ECU Measurement and Calibration Toolkit Help

Edition Date: October 2018

Part Number: 371602T-01

»View Product Info
Download Help (Windows Only)


Writes scaled samples to an ECU DAQ list.


mcTypeStatus mcDAQWrite(
mcTypeTaskRef DAQRefNum,



DAQRefNum is the task reference from the previous Measurement task function. The task reference is originally returned from mcDAQInitialize, and then reused by subsequent Measurement task functions.


NumberofSamplesToWrite specifies the number of samples to write for the ECU MC DAQ task to the ECU DAQ list. For single-sample output, pass 1 to this parameter. The initialized DAQ sample rate is ignored. mcDAQWrite immediately writes a single sample to the ECU when calling the mcDAQWrite function.


SampleArray specifies a 2D array, one array for each scaled channel initialized in the task. The array of each channel must have NumberOfSamplesToWrite entries allocated. The order of channel entries in SampleArray is the same as the order in the original MeasurementNames. If you must determine the number of channels in the task after initialization, get the mcPropDAQ_NumChannels property for the task reference.


Return Value

The return value indicates the status of the function call as a signed 32-bit integer. Zero means the function executed successfully. A negative value specifies an error, which means the function did not perform the expected behavior. A positive value specifies a warning, which means the function performed as expected, but a condition arose that may require attention.

Use the mcStatusToString function of the ECU M&C API to obtain a descriptive string for the return value.


For XCP STIM lists (refer to mcDAQInitialize), mcDAQWrite transfers an array of samples to the ECU. These samples are called data stimulation packets (STIM). On the ECU side the STIM processor buffers incoming data stimulation packets. When an event occurs, which triggers a DAQ list in data stimulation mode, the buffered data is transferred to the memory on the slave device.

Refer to the ASAM XCP Part 2 Protocol Layer Specification for more information on how to configure data stimulation.


Not Helpful