03-19-2013 08:55 AM
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
03-19-2013 08:59 AM
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
03-19-2013 10:11 AM
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
03-19-2013 11:30 AM - edited 03-19-2013 11:43 AM
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.
03-20-2013 02:23 AM
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