Receive Messages

Message reception via CAN channels

The CAN Receive Workflow shows how to receive and unpack CAN messages, using receive and unpack functions. You can also use the CAN Receive block to build a receive Simulink block.


receive Receive messages from CAN bus
attachDatabase Attach CAN database to messages and remove CAN database from messages
stop Set CAN channel offline
unpack Unpack signal data from message
extractAll Select all instances of message from message array
extractRecent Select most recent message from array of messages
extractTime Select messages occurring within specified time range from array of messages


MessageReceivedFcn Specify function to run
MessageReceivedFcnCount Specify number of messages available before function is triggered
MessagesAvailable Display number of messages available to be received by CAN channel
MessagesReceived Display number of messages received by CAN channel
MessagesTransmitted Display number of messages transmitted by CAN channel
InitialTimestamp Indicate when channel started
Timestamp Display message received timestamp
ReceiveErrorCount Display number of received errors detected by channel
TransmitErrorCount Display number of transmitted errors by channel


CAN Receive Receive CAN messages from specified CAN device
CAN Unpack Unpack individual signals from CAN messages
CAN Log Log received CAN messages
Was this topic helpful?