mcDAQWrite

ECU Measurement and Calibration Toolkit Help

Edition Date: October 2018

Part Number: 371602T-01

»View Product Info
Download Help (Windows Only)

Purpose

Writes scaled samples to an ECU DAQ list.

Format

mcTypeStatus mcDAQWrite(
mcTypeTaskRef DAQRefNum,
u32NumberofSamplesToWrite,
f64*SampleArray);

Input

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

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

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.

Output

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.

Description

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.

WAS THIS ARTICLE HELPFUL?

Not Helpful