05-16-2008 05:31 AM
Stop analog waveform generate task: Error
Error Message: NI_USB_6259.c - StopAnalogWaveformGen() failed. [Error Code: -200018]
Module Time: 0.0345954
The custom error message and function error code is the result of a request
to stop the task using the following function:
error = DAQmxStopTask(AO_Waveform1_Handle);
My question is: why should this intermittant error code occur ?
regards,
Gary.
PS Any tips on how to change the font while creating these messages - the font control in the editor is not helping.
05-19-2008 06:28 AM
05-22-2008 07:22 AM
Hi James,
To answer your question, the waveform is a continous sine wave.
To enable the continous action, I've set the appropriate parameter in the call to:
DAQmxCfgSampClkTiming
Originally I used a separate function call to start the waveform, but when this error
message occurred I decided to Auto start the waveform using the call to:
DAQmxWriteAnalogF64( )
i.e. Auto start = 1
The function was already in use and my reasoning was that the waveform would
not be auto started until the software/hardware was ready,
i.e. the system controls itself.
This appears to be a wrong assumption.
You mentioned the DAQmxWrite as the possible source of error, so I looked at the
returned warning codes as well as error codes.
I find that the call to DAQmxWriteAnalogF64( ) sometimes returns a warning, 200040.
Not sure if this is related.
Something I did not mention previously was that the 6259 is the external USB version,
is there a problem with DAQmxWrite's over USB sometimes being delayed ?
regards,
Gary.
06-11-2008 02:33 AM
Hi James,
Having talked to NI Tech Support, I now correctly understand your earlier reference to "Regeneration".
I've set the appropriate DAQmx Write attribute to "Regenerate" and the problem has now cleared.
thanks,
Gary.
06-11-2008 03:00 AM