LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using event structures

I want to use a event structure to display a pop up(with a sub vi) box whenever a indicator's value is changed.  I put the event structure in the while loop, but the sub vi opens whenever a value is sent to the indicator, but I only want it to open whenever the value sent to the indicator is different from the one previously sent to the indicator.   Below is an example of my program
0 Kudos
Message 1 of 4
(2,721 Views)
Below is the new program where is shows property nodes with the valus signaling property connected to each indicator. 
0 Kudos
Message 2 of 4
(2,717 Views)
Hi from NIWeek2005
Here is a possible answer. which should pop up your user message when the value is different from the previous. Another thing is that if you don't plan on using the timeout case of your event set the value to -1, then it will do nothing until one of the events occurs.


P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 4
(2,705 Views)
A more generic method of creating a change detector is right clicking on the loop wall and selecting Add Shift Register. A shift registers passes the value from the last iteration of the loop to the current iteration, which you can now compare. You can even make this into a subVI. If you download the OpenG VIs, you will also get such a VI.
 
A better suggestion is that you only enter the value into the property node when it changes, because using the value property is not good performance-wise.

___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(2,700 Views)