Modbus Read#

block

Block appearance in REPEAT VISION#

Important

The blocks Modbus Client Settings, Modbus Write, Modbus Read are available for use only in the local distribution of the REPEAT VISION platform.

 The block allows reading values from the registers of an external device (programmable logic controller (PLC) or emulator, sensors, diagnostic system) using the Modbus TCP protocol and using them during simulation on the REPEAT VISION platform.

 Modbus Read uses the client settings of the Modbus Client Settings block to read values from the registers of an external device. The address of the first read register is set according to the configuration of the external device’s registers.

Important

The model in REPEAT VISION with Modbus blocks is always Master—the device sending requests and information. For the model to work correctly with the Modbus Read block, it is necessary to add the client settings block Modbus Client Settings.

 Supported read operation types:

  • Holding Registers — reading values from holding registers (Holding Registers).

  • Coil Registers — reading values from coil registers (Coil Status).

  • Input Registers — reading values from input registers (Input Registers).

  • Discrete Inputs — reading values from digital inputs (Discrete Inputs).

 _Supported data types for reading:

  • int16;

  • uint16;

  • int32;

  • uint32;

  • float.

1.  Properties#

Property

Default Value

Description

Units of measurement

Client

–

–

–

Slave ID

1

ID of the slave device to which the REPEAT VISION model connects

–

Read operation type:
Coils;
Discrete inputs;
Holding registers;
Input registers

Holding registers

–

–

Data type:
int16;
uint16;
int32;
uint32;
float, available when selecting Read operation type - Holding registers, Input registers

float

Type of data read from the external device’s registers

–

Starting register address

5

Register address according to the external device’s specification

–

Number of values to read

1

The number of values to read determines the order of read registers starting from the address entered in the Starting register address property. This property also determines the number of output ports.

–

Sampling type:
Fundamental project frequency decimation;
Sample time;
Sampling frequency

Fundamental project frequency decimation

–

–

Sampling type, available when selecting Sampling type - Sampling type

0.05

–

s

Decimation factor of project fundamental discretization frequency, available when selecting Sampling type - Fundamental project frequency decimation

1

–

–

Sampling frequency, available when selecting Sampling type - Sampling frequency

20.0

–

Hz

Note

When using Modbus blocks, the project must always include the Modbus Client Settings block. Then the following can be added to the project:

  • Modbus Write if it is necessary to write values to the external device’s registers;

  • Modbus Read if it is necessary to read values from the external device’s registers.

2.  Inputs and outputs#

Parameters

Input/Output

Description

Units of measurement

Port type

Output 1

Output

The number of ports depends on the property value Number of values to read

–

Automation

In order to see the connection capabilities of the block, you need to go to page Description of block ports

See also

An example of using this block can be found in section Control systems practical guide Home heating control system with Modbus TCP.