Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Modbus Function Codes and Addresses
Share
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > Control Systems > Modbus Function Codes and Addresses

Modbus Function Codes and Addresses

In this article, you will learn the Modbus communication protocol function codes and address range with examples.

Last updated: November 9, 2022 9:34 am
Editorial Staff
Control Systems
No Comments
Share
4 Min Read
SHARE

A listing of commonly-used Modbus function codes appears in the following table.

Contents
Modbus Function CodesModbus AddressesModbus Example

Modbus Function Codes

Modbus Code

Live data inside of any digital device is always located at some address within that device’s random-access memory (RAM).

The Modbus “984” addressing standard defines sets of fixed numerical addresses where various types of data may be found in a PLC or other control device.

Modbus Addresses

The absolute address ranges (according to the Modbus 984 scheme) are shown in this table, with each address holding 16 bits of data:

Modbus Address Range

Note how all the Modbus address ranges begin at the number one, not zero as is customary for so many digital systems.

For example, a PLC with sixteen analog input channels numbered 0 through 15 by the manufacturer may “map” those input registers to Modbus addresses 30001 through 30016, respectively.

Modbus Example

While this fixed addressing scheme was correct for the original PLCs developed by Modicon, it almost never corresponds directly to the addresses within a modern Modbus master or slave device.

Manufacturers’ documentation for Modbus-compatible devices normally provides Modbus “mapping” references so technicians and engineers alike may determine which Modbus addresses refer to specific bit or word registers in the device.

In some cases, the configuration software for a Modbus-compatible device provides a utility where you may assign specific device variables to standard Modbus register numbers.

An example of a Modbus variable mapping page appears in this screenshot taken from the configuration utility for an Emerson Smart Wireless gateway, used to “map” data from variables within WirelessHART radio-based industrial field instruments to Modbus registers within the gateway device where other devices on a wired network may read that data:

Emerson Smart Wireless gateway

As you can see here, the primary variable within temperature sensor TT-101 (TT-101.PV) has been mapped to Modbus register 30001, where any Modbus master device on the wired network will be able to read it.

Likewise, the secondary variable within level switch LSL-78 (LSL-78.SV) has been mapped to Modbus register 30041.

It is important to note that Modbus registers are 16 bits each, which may or may not exactly fit the bit width of the device variable in question. If the device variable happens to be a 32-bit floating point number, then two contiguous Modbus registers must be used to hold that variable, only the first of which will likely appear on the Modbus mapping page (i.e. the Modbus map will only show the first Modbus register of that pair).

If the device variable happens to be a boolean (single bit), then it is likely only one bit within the 16-bit Modbus register will be used, the other 15 bits being “wasted” (unavailable) for other purposes.

Details such as this may be documented in the manual for the device performing the Modbus mapping (in this case the Emerson Smart Wireless Gateway), or you may be forced to discover them by experimentation.

© 2019-2021 by Tony R. Kuphaldt – under the terms and conditions of the Creative Commons Attribution 4.0 International Public License
Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

Industrial Automation System Architecture Reference Model
I&C Engineer Roles & Responsibilities – Instrumentation Design
What is Instrumentation Control System ?
Siemens PLC Course for Beginners: Problems and Solutions
How to Avoid Bad Grounds ?
Interconnection between PLC, MCC, LCP & Pumps – Video
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

2-wire Transmitters Current Loops
Hardwired I/O and Serial I/O – Differences Explained
Network Operating System
Process Control Systems Philosophy Concept
DCS System Layout and its Different Parts
VFD Commissioning and Testing Procedure (Variable Frequency Drive)
Basics of Trips, Interlocks, Permissives & Sequences
How to Do Loop Checks During Plant Pre-Commissioning

Keep Learning

Controller Output Current Loop

DCS Controllers to Output Current Loops

Adaptive Controller Overview

What is Adaptive Control?

4-20mA Current Loop Components

Why Use a Current Loop?

PID Controller Tunning Manually

PID Controller Parameters Tuning Manually

Library of PlantPAx Process Objects

How to Download PlantPAx Library?

What is NEST loading=

What is Nest Loading? – DCS and PLC Control Systems

how-a-4-20ma-transmitter-works

How a 4-20mA Transmitter Works?

Ziegler-Nichols closed-loop Formula

Tuning a Temperature Process Control Loop

Learn More

Electrical Machines Short Answers

Electrical Machines Short Answers

Seven Segment LED Display

Difference Between Common Cathode and Common Anode 7 Segment LED Display?

Tuning a Liquid Level Process Control Loop - 1

Tuning a Liquid Level Process Control Loop

Parallel Circuit Unknown Resistance

Simplified Formulas for Parallel Circuit Resistance Calculations

Digital Control Valve Working Principle

Digital Control Valve Working Principle

Digital Electronics Multiple Choice Questions

Programmable Logic Array Objective Questions

Custom CNC Machining Complete Guide

Custom CNC Machining – A Complete Guide You Cannot Miss

Comparison between Transit time and Doppler Flow Meter

Difference between Transit time and Doppler Ultrasonic Flow Meter

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?