At a Glance
You are responsible for these two parameters.
Length
The length parameter is used both to specify the number of characters (in bytes) to be sent during transmission, but also to store the number of characters (in bytes) received after reception of a message.
Before certain
communication functions are launched (SEND_REQ
, DATA_EXCH
, PRINT_CHAR
, SEND_TLG
), it is compulsory for some of these functions, and advisable for
others, to update the length parameter.
PRINT_CHAR
function, for example, if another
function in the application is using the same report table where the
number of bytes to send is different to the previous function, it
is imperative to initialize the length parameter with the new number
of bytes to transmit. Otherwise it keeps the same number of bytes
sent by the previous function.Timeout
Timeout determines the maximum waiting time for the response. The time base for this parameter is 100 ms (the value 0 corresponds to an infinite waiting value).
When the timeout elapses, the exchange is ended with an error report. Also, the system does not accept any responses after the end of the timeout.
Example

The timeout is evaluated every second.
The value of a communication function's timeout must be sufficient to ensure that the response to the question asked is received (use of an external modem on a protocol-based link, for example).
For Modbus master communication, application timeout set under the communication functions must be greater than the configuration screen timeout multiplied by the number of retries (hardware timeout).
Communication EFs timeout (as
WRITE_VAR
orREAD_VAR
) must be greater than communication master equipment timeout (answer delay).