add_modbus_rtu_signal_multi(slaveid=1, port=None, baudrate=115200, bytesize=DR_EIGHTBITS, parity=DR_PARITY_NONE, stopbits=DR_STOPBITS_ONE, name=None, reg_type=DR_HOLDING_REGISTER, start_address=0, cnt=1)
Features
This function registers the ModbusRTU 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 |
---|---|---|---|
slaveid | int | 1 | Slave ID of the ModbusRTU (0 or 1-247) 0 : Broadcase address |
port | string | None | E.g.) “COM”, “COM_USB”, “/dev/ttyUSB0” |
baudrate | int | 115200 | Baud rate 9600, 19200, 57600, 115200, etc |
bytesize | int | 8 | Number of data bits
|
parity | string | "N" | Parity checking
|
stopbits | int | 1 | Number of stop bits
|
name | string | - | Modbus signal name |
reg_type | int | - | Modbus signal type
|
start_address | int | 0 | Start address of Modbus multiple signal |
cnt | int | 1 | Count of Modbus multiple signal |
Return
Value | Description |
---|---|
0 | Success |
Negative value | Failed |
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
add_modbus_rtu_signal_multi(slaveid=1, port=”COM”, baudrate=115200, bytesize=DR_EIGHTBITS, parity=DR_PARITY_NONE, stopbits=DR_STOPBITS_ONE, name=”multi”, reg_type=DR_HOLDING_REGISTER, start_address=0, cnt=5)