System bus (CAN) with Ser vo PLC & Drive PLC
LenzeCanDrv.lib - Function blocks
9.2 Receive CAN object (L_CanPdoReceive)
9-5
L PLC-Systembus EN 1.1
9.2 Receive CAN object (L_CanPdoReceive)
This FB is used to receive data via the system bus interface according to CANopen.
Tip!
Due to a high bus load or extremely high transmission rates of other bus participants, data receipt
might be overloaded if additional receive telegrams arrive while a receive telegram is being
processed
In this case, the operating system sends an overrun error:
• An appropriate error message is displayed (see chapter “Error messages” in the relevant PLC
Manual, e.g. 9300 Servo PLC or Drive PLC).
• In addition, the CAN driver for the free CAN objects is deactivated and must be re-initialised
by means of the L_CanInit function.
L_CanPdoReceive
wDrvNr
byLen
dwCobId
pIOAdress
nState
bNewMessage
Fig. 9-2 Receive CAN object (L_CanPdoReceive)
Identifier Data type Type of variable Possible settings Info
wDrvNr Word VAR_INPUT 10
11
System bus
FIF CAN
byLen Byte VAR_INPUT 0 ... 8 Telegram length (in bytes)
dwCobID Double word VAR_INPUT 0 ... 2047 CAN identifier
pIOAdress Pointer to byte VAR_INPUT Pointer positioned over the
memory address from which
on the received data bytes will
be saved.
Use the ADR address function to ascertain the
address of a variable.
bNewMessage Bool VAR_OUTPUT - Set to TRUE if data was received and only reset
to
FALSE if the below command is called:
<Instanzname> ResetNewMessage
• Unless the variable is reset, data can continue
to be received, data receipt is, however, not
displayed.
nState Integer VAR_OUTPUT - Shows the latest receive state.
• See below table
“Receive state (nState)”
Note!
When selecting the CAN identifier (dwCobId), please make sure that the identifier is not yet used
by another CAN object CAN1_IO ... CAN3_IO since this would lead to the receipt of wrong data.