Engee documentation

Modbus Write Coil

Page in progress.

Implementation of protocol function 5 (0x05) - Force Single Coil.

blockType: CFunction

Path in the library:

/RITM/RITM Modbus/Modbus Write Coil

Description

The Modbus Write Coil block implements the following protocol functions:

  • 5 (0x05) - Force Single Coil.

The block writes a single flag.

Ports

Input

# Data — 8-bit unsigned integer for writing
scalar

Details
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 was performed successfully, 1 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

# Начальный адрес записи — write address, excluding offset

Details
Default value

0

Program usage name

m_start_addr

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