04-16-2008 01:12 AM
04-16-2008 12:57 PM
Hello Jyp,
The reason you receive this error is because you need to put samples in the write buffer before you start the task. I’ve included instructions on how to find an example that shows how to buffer and execute a finite analog output task below. You will need to modify the example to include the PFI0 as the sample clock source to use an external clock and then just buffer the write task by sending the array of data you want to write to the DAQmx Write VI. NOTE: You'll also need to change the Timeout input on the DAQmx Wait Until Done VI. If you try to generate 256 samples at 1Hz you need to timeout needs to be at least 256 seconds--otherwise this VI will error out and stop execution before you're done generating your samples.
To access this example:
1. Open LabVIEW and go to Help>> Find Examples...
2. Navigate to Hardware Input and Output>> DAQmx>> Analog Generation>> Voltage>> Gen Mult Volt Updates-Int Clk.vi
I hope this helps, and have a great day!
04-17-2008 12:39 AM
Thanks for your advice,Mr Brooks_C.
Following your instructions I finnally get it working now. But after the program has done the work I need it outputs an error:
Measurements: Wait Until Done did not indicate that the task was done within the specified timeout.
Increase the timeout, check the program, and make sure connections for external timing and triggering are in place.
I don't know why,but I want to be perfect though it's not a big problem.Hehe.
Hope for your reply!