ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delay problem

hi all,
I would like to know if it is possible to have a microsecond delay instead of the standards millisecond delay, because  i need more accurate delays in a for loop.
0 Kudos
Message 1 of 6
(3,495 Views)

I think what you need is a timed loop.  You may need to look at using an RT target for very high precision delays.
https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/platform/timedloop/xdatanode/dialog...

 
0 Kudos
Message 2 of 6
(3,480 Views)

would this mean that i would need to purchase the real time module or is there a way to get the delay in microseconds just by using the software.

thanks

0 Kudos
Message 3 of 6
(3,471 Views)
This question gets asked at least once a month, it seems. You won't be able to get microsecond resolution unless you run on a real-time platform. This means hardware. You cannot get microsecond resolution just with software.
0 Kudos
Message 4 of 6
(3,455 Views)

Hi Baller,

      Just out of curiosity, what are you doing in the loop?

Sometimes it's possible to restructure logic and/or exploit DAQ hardware capabilities to eliminate the need for such high-speed/precision software loop...

Cheers.

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 5 of 6
(3,441 Views)
Just a slight clarification:
 
1. Even under Windows (or other non-RT operating systems I'd guess), you can configure a timed loop to cycle at sub-millisecond intervals if you generate a timing source with a DAQ board.  Think of this as your request for Windows to honor your timing needs. 
 
2. Windows will often try to meet your timing needs, but will NOT be 100% successful.  The timed loop can let you know if a loop starts late and you can respond as you see fit.  So while you can't count on Windows to regulate the timing intervals, you can do a pretty good job of measuring them.  This is sufficient for some apps.
 
3. Many times people want fast loop rates to try to set up a control loop for some physical device.  I'd caution you that the variability in loop interval times under Windows will be at least a HUGE problem to overcome, and more likely an impossible one.  If you have a fast-responding device that requires a sub-msec control loop, you should look into RT or perhaps a motion controller board.
 
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 6 of 6
(3,428 Views)