Function Description

The UNITE_SERVER function is used to process UNI-TE requests immediately from the application program.

This function can be activated in the MAST task or the FAST task.

NOTE: At any given time, only one UNITE_SERVER function can be activated by the application.
NOTE: The UNITE_SERVER function is used to process requests from a Modbus link (TSX SCP 114 PCMCIA card in a TSX SCY 21601 module configured as a Modbus slave with immediate server).

The additional parameters EN and ENO can be configured.

Exchange principle

The following diagram illustrates the exchanges made during the use of the UNITE_SERVER communication function.

FBD representation

Representation:

LD representation

Representation:

IL representation

Representation:

LD Management_Param
UNITE_SERVER Address, Received_Codes

ST representation

Representation:

UNITE_SERVER(Management_Param, Address, Received_Codes);

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 first word contains the exchange number and the activity bit, the second word contains the report. The report comprises:

  • the operation report (most significant byte),

  • the communication report (least significant byte).

The communication report takes one of the following values:

  • 16#00: correct exchange,

  • 16#01: stop on timeout, the response was not able to be sent in under 2 seconds,

  • 16#02: stop on user request (STOP, %S0, INIT, hot or cold re-start),

  • 16#03: unknown address format,

  • 16#05: incorrect management parameters,

  • 16#07: problem in sending to the destination,

  • 16#11: no request received,

  • 16#12: UNITE_SERVER function already called by another task,

  • 16#FF: message refused.

Note: When a message is refused (code 16#FF), the operation report can then take the value 16#14 (server stopped).

The following table describes the output parameters:

Parameter

Type

Comment

Address

ARRAY [0.. 2] OF INT

Address of the destination entity of the exchange. This address corresponds to the channel to which the sender of the request is linked.

Received_Codes

INT

At the end of the exchange, this word contains:

  • the request code received (least significant),

  • the response code sent back (most significant).