Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Start Stop Start Stop Continuous AO Task

I have a Continuous AO Task on a simulated AO Card (until I get ahold of the real hardware).

 

I would like to Start a task, feed it data for a while, stop it, wait some time, start it up again and feed it more data, etc.

 

The first time I execute it, seems like it's working fine. The second time, I get this:

 

Error -200288 occurred at PowerControl_DAQLoop - AOWrite.vi

Possible reason(s):

Attempted to write a sample beyond the final sample generated. The generation has stopped, therefore the sample specified by the combination of position and offset will never be available.

Specify a position and offset which selects a sample up to, but not beyond, the final sample generated. The final sample generated can be determined by querying the total samples generated after a generation has stopped.

Attempted to Write Sample: 0
Property: RelativeTo
Corresponding Value: Current Write Position
Property: Offset
Corresponding Value: 0

Task Name: SimBufferedAO

 

I don't really know why this should be a problem. It seems like there's some step that DAQmx is expecting me to do that I don't know about. Note that I am not creating/clearing the task dynamically but instead am using a task pre-defined in MAX. Could this be part of the problem?

 

Any insight is appreciated.

0 Kudos
Message 1 of 3
(3,334 Views)

Hello 10Things_Rob,

 

Thanks for posting at NI forums! The error 200288 occurs when analog output operations that have software retriggering. Software retriggering means that the trigger was rearmed in software by restarting the task. You must call DAQmx Stop Task after a read or write before re-enabling the triggers. Could you post an image of the VI you’re using to check the way you are configuring the task?

 

Best Regards,

 

Alina M

Applications Engineering

National Instruments

0 Kudos
Message 2 of 3
(3,310 Views)

Here you go.

 

I want to be able to:

 

1.Generate a continuous waveform that ends only when I say it ends (with data being continuously supplied by me)

2.When it ends, I want it to generate every last point of data that I have written to it and stop in a clean/error-free manner

3.I want to be able to restart it whenever I want

 

So far, this VI can only do #1.

What changes need to be made to meet all 3 of my requirements?

 

Thanks.

0 Kudos
Message 3 of 3
(3,295 Views)