LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variables stop when I use RT Set date and time.vi

Solved!
Go to solution

Hi all, 

I have a problem which I can't resolve. I'm running an RT project on a PXI-8106 using LV8.5. I have been using Shared Variables to transfer data to and from my host pc for about 6 months with no problems. Recently, I neeeded to synch the RT time with my host PC time (to gather timestamped data from the RT target) and I decided to use the 'RT Set Time and Date.vi' to synch the times before the beginning of each test. 

As soon as I started using this vi, I noticed that my shared variables would either stop updating, or slow down considerably (this includes data loss when transferring data from the PXI to host PC using shared variables). I dont recieve any errors or warnings from any of my shared variables, and no errors are generated when I use the RT Set Time and Date vi, so im at a loss to where to begin. Ive disabled this function for now and my system is working ok again, but I would like to get this working as the timestamps generated in the data by the RT system are way out and i need a method to sync the time with the host pc.
Any ideas would be appreciated,

Thanks

David 

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

Hi,

 

This is a known issue with the LabVIEW Shared Variable. The internal timers used by the shared variable do not get rescheduled properly if the system clock changes. Setting the clock backwards can cause a significant data transfer delay. No error is reported because, from the perspective of both peers, the data transfer pipe is operating correctly and data currently in the pipe will be transfered as soon as the scheduled timeout elapses. 

 

There is currently no fix for this issue. However, if you have LabVIEW 8.5.1, you should be able to use the Flush Shared Variable Data VI (Data Communication>>Shared Variable palette) to kick-start variable communication after the clock changes. Run this VI once after changing the clock and it should cancel any pending timers, after which Variables should operate normally.

 

JD Robertson

Senior Software Engineer

Labview R&D

0 Kudos
Message 2 of 3
(2,418 Views)
Solution
Accepted by topic author DavidT

Thanks for the info. I'm going to avoid updating to 8.5.1 at the moment so I will just remove the VI. Instead I will create an "elapsed time" timestamp which should do the job.

Cheers,

David 

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