ModbusTools icon indicating copy to clipboard operation
ModbusTools copied to clipboard

Address number changed by 1

Open hooijschuur opened this issue 9 months ago • 1 comments

I do not exactly know it changed.

But i put in a lot of adres numbers. Checked with modbus mechanic to verify if the responses is at the right adres. After saving . And starting te program the adres is moved bij 1. And i do not know how to change it.

hooijschuur avatar Apr 25 '25 12:04 hooijschuur

Hello.

Can you provide more information, e.g. screenshot before and after?

Can I get the file you saved? It is *.pjc (for client project) or *.pjs (for server project)

serhmarch avatar Apr 25 '25 12:04 serhmarch

Version 0.4.6. here, compiled today, Linux

Experiencing the same thing, actually there are more offset-by-1 errors:

When editing items (takes some time to figure out that by address 0x/1x/... you actually mean FUNCTION CODE) you choose 0x for function code 1, 1x for function code 2 etc.

You choose address 3300 and a query for address 3299 is sent. So if you want to query address 3300, you need to define 3301.

rico666 avatar Sep 24 '25 12:09 rico666

Hello @rico666.

When editing items (takes some time to figure out that by address 0x/1x/... you actually mean FUNCTION CODE) you choose 0x for function code 1, 1x for function code 2 etc.

No. 0x, 1x, 3x and 4x it is never a FUNCTION CODE, it is a MEMORY ID. It is an old Modicon notation used from 1980s in its old PLC programming software called Modsoft (and then Concept).

And yes, it is 1-based!

If you want to switch to 0-based address notations, use menu Tools/Settings/View/Modbus adr. notation.

More details about addressing: https://github.com/serhmarch/ModbusTools?tab=readme-ov-file#memory-item-addressing

serhmarch avatar Sep 24 '25 14:09 serhmarch