Function Description

The RCV_TLG function is used to read telegram-type data from a remote application.

The data received must be a maximum of 16 bytes in length. Unlike the other communication functions, this function is processed immediately (synchronous): there are therefore no activity bit and timeout parameters.

The integer table assigned to the management parameters therefore only uses two words instead of four (the exchange and timeout numbers being unnecessary).

NOTE: this function can be used on Fipway in the processor only, and for stations 0 to 15.

The additional parameters EN and ENO can be configured.

FBD representation

Representation:

LD representation

Representation:

IL representation

Representation:

LD Management_Param
RCV_TLG Address, Received_Data

ST representation

Representation:

RCV_TLG(Management_Param, Address, Received_Data);

Parameter Description

The following table describes the input/output parameters:

Parameter

Type

Comment

Management_Param

ARRAY [0.. 1] OF INT

Table of words used to manage the exchange. This table is made up of 2 words: the report word and the word indicating the amount of data received (in number of bytes). The report comprises:

  • the operation report (most significant byte of the first word),

  • the communication report (least significant byte of the first word),

The communication report takes one of the following values:

  • 16#00 : correct exchange,

  • 16#05 : incorrect management parameters,

  • 16#06 : incorrect specific parameters,

  • 16#09 : insufficient receive buffer size,

  • 16#0B: No system resources: the number of simultaneous communication EFs exceeds the maximum that can be managed by the processor,

  • 16#0D: no telegram received,

  • 16#10 : network module missing,

  • 16#0F: telegram service not configured.

The following table describes the output parameters:

Parameter

Type

Comment

Address

INT

Address of the entity transmitting the telegram at the end of the exchange.

  • The least significant byte corresponds to the hexadecimal network number.

  • The most significant byte corresponds to the hexadecimal station number.

Received_Data

ARRAY [n... m] OF INT

Receive buffer. Integer table containing the data received.

This table must be a maximum of 8 integers (16 bytes) in length.