LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

output at 1 millisecond intervals

Hi,
I'm trying to create a VI in LabVIEW to drive a NI USB 9263 running on windows 7. I need the output from the DACs to update at 1 millisecond intervals, however even when running a very simple program in a while loop with no delays, I can only get the output to update approximately every 2 milliseconds.  I had tried something similar in a timed loop set to 10ms which seemed to be OK, but I am not able to get it below about 2 ms.  Does anyone know if it is even possible to achieve this kind of speed with LabVIEW (or even windows)?

 

Thanks,

Peter

0 Kudos
Message 1 of 5
(2,847 Views)

Peter,

 

this sounds as if you are using software single point. With this, the performance is heavily depending on your system.

 

When going to 1kHz or above (you can go up to 100kHz with this module), you have to use hardware timed (clocked) output. Refer to the example finder for examples on how to implement this.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,844 Views)

No, windows does not have that degree of precision in it's task switching.

What you typically do is setup a daqmx task with 1k sample rate and e.g. 1 or 10 times/sec you extract the buffer.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 5
(2,814 Views)

Thanks,

 

I have set up a daqmx task and created a task constant ("Measurement I/O"-->"NI-DAQmx"-->"Task Const"), selected my task and generated example code for it.  The example code (attached) just steps through 10 different voltage levels at 1 millisecond intervals.  So it seems like the only thing I have to do now is replace the example code's data generation subVI with my own data.  But it seems like it needs to be in a 1D array of waveforms, which coming from a C background doesn't make a great deal of sense to me, but I'm just starting to look into the waveform datatype now.  Then I'll need to take my array of doubles and presumably turn that into a single waveform?

 

I'll post back here if I can't figure it out.  Thanks again for your help.

0 Kudos
Message 4 of 5
(2,799 Views)

If you drop down the Polymorphic selector you can change to a double array. The waveform has some administrative data as t0 and dT which can be helpful for knowing when each sample occured.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 5
(2,768 Views)