Engee documentation

Modbus RTU Setup

Configuring the connection to the server (slave device) using the Modbus RTU protocol.

blockType: CFunction

Path in the library:

/RITM/RITM Modbus/Modbus RTU Setup

Description

To work with the block, install/update the support package RITM blocks.

Block Modbus RTU Setup It is used to set up a connection to a server (a slave device) using the Modbus RTU protocol.

Parameters

Parameters

# Имя порта: — the name of the port to configure

Details

The names of the available ports can be obtained in a pop-up window by clicking on the "Get information about available ports" in the block mask.

Default value

"/dev/ttyS0"

Program usage name

m_server_ip

Tunable

No

Evaluatable

Yes

# Скорость: — receiving and transmitting speed
9600 | 19200 | 38400 | 57600 | 115200

Details

Select the receive/transmit speed.

Values

9600 | 19200 | 38400 | 57600 | 115200

Default value

9600

Program usage name

m_baudRate

Tunable

No

Evaluatable

Yes

# Бит четности: — method for detecting reception and transmission errors
Нет | Even | Odd

Details
  • Even — check for odd numbers;

  • Odd — check for parity.

Values

Нет | Even | Odd

Default value

Нет

Program usage name

m_parity

Tunable

No

Evaluatable

Yes

# Биты данных: — the number of receiving and transmitting data bits
8 | 7 | 6 | 5

Details

Select the number of receiving and transmitting data bits.

Values

8 | 7 | 6 | 5

Default value

8

Program usage name

m_dataBits

Tunable

No

Evaluatable

Yes

# Стоповые биты: — number of receive-transmit stop bits
Один | Два

Details

Select the number of receive-transmit stop bits.

Values

Один | Два

Default value

Один

Program usage name

m_stopBits

Tunable

No

Evaluatable

Yes

# Идентификатор сервера: — connection ID for receiving and transmitting blocks

Details

Acceptable values from 0 before 15.

Default value

0

Program usage name

m_ctx_num

Tunable

No

Evaluatable

Yes

# Максимальное количество попыток переподключения: — the number of attempts to reconnect to the server during initialization of the model

Details

The number of attempts to reconnect to the server during initialization of the model.

Default value

5

Program usage name

m_max_reconnects

Tunable

No

Evaluatable

Yes