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: 

Shared variable is skipping values

I use shared variable to communicate data between a PXI ( used to control a system and to make measurements ) and a PC ( user interface and datalogging ). I simulated a measurement from the PXI by feeding a sine function into a shared variable, and I plotted the value received by the PC on the bound shared variable in a graphic. Up to there, everything is normal. But, when the PXI changes the value of another shared variable ( a boolean for example ), the data received on the PC for the sine function is interrupted for 2 seconds, twice. The sine function generated on the PXI doesn't change at all, it is the data read on the bound shared variable that skips values.
 
The sine function creates a new value every 10ms, and the plot is also updated every 10 ms.
 
Is there any way to prevent that bug?
 
I have attached a screenshot of the sine function, as read on the PC.
 
I'm using labview 8.2.1, with the DSC module installed on both computers.
 
0 Kudos
Message 1 of 6
(3,697 Views)
I would think hammerring your network and PC every 10ms to sync with the PXI isn't a good idea.  Assuming that is what your doing.  I would consider a way to buffer up the data and send it over in blocks.
0 Kudos
Message 2 of 6
(3,616 Views)
network or system performance is not an issue. The bug is reproductible at 500ms and at 1s. Also everything is running fine at 3 sine function timed at 1 ms. ( that is, until I change the value of the boolean ).
 
I have attached a simple project that can be used to reproduce it.
0 Kudos
Message 3 of 6
(3,607 Views)

I'm not convinced this is a bug (yet).

It is standard practice to check the time stamp of the last update before concidering the "new value" new since TCP/IP ( the transport layer) does not perform deterministically.

Just my 2 cents,

Ben



Message Edited by Ben on 02-29-2008 10:53 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 6
(3,604 Views)
I ran your sample you gave on my PC.  There is no way that will run on a PC without hiccup.  If you grab the window with your mouse and move it around, you will stall the process.  This doesn't neccessary mean we lost data, just that the process is frozen as the PC does it's thing.  I do a lot of PC control and you really can't run much faster than 100ms and you have to accept the 2 second+ interuptions as your virus scanner kicks in or some other update occurs in the operating system.
0 Kudos
Message 5 of 6
(3,592 Views)
Also, when I toggle the switch I do not see any interruption in the graph.  Wonder if something is wrong with your setup?
0 Kudos
Message 6 of 6
(3,578 Views)