From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel Binding to Network Shared Variable

I have a numeric slider that has a read/write binding to a Network Shared Variable.  I am finding that it seems to be fighting with itself when I attempt to move the slider with the mouse.  It would appear that as I am sliding and generating new write transaction to the bound NSV, the slider control is also receiving NSV updates which a just slightly out of phase with the current position of the control.  Thus it appears to have a jitter.  Is this normal?  I have tried various tricks to disable read binding when the control is clicked on but that seems to produce other unwanted effects.

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

Hi Sachsm,

 

Are you writing to this Network Shared Variable from more than one place? And if so, is the jitter you are seeing the indicator bouncing back and forth between two values? Or by "slightly out of phase" do you mean there is a short delay between when you change your control to when you see the value change on your indicator that is reading from the NSV?

 

Am I understanding your question?

 

If you are writing to the NSV from two different locations at the same time, LabVIEW will send both of those values to the NSV. If this occurs within two loops of different periods, the indicator will bounce back and forth between the two values. 

 

There will also always be some delay between when your control is changed to when your indicator reads the value. However, most of this delay is caused by the time period of your loop iteration. If you have a wait function of 10 ms, the indicator will follow much more closely than if you have a wait function of 100 ms within your loop.

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
0 Kudos
Message 2 of 3
(2,320 Views)

The NSV's are being hosted on the cRIO.  There are 2 numeric controls on my HMI that have read/write binding to a NSV.

One control is a numeric slider and I find that if I move the slider then I can, as expected, see my NSV value change and also

the value of the other HMI control that is bound to the NSV.  The problem is that as I am moving the slider I can tell that the control

is also receiving updates (possibly bounce back from the NSV) and this causes the slider to jiggle or jitter as I am moving it.  I have

now found a fix by creating a mouse up and down even that changes the binding mode of the control to write only after the mouse down

and then restoring read/write binding when I detect the mouse up.  Somehow I thought that NI would have put this intelligence into the control

itself.
0 Kudos
Message 3 of 3
(2,312 Views)