Manual

Table Of Contents
Interface Functions 49
Doc.Id. HMSI-216-117
CM CANopen Module for SIMATIC S7-1200
Doc.Rev. 1.00
8.2.2 CAN_RCV
Input Parameters
Output Parameters
Description
When REQ is TRUE, the block looks for new frames waiting in the CAN buffer of the module. If there
are any, the module will read the oldest frame, set NEW to TRUE, and wait for an ACK from the func
-
tion block. This will be repeated until all frames have been read. When all frames have been read BUSY
will go FALSE. The received frames will be buffered until they are read by the PLC. The buffer can hold
up to 256 frames.
For polling operation, set REQ to TRUE permanently.
Name Data type Description
REQ Bool Starts the block. Has to be set to TRUE for one scan cycle.
ID Word Logical address of the CM CANopen module.
ACK Bool Set to TRUE for one scan cycle to acknowledge a newly read CAN frame.
DB Dint Number of data block.
Name Data type Description
NEW Bool Set to TRUE when a new CAN frame has been received by the module and is ready
to be read by the function block.
COBID Word CAN ID of the CAN frame
RTR Bool RTR-bit of the CAN frame
SIZE Uint Data size of the CAN frame
BUSY Bool Set to TRUE if there is data in the receive buffer when REQ is set. BUSY will be
TRUE until buffer is empty.
RET Uint Error code, see “Error Codes (RET)” on page 59. Valid once the BUSY signal turns
FALSE until the next time the function block is started, i.e. when REQ is set to
TRUE.