mcDAQStartStop

ECU Measurement and Calibration Toolkit Help

Edition Date: October 2018

Part Number: 371602T-01

»View Product Info
Download Help (Windows Only)

Purpose

Starts or stops the transmission of the DAQ lists assigned to the Measurement task on the ECU.

Format

mcTypeStatus mcDAQStartStop(
mcTypeTaskRef DAQRefNum,
u32StartStopMode);

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.

StartStopMode

StartStopMode indicates the type of function to be performed.

0—mcStartStopModeStop

Configures the ECU to stop transmitting a DAQ task. If stopped, properties of the DAQ task can be changed using mcSetProperty. This function is performed automatically before mcDAQClear.

1—mcStartStopModeStart

Configures the ECU to start sending data for a Measurement task. Ensure that the DAQ list has not yet been transferred to the ECU first. Once started, properties of the DAQ list can no longer be changed using mcSetProperty. This function is performed automatically before the first read of the DAQ list with mcDAQRead.

2—mcStartStopModeTransmitDAQ

Transfers the DAQ list to the ECU, but does not start it. For example, use this mode if you want to change the session status before starting the DAQ list. For some ECUs this is necessary.

3—mcStartStopModePrepareStartAll

Prepares a DAQ or STIM list to be started by a single command. This is useful when multiple DAQ or STIM lists are used with the same ECU. After preparing the DAQ or STIM lists with this command, use mcDAQStartStop with mode mcStartStopModeStartAll to start all lists at the same time.

4—mcStartStopModeStartAll

Starts all previously prepared DAQ or STIM lists at the same time with a single command.

5—mcStartStopModeStopAll

Stops all running DAQ or STIM lists on the same ECU with a single command.

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

mcDAQStartStop is an optional command to start or stop communication for an M&C Measurement task. If you do not perform mcDAQStartStop (with the parameter mcStartStopModeStart) before using mcDAQRead the Measurement task is started by the first call of mcDAQRead. After you start the transmission of the DAQ lists, you can no longer change the configuration of the Measurement task with mcSetProperty. You must call mcDAQStartStop (with the parameter mcStartStopModeStop) first.

WAS THIS ARTICLE HELPFUL?

Not Helpful