ECU Measurement and Calibration Toolkit C API Reference

Content Type
Programming Language
Current manual
Table of Contents

MC DAQ Initialize.vi

MC DAQ Initialize.vi

Purpose

Initializes a Measurement task for the specified Measurement channel list.

Format

diagram

Input

string Raw measurement list is the array of channel names added to the Measurement task. Each channel name is provided in an array entry. Channel values are raw (no scaling). At least one of the lists must be non-empty.
string Measurement list is the array of channel names added to the Measurement task. Each channel name is provided in an array entry. Channel values are scaled. At least one of the lists must be non-empty.
long unsigned integer ECU ref in is the task reference which links to the selected ECU. This reference is originally returned from MC ECU Open.vi or MC ECU Select.vi, and then wired through subsequent VIs.
long unsigned integer Mode specifies the I/O mode for the task. For an overview of the I/O modes, refer to the ECU M&C API Basic Programming Model topic.

Mode=0

DAQ List: The data is transmitted from the ECU in equidistant time intervals as defined in the A2L database. The data can be read back with the MC DAQ Read.vi as Single point data using a sample rate = 0 or as waveform using a sample rate > 0. Input channel data are received from the DAQ messages. Use MC DAQ Read.vi to obtain input samples as single-point, array, or waveform.

Mode=1

Polling: In this mode the data from the Measurement task are acquired from the ECU whenever the MC DAQ Read.vi is called.

Mode=2

STIM List: In this mode the data from the Measurement task are send to the ECU whenever MC DAQ Write.vi is called.

Mode=3

Timestamped read: The data is transmitted from the ECU in equidistant time intervals as defined in the A2L database. The data can be read back with MC DAQ Read.vi as timestamped data array. Input channel data are received from the DAQ messages. Use MC DAQ Read.vi to obtain input samples as an array of sample/timestamp pairs (Poly VI types 2D Double time stamped and Time-Value XY Array). Use this input mode to read samples with timestamps that indicate when each channel is received from the network.

double-precision, floating-point Sample rate specifies the timing to use for samples of the task. The sample rate is specified in Hertz (samples per second). A sample rate of zero means to sample immediately. If the Mode is defined as DAQ List, a sample rate of zero means that MC DAQ Read.vi returns a single point from the most recent message received, and greater than zero means that MC DAQ Read.vi returns samples timed at the specified rate. If the Mode is defined as Polling, the sample rate is ignored.
cluster Error in is a cluster which describes error conditions occurring before the VI executes. If an error has already occurred, the VI returns the value of the error in cluster to error out.
boolean status is TRUE if an error occurred. This VI will not execute when status is TRUE.
long unsigned integer code is the error code number identifying an error. A value of 0 means success. A negative value means error: VI did not execute the intended operation. A positive value means warning: VI executed intended operation, but an informational warning is returned. For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.
string source identifies the VI where the error occurred.
long unsigned integer DTO ID is the CAN identifier for the Data Transmission Object (DTO) used by the ECU to transmit the DAQ list data to the host. If bit 31 (hex 0x80000000) of the value is set, the value is considered an extended CAN identifier (29-bit). If the DTO ID terminal is unwired, the ECU will use the same identifier to transmit the DAQ list data as it uses for the rest of the CCP communication. This is currently supported with CCP protocol and is being ignored with XCP.

Output

long unsigned integer DAQ ref out is a task reference for the Measurement task created. Wire this task reference to subsequent VIs for this Measurement task.
cluster Error out describes error conditions. If the Error in cluster indicated an error, the Error out cluster contains the same information. Otherwise, Error out describes the error status of this VI.
boolean status is TRUE if an error occurred.
long signed integer code is the error code number identifying an error. A value of 0 means success. A negative value means error: VI did not execute the intended operation. A positive value means warning: VI executed intended operation, but an informational warning is returned. For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.
string source identifies the VI where the error occurred.

Description

MC DAQ Initialize.vi does not start the transmission of the DAQ lists from the ECU to or from the application through XCP or CCP. This enables you to use MC Set Property.vi to change the properties of a Measurement task. After you change properties use MC DAQ Start Stop.vi to start the communication for the Measurement task.

Was this information helpful?