
TPU2000/2000R Modbus/Modbus Plus Automation Guide
39
The generic Modbus Frame is analyzed in Figure 5-3. The start of an ASCII frame is always a colon (: = 3A HEX)
and a termination of the command is a line feed and carriage return (lf cr = 0D 0A). The format is the same for
the host transmitting the frame and the slave node responding to the host’s transmission. The device address is
imbedded within the frame along with the Modbus command function code. A checksum is appended to the
entire command. The checksum is a Longitudinal Redundancy Checksum. The LRC checksum combined with
parity and internal field length detection determination, provides good security in detection of data packet errors.
LRC is easily calculated by many devices which results in ASCII emulation’s popularity.
Device
Addr
1 byte
Function
Code
1 byte
8 Bit Data Bytes
Varies per command
Checksum
1 byte
Device
Addr
1 byte
Function
Code
1 byte
8 Bit Data Bytes
Varies per command
Checksum
1 byte
Data Sent From Master
Data Received From Slave
(Device Address = 0 (Null Command), 1 - 247, 255 (Broadcast)
Figure 5-2. Modbus ASCII Transmitted and Received Frame Formats
START
FUNCTION
ADDRESS
DATA
LRC
END
1 Char
:
2 Chars
2 Chars
N Chars
2 Chars2 Chars
CR LF
Figure 5-3. Modbus ASCII Frame Format
The Modbus characters are encoded with a variety of frame sizes. An analysis of each frame is illustrated in
Figure 5-4. When selecting a common frame size, (as explained in the configuration setup examples), parity,
word length, and stop bits are selected to form a 10 bit data frame (1 start bit + 7 data bits + 1 stop bit + 1 Parity
bit “OR” 1 start bit + 2 stop bits + 7 data bits + NO Parity = 10 bits per frame). It is important to note this
distinction since if TPU2000,and TPU2000R, device attachment is to occur through a device, the device must
support 10 bit asynchronous data framing.
Least Significant Bit …………………………………………Most Significant Bit
START 1 2 3 4 5 6 7 PARITY STOP
With Parity Checking
START 1 2 3 4 5 6 7 STOP STOP
Without Parity Checking
Figure 5-4. Modbus ASCII Frame Analysis
The TPU2000 and TPU2000R offers a variety of frame sizes. If the frame size, 8N1 is selected (8 Data Bits, No
Parity, 1 Stop Bit), then an additional stop bit is inserted. The frame format follows that of Figure 5-4 “ Without
Parity Checking”. However, when using ASCII protocol with many other devices, the data is limited to 7 bits.
Selection of 8 bits for the data frame will automatically require that the device receive/transmit RTU mode. The