Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

latching boolean and shared variable

I am connecting an NI touch panel as an interface to my cRIO.
I plan to use shared variables as an easy, efficient way to communicate.
How do I implement a latching boolean, such as a STOP button, on the touch panel and have it activate just once on the cRIO?
0 Kudos
Message 1 of 2
(3,245 Views)
Hi khalsans,
You can use something called a rising edge detector, which basically a polling architecture that detects if a rising edge of a signal has occured.
Attached is a simple rising edge detector in LabVIEW.  It polls the value of a shared variable every 20ms and detects if there's a rising edge (boolean value changes from false to true).
Hope this helps!

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 2
(3,234 Views)