Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

AnalogOutput BeginWriteMultiSample - when is Callback executed?

Solved!
Go to solution

The BeginWriteMultiSample method for analog output has a callback.

 

When exactly is this callback executed?

 

Example:

I write samples for 10 seconds to the buffer (writing should last a few milliseconds if buffer has space).

Is the callback executed after writing to the buffer is finished (= few milliseconds if buffer has space) or is the callback executed after the samples has been generated at the output (= at least 10 seconds).

 

I hope, it will be executed after writing to the buffer is finished, because then you can easily use it to generate continuous analog output. 

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

Seems like the CallbackMethod is called quite immediately, which means it is called after writing into buffer (but not analog output) is finished.

 

I seems like I can't use the CallbackMethod to immediately begin another writing without using any timeouts. Right?

 

I am missing examples or documentation about how to use the callback for continuous analog output 😞 

0 Kudos
Message 2 of 3
(3,692 Views)
Solution
Accepted by topic author Camell

Hi Camell

 

i hope this explanation helps a little bit

When Do DAQmx Analog/Digital WriteMultiSample Methods Return?

Have you looked into the examples?

best regards
Alexander
Message 3 of 3
(3,681 Views)