From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I get better time resolution than 1ms in labview?

Hello,

I am trying to generate an external waveform which requires timing to be in the microsecond range, I was trying to use the wait function to define the timing dt but found that I could not get below 1 ms. I tried to specify timing in the microsecod range by overloading the wait function with a float (0.200) to represent 200 us but found behavior to be erratic. Again, I am trying to create a waveform for extenal hardware which does not support buffering and requires software to drive.

Thanks!

Joel Abdullah


0 Kudos
Message 1 of 6
(3,546 Views)
Under Windows you cannot do any reliable timing below 10 ms.
If you are realy forced to do the timing in software you can switch to LV RealTime and an PXI Realtime controller.
Use a timed loop instead of a wait where you can get microseonds on a PXI Realtime controller.
You must be sure that your external hardware can be accessed from LV Realtime.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 2 of 6
(3,536 Views)

"I am trying to create a waveform for extenal hardware which does not support buffering and requires software to drive."

Sorry but that simply can not be done in a Windows environment due to the limitaions of the OS (1KHz was "way-fast" when WIndows replaced DOS).

It can be done in a Real-Time OS like Pharlap for example.

Attempts to deterministically perform any operation at a rate faster than 1KHz in a non-deterministic OS can be best described as an "exercise in futility."

Trying to help,

Ben

Note to Waldermar:

Timed loops can perform rather well at 1KHz or even better if you have a hardware clock available. Smiley Wink

 



Message Edited by Ben on 05-28-2008 10:47 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 6
(3,528 Views)
Oi,

I had a pit of the stomach feeling that was the case.

I love it, my computers clocking at 3 Ghz but the but the fastest time I can rely on is 100 Hz.

Incredible.


Thank you
Joel Abdullah



0 Kudos
Message 4 of 6
(3,525 Views)

Have you tried using a timed loop to get down to 1KHz?

Provided your device can take updates that fast and your code is structured well, 1KHz may be possible.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(3,519 Views)
Yes I just coded up 1 kHz, my sinusoid is compressing and decompressing,dropping out values etc.  Using THD as a quality indicator my 100Hz waveform is acceptable.


0 Kudos
Message 6 of 6
(3,515 Views)