LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared variables don't trigger events

Hello,

I was trying to use a shared variable to trigger event, and noticed some very counterintuitive behavior in LV8.  I start by creating a shared variable which is "network" type.  Then I link it to an indicator on the front panel of my VI.  Then I insert an event loop and create an event associated with a changed value of that indicator.  A separate VI is used to write to the shared variable, to test it.

But it doesn't work.  You can see with your own eyes (see attached VIs) that the indicator reacts and changes accordingly, but no event is triggered.

Is this a bug or a feature?

Thanks,


Jeremy Levy
jlevy@pitt.edu

0 Kudos
Message 1 of 2
(2,262 Views)
You're right that it doesn't work with a shared variable.  It won't work with a regular variable either.

The only way to programmatically throw an event on a value change is via a property node->value(signaling).  The value(signaling) was added in 7.x I believe, and it emulates the behaviour of a user front panel action (i.e. flipping a boolean swich with a mouse click).

If you're looking to do this across different vi's, you might be better off creating your own events (create user event/generate user event).
0 Kudos
Message 2 of 2
(2,255 Views)