LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time a boolean value

I am reading the status of 10 lamps from a serial string. My VI
returns a boolean value according to the status of the lamp. Now I
need to time the on time of each lamp. As soon as a lamp turns off it
should save the time and start adding the time again once the lamp
comes on again. Once the VI is closed and reopend the on time should
appear in the VI for each lamp. And once a lamp comes on it should
start adding to that time. I should also be able to reset the time and
I should also be able to enter a number of hours that a lamp has been
on already. Any suggestions ? Thanks
0 Kudos
Message 1 of 2
(2,363 Views)
Hello wv,

do you want someone to develop a program for you? Then you have to pay him/her 🙂

Some hints: Make an array for your time values. To reset a timevalue you just need to clear it. To have an offset you just set it in that array. Let the status-vi run in a loop and get the time difference for one loop iteration. Add that delay to the timevalues, if the status of the lamp is on. If you need that timevalues after restarting your VI you should think about a subVI for saving and reading the timevalues.

Best regard,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,363 Views)