Modbus functions, Modbus registers, Network command interface – Hardy HI 6300 Series User Manual
Page 40

32 Chapter
4
•
•
•
•
•
•
Modbus Functions
The Modbus functions allowed in the HI 6300 are:
Function 3: Modbus Read Holding Registers
Function 4: Modbus Read Input Registers
Function 6: Modbus Write Single Register
Function 16 (0x10): Modbus Write Multiple Registers.
Modbus Registers
This instrument has 64 16-bit MODBUS input registers and 64 16-bit output registers. The
data in these registers is in "big endian" format, meaning that the most significant byte
comes first.
•
The first 6 registers (0 – 5) are used for the “command interface” in the unit.
•
Registers 6 & 7 will contain the Net weight in 32 bit floating point format.
•
Registers 8 & 9 will contain the Gross weight in 32 bit floating point format.
•
Registers 10 and 11 will contain the statusword
•
Registers 12 and 13 (HI 6310 only) are for the count function.
Network Command Interface
The "network command interface" uses 6 registers (0 – 5) in and 6 registers out.
•
Register 0: command (shown below)
•
Register 1: status
•
Registers 2, 3: Parameter number. See the diagnostics/parameters web page for a list of
parameter numbers.
•
Registers 4, 5: parameter value
The Modbus master sends a 'command' by writing a value to register 0. Any non-zero
return value is an error.
Here is a list of Hardy command numbers:
•
0: READ PARAM CMD. To read a parameter, write a #0 to the command register
(register #0), and write the parameter number in the parameter ID number in registers 2
and 3, most significant word first. The parameter value may then be read from registers
4 and 5, again most significant word first. This value may be in integer or floating point
format, depending on the parameter. The status register in the reply will contain the
lower 16 bits of the system status word.
•
Status word bit 0: A/D error.
•
Status word bit 6 (0x40): Motion status.
•
Status word bit 15 (0x8000): Not Found - the requested parameter number does
not exist
•
1: ZERO CMD. Write a #1 to the command register to ZERO the gross weight. The
status register will read 0 if this command succeeds.
•
Status Error code 1 (motion)
•
Status Error code 2 (A/D error)