LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global variable in an event loop

Hi,

I have a global variable from one VI and want to read it in another VI but
only if the value has changed, i want to do it with an event case but it
doesn't do any thing when a read my Global variable in an event when the
value has changed?

Does anyone knows how to do this?

Best regards,
Thijs
0 Kudos
Message 1 of 3
(2,889 Views)
You'll either need to generate a user event, or set the value using a value (signaling) property and let the "listener" create a dynamic value change event based on a reference to the indicator in use.

With user event:
Create a user event and give both the VI that is to react to a change event and the global (functional global) a reference to that event. Inside the global you check if the value differs from the previous one whenever it is written to, and if it is then fire the event.
Message 2 of 3
(2,889 Views)
Hi,
The reason why the event structure is not detecting the event is explained in the document below:

Event Structure Does Not Capture the Value Changed Event...

Sincerely,
Feroz
National Instruments
0 Kudos
Message 3 of 3
(2,889 Views)