Page 20 COMMUNICATIONS SETUP
MODBUS Protocol
Since Modbus protocol is a messaging structure, it is
independent of the underlying physical layer. It is
traditionally implemented using RS-232, RS-422, or
RS-485 communications hardware.
The Quantum™ controller is setup to communicate on
standard Modbus networks using ASCII (American
Standard Code for Information Interchange).
NOTE: With the Quantum™ Controller, ONLY Modbus
ASCII (7 data bits) is recognized, and all references to
Modbus protocol in this document will be as they relate to
ASCII. The mode and serial parameters must be the same
for all devices on a Modbus network, therefore, ensure
that your network is utilizing the Modbus ASCII protocol
before attempting to try to communicate to the Quantum™
portion of the network. Additionally, typical Modbus
protocols allow for network broadcasting, whereby a single
message can be sent to all devices simultaneously. This
Broadcasting is NOT allowed or supported by the
Quantum™ Controller.
The Quantum™ provides the capability to interface with
other devices that support serial data communications
using the Modbus ASCII protocol. This is a Leader /
Follower multi-drop communication method
whereby the Quantum™ is setup to be a Modbus
ASCII Follower. The customer’s PLC (Programmable
Logic Controller) or DCS (Data Communications System,
such as a desktop or laptop computer) must be
setup as a Modbus ASCII Leader. The Leader
initiates the reading and writing of data (queries) to a
Quantum™. The Quantum™ does not generate its own
data, it will only reply from a request by the Leader.
The Quantum™ ID number is used as the Modbus
Follower address. The Leader uses Function Code 3
(Read Holding Registers) to send a request to read
data from the Quantum™. The Leader uses Function
Code 6 (Load Register) to request to change a
setpoint or to send a command such as starting the
compressor. Up to fifty (50) data elements can be read
with one read request.
Address references are numbered relative to the Frick
addresses in the Quantum™ Data Table (see “MODBUS
Addressing Note” in the “Quantum™ Data Table” section
of this manual for additional information). The Quantum™
only accepts one value with a Load Register request.
Changing a setpoint causes the Quantum™ to save the
new setpoint to nonvolatile memory. Be careful not to
continuously request a setpoint change. Keeping the
Quantum™ busy writing to memory will interfere with the
Quantum™ communicating to its I/O boards. A
communication failure to an I/O board will cause the
compressor to shutdown. For more detail and a list of the
data, reference the “Quantum™ Data Table” section of
this manual. For details and information about the actual
protocol, reference the Modicon website at
http://www.modicon.com.
The read (query) and write examples on the following
pages are executed using a terminal emulation package
known as Hyperterminal. For more information on
Hyperterminal, refer to the Hyperterminal section in this
manual. When using Hyperterminal, use the Frick
addresses listed in the address tables, rather than the
Modbus addresses. This is because Hyperterminal does
not use a Modbus driver as a protocol, but rather a pure
ASCII data packet. The Quantum™ however, does need
to be set to Modbus protocol to properly interpret the
ASCII data.
Port Configuration of The Leader
7 Bits per Character (Data Bits)
No Parity
1 Stop Bit
No Handshake
Data Packet
The Modbus protocol establishes the format for the
Leader's query by creating a message (data packet) as
follows:
•Assign the device address (Quantum™ panel ID
#). The address field of a message frame
contains two characters (ASCII). Valid
Quantum™ device addresses are in the range of
01 – 99 decimal. A leader addresses a
Quantum™ by placing the Quantum™ address in
the address field of the message. When the
Quantum™ sends its response, it places its own
address in this address field of the response to
let the Leader know which Quantum™ is
responding.
•A function code defining the requested action
(Query):
•Function Code 3 - to read holding registers
(sends a request to read data from the
Quantum™).
- OR -
•Function Code 6 to load a register (to request to
change a setpoint or to send a command such as
starting the compressor).
•Any data to be sent (Response). The data field is
constructed using sets of two hexadecimal digits,
in the range of 00 to FF hexadecimal. These are
to be made from a pair of ASCII characters. The
data field of messages sent from a Leader to the
Quantum™ devices contains additional
information which the Quantum™ must use to
take the action defined by the function code. This
can include items like discrete and register
addresses, the quantity of items to be handled,
and the count of actual data bytes in the field. If
no error occurs, the data field of a response from a
Quantum™ to a Leader contains the data
requested. If an error occurs, the field contains
an exception code that the Leader application
can use to determine the next action to be taken.
•An error-checking field.
The Query
The function code in the query tells the addressed
Quantum™ what kind of action to perform. The data bytes
contain any additional information that the Quantum™ will
need to perform the function. For example, function code
03 will query the Quantum™ to read holding registers and
respond with their contents. The data field must contain
the information telling the Quantum™ which register to