Modbus protocol, 2 rtu frame format – KROHNE MFC 300 Modbus User Manual

Page 8

Advertising
background image

6

MODBUS PROTOCOL

8

MFC 300

www.krohne.com

11/2009 - 4000744801 - AD Modbus MFC 300 R01 en

Modbus protocol

6.1 General information concerning the protocol

Using RTU (Remote Terminal Unit) format, data is transmitted as 8 bit binary characters. There
are no special characters to determine the start and end of a message frame.

Synchronization is achieved by a minimum silent period of at least 3.5 character times before the
start of each frame transmission and a maximum silent period of 1.5 character times between
characters in the same frame.

6.2 RTU frame format

The format of the query and response frames vary slightly depending upon the command
function. The basic form is outlined below.

Command function

Frame format

Description

Silent period

3.5 x T

All transmissions must be preceded by a minimum silent

period of 3.5 x T, where T is the transmission time of a

single character. This can be calculated from the baud

rate, e.g. at 19.2 kb no parity with 1 stop bit (10 bits),

T = 520 µs.

Slave address

8 bits

This is a single byte slave address which is transmitted

first and must be in the range of 1...247. Address 0 is

reserved for a broadcast address which all slaves should

recognize, and therefore requires no response.

Function code

8 bits

This is an eight bit code in the range of 1...255 although

only 126 functions exist as the codes 129...255 represent

an error condition. An error condition occurs when the

addressed slave does not accept the command, in which

case it responds with the function code + 128, i.e. with its

MSB set to 1.

Register start address or

byte count when required

8 bit byte count

16 bit address

Register start address:

Register start address:

Register start address:

Register start address: for a query command that requires

data to be returned, this field will contain the 16 bit start

address of the register (or data) to be returned.

Note that the converter uses protocol addresses.

Therefore the register address listed is the actual number

required in the Modbus command.

E.g:

E.g:

E.g:

E.g: to access input register 30006, the register start

address is 30006dec = 7536hex.

Byte count:

Byte count:

Byte count:

Byte count: In general this is only present in frames that

are transferring data, and has a value equal to the number

of bytes contained in the data field. The data field is limited

to a maximum of 250 bytes.

Number of points or data

bytes when required

n × 8 bits

Number of points:

Number of points:

Number of points:

Number of points: for a query command that requires data

to be returned, this field will contain the number of

registers to be returned regardless of their bit size.

Data bytes:

Data bytes:

Data bytes:

Data bytes: contains the data requested. The converter can

use big endian format (MSB first) or little endian

format (LSB first).

CRC

16 bits

This field contains a 16 bit CRC which is calculated on all

the data bits of the message bytes.

.book Page 8 Tuesday, November 24, 2009 1:48 PM

Advertising