Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

network publish shared variable

Solved!
Go to solution

I'm hosting the SV engine from an sbRIO, developing with LV10.  I'm sharing an array of booleans on the sbRIO and I need the control array to be modified by (1) the sbRIO programatically and (2)an LV HMI running on a PC graphically (i.e. radio buttons).  I can share the array and the PC's HMI can connect and display the button states as set by the sbRIO, but when I attempt to click one of the radio buttons, the sbRIO appears to trump the request and turn the button back off (I know the request is getting through, I can see a very quick change in the button/array state on a temporary HMI connected through the sbRIO project).

 

Do I need a separate shared array for PC/HMI requests that I then have to parse through w/combinational logic and check for changes, then send the updates down to the sbRIO to be written to the "master" control array programatically?  Or is there some type of arbitration feature for a NP Shared Variable?

 

thx

0 Kudos
Message 1 of 2
(3,640 Views)
Solution
Accepted by topic author atlasHW

Hi Atlas,

 

This sounds like an issue that stems from race conditions accessing the shared variables. Are you continuously reading or writing from the variables in a loop on either application? If the boolean values are being changed from the HMI, you should use a "send" or "write" button that writes to the shared variable. If the HMI application is continuously reading from and writing to the shared variable, you're going to overwhelm the network variable engine and see problems like these. If you're still having issues, feel free to post your VIs or block diagram screenshots so we can see what you're doing.

Andy H.
National Instruments
0 Kudos
Message 2 of 2
(3,629 Views)