Specifications
Ammonia Gas Monitor – Multi Zone
48
Instruction 3015-5113
AGM-MZ MODBUS RTU Operation
Overview
The AGM-MZ and AGM-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
AGM-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 AGM-MZ, placing the AGM-MZ in any of its different operating modes. The network may be
configured so that the AGM-MZs are connected directly to the MODBUS master device, or the MODBUS
master device may communicate with the AGM-MZs through the AGM-RD.
(NOTE: This document was written with the assumption that the reader is familiar with the various setup
parameters and operational modes for the AGM-MZ.
Protocol Details
A 2 wire RS-485 bus is used for transmission, therefore communication occurs in a Half-Duplex mode. The
AGM-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 AGM on the network. AGM data is organized into structures (internal to the AGM-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 AGM-MZ responds by sending the contents of the structure referenced by the
specified register. After the master validates the AGM-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 AGM-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 AGM-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 AGM-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 AGM-MZ.
AGM-MZ Polling
After the AGM-MZs are setup and operating, the master device need only poll each AGM for its status
register which contains summary data of the AGM’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 AGM-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 AGM-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 AGM-MZ. Under no circumstances should the AGM-MZ be continuously
polled at rate faster than 500mS, as this could result in erroneous readings by the AGM-MZ.
Network Topologies
AGM-MZs may be connected directly to the MODBUS network or they may be connected to the network
through an AGM-RD. In either case, each AGM-MZ must have a unique node ID. Up to 15 AGM-MZs can
be connected directly to the MODBUS network.
If AGM-MZs are accessed via an AGM-RD connected to a MODBUS network, the AGM-RD “BMS enabled”
parameter must be set equal to “1” via the “RDM SETUP” screen on the AGM-RD. The same commands and
registers are used to communicate with the AGM-MZ directly or through the AGM-RD. If the communications
is through the AGM-RD, it monitors each MODBUS message to determine if the message is intended for one
of the AGM-MZs it is connected to. If it is, the AGM-RD passes the message through to the AGM-MZs. If it is