Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

[AI/AOsynchronization] Read AI data and write same data at AO

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

 

 

 

0 Kudos
Message 1 of 3
(1,742 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 3
(1,709 Views)

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. 

0 Kudos
Message 3 of 3
(1,618 Views)