Configuring the Management Parameter

The Management parameter consists of 4 contiguous words, described below:

Data source

Register

Description

High Byte (MSB)

Low Byte (LSB)

Data managed by the system

Management_Param[0]

Exchange number

Two read-only bits:

  • Bit 0 = Activity bit (see below)

  • Bit 1 = Cancel bit

Management_Param[1]

Operation report

Communication report

Data managed by the user

Management_Param[2]

Block timeout. Values include:

  • 0 = infinite wait

  • other values = timeout x 100 ms, for example:

    • 1 = 100 ms

    • 2 = 200 ms

Management_Param[3]

Length of data sent or received:

  • Input (before sending the request): length of data in the Data_to_Send parameter, in bytes

  • Output (after response): length of data in the Received_Data parameter, in bytes

Activity Bit:

This bit indicates the execution status of the communication function.

It is set to 1 when launched, and returns to 0 when its execution is complete.

It is the first bit of the first element of the table.

Example: if the management table has been declared as follows:

Management_Param[0] ARRAY [0..3] OF INT,

the activity bit is the bit with the notation Management_Param[0].0.

NOTE: The notation previously used requires configuration of the project properties in such a way as to authorize the extraction of bits on integer types. If this is not the case, Management_Param[0].0 cannot be accessed in this manner.