01-15-2020 07:14 AM
Hello everyone.
I want to synchronize AO/AI loop running fast enough using a USB-6351. In my application, there are three Analog Inputs and one Analog Output. I have to receive the data from 3 AIs, perform some basic calculations to convert it into one signal and have to send the signal at the designated AO. I would like to have this loop repeat as quickly as possible, nearly at < 3 msec. I made a basic VI, which I am sure is not the proper way to create a VI anyways, that takes the data from AI and send it to the AO. However, the delay in the output w.r.t the input is 2~3 seconds.
Thanks in advance for any help you can provide.
Raza
01-15-2020 08:59 AM
I'm doubtful you can get that kind of low-latency fast turnaround with a USB device.
The best approach will be to leave AO in an on-demand software-timed mode by *not* calling DAQmx Timing to set up a sample rate and buffer.
<Time passes...> Now that I'm on a machine with LV 2018, here are 2 more things you *definitely* should do to have the best shot at fairly low latency.
1. Use standard DAQmx functions for your tasks instead of the DAQ Assistants. This will give you *much* more control over acquiring and generating signals.
2. Use a "producer - consumer" pattern to move your file writing operations into a parallel loop.
-Kevin P
01-19-2020 07:28 PM
Thanks for the response,
I will try to make a proper VI using the DAQmx function and will see if it reduces the latency or not.