From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

6259 waveform generation task - stop error

Hi,
 
I'm using an NI-6259 Analogue o/p channel to generate a waveform.
 
Using Labwindows 8.0 and Teststand 3.5, I've created an appropriate task which can be called
to generate the waveform.
The task is created, configured, started and stopped during my calling sequence using
functions created in Labwindows.
 
The task is called many times during the execution of the test sequence without problems,
but sometimes (approximately 1 in 20), the following error is returned via my Teststand
sequence:
 

 

 

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.

 

 

 
0 Kudos
Message 1 of 5
(3,135 Views)
Hi Gary,

It looks like the error should be occurring from the DAQmx Write, as the error message associated with the code is

"Measurements: DAC conversion attempted before data to be converted was available.

Decrease the output frequency to increase the period between DAC conversions, or reduce the size of your output buffer in order to write data more often. If you are using an external clock, check  your signal for the presence of noise or glitches."

Can you focus on the write part of you code, are you always outputting a continuous signal, or does it change dynamically?
If it is a continuous sine wave or continuous arbitrary signal, you should be able to enable regeneration and then you only have to download the waveform once and then allow the card to continually output that one waveform.

Or you could try increasing your output buffer size.

Regards
JamesC
NIUK and Ireland

It only takes a second to rate an answer 🙂



0 Kudos
Message 2 of 5
(3,105 Views)

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.

0 Kudos
Message 3 of 5
(3,088 Views)

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.

0 Kudos
Message 4 of 5
(3,028 Views)
Hi Gary,

Good to hear this is now sorted.

Regards
JamesC
NIUK and Ireland

It only takes a second to rate an answer 🙂

0 Kudos
Message 5 of 5
(3,025 Views)