Engee documentation

Arduino-modbusRead

Reading values from the internal Modbus register card of the server.

blockType: CFunction

Path in the library:

/Interfaces/Targets/Arduino/Arduino-modbusRead

Description

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

Block Arduino-modbusRead reads values from the internal Modbus register card of the server.

To use this unit, you must first configure the Modbus parameters of the server and the data link. To configure them, use the block Arduino-modbusSetup.

Ports

Input

# conn — connection descriptor
true | false

Details

Waiting to exit the block Arduino-modbusSetup.

Data types

Bool

Complex numbers support

No

Output

# data — data
scalar

Details

A readable bit (Coil) or 2 bytes (Register).

Data types

Bool, UInt16

Complex numbers support

No

# status — data reception status
scalar

Details

Returns 1 if a data reception register exists (its value can always be successfully read).

Returns 0 if this register does not exist in the register map (going outside the address space when trying to read the register).

Data types

UInt8

Complex numbers support

No

Parameters

Main group

# Функция: — Modbus protocol reading function
Read Coil | Read Discrete Input | Read Holding register | Read Input register

Details

Modbus protocol reading function.

Values

Read Coil | Read Discrete Input | Read Holding register | Read Input register

Default value

Read Coil

Program usage name

m_function_name

Tunable

No

Evaluatable

Yes

# Адрес: — the address for reading a bit or register into the Modbus server’s internal register card

Details

The address for reading a bit or register into the Modbus server’s internal register card.

The address space is divided into 4 groups:

  • 00009999 for Read Coil;

  • 1000019999 for Read Discrete Input;

  • 3000039999 for Read Holding register;

  • 4000049999 for Read Input register.

Default value

30000

Program usage name

m_address

Tunable

No

Evaluatable

Yes

# Шаг расчёта: — the period for which the block will be called

Details

The period for which this block will be called.

Default value

-1

Program usage name

sample_time

Tunable

No

Evaluatable

Yes