Modbus Protocol; Introduction To Modbus Protocol - Omron NB3Q-TW**B series Connection Manual

Nb-series programmable terminals
Hide thumbs Also See for NB3Q-TW**B series:
Table of Contents

Advertisement

5 Modbus Connection
5-6

Modbus Protocol

5-6-1

Introduction to Modbus Protocol

Modbus functions as a request-response protocol which provides the service specified by function
codes.
Modbus protocol such as ASCII, RTU, and TCP does not specify the physical layer, but defines the
message frame and is available to communicate with the Controllers through varied networks. In ASCII
mode and RTU mode, the protocol is composed of the each combination of message and data, or
command and response. The data communications of Modbus adopt master-slave mode. In the mode,
first of all, the master sends a message and the slave receives the message, followed by the slave
replies the data to the request by the master.
As the master can also send the data directly to the slave to change the data of the slave, that means
the master and the slave can perform bidirectional read and write.
When the PTs of NB series performs the communications following the Modbus protocol, it is
performed in accordance with Modbus communications procedure.
Common format of message frame is shown as follows.
Address code
8 bits
 Address code
Data field of the message frame is two characters when the transmission mode is ASCII and eight
bits when it is RTU. Addresses of the slave are ranged from 0 to 247 (written by decimal) and
addresses of each device are allocated from 1 to 247. The master device select the slave device
through the data field of the message in which the addresses of the slave communicating with the
master are stored. When the slave replies the message, in order to recognize which slave replied to
the message, the addresses replied from the slave are stored in the data field of the response mes-
sage. Address 0 is used as a broadcast address which can be recognized by all the slave devices.
 Function code
Modbus Function
Code
01
02
03
04
05
06
15
16
5-10
Function code
8 bits
Name
Read coil status
Reads the bit data (N bits)
Read input discrete
Reads the bit data
value
Read multiple registers
Reads the integer type/character type/status
word /floating-point data (N words)
Read input registers
Reads the integer type/status word/
floating-point type data
Write single coil
Writes the bit data (one bit)
Write single register
Writes the integer type/character type/status
word /floating-point data (one word)
Write multiple coils
Writes the bit data (N bits)
Write multiple registers
Writes the integer type/character type/status
word /floating-point data (N words)
NB-series Programmable Terminals Host Connection Manual (V108)
Data area
Error checking code
N × 8 bits
Function
16 bits
Corresponding
Address Type
0x
1x
4x
3x
0x
4x
0x
4x

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nb5q-tw**b seriesNb7w-tw**b seriesNb10w-tw01b

Table of Contents