Specifications

Halogen Gas Monitor – Multi Zone
Instruction 3015-5074 49
HGM-MZ MODBUS RTU Operation
Overview
The HGM-MZ 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-MZs 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 so that the HGM-MZs are connected directly to the MODBUS master device, or the MODBUS
master device may communicate with the HGM-MZs through the HGM-RD.
(NOTE: This document was written with the assumption that the reader is familiar with the various setup
parameters and operational modes for the HGM-MZ.
Protocol Details
A 2 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
are within the working limits of the HGM-MZ.
HGM-MZ Polling
After the HGM-MZs are setup and operating, the master device need only poll each HGM for its status
register which contains summary data of the HGMs 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.
Network Topologies
HGM-MZs 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-MZs can
be connected directly to the MODBUS network.
If HGM-MZs 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
and registers are used to communicate with the HGM-MZ directly or through the HGM-RD. If the
communications is through the HGM-RD, it monitors each MODBUS message to determine if the message is
intended for one of the HGM-MZs it is connected to. If it is, the HGM-RD passes the message through to the