LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reacting to Change in Shared Varaible Value

Hi 

 

I am writing to a shared variable and if there is a change in its value when compared to previous value then I want to execute some  control.

 

Some sample examples for performing the above tasks will be really helpful

 

Kind Regards

Fareez

0 Kudos
Message 1 of 3
(2,640 Views)

you might want to consider encapsulating your shared variable inside a functional global and use a shift register to keep track of the last read/write value.  Then pass out a boolean value to alert the caller if a new value is detected.  Sorry no labview on this pc so i cant give you example code.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 3
(2,626 Views)

You can also try registering the shared variables for value change notification, and get the latest value changes in an event structure.

 

Check the example shipped with your DSC module

 

DSC Alarm Demo.lvproj

DSC Eventstructure Demo.lvproj 

0 Kudos
Message 3 of 3
(2,607 Views)