Question
Downtime Calculation using Stream Value
Would like to know the best practice to calculate machine downtime by running signal,
For example: running signal was collected and storage in Stream Table, data are timestamp and value 0 (stop) and 1(run)
timestamp0 : 1
timestamp1 : 0
timestamp2 : 1
timestamp3 : 0
timestamp4 : 1
....
Stop time should be: (timestamp2-timestamp1) + (timestamp4-timestamp3) + ....
What is best way to calculate/query in historian value in stream table?
Thank you so much!

