# Modbus query out of range from the Modbus Adresse

**URL:** <https://forum.inductiveautomation.com/t/modbus-query-out-of-range-from-the-modbus-adresse/17813>\
**Category:** Ignition\
**Created:** [April 24, 2018, 9:00am UTC](https://forum.inductiveautomation.com/t/modbus-query-out-of-range-from-the-modbus-adresse/17813 "2018-04-24T09:00:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivier.dekoster](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@olivier.dekoster](https://forum.inductiveautomation.com/u/olivier.dekoster)\
**Post date:** [April 24, 2018, 9:00am UTC](https://forum.inductiveautomation.com/t/modbus-query-out-of-range-from-the-modbus-adresse/17813/1 "2018-04-24T09:00:04Z")

</div>

Hello for all,

I communicate between our PLC and the Gateway in Modbus TCP.  
I’m working with ignition 7.9.7  
I have had a Device Modbus TCP with those adresses below

10  
NUM\_8\_,4000,4255,false,0,InputRegister,4000  
NUM\_9\_,4256,4511,false,0,InputRegister,4256  
TC\_ON\_0\_,7000,7255,false,0,Coil,7000  
TC\_OFF\_0\_,8000,8255,false,0,Coil,8000  
DISC\_0\_,2000,2255,false,0,DiscreteInput,2000  
AL\_2\_3\_,3000,3511,false,0,DiscreteInput,3000  
CAPT\_1\_,1000,1255,false,0,DiscreteInput,1000  
ST\_0\_,0,255,false,0,DiscreteInput,0

I have add 256 tags like this in html format

 6 Ignition OPC-UA Server ns=1;s=[Slave\_12]TC\_ON\_0\_7000 6 

and the last one in this range (7000 … 7255)

I have catch the modbus communication with Wireshark.  
There is a Modbus Query like THIS READ COILS from adresse 7000 and Bit Count 1006

1006 is out of range from the adresse describe above (7000 … 7255) —\> 256 bits not 1006

Thanks for Help

Olivier

---

<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:** [April 24, 2018, 12:28pm UTC](https://forum.inductiveautomation.com/t/modbus-query-out-of-range-from-the-modbus-adresse/17813/2 "2018-04-24T12:28:31Z")

</div>

Thanks, certainly sounds like a bug…

edit: Nevermind, it’s not a bug. This is the “gap spanning” option working. Try turning that off.

---

<div class="post-metadata">

**Author:** ![olivier.dekoster](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@olivier.dekoster](https://forum.inductiveautomation.com/u/olivier.dekoster)\
**Post date:** [April 24, 2018, 1:23pm UTC](https://forum.inductiveautomation.com/t/modbus-query-out-of-range-from-the-modbus-adresse/17813/3 "2018-04-24T13:23:09Z")

</div>

Thanks Kevin,

I have more tests done.

If I use “Gap spanning” there are much more modbus query.  
The issue is that the modbus query try to join in one query two different range of adresse with two different prefix in the Device.  
I have found an other solution is to reduce the maximum for the coil query (2000 ----\> 256) and change the modbus address to put more gap between two different Prexix.

Regards

Olivier

---

<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:** [April 24, 2018, 3:38pm UTC](https://forum.inductiveautomation.com/t/modbus-query-out-of-range-from-the-modbus-adresse/17813/4 "2018-04-24T15:38:48Z")

</div>

> [@olivier.dekoster](#):
>
> I have found an other solution is to reduce the maximum for the coil query (2000 ----\> 256) and change the modbus address to put more gap between two different Prexix.

Yep, that works as well.

---

<div class="post-metadata">

**Author:** ![olivier.dekoster](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@olivier.dekoster](https://forum.inductiveautomation.com/u/olivier.dekoster)\
**Post date:** [April 30, 2018, 10:08am UTC](https://forum.inductiveautomation.com/t/modbus-query-out-of-range-from-the-modbus-adresse/17813/5 "2018-04-30T10:08:07Z")

</div>

Hello Kevin,

Right now each second the gateway ask the modbus queries.  
Could you tell me if it’s possible to reduce this time between two queries ?

Thanks  
Olivier

---

<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:** [April 30, 2018, 11:51am UTC](https://forum.inductiveautomation.com/t/modbus-query-out-of-range-from-the-modbus-adresse/17813/6 "2018-04-30T11:51:09Z")

</div>

> [@olivier.dekoster](#):
>
> Right now each second the gateway ask the modbus queries.

That's the timing of the default scan class. Create a slower scan class and assign your tags to it.
