Raptor:CAN Rx Raw
Return to the main Raptor page
Description
This block is used to receive a CAN message when access to the raw receive bytes is necessary. The Raptor CAN Rx Message block can be used if the raw receive bytes are not needed.
This block can receive messages on multiple IDs through the message ID filter ID and mask. For each bit in the mask parameter which contains a 1, the corresponding bit of the incoming message ID must match the corresponding bit in the ID parameter. Some modules do not support a fully open mask (all 0s).
Each CAN rx block uses its own queue to buffer the incoming messages until the block can execute. If another message is received once the queue is full then the oldest message is overwritten. To always get the data from the last message set the queue size to 1.
The mailbox is a mechanism to link a CAN rx block with a CAN trigger block. This allows code to be executed whenever a message is received. The mailbox name must be unique for each receive block (if used), but can have multiple trigger blocks using the same mailbox name.
Outputs
Output | Type | Description |
---|---|---|
Age | uint32 | The number of times this block has executed since a new message was received. Age is 0 when a new message is being output. |
extended | boolean | Indicates if the received message's ID was standard (0) or extended(1). |
ID | uint32 | Indicates the ID of the received message. |
length | uint8 | The number of data bytes in the received message. |
Data | uint8[8] | The data in the received CAN message. If the length is less than 8, this block will still output a vector of 8 bytes, but the upper bytes may have unspecified contents. |
Parameters
Parameter | Type | Description |
---|---|---|
CAN Bus Name | String | The CAN bus to transmit the message on. |
Extended ID | Indicates if this block will receive standard or extended ID messages. | |
ID | Number | The ID used in the receive message filter. |
Mask | Number | The mask used in the receive message filter. |
Mailbox | String | Identifies the mailbox trigger that is connected to this receive block. |
Queue Size | Number | Specifies the size of the receive queue. |
Supported Versions
- Raptor 2013a_0.0.1 and newer