# Modbus RTU over TCP, bytecount

**URL:** <https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [October 17, 2023, 9:51am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584 "2023-10-17T09:51:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vipo](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vipo](https://forum.inductiveautomation.com/u/vipo)\
**Post date:** [October 17, 2023, 9:51am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/1 "2023-10-17T09:51:33Z")

</div>

I'm having trouble with modbus.

When I do HRS40:10 - is that 10 registers or 5 registers ?

The reason I ask, is that I get a bytecount of 10, when it should be 20, when asking for 10 registers.

When I try with other modbus clients, I get the correct bytecount (20), but not with ignitions modbus driver

All help highly appreciated.

Regards

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [October 17, 2023, 9:56am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/2 "2023-10-17T09:56:50Z")

</div>

As per the manual:

> `[DL240]HRS1024:20` Read 20 character string value starting at Holding Register 1024.

@Kevin.Herron can perhaps clarify further, when he wakes up...

---

<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:** [October 17, 2023, 10:22am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/3 "2023-10-17T10:22:29Z")

</div>

That's String length in bytes, so it's 5 registers.

---

<div class="post-metadata">

**Author:** ![vipo](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vipo](https://forum.inductiveautomation.com/u/vipo)\
**Post date:** [October 17, 2023, 10:32am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/4 "2023-10-17T10:32:00Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![vipo](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vipo](https://forum.inductiveautomation.com/u/vipo)\
**Post date:** [October 17, 2023, 11:00am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/5 "2023-10-17T11:00:19Z")

</div>

On that note, is it possible to read multiple integer registers?

like [Device]1.HR40:20 ?

I don't see this anywhere in the documentation.

best regards  
V

---

<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:** [October 17, 2023, 11:00am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/6 "2023-10-17T11:00:50Z")

</div>

Not as arrays, no. Only when addressing a multi-register datatype like Int32, Float, Double, etc...

---

<div class="post-metadata">

**Author:** ![vipo](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vipo](https://forum.inductiveautomation.com/u/vipo)\
**Post date:** [October 17, 2023, 11:13am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/7 "2023-10-17T11:13:13Z")

</div>

Ok, modbus is new to me.

I'm trying to read from a siemens s7-1200 via modbus rtu over tcp.

I have a struct which have some Int and Uint, and are addressed from 0 to 14

The catch here, is that there is a hydro acoustic modem in between, and the delay is around 20 seconds.  
Therefor the RTU

Reading a single integer works fine, but I'm having a hard time reading a block (array) of integers.

Can you point me in the right direction, or simple say it's not possible with this ignition driver.  
(it works on other clients)

best regards  
V

---

<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:** [October 17, 2023, 11:14am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/8 "2023-10-17T11:14:49Z")

</div>

You don't address a block, you just create multiple tags, one for each register or register(s) depending on the datatype, that span a contiguous address range. The driver will read them all in one request.

I'm not sure why the horrendous latency implies RTU.

---

<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:** [October 17, 2023, 11:16am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-over-tcp-bytecount/80584/9 "2023-10-17T11:16:38Z")

</div>

If you have other working clients, then get Wireshark captures to compare.
