LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lagging caused by scrolling

My program collects measurements at 10Hz and saves it to a file, and I also have a graph showing the data and a multicolumn listbox up dating once a minute showing the numeric values of the data I have collected. When ever the program is running and I do something just as simple as using the scroll bar, the program lags. Or when the multicolumn listbox updates it also lags. It does catch up to realtime, but it is really important that the timestamps I use when saving the data to the file be as accurate as possible. I don't believe it is the computer is at fault, it is brand new.

 

Is there anything I can do to fix this?

 

Thanks

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

Yes, you can fix this by using a deterministic OS.  Timekeeping is a very low priority task in Windows (although, much improved since NT.) 

 

The Bill Gates thought process seams to have been "nothing is more demanding that user input" so, the OS was built to run with the UI and HMI's having a very high priority.  In effect, the computer IS at fault.  And "doing things" with the Human-Machine-Interfaces will skew the timing of application processing. 

 

Some mitigation exists in LabVIEW to compensate for this lack.  Some wait routines (installed with the base package) are commonly used to release threads so the OS can do housekeeping.  Read the help on Wait+ (ms).vi and search on CPU hogging.  Also, there are other timing sources available in the timed loop that can report (or take action on) a changed time state. 

 

Yet it does come back to the MAJOR point that the OS clock is not a time standard.  If you need to log the "civil time" that the measurement was made you need to trace to the United States Naval Observatory (US) NIST publishes an exe called NISTTime-32 (or pretty close) that's built to synchronize the PC clock with the current civil time.

 

Alternately, you may need to log something other than "civil time"  The SI second and a second of civil time are two distinctly different units.  Many factors go into keeping the current civil time (UTC)  within 1 SI second of celestial observations however, civil time is still measured by the earths rotation and SI seconds are measured by transitions between hyperfine states of a specific isotope of cesium.  The two things trace back to two different standards! (and show us all the true wit of the great Ben Franklin " A man with one clock knows what time it is but, the man with two is never sure"

 

Yes, I'm an amateur "horologist" ( - don't tell my wife) So, when you speak about the "importance of timing accuracy" we do need to clearly define the base unit to try to become tracable to a recognized standard.

 

 


"Should be" isn't "Is" -Jay
Message 2 of 2
(2,517 Views)