Modbus Protocol; Introduction To Modbus Protocol; Modbus Function Codes - ABB 8241 Operating Instructions Manual

8240 series. modbus communication supplement
Table of Contents

Advertisement

7 MODBUS PROTOCOL

7.1 Introduction to MODBUS Protocol (RTU only)
MODBUS communication is based on a master and a slave arrangement. The master sends a message to one slave at a time
and waits for a reply.
The slave cannot accept a new message until the existing message is processed and a reply sent to the master (maximum
response time 250 milliseconds). The slave monitors the elapsed time between receipt of characters. If the elapsed time without
a new character is 3
1
/
character times, the slave assumes the next character received is the start of a new message.
2
To allow the master to differentiate between more than one slave in a system, each slave is given a unique identity address
(between 1 and 99).
A broadcast address (address zero) can be used to access all slave devices with one command. This is limited to write messages
only and there is no slave acknowledgment.
Note. MODBUS RTU requires 1 start bit, 8 data bits, 1 parity bit (optional) and 1 or 2 stop bits. The 8240 uses only
1 stop bit.
7.2 MODBUS Function Codes – Table 4.1
The function code field instructs the addressed slaves which function to perform.
MODBUS
MODBUS Message Name
Function Code
01
Read Coil Status
03
Read Holding Register
05
Force Single Coil
06
Preset Single Register
Loopback Diagnostic Test
08
Preset Multiple Registers
16
*NAK = Negative Acknowledgement
Read up to 16 consecutive discrete (boolean) points from a specific point. The 8240
returns zeros for points which do not contain defined data and NAKs* any request for
point numbers greater that 100.
Up to 8 consecutive registers from a specific starting register. The 8240 returns zeros
from registers which do not contain defined data and NAKs any request for register
numbers greater than 100.
Write one discrete (boolean) point. The 8240 NAKs this if the point is not currently
writeable.
Write one register. The 8240 NAKs if the register is not currently writeable. This function
code also applies any existing limits to the register before storage in the database.
Echo the message, only 'Return of Query' is supported.
Write up to 8 consecutive registers from a specified starting register. The 8240 NAKs if
any of the registers are not currently writeable, but still carries out all the writes which
are valid, applying any currently applicable limits to the value before storage in the
database.
Table 7.1 MODBUS Function Codes
4600 MODBUS Definition
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

8242

Table of Contents