Specifications

Halogen Gas Monitor – MultiZone Remote Display
Instruction 3015-5157 50
HGM-MZ MODBUS RTU Operation
Overview
The HGM-400 and HGM-RD are equipped to communicate with other equipment using the MODBUS RTU
protocol. Using this communication channel a MODBUS master device may communicate with up to 15
HGM-MZ’s on a communications network, exchanging measurement information, alarm data, fault data,
history (logs and trends) and setup information. Additionally, the MODBUS master can control the operating
state of an HGM-MZ, placing the HGM-MZ in any of its different operating modes. The network may be
configured such that the HGM-MZ’s are connected directly to the MODBUS master device, or the MODBUS
master device may communicate with the HGM-MZ’s through the HGM-RD.
NOTE: This document will assume that the reader is familiar with the various parameters used to setup the
HGM-MZ, as well as the different operational modes that the HGM-MZ may be placed in. If you are unfamiliar
with this information, please reference the HGM-MZ operations manual.
Protocol Details
A two-wire RS-485 bus is used for transmission, therefore communication occurs in a Half-Duplex mode. The
HGM-MZ is a slave device and will respond to queries in the MODBUS RTU format from a master device.
Two MODBUS functions are supported. They are function 03 (read holding register) and function 16 (Preset
Multiple registers). Please refer to the MODBUS Protocol Reference Guide (available at
www.modicon.com/techpubs/techPubNew/PI_MBUS_300.pdf) for protocol detail and use instructions.
Using the two MODBUS functions, a master device may read, modify and write data and status information to
any HGM on the network. HGM data is organized into structures (internal to the HGM-MZ) which can be
accessed by the MODBUS registers defined in this document. A corresponding set of data structures should
be maintained by the master device. These master device data structures become the destination for
responses to read queries and sources for preset register commands. When a read holding register query is
made by the master device the HGM-MZ responds by sending the contents of the structure referenced by the
specified register. After the master validates the HGM-MZ response using the CRC bytes, it must then move
the data into its matching data structure before individual items may be accessed or modified. Therefore, the
master data structure should correspond to the HGM-MZ data structure byte for byte. Note that some data
structures have been divided into multiple registers due to MODBUS RTU message length constrains. To
change a setting in the HGM-MZ, the master device first reads the register structure that contains the data
item to be modified, makes the desired change, then sends the structure back using the preset multiple
register function. If the transaction is successful, the HGM-MZ sends the appropriate MODBUS response. It
is the responsibility of the master device when making modifications to insure that all parameters transferred
fall inside the working limits of the HGM-MZ.
Notes on HGM-MZ Polling
After the HGM-MZ’s are setup and operating, the master device need only poll each HGM for its status
register which contains summary data of the HGM’s alarms, faults, and operating state. If exceptions are
detected through the status register and more details are required, additional registers can be examined.
Also if current PPM values are required, the PPM register provides access to current PPM values for all
zones. The HGM-MZ requires a minimum of 20 seconds to complete a gas concentration measurement for a
single zone. Therefore, it is not necessary to poll the HGM-MZ more frequently than once every 15-20
seconds, as there will not be any new data available/obtained by more frequent polling. In fact, excessive
polling will slow the operation of the HGM-MZ. Under no circumstances should the HGM-MZ be continuously
polled at rate faster than 500mS, as this could result in erroneous readings by the HGM-MZ.
Notes on Network Topologies
HGM-MZ’s may be connected directly to the MODBUS network or they may be connected to the network
through an HGM-RD. In either case, each HGM-MZ must have a unique node ID. Up to 15 HGM-MZ’s can
be connected directly to the MODBUS network.
If HGM-MZ’s are accessed via an HGM-RD connected to a MODBUS network, the HGM-RD “BMS enabled”
parameter must be set equal to “1” via the “RDM SETUP” screen on the HGM-RD. The same commands