Remark 3: Telegram ending identifier

The telegram ending identifier is set using the parameters Character timeout, Telegram ending selection, Telegram ending character and Telegram ending value.

Character silent time monitoring:

Monitoring of the character timeout can be set for all possible telegram ending settings (except Character timeout).

If the parameter Character timeout = 0, no character timeout monitoring is done.

With Character timeout > 0 the character timeout monitoring is activated.

The character silent time is defined in number of characters. The number of characters and the interface parameters (Baudrate, Parity, Data bits and Stop bits) are used to calculate the silent time.

Example: Baudrate=9600 Baud, Parity=none, Data bits=8, Stop bits=1, Character timeout=3

This results in a frame of 10 bits/character:

1 start bit + 8 data bits + 0 parity bit + 1 stop bit

Character silent time = 1000 x Character timeout x Frame / Baudrate [ms]

Character timeout = 1000 x 3 x 10 / 9600 = 3.125 ms ~ 4 ms.

If the time between the reception of two characters exceeds the character silent time, the reception is aborted with an error and the characters received up to this moment are made available.

The following parameter combinations are possible:

Character

timeout

Telegram ending selection Telegram ending character Telegram ending value Description

Character timeout

see remark on character silent time monitoring

Type of telegram ending identifier

Telegram

ending character

- = ignored

Telegram

ending value

- = ignored

Number of

characters

0 or >0

None - - No telegram ending identifier, i.e., the characters received since last call are provided. The maximum number of characters is limited to 256.

Number of

characters

0 or >0

String (check

receive)

Number of

telegram ending

characters

1 or 2

2 characters

(for example

16#0d0a)

According to value set for “Telegram ending character”, it is checked for 1 or 2 ending characters.

The ending character(s) is (are) not passed, i.e., they are not contained in DATA area.

1 1

16#0d =

13dec =

<CR>

After reception of 16#0d, telegram received is reported.
2 2

16#0d0a =

3338dec =

<CR><LF>

After reception of 16#0d and subsequently 16#0a, telegram received is reported.

Number of

characters

0 or >0

Telegram

length

-

Number

of characters

>0 and <=256

Telegram received is reported once the number of characters defined in “Telegram ending value” is received.

Number of

characters

0 or >0

Duration - Time in [ms] Telegram received is reported once the time set for “Telegram ending value” (in [ms]) is elapsed. The time starts with the first FALSE -> TRUE edge at input EN of the receive block COM_REC.
0

Character

timeout

-

Number

of characters

>0 and <=256

The number of characters set for “Telegram ending value” and the interface parameters (Baudrate, Parity, Data bits and Stop bits) are used to calculate the silent time.

Telegram received is reported if the silent time between two characters is >= the calculated silent time.