KEMBAR78
Modbus Function Code and Address Range | PDF | Electrical Engineering | Computer Engineering
0% found this document useful (0 votes)
14 views3 pages

Modbus Function Code and Address Range

The document outlines the object types and access methods for a Modbus slave device, detailing coils, discrete inputs, input registers, and holding registers. It lists the most commonly used function codes for reading and writing these objects, along with their corresponding address ranges. Additionally, it provides a formula for calculating the DCS address from the PLC address.

Uploaded by

vdevnikhil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

Modbus Function Code and Address Range

The document outlines the object types and access methods for a Modbus slave device, detailing coils, discrete inputs, input registers, and holding registers. It lists the most commonly used function codes for reading and writing these objects, along with their corresponding address ranges. Additionally, it provides a formula for calculating the DCS address from the PLC address.

Uploaded by

vdevnikhil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

The following is a table of object types provided by a Modbus slave device to

a Modbus master device:

Object type Access Size

Coil Read-write 1 bit

Discrete input Read-only 1 bit

Input register Read-only 16 bits

Holding register Read-write 16 bits

Most used Function Codes


Read:
 01: Coils (FC=01)
 02: Discrete Inputs (FC=02)
 03: Multiple Holding Registers (FC=03)
 04: Input Registers (FC=04)

Write:
 05: Single Coil (FC=05)
 06: Single Holding Register (FC=06)
 0F: Multiple Coils (FC=15)
 10: Multiple Holding Registers (FC=16)

MODBUS CODES
OR ADDRESS RANGE PURPOSE
FUNCTION CODES

01, 05, 15 00001 to 09999 Discrete Output (Coils), Read/Write (DI/DO)

02 10001 to 19999 Discrete Inputs (Contacts), Read Only (DI)

04 30001 to 39999 Analog Input Registers, Read Only (AI)

03, 06, 16 40001 to 49999 Holding Registers, Read/Write (AI/AO)

MODBUS CODES
OR FUNCTION
FUNCTION CODES
01 Read one or more output "coils" (1 bit each)

02 Read one or more input "contacts" (1 bit each)

03 Read one or more "holding" registers (16 bit each)

04 Read one or more analog input registers (16 bit each)

05 Write (force) a single output "coil" (1 bit)

06 Write (preset) a single "holding" register (16 bits)

15 Write (force) multiple output “coils” (1 bit)

16 Write (preset) a multiple "holding" registers (16 bits)

Function Address Range (Modicon


Data Type Access
Codes Notation)

Coils Read/Write 01, 05, 15 00001–09999 (DI/DO)

Discrete Inputs Read-Only 02 10001–19999 (DI)

Input Registers Read-Only 04 30001–39999 (AI)

Holding Registers Read/Write 03, 06, 16 40001–49999 (AI/AO)

Function Codes and Address Ranges


 Function Code 1 (0x01): Read Coils. Typically associated with address range 00001-
65536 (or 0-65535 in some notations).
 Function Code 2 (0x02): Read Discrete Inputs. Similar address range to coils.
 Function Code 3 (0x03): Read Holding Registers. Commonly associated with address
range 40001-49999 (or 40000-49999).
 Function Code 4 (0x04): Read Input Registers. Commonly associated with address
range 30001-39999 (or 30000-39999).
 Function Code 5 (0x05): Write Single Coil.
 Function Code 6 (0x06): Write Single Holding Register.
 Function Code 15 (0x0F): Write Multiple Coils.
 Function Code 16 (0x10): Write Multiple Holding Registers.
MODBUS ADDRESS CALCULATION FORMULA:

DCS ADDRESS =
((LAST 3 DIGITS OF PLC ADDRESS * 2) – 1) + 42000

EXAMPLE :1
41057 IS THE PLC ADDRESS, DCS ADDRESS IS
= ((057*2) – 1) + 42000
= (114-1) + 42000
= 42113 is the DCS address

You might also like