6.2 Modbus
®
TCP
The Modbus
®
23
TCP protocol provides device information using register and coil banks defined by the slave device. Modbus
TCP can also be used to modify parameters of the sensor.
Important:
Parameter changes over Modbus TCP are only stored in temporary memory and are not
retained through a reboot unless the Save Parameters Permanent Input Bit is used.
This section defines the register and coil banks. By specification, Modbus TCP uses TCP port 502.
The Modbus Client must use a UNIT ID of 1 or higher to connect to the ZMX sensor. The Modbus TCP remote unit identifier
is used with Modbus TCP devices that are composites of several Modbus devices. For example, on Modbus TCP to Modbus
RTU gateways. In this case, the unit identifier tells the Slave Address of the device behind the gateway. Most Modbus TCP
Clients use a Unit ID of 1 or higher.
The Input Bits can be set as Coils using Modbus function code 05 (Force Single Coil). The state of the Input ACK Bits and
Status Bits can be read as Inputs (10000) using Modbus function code 02 (Read Input Status).
Modbus Function Codes Supported
01: Read Coil Status
02: Read Input Status
03: Read Holding Registers
04: Read Input Registers
05: Force Single Coil
06: Preset Single Register
07: Read Exception Status
16: Preset Multiple Registers
Table 5: Modbus TCP Input and Output Bits
Input Bits
Output Bits
Function Code 05: Force Single Coil
Function Code 02: Read Input Status
Coil
NAME
Input
NAME
00001
Update ROI Parameters
10001
Update ROI Parameters ACK
00002
Save Parameters Permanent
10002
Save Parameters Permanent ACK
00003
Reset Application Results
10003
Reset Application Results ACK
00004
Trigger
10004
Trigger ACK
00005
reserved
10005
reserved
00006
reserved
10006
reserved
00007
reserved
10007
Fill Level Limit
00008
reserved
10008
reserved
00009
reserved
10009
Peak Height Limit
00010
reserved
10010
reserved
00011
reserved
10011
Discrete Output State (1)
00012
reserved
10012
Discrete Output State (2)
00013
reserved
10013
reserved
00014
reserved
10014
reserved
00015
reserved
10015
reserved
00016
reserved
10016
Configuration Error
23
Modbus
®
is a registered trademark of Schneider Electric USA, Inc.
ZMX Series 3D Time of Flight Sensor
www.bannerengineering.com - Tel: + 1 888 373 6767
39