LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting if value changed over a 2 second period

Hello I have this simple while loop which works at 100ms and reads temperature at the 4 wheels (fl (Front left), fr, rl and rr). 

I want to add a error handler which detects disconnection on the emitter side by determining if any of the 4 sensor have frozen values and not updating. If the value for any sensor does not update in 2 seconds then I need a dialogue box mentioning which sensor is not updating. 
My try:

I thought of feedback node by setting delay to 20 iterations and then comparing values to get a true and false Boolean, but it did not work, I had one feedback node for each sensor. As soon as I run my code dialogue box for all sensors came up. Sadly I did not save this version of code. 

 

Main code:

Happy96_0-1706258663017.png

SubVI: I had implemented my feedback solution in this subVI. 

Happy96_1-1706258841465.png

 

Apologies if this is very trivial to ask, but I am not able to get this to work. Also let me know I can share the actual VIs

0 Kudos
Message 1 of 2
(299 Views)

Develop Timer Engine which will calculate the delta time difference between each loop and whenever you get the value you need to reset the value.

 

Check for two seconds if any new value is detected, if not pops up the dialogue box.

 

Also in simple you can set the timeout option for VISA Read as 2000ms and if timeout occurs you can pop up the message

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 2
(266 Views)