Engee documentation

Modbus Write Coils

Page in progress.

Writing values in multiple bits.

blockType: CFunction

Path in the library:

/RITM/RITM Modbus/Modbus Write Coils

Description

The Modbus Write Coils block is used to write values to multiple bits.

Modbus function: 15 (0x0F).

Ports

Input

# Data — scalar or vector of 8-bit unsigned integers to be recorded
scalar | vector

Details

The length of the vector must not exceed 1968.

Data types

UInt8.

Complex numbers support

No

Output

# Status — transaction status
scalar

Details

Designed for error control and error handling in the model. Error codes:

  • -1 - operation error.

If the operation is successful, the number of written bits will be returned.

Data types

Float64.

Complex numbers support

No

Parameters

Параметры

# Идентификатор сервера — slave device ID

Details
Default value

0

Program usage name

m_server_ip

Tunable

No

Evaluatable

Yes

# Начальный адрес записи — initial address for writing, without taking into account the offset

Details
Default value

0

Program usage name

m_start_addr

Tunable

No

Evaluatable

Yes

# Количество битов — number of bits to write

Details
Default value

1

Program usage name

m_amout_coils

Tunable

No

Evaluatable

Yes

# Шаг расчёта, с: — calculation step in seconds for sending data from a real-time application

Details
Default value

-1

Program usage name

m_sample_time

Tunable

No

Evaluatable

Yes