add_modbus_signal_multi()

Definition

add_modbus_signal_multi(ip, port, slaveid=255, name=None, reg_type=DR_HOLDING_REGISTER, start_address=0, cnt=1)

Features

This function registers the ModbusTCP FC15 & FC16 multiple signal. The Modbus I/O must be set in the Teach Pendant I/O set-up menu. Use this command only for testing if it is difficult to use the Teach Pendant. The Modbus menu is disabled in the Teach Pendant if it is set using this command.

Note

Initial value setting function is not supported.

Parameters

Parameter Name

Data Type

Default Value

Description

ip

string

-

IPv4 address of the ModbusTCP module

port

int

-

Port number of the ModbusTCP module (Range: 1 - 65535)

slaveid

int

255

  • Slave ID of the ModbusTCP module
    (0 or 1-247 or 255)

0 : Broadcast address

255 : Default value for ModbusTCP

name

string

None

Modbus signal name (max 25 characters)

reg_type

int

DR_HOLDING_REGISTER

Modbus signal type

  • DR_COIL =DR_MODBUS_DIG_OUTPUT

  • DR_HOLDING_REGISTER =DR_MODBUS_REG_OUTPUT

start_address

int

0

Start address of Modbus multiple signal (Range: 0 - 65535)

cnt

int

1

Count of Modbus multiple signal (max 100)

Return

Value

Description

0

Success

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data type 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
add_modbus_signal_multi(ip="192.168.137.200", port=502, slaveid=255, name="multi", reg_type=DR_HOLDING_REGISTER, start_address=0, cnt=5)

Keyword

add_ / add_modbus / modbus / modbus_ / modbus_signal / signal_multi