02-13-2007 08:34 AM
02-13-2007 11:51 AM
It shouldn't make any difference whether you click run from the diagram or front panel. What is the error code that you are getting?
In another post of yours, you were using LabVIEW 7.1. Is that still true? Can you post your VI?
02-14-2007 04:18 AM
Labview 7.1, indeed.
The error is : Error -200279 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi
Attaching also the vi. Just have in mind that i have physically connected the output directly to the input channel.
Running from the block diagram, always ok. Running from the front panel sometimes ok but most of the times delivers error.
thanks in advance.
02-14-2007 08:32 AM
I got the error when I started it from the block diagram and the front panel. The reason for the error is your Wait Until Next ms Multiple. You've set the DAQ Read for continuous acquisition but then pause the transfer with the wait. Eliminate the wait statement and the error goes away.
You also want to move the Start Task in the AO chain to outside the for loop and before the DAQmx Write.
02-16-2007 03:40 AM
02-16-2007 09:50 AM
You seem to have a contradictory setup. You can change the number of samples read by the DAQmx Read. Currently, you have it set to -1 which is to read all samples in the buffer and with any delays, you are going to get that error message because you can't read the buffer continuously. Putting a wait statement does not do anything for synching the ao and ai and I don't understand why you would get zero values in the DAQmx Read. The analog output is set for continuous so I think it should always be generating a signal. Having the Start Task inside the loop and the DAQmx Write set to autostart may be the cause but I'm not sure.
Also, if you want to periodically write, you might want to do that in a different loop and pass data with a queue.