CounterSingleChannelWriter.BeginWriteMultiSample Method (Boolean, CODataTicks[], AsyncCallback, Object)
- Updated2023-02-21
- 2 minute(s) read
Begins an asynchronous write of one or more ticks samples to a single COChannel in a counter output task.
Namespace: NationalInstruments.DAQmx
Assembly: NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302
Syntax
public IAsyncResult BeginWriteMultiSample( bool autoStart, CODataTicks[] data, AsyncCallback callback, Object state )
Public Function BeginWriteMultiSample ( autoStart As Boolean, data As CODataTicks(), callback As AsyncCallback, state As Object ) As IAsyncResult
Parameters
- autoStart
- Type: SystemBoolean
If set to this method automatically calls Start if you do not explicitly call it. You cannot set this parameter to if you have installed events on the task. - data
- Type: NationalInstruments.DAQmxCODataTicks
A 1D array of samples to write to the task. Each element of the array corresponds to a sample to write to the channel. - callback
- Type: SystemAsyncCallback
An optional asynchronous callback that is called when the write is complete. Specify if you do not want a callback when the write is complete. - state
- Type: SystemObject
A user-provided object that distinguishes this asynchronous write request from other requests. Use this parameter to provide information to the callback. Specify if you do not need to pass any additional information to the callback.
Return Value
Type: IAsyncResultAn IAsyncResult that represents the asynchronous call.
Remarks
Pass the returned IAsyncResult to EndWrite(IAsyncResult) to get any exceptions that occurred during the asynchronous write or to wait for the write to complete.
NI-DAQmx scales the generated data to the units of the measurement, including any custom scaling you apply to the channel. You specify these units with the create channel methods or the DAQ Assistant.
NI-DAQmx read and write methods time out after the amount of time specified by the Timeout property on the task you are reading from or writing to.
| Refer to Asynchronous Reads and Writes for additional information. |