Input Description

../_images/b981cf93e38964b20a33139000eba54e1

EN

Data_Type Default_Value Range Unit
BOOL FALSE TRUE/FALSE -

The input EN has to be driven in edge triggered mode.

The execution of the Function Block is started with a positive edge on the input EN.

In the first call it evaluates its inputs and creates a local copy of them. Afterwards it starts its internal algorithm. It may take several PLC task cycles until it is executed.

Once the execution is completed DONE and its other outputs are set. To start the Function Block again a new positive edge on the input EN has to be applied.

COM

Data_Type Default_Value Range Unit
BYTE - - -

At the COM input, the number of the serial interface is specified.

COM = 1: COM1

COM = 2: COM2

DATA

Data_Type Default_Value Range Unit
DWORD - - -

At input DATA, the start address for storing the received data is specified using an ADR operator. Received data can be stored in the operand area as well as in variables. Some peculiarities have to be observed when receiving binary values.

When using IEC bit operands as storage address, only operands are allowed which end with “.0” (e.g. %QX62.0 allowed, %QX62.1 forbidden).

When storing a received telegram within the IEC bit operand area, it has to be observed that a received byte describes 8 bit operands. However, if a received telegram is stored to a Boolean variable, this variable is considered as FALSE if the byte has the value 0 and TRUE for all other values of the byte.

LEN

Data_Type Default_Value Range Unit
WORD - - -

LEN outputs the length of the received data (in bytes) including end character (if contained). LEN is only valid if DONE = TRUE. LEN has always to be considered together with output ERR.

END_LEN

Data_Type Default_Value Range Unit
BYTE - - -

Number of end characters to be attached: 0, 1, 2 means none, one or two.

The input´s LEN and END_LEN have to be smaller than 256! If not an error appears!

END_CH

Data_Type Default_Value Range Unit
WORD - - -

At input END_CH, the value of the telegram end character(s) must be specified which has (have) to be attached to the actual transmit data. END_CH is considered if input END_LEN of the COM_SEND Function Block is not 0. END_CH is applied with a FALSE > TRUE edge at EN. If required, the end character can vary within each telegram.

If, for example, a CR/LF shall be attached to a telegram, the value of END_CH is as follows: 16#0D0A and END_LEN: 2.