LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous Analog read an write: timing issue

Hello everyone,

 

I am working for the first time in labview and for my project I use two different cards : an USB 6361 for voltage output and input, and an NI 9217 to mesure the temperature. 

I want to generate one short voltage pulse of 2ms and to acquire at the same time another voltage with the USB 6361. I have build a first program that is working but when i look at the files created, the timing resolution is too big : we have approximately 2.5 ms when I need 0.5ms at least. I have seen many example with the DAQmx timing vi to select the number of samples and the rate but I have an error each time I try to implement it. Do anyone has an idea to help me ?

 

Thank you in advance 

Baptiste

0 Kudos
Message 1 of 5
(203 Views)

Please save the VI in a older version of LabVIEW (2021 should be enough to allow most people to view it)

0 Kudos
Message 2 of 5
(181 Views)

Here you go ! Normally it is on 2021 version

0 Kudos
Message 3 of 5
(162 Views)

There are a lot of things you can work on. As starting point:

 

  • Don't use the DAQ Assistant. It is not efficient.You can use it just as starting point. Note: "right-click on the DAQ -> Generate DAQmx code" will create you the code using the DAQmx API.
  • You should improve your "acquisition and generation architecture". Here are some suggestions. 
    • You should try to synchronize analog and input tasks (don't know if actually your device support that).
    • Evaluate to read Multiple sample (rather than 1 sample). The same for the output.
    • Have a look on the LabVIEW examples. You should find some useful examples for voltage generation:

      andcadev_1-1746619146421.png

       

0 Kudos
Message 4 of 5
(143 Views)

You should use sample clock timing. Refer toSynchronize Correlated Digital Output with Analog Input Using NI-DAQmx and replace the Digital task with Analog Task.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 5 of 5
(132 Views)