|Download Help (Windows Only)|
Calculates the checksum of a data block in memory.
|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.|
|Data is a byte array over which the checksum calculation is performed.|
|Type of checksum specifies the kind of checksum which is calculated.|
|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.
|ECU ref out is the same as ECU ref in. Wire the task reference to subsequent VIs for this task.|
|Checksum is the calculated checksum.|
|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.
MC Calc Checksum.vi implements a checksum calculation over a given data block. The checksum algorithm is performed by the ECU M&C toolkit using a predefined algorithm (XCP only) or over a dedicated checksum function provided by a specific DLL. The Checksum DLL is defined in the A2L data base and can be changed by the application by the MC Set Property.vi using the Checksum DLL Name property.
If you are using the CCP protocol, type of checksum must always be set to 0xFF, as CCP supports an external checksum DLL only. If using XCP, the following values for type of checksum are defined in the XCP specification:
|0x01||XCP_ADD_11||Add BYTE into a BYTE checksum, ignore overflows|
|0x02||XCP_ADD_12||Add BYTE into a WORD checksum, ignore overflows|
|0x03||XCP_ADD_14||Add BYTE into a DWORD checksum, ignore overflows|
|0x04||XCP_ADD_22||Add WORD into a WORD checksum, ignore overflows, blocksize must be modulo 2|
|0x05||XCP_ADD_24||Add WORD into a DWORD checksum, ignore overflows, blocksize must be modulo 2|
|0x06||XCP_ADD_44||Add DWORD into DWORD, ignore overflows, blocksize must be modulo 4|
|0x07||XCP_CRC_16||See CRC error detection algorithms|
|0x08||XCP_CRC_16_CITT||See CRC error detection algorithms|
|0x09||XCP_CRC_32||See CRC error detection algorithms|
|0xFF||XCP_USER_DEFINED||User defined algorithm, in externally calculated function|
For a detailed description of the checksum algorithm, refer to the MC Build Checksum.vi or the XCP Part 2 Protocol Layer Specification.
For more detailed information about CRC algorithms, refer to the following site: