Gocator Line Profile Sensors: User Manual
Protocols • 506
Field Length (Bytes) Description
Transaction ID 2 Used for transaction pairing. The Modbus Client sets the value and
the Server (Gocator) copies the value into its responses.
Protocol ID 1 Always set to 0.
Length 1 Byte count of the rest of the message, including the Unit identifier
and data fields.
Unit ID 1 Used for intra-system routing purpose. The Modbus Client sets the
value and the Server (Gocator) copies the value into its responses.
Modbus Application Protocol Header
Modbus Application Protocol Specification describes the standard function codes in detail. Gocator
supports the following function codes:
Function Code Name Data Size (bits) Description
3 Read Holding
Registers
16 Read multiple data values from the sensor.
4 Read Input Registers 16 Read multiple data values from the sensor.
6 Write Single Register 16 Send a command or parameter to the sensor.
16 Write Multiple
Registers
16 Send a command and parameters to the sensor.
Modbus Function Code
The data payload contains the registers that can be accessed by Modbus TCP messages. If a message
accesses registers that are invalid, a reply with an exception is returned. Modbus Application Protocol
Specification defines the exceptions and describes the data payload format for each function code.
The Gocator data includes 16-bit, 32-bit, and 64-bit data. All data are sent in big endian format, with the
32-bit and 64-bit data spread out into two and four consecutive registers.
Register Name Bit Position
0 32-bit Word 1 31 .. 16
1 32-bit Word 0 15 .. 0
32-bit Data Format
Register Name Bit Position
0 64-bit Word 3 63 .. 48
1 64-bit Word 2 47 .. 32
2 64-bit Word 1 31 .. 16
3 64-bit Word 0 15 .. 0
64-bit Data Format
Registers
Modbus registers are 16 bits wide and are either control registers or output registers.
Control registers are used to control the sensor states (e.g., start, stop, or calibrate a sensor).