MBTCP Protocol
PLX30 Series
User Manual
Ethernet and Serial Gateways
Page 104 of 200
ProSoft Technology, Inc.
September 19, 2012
Parameter
Value
Description
done only when using an even number of words, such as when
32-bit integer or floating-point data is involved.
Node IP
Address
xxx.xxx.xxx.xxx
IP address of the device being addressed by the command.
Serv Port
502 or other
supported port
on server
Service port on which communication will occur. Use a value of
502 when addressing Modbus TCP/IP servers which are
compatible with the Schneider Electric MBAP specifications (this
will be most devices). If the server device supports another
service port, enter the value here.
Slave
Address
1 to 255 (0 is a
broadcast)
Specifies the node address of a remote Modbus Serial device
through a Modbus Ethernet to Serial converter. Values of 1 to
255 are permitted.
Note:
Most Modbus devices only accept addresses in the range
of 1 to 247, so check with the slave device manufacturer to see
if a particular slave can use addresses 248 to 255.
If the value is set to zero, the command will be a broadcast
message on the network. The Modbus protocol permits
broadcast commands for
write
operations.
Do not
use node
address 0 for
read
operations.
Modbus
Function
1, 2, 3, 4, 5, 6,
15, or
16
Specifies the Modbus Function Code to be executed by the
command. These function codes are defined in the Modbus
protocol. (More information on the protocol is available from
.) The following function codes are supported
by the gateway.
1
- Read Coil Status
2
- Read Input Status
3
- Read Holding Registers
4
- Read Input Registers
5
- Force (Write) Single Coil
6
- Preset (Write) Single Register
15
- Force Multiple Coils
16
- Preset Multiple Registers
MB Address
in Device
Varies
Specifies the starting Modbus register or bit address in the
server to be used by the command. Refer to the documentation
of each Modbus server device for the register and bit address
assignments valid for that device.
The Modbus Function Code determines whether the address
will be a register-level or bit-level OFFSET address into a given
data type range. The offset will be the target data address in the
server minus the base address for that data type. Base
addresses for the different data types are:
00001 or 000001 (0x0001) for bit-level Coil data (Function
Codes 1, 5, and 15).
10001 or 100001 (1x0001) for bit-level Input Status data
(Function Code 2)
30001 or 300001 (3x0001) for Input Register data (Function
Code 4)
40001 or 400001 (4x0001) for Holding Register data
(Function Codes 3, 6, and 16).
Address calculation examples:
o
For bit-level Coil commands (FC 1, 5, or 15) to read or
write a Coil 0X address 00001, specify a value of 0