3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

set_modbus_slave()

Definition

set_modbus_slave(address, val)

Features

It is used to export values to the General Purpose Register area of the Modbus TCP Slave.

Parameters

Parameter Name

Data Type

Default Value

Description

address

int

-

Address value of GPR area  (128~255)

val

int

-

2byte value  (0~65535)

Return

Value

Description

0

Success

Negative value

Failure

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C Extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

Python
set_modbus_slave(128, 0)
set_modbus_slave(255, 65535)

Keyword

set_ / modbus / slave / set_modbus / modbus_slave