Input DescriptionΒΆ

Using CAN2A_SEND, CAN telegrams with 11 bit identifiers according to CAN 2.0A can be transmitted.

Every time a FALSE->TRUE edge is applied to input EN, CAN2A_SEND reads the data at its inputs and sends a corresponding request message to the Communication Module. Further FALSE->TRUE edges at input EN are ignored until the processing of the active requests is completed. The completion of the request processing is indicated by DONE = TRUE and ERR = FALSE. A possibly occurring error is indicated by output ERR = TRUE.

The Function Block is able to transmit several telegrams up to a total length of 254 bytes within one event to the Communication Module which in turn transmits these telegrams sequentially via the bus. Thus, the maximum number of simultaneously transmitted telegrams depends on the sum of the individual telegram lengths. If all telegrams to be transmitted do not contain any other data than the 2 header bytes (identifier, RTR and DLC; Data Length Code DLC = 0), up to 127 telegrams can be transmitted at the same time (2 x 127 = 254). However, if all telegrams contain the maximum 8 bytes of data, only up to 25 telegrams can be transmitted to the Communication Module simultaneously ((2 + 8) x 25 = 250).

../_images/d8249c93e3899cb20a33139000eba54e

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.

NUM

Data_Type Default_Value Range Unit
BYTE - - -

Input NUM is used to specify the number of valid telegrams to be transmitted and stored starting at address DATA. Basically, the valid values for NUM are 1 to 127. However, the upper limit depends on the total length of all telegrams. The total length is calculated by the Function Block from the data length codes (DLC) of the individual telegrams and must not exceed 254 bytes. Otherwise an error message is generated. In such cases, the number of telegrams to be transmitted has to be chosen correspondingly that the total length does not exceed 254.

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.