07-07-2015 04:00 AM - edited 07-07-2015 04:01 AM
I was using an NI-6251 USB to capture a signal regenerated from the Signal Simulation toolbox. The generated signal was sent out at AO 0. The signal was then captured using AI 0. These two signals were plotted against each other as shown in the figure. I found delay between these signals of about 20 ms. I need to reduce the delay to be less than 500 usec. Please you could show me how to deal with this problem, please?
07-07-2015 06:24 AM
Since all of the important information is hidden inside of those express VIs, that image is next to useless. You need to post your VI.
07-07-2015 07:25 AM
Here is my VI
thank
07-07-2015 08:24 AM
The more I think about this problem, the more convinced I am that you really need to abandon the DAQ Assistant. I think it is adding overhead that is causing your issue.
If you look at the DAQmx palette, you will find all kinds of VIs that you will want to use. In this case, you will want the Create Virtual Channel to set up your channels, DAQmx Timing to set up your sample clocks, and DAQmx Start Task to tell your tasks to start running. These functions should be done before your main loop. You will also want to set the sample clock of your analog output to be the sample clock for the Analog Input. This will help keep them in synch. Now inside of your loop, you use the DAQmx Write to write to your analog output and DAQmx Read to read the data captured by your analog input. After your loop, use DAQmx Stop Task and DAQmx Clear Task to stop and clean up your tasks.
07-08-2015 02:45 AM - edited 07-08-2015 02:46 AM
is that right?