LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how accurate is wait

Hi,

I am very new to LabVIEW/CVI and labview in general.  I am working on a system where I will scan area in a square grid by turning on an focused ultrasound beam for a specific time period at each node in the grid. It is extremely important that the timing of the beam is the same at all the positions, and depending on our power setting, we want to have intervals from 0.1 sec to 2 seconds.

My question is:

1. I know that using "delay" is not accurate, and I was wondering if any other functions like "wait" were more accurate.

2.  Is there a way to use the CPU time so it will always give exactly the same time?

Any suggestions or comments would be very helpful,

 

Thanks,

T

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

Well,

 

Windows is not a real time operating system. So everything depends on your definition of ''It is extremely important that the timing of the beam is the same". The same within minutes, seconds, hundreds of milliseconds?

 

There are a few options to optimize time response (for example, you could read more on asynchronous timer control in the CVI help), but they all do not guarantee any time resolution. If Windows decides to download updates or your antivirus scanner sets in or..., even advanced software timing schemes will not help.

 

I would rather log the measurement time too, this can be done 'very' accurately. After your measurement, you can check if the deviations are too large for your application and if so redo the measurement.

 

 

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

Did you try windows sdk function Sleep. I have found it to be very accurate and repeatable. I am using it to delay for 100 mS.

 

Parameters

dwMilliseconds
[in] Specifies the time, in milliseconds, for which to suspend execution. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. A value of INFINITE causes an infinite delay.  
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 3 of 3
(2,708 Views)