| Target Support Package™ IC1 | ![]() |
Target Support Package IC1/ C166 Driver Library/ CAN Interface

The CAN Receive block receives CAN messages from a CAN module. The CAN Receive block can reserve one of the buffers on the CAN module. Alternatively, you can instruct the CAN Receive block to select a hardware buffer automatically from the available buffers. The CAN Receive block has two outputs: a data output and a function-call trigger output. The CAN Receive block polls its message buffer at a rate determined by the block's sample time. When the CAN Receive block detects that a message has arrived, the function-call trigger is activated. You should use a function-call subsystem, activated by the trigger, to decode the message available at the CAN Receive block data output.

Select CAN module A or B. The CAN modules can receive messages independently.
The identifier of the message you want to receive. Note that if you have set the CAN configuration parameters in your model to mask out certain bits (e.g., the message identifier field), you may receive messages with identifiers other than the identifier specified here. See CAN Configuration Parameters.
Choose Automatic or Manual. When the automatic option is selected, the CAN Receive block automatically selects a receive buffer from the available buffers. Use this automatic buffer selection, unless you want to use buffer 15 with its individually programmable mask.
This field is enabled if the Buffer selection is Manual. The buffer number specifies the identifier of the receive buffer for this block. Select Automatic buffer selection instead of manually specifying the buffer, unless you want to use buffer 15 with its individually programmable mask.
The type of message you want to receive. Select either Standard(11-bit identifier) or Extended(29-bit identifier).
Determines the rate at which to sample the buffer to see if a new message has arrived.
Note The CAN Receive block sample time must be set to a value that is smaller than the minimum time between CAN messages that will be received into the corresponding buffer. If more than one message is received into a buffer during a single sample interval, the older message will be overwritten. |
![]() | CAN Calibration Protocol (C166, TwinCAN) | CAN Reset | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |