Figure 5-2. Modbus Ascii Transmitted And Received Frame Formats; Figure 5-3. Modbus Ascii Frame Format; Figure 5-4. Modbus Ascii Frame Analysis - ABB TPU2000 Technical Manual

Modbus/modbus plus/ modbus tcp/ip automation
Table of Contents

Advertisement

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.

Figure 5-2. Modbus ASCII Transmitted and Received Frame Formats

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
START
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
TPU2000/2000R Modbus/Modbus Plus Automation Guide
Data Sent From Master
Device
Function
Addr
Code
1 byte
1 byte
Data Received From Slave
Device
Function
Addr
Code
1 byte
1 byte
(Device Address = 0 (Null Command), 1 - 247, 255 (Broadcast)
START
ADDRESS
2 Chars
1 Char
:

Figure 5-3. Modbus ASCII Frame Format

1
2
3
4
5
With Parity Checking
1
2
3
4
5
Without Parity Checking

Figure 5-4. Modbus ASCII Frame Analysis

8 Bit Data Bytes
Varies per command
8 Bit Data Bytes
Varies per command
FUNCTION
DATA
2 Chars
N Chars
6
7
PARITY
STOP
6
7
STOP
STOP
Checksum
1 byte
Checksum
1 byte
LRC
END
2 Chars 2 Chars
CR LF
39

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tpu2000r

Table of Contents