Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Modbus Master | Configuration

Accessing the I/O Interface Configuration

The Modbus master communication protocol can be configured in the I/O Interface Configuration tool that can be opened from the HYPERSIM ribbon.

For more information on the general use of the I/O Interface Configuration, see I/O Interface Configuration.

General Configuration

The Modbus master I/O interface is configured within a few pages. The first page contains some generic configurations.

Use an RT core for asynchronous computationIf set to "true", the driver will reserve a real-time CPU core for its communication system and will be able to handle a bigger number of slaves. If set to "false", the communication system will default to core 0 (running with the operating system).
Enable verbose modeIf enabled, additional information will be displayed in the HYPERSIM log during the loading of the model.
Enable virtual modeIn virtual mode, the model can be executed even if this I/O interface is not compatible with the hardware configuration of the system. The connections between the model and the I/O interface will be done during the initialization, but the I/O interface will not do anything.
The virtual mode can be used to troubleshoot problems on a system without having the required hardware, or to prepare a model with different I/O interfaces even if the final hardware platform is not available.

Slave Configuration

By default, the driver is configured with one TCP slave configured to listen on the internal loopback network on port 1504 and one RTU slave configured on /dev/ttyS0 serial port. 

General Parameters

ModeSelect "TCP" or "RTU".
Cycle output rate (ms)Defines the rate (in milliseconds) at which the data from the model is written in the slave's outputs (coils and holding registers). When the slave's outputs are controlled both from the model and from the master, this parameter must be set to a value greater than the time step of the model. Otherwise the write operations made by the master will never be reflected in the model.
Byte orderingDefines how 32 bits data is encoded. For FLOAT32, the ABCD byte order refers to the IEEE 754 standard. Any of the byte ordering cases are possible (ABCD, BADC, CDAB, DCBA).

TCP Specific Parameters

NIC nameThe desired network interface name. The proper interface name should be selected based on the information given by the Linux command "ifconfig". If a Modbus master is running on the same machine as the Modbus slave, the loopback network interface must be used ('lo'). If the driver is running on Windows this field will be ignored.
IP addressThe IP address of the Modbus slave. If a Modbus master is running on the same machine as the Modbus slave, the loopback IP address must be used (
TCP portSelect the TCP port on which the slave will wait for a connection.

RTU Specific Parameters

Modbus slave IDID of the Modbus slave. In RTU mode, many slaves can be connected on the same physical serial link. Because of that, each Modbus slave must be configured with a unique identification number.
Serial portPath to the serial interface to be used. The default serial interface name of the first port on a SuperMicro motherboard (OPAL-RT chassis) is "/dev/ttyS0".
Serial baudrateSpeed at which Modbus RTU slave is configured to communicate.
Serial data bitsNumber of data bits the Modbus RTU slave is configured to communicate.
Serial stop bitsNumber of stop bits the Modbus RTU slave is configured to communicate.
Serial parityParity at which the Modbus RTU slave is configured to communicate.

If "Odd" or "Even" is selected, the number of "1" bits in the data section of each character frame is counted. As each character in RTU mode contains 8 bits, the parity bit will then be set to a 0 (even parity) or a 1 (odd parity) to reflect the total number of "1" bits.


Note: For each slave instance, the inputs and outputs must be configured. The slave will reply to the master requests continuously as fast as possible.

Operation Configuration

NameName that will be used to identify the signal associated to the read/write operation in the Sensor form.
Operation typeType of operation to perform. See the list of supported operations in the "Supported features" section.
Operation codeRead-only field that gives the hexadecimal code of the configured Modbus operation.
Start addressAddress at which will begin the read/write operation.
Item numberNumber of coils/registers that will be read/written.
Interpreted as

For coils and discrete input: Only bit is supported.

For all types of registers: Unsigned integers (16 bits & 32 bits), signed integers (16 bits & 32 bits) and single-precision floating-point (32 bits) are supported.

Triggered operationTrigger read/write for non-cyclic operation.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323