MC XCP Get Status.vi

ECU Measurement and Calibration Toolkit Help

Edition Date: October 2018

Part Number: 371602T-01

»View Product Info
Download Help (Windows Only)

Purpose

Queries the current session status from an ECU slave device.

Format

diagram

Input

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.
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 is not executed 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.

Output

word unsigned integer Session Id returns the defined session configuration ID.
long unsigned integer ECU ref out is the same as ECU ref in. Wire the task reference to subsequent VIs for this task.
byte unsigned integer Session status returns the current status of the selected ECU.
byte unsigned integer Resource mask is the current resource protection status of the selected ECU.
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 XCP Get Status.vi implements the XCP command GET_STATUS and returns all current status information of the selected ECU slave device, including the status of the resource protection, pending store requests and the general status of data acquisition and stimulation.

Current Session Status

Session status contains a bit mask which is described below:

Bit NumberFlagDescription
0STORE_CAL_REQREQuest to STORE CALibration data:

0—STORE_CAL_REQ mode is reset.

1—STORE_CAL_REQ mode is set.

1Unused
2STORE_DAQ_REQREQuest to STORE DAQ list:

0—STORE_DAQ_REQ mode is reset.

1—STORE_DAQ_REQ mode is set.

3CLEAR_DAQ_REQREQuest to CLEAR DAQ configuration:

0—CLEAR_DAQ_REQ is reset.

1—CLEAR_DAQ_REQ is set.

4Unused
5Unused
6DAQ_RUNNINGData Transfer:

0—The data transfer is not running.

1—The data transfer is running.

7RESUMERESUME Mode:

0—The slave device is not in RESUME mode.

1—The slave device is in RESUME mode.

The STORE_CAL_REQ flag indicates a pending request to save the calibration data into non-volatile memory. As soon as the request has been fulfilled, the slave will reset the appropriate bit. The slave device may indicate this by transmitting an EV_STORE_CAL event packet.

The STORE_DAQ_REQ flag indicates a pending request to save the DAQ list setup in non-volatile memory. As soon as the request has been fulfilled, the slave will reset the appropriate bit. The slave device may indicate this by transmitting an EV_STORE_DAQ event packet.

The CLEAR_DAQ_REQ flag indicates a pending request to clear all DAQ lists in non-volatile memory. All ODT entries are reset to address = 0, extension = 0, size = 0 and bit_offset = FF. Session configuration ID is reset to 0. As soon as the request has been fulfilled, the slave will reset the appropriate bit. The slave device may indicate this by transmitting an EV_CLEAR_DAQ event packet. If the slave device does not support the requested mode, an ERR_OUT_OF_RANGE is returned.

The DAQ_RUNNING flag indicates that at least one DAQ list has been started and is in RUNNING mode.

The RESUME flag indicates that the slave is in RESUME mode.

Resource mask contains the current resource protection status as a bit mask described below:

Bit NumberFlagDescription
0CAL/PAGREQuest to STORE CALibration data: 0—STORE_CAL_REQ mode is reset. 1—STORE_CAL_REQ mode is set.
1Unused
2DAQDAQ list commands (DIRECTION = DAQ):

0—DAQ list commands are not protected with SEED & Key mechanism.

1—DAQ list commands are protected with SEED & Key mechanism.

3STIMDAQ list commands (DIRECTION = STIM):

0—DAQ list commands are not protected with SEED & Key mechanism.

1—DAQ list commands are protected with SEED & Key mechanism.

4PGMProGraMming commands:

0—ProGraMming commands are not protected with SEED & Key mechanism.

1—ProGraMming commands are protected with SEED & Key mechanism

5Unused
6Unused
7Unused

The CAL/PAG flags indicates that all commands of the CALibration/PAGing group are protected and will return an ERR_ACCESS_LOCKED upon an attempt to execute the command without a previous successful GET_SEED/UNLOCK sequence.

The PGM flags indicates that all the commands of the ProGraMming group are protected and will return a ERR_ACCESS_LOCKED upon an attempt to execute the command without a previous successful GET_SEED/UNLOCK sequence.

The parameter Session Id contains the Session configuration ID. The session configuration ID must be set by a prior MC XCP Set Request.vi call with STORE_DAQ_REQ set. This allows the master device to verify that automatically started DAQ lists contain the expected data transfer configuration.

WAS THIS ARTICLE HELPFUL?

Not Helpful