Input DescriptionΒΆ

Using CAN2B_REC, CAN telegrams with 29 bit identifiers according to CAN 2.0 B can be received. Only those telegrams can be received, the identifiers of which have been enabled previously. Enabling of this Function Block is done using the configuration tool SYCON.net or using the controller configuration of the CPU.

First, the exchange of CAN 2.0 B telegrams is generally enabled in the Communication Module using SYCON.net. By means of an acceptance code and an acceptance mask it is furthermore possible to set up an ID filter. The Communication Module then compares all 29 bit identifiers on the bus with these two entries and forwards the filtered telegrams to the CPU.

Enabling of the individual identifiers is done by the controller configuration of the CPU. For each identifier a corresponding buffer, the buffer size and its behavior if the buffer is full has to be defined. Received telegrams with non-enabled identifiers are automatically dismissed. See CAN2B_INFO, output NUM_INV CAN2B_INFO.

../_images/aa980c22e3899d4e0a33139000eba54e

EN

Data_Type Default_Value Range Unit
BOOL - - -

The Function Block is activated (EN = TRUE) or deactivated (EN = FALSE) via input EN. If the Function Block is active, the current values are available at the outputs. If the Function Block detects a CAN Communication Module with a configured CAN 2.0A protocol at the specified SLOT, this is indicated by DONE = TRUE and ERR = FALSE. The corresponding status information is then available at the Function Block outputs.

SLOT

Data_Type Default_Value Range Unit
BYTE - - -

At input SLOT, the Communication Module slot (module number) is selected to used by the Function Block.

The internal Communication Module always has the module number 0. All external Communication Modules are serially numbered from right to left, starting with module number 1.

ID

Data_Type Default_Value Range Unit
WORD - - -

Input ID is used to specify the identifier of the CAN 2.0A telegrams to be read from the buffer. If no buffer has been specified for the selected identifier using the controller configuration, this is indicated accordingly at the Function Block outputs.

DATA

Data_Type Default_Value Range Unit
DWORD - - -

Input DATA is used to specify the address starting from which the received CAN 2.0A telegrams should be written. Usually, this specification is done via the ADR operator and should point to variables of the type CAN2A_MESSAGE_TYPE or CANOpen_MESSAGE_TYPE.