I am not sure what you are asking; But Modbus documentation addresses
are (in my experience) always offset by 1, which I think goes back to
the 1970s when we weren't yet sure whether numbers started at 0 or at 1,
and number ranges were a scarce resource so we wouldn't sacrifice one
for consistency... Those were the days.
Niclas
On 2023-01-07 17:27, Niels Basjes wrote:
Hi,
I ran into the effect that all modbus addresses I specify are shifted
down
by 1.
This turns out to be code in most of the ModbusTag implementations (not
all) which have a PROTOCOL_ADDRESS_OFFSET to shift it by.
Why was this done?
If I'm writing software to read modbus addresses and I follow the
manufacturer specified information it will run into unexpected effects
(like I have today).
Also: Now getAddressString() yields something different then what I
used
to build the tag with.