Modbus Write#

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.

 Modbus Write uses the configuration of the Modbus Client Settings block to write values to the registers of an external device.

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 Write block, it is necessary to add the client settings block Modbus Client Settings.

 Supported write operation types:

  • Holding Registers — writing one or more values to holding registers (Holding Registers).

  • Coil Registers — writing one or more values to coil registers (Coils).

 Supported data types for writing:

  • 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

–

Write operation type:
Coil Registers;
Holding Registers

Holding Registers

–

–

Data type:
int16;
uint16;
int32;
uint32;
float, available when selecting Write operation type - Holding Registers

float

Type of data written to the external device’s registers

–

Starting register address

5

Register address according to the external device’s specification

–

Number of values to write

1

Determines the order of writing information to the external device’s 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

Input”

Input

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

–

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.