LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Step Time Drift

I am running a process using LabView 7, that controls a sequence of valves using a PXI-8420 Serial card inserted into a PXI-1002 Controller. The process allows the operator to specify a cycle time (i.e. 120 seconds). After the specified time, the vlaves cycle to a new position. We have noticed a drift when compared to a calibrated stop watch after ~ 1hr of 1 second. The drift increases to 8 sec after three hrs. This all seemed to start after a power failure on 6/3.
0 Kudos
Message 1 of 6
(3,704 Views)
There is absolutely no relationship to the windows os and a calibrated stop watch. A drift of 8 seconds in three hours is nothing unique and unexpected. If you need something more precise, you need to be looking at LabVIEW Real-Time and a deterministic OS.
Message 2 of 6
(3,685 Views)

Hi,

As Dennis mentioned, you are relying on the PC clock, which is a free-running clock.  A drift of 1sec within 1 hour means the accuracy of the PC clock is about 278ppm, which does not sound too surprising.

 

Since you say that this behavior only started after a power failure, could it be that while the power was out the battery of the PC was drained, and that is affecting timekeeping?  This is just a theory, but it might be worth trying replacing the battery.

 

If you absolutely cannot tolerate drift, you might have to use one of the timing & sync products, such as the PXI-6682, which allows you to be synchronized to GPS, 1588 and other time sources.

 

AlejandroZ

0 Kudos
Message 3 of 6
(3,673 Views)
The PC clock matches with the stop watch, but the programmed step time drifts.
0 Kudos
Message 4 of 6
(3,665 Views)
The step times are still going to be based on an inaccurate pc clock. If, for example, you have a Wait (ms) function, the actual wait is going to at least what you request and may be much more. A 100msec wait could actually be 200 msec because of the inaccurate clock and the OS interupting your program.
0 Kudos
Message 5 of 6
(3,659 Views)

POst images of your code so we can take a look.

 

There are many things that could introduce a small drift as you described. If you post images we can let you know if we spot anything obvious.

 

Without seeing the code we can only guess so... my guess is;

 

You are using delay timers and assuming the delay is the time you specified.

 

Take care,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(3,637 Views)