QUANTUM™ HD COMPRESSOR CONTROL PANEL
COMMUNICATIONS SETUP
090.040-CS (JAN 14)
Page 45
MODBUS® ASCII (Serial Communications)
In the ASCII Transmission Mode (American Standard
Code for Information Interchange), each character
byte in a message is sent as 2 ASCII characters. This
mode allows time intervals of up to a second between
characters during transmission without generating
errors. Some particulars about MODBUS® ASCII:
• The device address field of the message
frame contains two characters (16 bits).
• The function code field of the message
frame will contain two characters (16 bits).
• Word size is selectable.
• Error checking is accomplished using LRC
(Longitudinal Redundancy Check).
• Hyperterminal can be used to test commu-
nications.
MODBUS® RTU (Serial Communications)
In RTU (Remote Terminal Unit) Mode, each 8-bit
message byte contains two 4-bit hexadecimal char-
acters, and the message is transmitted in a continu-
ous stream. The greater effective character density
increases throughput over ASCII mode at the same
baud rate. Some particulars about MODBUS® RTU:
• The device address field of the message
frame contains 8 binary bits.
• The function code field of the message
frame will contain 8 binary bits
• Word size is selectable.
• Error checking is accomplished using CRC
(Cyclical Redundancy Check).
• Hyperterminal cannot be used to test com-
munications.
Serial Port Configuration Of The Leader
7 or 8 Bits per Character (Data Bits)
Odd, Even or No Parity
1 or 2 Stop Bits
No Handshake
Data Packet
The MODBUS® protocol establishes the format for
the Leader's query by creating a message (data pack-
et) as follows:
• Assign the device address (Quantum™ panel
ID #). The address field of a message frame
contains two characters for ASCII, or 8 bits
for RTU. Valid Quantum™ device addresses
are in the range of 01 – 99 decimal. A lead-
er 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 respond-
ing.
• An 8-bit function code defining the request-
ed action (Query):
• Function Code 3 - to read holding regis-
ters (sends a request to read data from the
Quantum™).
• Function Code 6 to load a register (to re-
quest to change a setpoint or to send a
command such as starting the compressor),
or a function code 16 (RTU only) to load
multiple registers.
• Any data to be sent (Response). The data
field is constructed using sets of two hexa-
decimal digits, in the range of 00 to FF
hexadecimal. These are to be made from a
pair of ASCII characters (ASCII), or one 8-bit
for RTU. 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 de-
fined 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 ex-
ample, function code 03 will query the Quantum™ to
read holding registers and respond with their con-
tents. The data field must contain the information
telling the Quantum™ which register to start at and
how many registers to read. The error check field
provides a method for the Quantum™ to validate the
integrity of the message contents.
The Response
If the Quantum™ makes a normal response, the func-
tion code in the response is an echo of the function
code in the query. The data bytes contain the data
collected by the Quantum™, such as register val-
ues or status. If an error occurs, the function code
is modified to indicate that the response is an er-
ror response, and the data bytes contain a code that
describes the error. The error check field allows the
leader to confirm that the message contents are valid.
Data Field
The data field is constructed using sets of two hexa-
decimal digits, in the range of 00 to FF hexadecimal.
For ASCII, these can be made from a pair of ASCII
characters. For RTU, this is one 8-bit number.