MS-2102
8.1
Chapter 8 Communications
Overview
The MS-2102 heat trace controller communicates with
computerized equipment such as programmable logic
controllers, desktop computers or man-machine interfaces
using Modicon Modbus protocol. The MS-2102 supports
a subset of the Remote Terminal Unit (RTU) format of the
protocol that provides extensive monitoring, programming
and control functions using read and write register
commands. The MS-2102 always acts as a slave device
such that it does not initiate communications; it only
listens and responds to requests issued by a master
computer.
Physical Layer
Modbus protocol is hardware independent so that the
physical layer can be a variety of hardware mediums such
as RS-485, RS-422, RS-232 or fiber optics. The MS-2102 is
configured with one RS-485 port. Refer to Chapter 2
Installation, for wiring details.
Each data bit is transmitted in an asynchronous format
consisting of 1 start bit and 1 stop bit to produce a 10-bit
data frame. This is important for transmission through
modems at higher bit rates (11 bit frames are not sup-
ported by some modems at bit rates greater than 300bps).
The baud rate on the serial port is programmable. Baud
rates of 1200, 2400, 4800 and 9600 are available. Parity
is fixed to none. Refer to Chapter 6 Setpoint Values, for
details on baud rate configuration.
The master device must know the address (module
number) of the slave device in order to communicate with
it. The MS-2102 does not respond to requests from the
master unless the request matches the controller’s module
number. Refer to Chapter 6 Setpoint Values, for details on
setting the module number.
Modbus Protocol
This section discusses the Modbus protocol.
Data Structure: Data communications take place in
packets, which consist of multiple asynchronously framed
data. The master sends a packet to the slave and the slave
responds with a packet. End of packet is determined by a
dead time on the data highway.
Modbus packet Format:
Slave Address:
1 byte
Function Code:
1 byte
Data:
N bytes
CRC:
2 bytes
Dead Time:
3.5 bytes transmission time
Slave Address: This is referred to as module number on
the MS-2102 that is to receive packets sent by the master
and respond to the request. The module number must be
unique for each controller on the data highway to avoid
bus contention. The module number is user defineable
from 1 to 250; refer to Chapter 6 Setpoint Values for
details. Only the addressed slave responds to a packet that
starts with its module number.
Function Code: The function code tells the slave what
action to perform. Refer to supported functions in this
section for details.
Data: The number of bytes depends on the function code.
Data include setpoints, Measured Values, or alarm status
or addresses sent between the master and slave.
CRC: Short for Cyclic Redundancy Check, CRC is an
industry standard method used for error detection.
Modbus RTU includes a 16-bit CRC with every packet.
When a slave receives a packet that is in error due to
CRC the slave device ignores the packet to prevent any
erroneous operation.
Dead Time: End of transmission of a packet is determined
when no data is received for a period of 3.5 byte
transmission times (about 15ms at 2400 baud and 4ms at
9600 baud). Consequently, the transmitting device must
not allow gaps between bytes longer than this interval.
Once the dead time has expired without a new byte
transmission, all slaves start listening for a new packet
from the master except the addressed slave.
Supported Function Codes: The following functions are
supported by MS-2102 firmware:
Note: Any slave module must have a unique address
within 1 - 250. Address 255 is reserved for module
commissioning & addressing.
Function code 03 - Read Variable Registers
Modbus implementation: Read Holding Registers
MS-2102 implementation: Read variable registers
In Modbus, Read Holding Registers is used to obtain
current binary value in one or more holding registers.
It assumes that each register is a 16-bit register. For the
MS-2102 implementation of Modbus, this function
obtains value from one variable register or values from a
group of variable registers.
E
D
O
C
s
s
e
r
d
d
A
e
g
n
a
R
e
p
y
T
n
o
i
t
a
t
e
r
p
r
e
t
n
I
3
0
0
0
0
0
5
-
1
0
0
0
4
g
n
i
d
l
o
H
r
e
t
s
i
g
e
R
e
l
b
a
i
r
a
v
d
a
e
R
s
r
e
t
s
i
g
e
r
5
0
0
0
0
0
1
-
1
l
i
o
C
t
u
p
t
u
O
r
e
t
a
e
h
t
e
s
e
R
r
o
m
r
a
l
a
s
c
i
t
s
i
t
a
t
s
6
0
0
0
0
0
5
-
1
0
0
0
4
g
n
i
d
l
o
H
r
e
t
s
i
g
e
R
o
t
n
i
e
u
l
a
v
e
r
o
t
S
e
l
b
a
i
r
a
v
e
n
o
r
e
t
s
i
g
e
r
6
1
0
0
0
0
5
-
1
0
0
0
4
g
n
i
d
l
o
H
r
e
t
s
i
g
e
R
o
t
n
i
e
u
l
a
v
e
r
o
t
S
f
o
p
u
o
r
g
a
e
l
b
a
i
r
a
v
s
r
e
t
s
i
g
e
r