Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx, C++, program onDemand output

HI,

 

I have a task configured to do buffered output (N samples, loaded from MAX)

now I want to reconfigure it to do single sample OnDemand output

 

DAQmxCheck((DAQmxStopTask)(task), "DAQmxStopTask:");

DAQmxCheck((DAQmxWriteAnalogScalarF64) (task, (bool32)_autoStart, (float64)_timeout,
_writeArray[0], NULL), "DAQmxWriteAnalogScalarF64 -- single --:");

 

Response:

Generation cannot be started, because the selected buffer size is too small. Increase the buffer size. Error -200609 (fffcf05f)

 

If I create OnDemand task in MAX everything os OK.

 

How to 'undo' output buffering ?   Win7-64+NI6002

 

Thanks!

Boris

0 Kudos
Message 1 of 4
(3,918 Views)

I am confused.

 

If you are creating a task in NI-MAX and using it, just create create the one that works and use it.

 

 

0 Kudos
Message 2 of 4
(3,900 Views)

Hi NYC,

 

I have a program that switches between outputing of a pattern (saw tooth) and single value (locking on some value)

 

I load task from max (which is a user friendly place to configure channels)

 

So at some point I want to stop pattern and send out just a value 

 

To avoid locking of other board resources (like counters) I would just switch to ondemand mode now - but that does not work

 

Surely I can kill the task and recreate it in other mode but that is less convenient 

 

Regards,

Boris

 

 

 

0 Kudos
Message 3 of 4
(3,895 Views)