# Modbus Addressing Documentation - 6 digits

**URL:** <https://forum.inductiveautomation.com/t/modbus-addressing-documentation-6-digits/68958>\
**Category:** Ignition\
**Created:** [January 24, 2023, 11:39am UTC](https://forum.inductiveautomation.com/t/modbus-addressing-documentation-6-digits/68958 "2023-01-24T11:39:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISEMAREN\_AAG](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@ISEMAREN\_AAG](https://forum.inductiveautomation.com/u/ISEMAREN_AAG)\
**Post date:** [January 24, 2023, 11:39am UTC](https://forum.inductiveautomation.com/t/modbus-addressing-documentation-6-digits/68958/1 "2023-01-24T11:39:06Z")

</div>

Hello.  
I think the Ignition documentation regarding **Modbus Addressing** should be updated.  
I explain:  
On these pages it is implied that memory addresses have **5 digits:** 0000X, 1000X, 3000X or 4000X:

[https://docs.inductiveautomation.com/display/DOC81/Modbus+Addressing](https://docs.inductiveautomation.com/display/DOC81/Modbus+Addressing)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/0/b088af82e774af3b01466cdd22ed7dfbe9d031c1.png)

[https://docs.inductiveautomation.com/display/DOC81/Modbus+Address+Mapping](https://docs.inductiveautomation.com/display/DOC81/Modbus+Address+Mapping)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/7/27232e5cc39cd95340e0de78fe7d94dea527bfcc.png)

But this is very confusing. For example, a **holding registe** r with address **30150** would be expressed with **6 digits** : 430150. In Ignition: **HR30150**.  
In fact, all new implementations **are recommended to use 6-digit addressing with leading zeros**.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/2/c29fc20b6c59e9f12fc291e842163a7e203ad0e8.png)

> **[What is the Modbus Protocol & How Does It Work?](https://www.ni.com/es-es/innovations/white-papers/14/the-modbus-protocol-in-depth.html)**
>
> Modbus is an industrial protocol that makes communication possible between automation devices. Get an in-depth view of the Modbus Protocol at ni.com.

Best Regards.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 24, 2023, 1:48pm UTC](https://forum.inductiveautomation.com/t/modbus-addressing-documentation-6-digits/68958/2 "2023-01-24T13:48:07Z")

</div>

> [@ISEMAREN\_AAG](#):
>
> have **5 digits:** 0000X, 1000X, 3000X or 4000X:

There's some history here.

In traditional modbus addressing, the format is five digits, where the first digit is a prefix for the memory area: '0' for writable coils, '1' for readonly discrete inputs, '3' for readonly input registers, and '4' for writable holding registers. { There's also '6' for extended file registers, but that is not supported by most devices and drivers. }

The key point is that the leading '0', '1', '3', and '4' are **prefixes** , not otherwise treated as numbers.

So the patterns were `0xxxx`, `1xxxx`, `3xxxx`, and `4xxxx`. The "x" is a decimal integer, originally constrained to 1-9999 (four "x"s). The underlying wire protocol uses a 16-bit binary number to carry "x", and it starts with zero instead of one.

The discrepancy between displayed "x" and "x" on the wire, with adoption by multiple brands before the protocol was really standardized, created some varying implementations.

First, some implementations wanted a nice even ten thousand registers, but still in five total digits, so they made their stuff start with "x" = 0, both on the wire and as displayed.

Then, other implementations wanted to use the full 16-bit range (including Modicon themselves), so they made it six total digits, with "x" from 1 to 65,536.

Then, some more implementations adopted the six digit format, but from 0-65,535, identical to the number on the wire.

Ignition replaces the confusing numeric prefixes with alphabetic prefixes, and therefore allows you to omit the no-longer-needed leading zeros in "x". Ignition still defaults to "x" starting with one, but there's a driver setting to use "x" starting from zero.

Ignition also allows variations on the alphabetic prefixes to manipulate the values on your behalf, including interpreting multiple registers together.

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [January 24, 2023, 3:12pm UTC](https://forum.inductiveautomation.com/t/modbus-addressing-documentation-6-digits/68958/3 "2023-01-24T15:12:31Z")

</div>

Although ignition's manual is already very detailed, there is still room for improvement. I mean, it should be stated here that sometimes five digits are used for modbus addresses and sometimes six. In fact, the manuals of different modbus devices have different usages. The addressing instructions here really confused me because the ignition manual and the modbus device manual used different keywords. The modbus protocol is not a strictly standard protocol, or too many devices do not comply with the original standard. Therefore, Ignition can't do too many things, and more situations still need to be figured out by users themselves.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 24, 2023, 3:16pm UTC](https://forum.inductiveautomation.com/t/modbus-addressing-documentation-6-digits/68958/4 "2023-01-24T15:16:55Z")

</div>

If you don't like Ignition's Modbus driver, you can use mine instead:

> [@Automation Professionals' Advanced Modbus Driver](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312):
>
> Automation Professionals is pleased to announce the first beta for its Advanced Modbus Driver, for Ignition version 7.9. Key features: Server mode, emulating one or more slave [devices](https://www.automation-pros.com/modbus/UserManual.pdf), using any of the three typical connection types, including simultaneous connections of multiple types. Client mode, incorporating all three connection modes in one driver. Support for Modbus Function Codes 20 and 21, File Records. Configure protocol tweaks for troublesome devices per slave unit, enabling suppor…

I wanted some features IA didn't implement, and it ballooned from there....

{/shameless plug}

Recommendations for updating my module's manual are welcome, too.

---

<div class="post-metadata">

**Author:** ![ISEMAREN\_AAG](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@ISEMAREN\_AAG](https://forum.inductiveautomation.com/u/ISEMAREN_AAG)\
**Post date:** [January 24, 2023, 7:49pm UTC](https://forum.inductiveautomation.com/t/modbus-addressing-documentation-6-digits/68958/5 "2023-01-24T19:49:18Z")

</div>

Thanks for the detailed answer.
