CAN receive packed

Block to receive CAN messages, fitted into a packed CAN message.

Description

A "CAN Receive" block instructs the code generator to include CAN support.
Each time the block is evaluated, the last message with the given CAN ID is used to get the output values.
The 'new data' output gives a 1 or higher (true) if new data was received since the last evaluation, otherwise a 0 (false).
Use the "CAN Unpack" block from either the "xPC Target" or "Vehicle Network Toolbox" library to extract the desired data.

Remarks

Declaration

Use the CAN config block:

Output
Parameters
CAN channel
Select the used channel.
CAN ID
Specify the message ID of the CAN messages you wish to receive with this block. Use 'hex2dec()' to transform a hexadecimal formatted ID into a decimal ID.