Skip to main content
Skip table of contents

set_modbus_slave(address, val)

Features

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

Parameter

Parameter NameData TypeDefault ValueDescription

address

int

-

Address value of GPR area  (128~255)

val

int

-

2byte value  (0~65535)

Return

ValueDescription

0

Success

Negative value

Failure

Exception

ExceptionDescription

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

PY
set_modbus_slave(128, 0)
set_modbus_slave(255, 65535)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.