LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring the total time period of a specified condition

I am monitoring the performance of a motor in our production line. When the motor is working ok, the PLC outputs a value of 0 (i.e. FALSE), however when the motor is offline (the PLC outputs a value of 1 (i.e. TRUE). I am trending the history of this online/offline relationship using a bar plot and I would like to show next to the graph, in a numerical indicator, the total time the motor has spent offline at the value 1. I have managed to get so far with this, however I am unsure how to effectively ‘sum’ the timestamps.

If anyone has any suggestions for this, I would be grateful for the help. I have attached my vi to show what I have so far.

Many thanks

Stuart

0 Kudos
Message 1 of 2
(2,437 Views)
Hi, Stuart:

Have a look to attatched vi.

You can rest the TimeStamp array (from element 1 to the end) to the same array, so you have a double array of time periods, of (n-1) elements.

Then you can multiply by 1s if offline or 0s if online, and then sum.

Hope it helps.

Aitortxo.
Aitortxo.
Message 2 of 2
(2,420 Views)