Introduction
Use of
the OUT_IN_MBUS
block requires prior correct configuration
of the serial link.
The following parameters are used:
linked to transmission and configured from Control Expert
linked to the application and passed as function arguments
Reminder of Transmission Parameters
The serial link of the cards is configured from Control Expert. These parameters are the following:
Transmission speed
Delay between characters
Data
Stop
Parity
To allow exchange of data between all equipment connected on the bus, configuration of the serial link should be identical for all.
The configuration screen used to enter the parameters depends on the configuration selected in nominal mode.
Transmission Parameters of the Modbus Mode
The figure below shows a configuration screen when the nominal mode is in Modbus mode.

OUT_IN_MBUS
block should match the value checked in the
Data window of the configuration screen. Use of OUT_IN_MBUS
requires dynamic switching to character mode.
In this mode, the conditions for stopping (on characters or silence)
are disabled and not modifiable by the application. The OUT_IN_CHAR
function is thus no longer usable in receive mode (stop on timeout),
and only the INPUT_CHAR
and INPUT_BYTES
functions may be used for receiving by specifying the number of
characters to receive.
Transmission Parameters of the Character Mode
The figure below shows a configuration screen when the nominal mode is in character mode.

OUT_IN_MBUS
block should match the value checked in the
Data window of the configuration screen. When the card configuration is the character mode:
The conditions for stopping (on characters or silence) configurable in this mode must be disabled for proper operation of
OUT_IN_MBUS
. The functionOUT_IN_CHAR
is thus no longer usable in receive mode (stop on timeout), and only the functionsINPUT_CHAR
andINPUT_BYTES
may be used for receiving by specifying a number of characters to receive.The delay between characters cannot be configured. It is thus necessary to make sure that the value of this parameter in the remote Modbus devices is compatible with the character mode configuration.
Parameters for the Application
Two parameters for the application are sent as arguments of the OUT_IN_MBUS
function.
These parameters are the following: