CAN Raw Read

This MotoHawk™ block receives a CAN message without unpacking the payload.

Block ID

Read CAN Raw

Library

MotoHawk_lib/CAN Blocks

Description

 

 

Block Parameters

Parameter Field Values Comments/Description
Reference Name Alpha-numeric text, single-quote enclosed Specify reference to CAN Definition channel - match to name defined in CAN Definition block. No special characters, such as spaces, dashes, commas (underscore allowed).
ID Type 0 or 1 Set type of the message ID (0=standard, or 1=extended)
ID hex2dec('701') Message ID to receive.
ID Mask hex2dec('ffffffff')  
Payload Value [] Set value of the Payload when the Payload Mask is used.
Payload Mask [] Any non-zero bit in any byte of the payload will require that that bit match exactly to the Payload Value at that bit position.
Queue Size Numeric Sets the size of the incoming message queue that will hold messages until this block executes. A value of zero or one will make only the most recently received message available.
Slot Name Alpha-numeric text, single-quote enclosed. May be empty.  It allows other blocks to reference the slot, such as the CAN Receive Slot Properties Set block which can be used to dynamically set by ID, ID Mask, Payload, and Payload Mask. It is also referenced by the CAN Receive Slot Trigger block.
No special characters, such as spaces, dashes, commas (underscore allowed).
Show Data Available Port Check Box (enable) If selected, a port will be added that will have the value 1 if a message is available and zero otherwise. If the queue size is larger than 1, one can associate a Simulink Do-While block to this port and poll all of the messages out of the Queue.
Show Age Count Port Check Box (enable) This port increments every time the block executes and no messages are available. The data from this port can be used to do timeout logic on a message.