LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delay in displaying data from Shared Variable

I have a VI that runs on a PXI RT system acquiring data and writing it to a Shared Variable.  The Shared Variable is a 1D SGL array and is in a library hosted by the PXI.  Users run a suite of VIs that display this data on their computers.  The PXI and computers are all connect via ethernet on a private network. 

 

The problem is that the data being displayed is lagging on each user's computer by different times.  One user's data is displayed 30 secs late and another 60 secs and another up to 2 min.  I know this from the time displayed on the time indicators of the front panels of the VIs used by the users. 

 

The time for the data comes from a GPS card (PXI-6682) in the PXI and is part of the Shared Variable.  On each user's computer there is a VI that reads the Shared Variable and puts it on a queue.  Another VI reads the queue, and writes the data to a DataSocket or Shared Variable (hosted on the user's computer).  The indicators on the VIs all use Data Binding.

 

Why the differences in time lag?  Suggestions on the best way to debug this?

0 Kudos
Message 1 of 2
(2,232 Views)

Hi Faustina,

 

Are the time indicators you are displaying (the ones that tell you the latancy), the shared variable timestamps?

 

If so, then it doesn't sound like the problem is with code on your PXI; it sounds more like the problem is with the reading side of things. Are you displaying the variable before or after you write it to the queue on the host computer?

 

If after, it sounds like maybe the queue is getting filled up faster then you are reading it.

If not, do you have anything else between reading the data and displaying it?

 

If you look at your variables in distributed system manager, do they updata appropriately?

 

For troubleshooting, I would recommend running a simplified VI on the user computer with just a loop that reads shared variables. Then we can pinpoint it to a problem with the more complicated code or something else.

0 Kudos
Message 2 of 2
(2,199 Views)