Link layer – Despatch Protocol 3 Modbus Communications User Manual

Page 8

Advertising
background image

A

BOUT

T

HIS

M

ANUAL

Modbus Programming Manual

8

Version 2

Copyright © 2012 by Despatch Industries.

All rights reserved. No part of the contents of this manual may be reproduced, copied or transmitted in any form or by any
means including graphic, electronic, or mechanical methods or photocopying, recording, or information storage and
retrieval systems without the written permission of Despatch Industries, unless for purchaser's personal use.

1.4.5.

Link Layer

A Query (or command) is transmitted from the Modbus Master to the Modbus Slave. The slave
instrument assembles the reply to the master (see

Figure 1

).

A message for either a QUERY or RESPONSE is made up of an inter-message gap followed by a
sequence of data characters. The inter-message gap is at least 3.5 data character times - the
transmitter must not start transmission until 3 character times have elapsed since reception of the
last character in a message, and must release the transmission line within 3 character times of the
last character in a message.

Note:

Three character times is approximately 0.25ms at 115200 bps, 0.51ms at 57600 bps, 0.75ms at
38400 bps, 1.5ms at 19200 bps, 3ms at 9600 bps and 6ms at 4800bps.

Data is encoded for each character as binary data, transmitted LSB first.

For a QUERY the address field contains the address of the slave destination. The slave address is
given together with the Function and Data fields by the Application layer. The CRC is generated
from the given address, function and data characters.

For a RESPONSE the address field contains the address of the responding slave. The Function
and Data fields are generated by the slave application. The CRC is generated from the address,
function and data characters.

The standard MODBUS RTU CRC-16 calculation employing the polynomial 2

16

+2

15

+2

2

+1 is

used.

MODBUS

MASTER

SLAVE

INSTRUMENT

QUERY

RESPONSE

Figure 1. Modbus Link Layer.

Advertising