# Modbus confusion

**URL:** <https://forum.inductiveautomation.com/t/modbus-confusion/84977>\
**Category:** Ignition\
**Created:** [January 30, 2024, 7:39pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977 "2024-01-30T19:39:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [January 30, 2024, 7:39pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/1 "2024-01-30T19:39:52Z")

</div>

hi,

I am trying to get some modbus data in from a Columbia weather station. I have only delt with modbus for the the briefest of times and usually just button mash until it works, I have been unsuccessful here. I am unsure what setting to use in the modbus device config, I have tried all the various Input Register options with no luck. Any suggestions based on this documentation? It works on Kepware on our of SCADA machine.

This is what the documentation for the weather station says, with the Notes three pages down:  
full document here, [ModbusPointList.xls (columbiaweather.com)](https://columbiaweather.com/resources/manuals-and-brochures/ms-docs/modbus-point-list.pdf)

32-Bit Registers  
All data accessed via (read only) Input Registers  
Data type Long = Signed 32 bit value  
Data type Float = 32 bit floating point value  
Byte Order: Little Endian  
Node 1

Measurement Description, Starting Modbus, Offset, Columbia data type, Modbus  
Address, OPC data type, Dnp3 index

umtLastMeasTime Time of last measurement 1 posix time 30001 Long 1  
Last measurement time stamp 3 posix time 30003 Long  
umtWindSpeed Wind speed 5 float 30005 Float 2  
Wind speed time stamp 7 posix time 30007 Long  
umtRawWindDir Wind direction - unadjusted 9 float 30009 Float 3  
Wind direction - unadjusted time stamp 11 posix time 30011 Long  
umtAdjWindDir Wind direction 13 float 30013 Float 4  
Wind direction time stamp 15 posix time 30015 Long  
umtRelHumidity Relative humidity 17 float 30017 Float 5

Notes:  
For each of the available measurements, the two registers immediately following the value  
contain the posix time value of the time that value was last updated. For example:  
the wind speed value is stored in registers 5 and 6. The last update timestamp is stored in registers 7 and 8 and is a 32-bit integer value.  
The posix time values are 32-bit integers; All the values are Modbus input registers.

---

<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 30, 2024, 7:42pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/2 "2024-01-30T19:42:00Z")

</div>

What have you tried so far? What does your Kepware configuration look like?

Either of these addresses would be a good starting point:

- `1.IRI30001`
- `1.IRI1`

From there, you may need to toggle the "Swap Words" option in the driver config.

---

<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 30, 2024, 7:46pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/3 "2024-01-30T19:46:36Z")

</div>

> [@Bigtalljv](#):
>
> Byte Order: Little Endian

Is it really? Not "Word Order: Little Endian"? Because, while the Modbus spec is very loose in most things, it is really explicit that 16-bit registers are transferred in big endian on the wire.

(You may not be able to use this device if it really is little endian for each register.)

---

<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 30, 2024, 7:47pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/4 "2024-01-30T19:47:30Z")

</div>

> [@pturmel](#):
>
> (You may not be able to use this device if it really is little endian for each register.)

Ooh, yeah, I missed that. It would require bringing the "raw" registers in and making expression tags that rearranged the bytes.

---

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [January 30, 2024, 7:49pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/5 "2024-01-30T19:49:47Z")

</div>

aargh!! Well this weather station has been a PITA since we go it so why not continuing...

I can only go by what Columbia's documentation says, that might explain why I get some really impressive number strings.

---

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [January 30, 2024, 7:51pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/6 "2024-01-30T19:51:48Z")

</div>

they do have a 16 bit register option, it means even less to me although it might sort of be more reasonable...

16-Bit Registers  
The 16-bit unsigned scaled integer registers  
Data type: Unsigned scaled integers  
Parameter value = (unsigned 16-bit integer + Offset)/Factor  
Measurement Description Register Factor Offset  
umtLastMeasTime 32001  
umtWindSpeed Wind speed 32002 368 0  
umtAdjWindDir  
Adjusted wind  
direction 32004 163 0

---

<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 30, 2024, 7:54pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/7 "2024-01-30T19:54:46Z")

</div>

I'd suggest similar starting points for these:

- `1.IR32001`
- `1.IR2001`

except you'll need an additional expression tag for each to apply the scaling, I'm not sure the regular tag scaling can handle what they're doing.

---

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [January 30, 2024, 8:07pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/8 "2024-01-30T20:07:10Z")

</div>

well those give me numbers but they don't make sense even with the scaling. I created a second tag for the expression.

sorry, I'm being dumb. I was mixing up factor and Offset.

I think I have it now. Looks like I'll need to use the 16 bit registers and create a second tag to do the scaling

---

<div class="post-metadata">

**Author:** ![jay](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jay](https://forum.inductiveautomation.com/u/jay)\
**Post date:** [January 30, 2024, 8:42pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/9 "2024-01-30T20:42:54Z")

</div>

I suggest you start with the Air Temperature since you can probably tell if the value you receive is reasonable.

This will be at 1.IRF37

"Zero-based Addressing" will NOT be checked.

Try with and without "Reverse Word Order"

That could be in either deg C or deg F.

---

<div class="post-metadata">

**Author:** ![Bigtalljv](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@Bigtalljv](https://forum.inductiveautomation.com/u/Bigtalljv)\
**Post date:** [January 31, 2024, 11:19pm UTC](https://forum.inductiveautomation.com/t/modbus-confusion/84977/10 "2024-01-31T23:19:50Z")

</div>

thanks all, I got it all working. The key was the bit order Pturmel and Kevin caught. once I abandoned that path the unsigned 16 bit registers worked just fine. I create a raw tag and an expression tag to do the math required. clunky but it work and it's just a handful of values. thanks for the help
