Herunterladen Diese Seite drucken

Modbus Function Codes; Data Addresses In Modbus Messages; Supported Function Codes - Hitachi Abb Rvt Installation Und Betriebsanleitung

Verfügbare Sprachen
  • DE

Verfügbare Sprachen

  • DEUTSCH, seite 161

3. Modbus function codes

3.1.

Data Addresses in Modbus Messages

Modbus defines 4 address spaces: 2 address spaces for bit addressable data and 2 address spaces for 16 bits ad-
dressable data.
Address space
Data
OXXXX
Output bit
1XXXX
Input bit
3XXXX
Input word
4XXXX
Output word
Input register address space will be mainly used for measurements.
Holding register address space will contain settings.
All data addresses in Modbus messages are referenced to zero.
For example:
The coil known as 'coil 1' in a programmable controller is addressed as coil 0000 in the data address field of a Mod-
bus message.
Coil 127 decimal is addressed as coil 007E hex (126 decimal).
Holding register 40001 is addressed as register 0000 in the data address field of the message.
The function code field already specifies a 'holding register' operation. Therefore the '4XXXX' reference is implicit.
Holding register 40108 is addressed as register 006B hex (107 decimal).
3.2.

Supported function codes

The following table gives the Modbus functions which are implemented and supported.
The code is the one used in function field of the Modbus message.
The address space concerned and the purpose of the function are given below.
Code
Function
1
Read coil status
2
Read input status
3
Read holding registers
4
Read input registers
5
Force single coil
6
Preset single register
7
Read exception status
8
Diagnostics
11
Fetch comm. event ctr.
STATUS
Approved
Readable/writable
Read & write
Read
Read
Read & write
Address range/remark
0XXXX reads the on/off status of discrete outputs
1XXXX reads the on/off status of discrete inputs
4XXXX reads contents of output registers
3XXXX reads contents of input registers
0XXXX sets the status of a discrete output
4XXXX sets the value of a holding register
Device specific
Checks the communication system between the master and the
slave
Returns the amount of successful read/write operations on data
points
SECURITY LEVEL
Public
Modbus name
Coil status
Input status
Input register
Holding register
DOCUMENT ID
9AKK106713A9758
RVT CO MM UNI CATI O N
REV.
LANG.
PAGE
K
en
11/71
© 2022 Hitachi Energy. All rights reserved.
loading