# Data Register Skew Modbus RTU via Modbus TCP bridge

**URL:** <https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841>\
**Category:** Ignition\
**Created:** [January 15, 2014, 11:37am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841 "2014-01-15T11:37:37Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfrahm](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sfrahm](https://forum.inductiveautomation.com/u/sfrahm)\
**Post date:** [January 15, 2014, 11:37am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/1 "2014-01-15T11:37:37Z")

</div>

Data Register Skew Problem   
Offset by one register per increasing modbus RS-485 address value

Eurotherm 2404 Modbus RTU via Modbus TCP bridge

|Eurotherm| ~~|Eurotherm|~~~ RS-485 ~~~|Moxa |~~~ |Modbus-TCP |  
| **2404** \_||\_\_2404 \_\_| ~~~~~~~~~|Bridge |~~~ | **Ignition** |

Overview -  
I am having some difficulty communicating with a string of very old (read ancient) Eurotherm 2404 Modbus-RTU (aka Jbus) serial devices connected with a two wire RS-485 master slave network thru a Moxa MGate MB3480 using the Ignition Modbus-TCP Driver v2 2.6.1 (b386) with Ignition Version 7.6.1 (b2278)  
(BTW - Thank You for the suggestion to use Moxa bridges on another forum topic, very fast and very easy to set up and use)

I have also tried this using either of the Ignition Modbus-RTU over TCP and Modbus-TCP drivers with a DigiOne IAP configured as a multiple master RS-232 to RS-485 serial/ethernet bridge and gotten the same result described further below.

I have read the Inductive Automation Ignition Forum “Topic: Help setting up Eurotherm 2404 to Integrate to Ignition” and the Eurotherm SERIES 2000 COMMUNICATION HANDBOOK I have attempted this using the example .csv parameters provided from the link in the previous forum post.

What Does Work -  
I also have a legacy data connection working. A DigiOne IAP used as a Modbus-RTU serial master to Modbus-TCP bridge that is successfully converting the old RS-485 Modbus serial master connection collecting data on a PC running SpecView version 2+ and connecting it to the new Modbus-TCP ethernet slave data connection from the Moxa MB3480. To keep the old data collection system working, while I build the new remote store and forward historian with Ignition. All of the old SpecView data comes out correctly in the right places after having gone through the SpecView modbus serial master to ethernet DigiOne bridge conversion and ethernet slave to serial Moxa bridge conversion.

The Problem -  
Whenever I create OPC tags and connect them to SQL tags there is a skewed modbus register offset that seems dependent upon the device modbus address. For instance when I talk to a device with modbus address 9, the data registers are all offset by one place compared to the data from the device with modbus address 8. The data registers in each of the next devices are skewed one more place further in each subsequent device. This makes it very difficult to see the process value in the first register (register 1 in modbus or register 0 in jbus terms.)

Example-  
For instance (these are not the actual register data, just some example numbers from memory to help convey the concept)

[code]MBus-Addr 8 9 10

* * *

E8\_4001 0 E9\_4001 100 E10\_4001 30  
E8\_4002 100 E9\_4002 30 E10\_4002 1400  
E8\_4003 30 E9\_4003 1400 E10\_4003 9999  
E8\_4004 1400 E9\_4004 9999 E10\_4004 1550  
E8\_4005 9999 E9\_4005 1550 E10\_4005 0  
E8\_4006 1550 E9\_4006 0 E10\_4006 32767[/code]

I have tried starting with E8\_4000 or even E8\_3990 or E8\_0001 and still see skewed data from the wrong data registers.

???  
Have I missed something here or is there an issue with the Ignition driver and ancient modbus/jbus devices? Do I need to write my own TCP driver or pay for a third party OPC translation device like Kepware or Matrikon? I haven’t even begun to try to talk to the bitwise devices that are defined as Kevotherm devices in SpecView. I hope to get most of my process status bits from the AllenBradley SLC 5/04 PLCs already connected though 1761-NET-ENIs, since I can not find any references to a Kevotherm device anywhere.

The only thing I can think is to try the Ignition Modbus RTU over TCP driver again, but that didn’t seem to work using the DigiOne IAP as a multiple serial/ethernet master bridge that way either.

Please help save me from having to break out the serial protocol analyzer and write my own driver. Like when I had to write serial communication scripts in ladder logic to talk to a Prosoft module. That was two weeks of fun there alright, but this has been a few weeks of fun too.

Thanks!

S

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 15, 2014, 3:14pm UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/2 "2014-01-15T15:14:49Z")

</div>

So just to be clear: you’re talking to 3 different physical devices, through 1 gateway, all of which you’re doing so through 1 device configured in Ignition? And when you say ‘modbus address’ you’re talking about unit id / slave id?

---

<div class="post-metadata">

**Author:** ![sfrahm](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sfrahm](https://forum.inductiveautomation.com/u/sfrahm)\
**Post date:** [January 15, 2014, 10:09pm UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/3 "2014-01-15T22:09:11Z")

</div>

Yes. Multiple different physical Eurotherm 2404 devices (Modbus RTU over RS-485 serial slaves,) through 1 Moxa gateway (presently configured for Modbus RTU slave to Modbus TCP master bridging,) all of which I’m doing so through 1 device configured in Ignition. The data register location in the first Eurotherm device read, even if I only connect to one of them at a time, is still already skewed by it’s modbus serial address value, where I can not see the first register value. Which is the very most important Process Value that I need to be able to see and log.

Yes. When I say ‘modbus address’ I am talking about unit id / slave id, using the same ‘unit id’ number for each ‘slave id’ number. Moxa Bridge has one IP Address - Each Eurotherm 2404 has an individual RS-485 slave id, each accessed by the TCP unit id through the bridge.

Actually it is about 15 each modbus eurotherm 2404 devices in total. That I will eventually be parsing out over the one Moxa bridge, over it’s four serial ports mapped by slave id range for improved bandwidth, but I am testing with just the three eurotherm 2404 devices at slave id 8,9, and 10 on the one port to start with for this example.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 16, 2014, 5:45am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/4 "2014-01-16T05:45:49Z")

</div>

Can you set things up exactly like in your example, 3 devices, only a handful of tags, and then turn ReadHoldingRegistersRequest (or ReadInputRegistersRequest) loggers to TRACE level. After a few minutes, export the logs and upload them here or email them to support. Alternatively, if you’re handy with wireshark, you can just capture the comms between Ignition and the gateway device and then upload the pcap file.

---

<div class="post-metadata">

**Author:** ![sfrahm](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sfrahm](https://forum.inductiveautomation.com/u/sfrahm)\
**Post date:** [January 16, 2014, 11:26pm UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/5 "2014-01-16T23:26:11Z")

</div>

Hi Kevin, Thanks for your help so far.

OK, I am looking at the Diagnostics Window found in the Ignition Designer Help menu. I see no Logger entry for ReadHoldingRegistersRequest in the selectable Logging Levels. Am I supposed to create a Logger from the Diagnostics Console or something?

I am very glad that I haven’t had to use the diagnostics until now, where might I find the man page for that? Also, where might I find the log export function? Do you mean the copy button in the log viewer? I only see loggers for the  
…client.gateway\_interface.GatewayConnectionManager and  
…TagManager.Gateway  
there and in the Logging Levels selector that might perhaps be appropriate, I’m not quite sure what you are talking about. Ticking the TRACE option for either of these shows no discernible output anywhere I can see like in the LogViewer.

Am I missing a developer toolkit of some kind? ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

Thanks!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 16, 2014, 11:36pm UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/6 "2014-01-16T23:36:12Z")

</div>

Sorry, this is all on the Ignition gateway that you’ll be doing this. Configure \> System \> Console. You’ll find Levels and Logs tabs there.

[attachment=0]Screen Shot 2014-01-16 at 3.34.29 PM.png[/attachment]

---

<div class="post-metadata">

**Author:** ![sfrahm](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sfrahm](https://forum.inductiveautomation.com/u/sfrahm)\
**Post date:** [January 17, 2014, 12:31am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/7 "2014-01-17T00:31:27Z")

</div>

OK, I captured a minute or so of packets from the Virtual Machine running the Ignition gateway with Wireshark and will email them to support ASAP. Thanks!

---

<div class="post-metadata">

**Author:** ![sfrahm](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sfrahm](https://forum.inductiveautomation.com/u/sfrahm)\
**Post date:** [January 17, 2014, 1:00am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/8 "2014-01-17T01:00:02Z")

</div>

OK, Here is the ReadHoldingRegistersRequest Trace Log attached

Thanks!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 17, 2014, 2:20am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/9 "2014-01-17T02:20:44Z")

</div>

Did you configure these as SQLTags or via the address map page?

If SQLTags, can you export SQLTags csv/xml from the designer, for the folder(s) with these tags, and attach?

If the address map, can you export the mappings from the page in the gateway, and attach?

---

<div class="post-metadata">

**Author:** ![sfrahm](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sfrahm](https://forum.inductiveautomation.com/u/sfrahm)\
**Post date:** [January 17, 2014, 2:54am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/10 "2014-01-17T02:54:53Z")

</div>

via the address map page

Export attached and looks like

`10
E,4000,4005,false,8,HoldingRegister,8
E,4000,4005,false,9,HoldingRegister,9
E,4000,4005,false,10,HoldingRegister,10`

Hmm, what does the 10 on the first line mean?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 17, 2014, 3:20am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/11 "2014-01-17T03:20:24Z")

</div>

The 10 on the first line is the radix.

The problem is the next three lines: it appears you’ve set your start address to 8, 9, then 10, which would explain why you see an offset by one for each address…

You probably mean to have a starting address of 8 across the board… not 8, for unit 8, 9 for unit 9, 10 for unit 10.

---

<div class="post-metadata">

**Author:** ![sfrahm](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sfrahm](https://forum.inductiveautomation.com/u/sfrahm)\
**Post date:** [January 17, 2014, 3:29am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/12 "2014-01-17T03:29:34Z")

</div>

Start Address? How does “Modbus address” mean start address?  
Start address as in after holding register 4000 where do I start reading registers?  
Ahhhhhh  
That explains it.  
Now I see the numbers That I am looking for.  
Thank You!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 17, 2014, 3:42am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/13 "2014-01-17T03:42:43Z")

</div>

When using the address map page, the ‘start’ and ‘end’ are just combined with prefix to create names for your tags, they have no bearing on what actual register address the tags begin at. That’s up to the ‘modbus address’ field.

So if you really want to be reading HR1 through HR6, you should maybe put in 40001 start, 40006 end, and 1 as the modbus address.

---

<div class="post-metadata">

**Author:** ![sfrahm](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sfrahm](https://forum.inductiveautomation.com/u/sfrahm)\
**Post date:** [January 20, 2014, 8:02am UTC](https://forum.inductiveautomation.com/t/data-register-skew-modbus-rtu-via-modbus-tcp-bridge/7841/14 "2014-01-20T08:02:40Z")

</div>

OK. It all makes sense now and is working perfectly. Thank You. I would say Modbus register instead of Modbus “address.” My being so literal I painted myself into a corner. Thanks!
