Purpose

Queries the current session status from an ECU slave device.

Format

Input

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.
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.
status is TRUE if an error occurred. This VI is not executed when status is TRUE.
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.
source identifies the VI where the error occurred.

Output

Session Id returns the defined session configuration ID.
ECU ref out is the same as ECU ref in. Wire the task reference to subsequent VIs for this task.
Session status returns the current status of the selected ECU.
Resource mask is the current resource protection status of the selected ECU.
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.
status is TRUE if an error occurred.
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.
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 Number Flag Description
0 STORE_CAL_REQ REQuest to STORE CALibration data:

0—STORE_CAL_REQ mode is reset.

1—STORE_CAL_REQ mode is set.

1 Unused
2 STORE_DAQ_REQ REQuest to STORE DAQ list:

0—STORE_DAQ_REQ mode is reset.

1—STORE_DAQ_REQ mode is set.

3 CLEAR_DAQ_REQ REQuest to CLEAR DAQ configuration:

0—CLEAR_DAQ_REQ is reset.

1—CLEAR_DAQ_REQ is set.

4 Unused
5 Unused
6 DAQ_RUNNING Data Transfer:

0—The data transfer is not running.

1—The data transfer is running.

7 RESUME RESUME 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 Number Flag Description
0 CAL/PAG REQuest to STORE CALibration data: 0—STORE_CAL_REQ mode is reset. 1—STORE_CAL_REQ mode is set.
1 Unused
2 DAQ DAQ 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.

3 STIM DAQ 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.

4 PGM ProGraMming commands:

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

1—ProGraMming commands are protected with SEED & Key mechanism

5 Unused
6 Unused
7 Unused

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 call with STORE_DAQ_REQ set. This allows the master device to verify that automatically started DAQ lists contain the expected data transfer configuration.