sanny32 / OpenModScan

Open ModScan is a Free Modbus Master (Client) Utility
MIT License
139 stars 17 forks source link

address offset #9

Open tosione opened 2 weeks ago

tosione commented 2 weeks ago

There seems to be an offset of 2 in the address, at least with the 32bit data with Modbus TCP (I can only test the Modbus on a machine that only uses 32bit data: long int, or float32).

The get the correct data I must increase the address by 2, as it can be seen on screenshot:

Tested on version 1.7.0 for windows.

address ofset issue

sanny32 commented 2 weeks ago

Hello @tosione. Why do you think there is a offset in addresses here?

tosione commented 2 weeks ago

Because I know the values to expect at each address, as we design the machine: values of ~411 are expected on addresses 16078, 16080, 16082, not the ones before or after. Besides, with other programs (QModMaster and Radzio! Modbus Master Simulator ) this coincides.

sanny32 commented 2 weeks ago

@tosione can you show hex values of your server address space?

tosione commented 1 week ago

Sorry for delay @sanny32,

It is a bit difficult, and possibly senseless, to show you my hex values from server address (microcontroller): that's because we are using a Raspberry Pi as a gateway, and the software on the Raspberry is not easily available to me:

Windows-PC ---(ModBus TCP)---> Raspberry-Pi ---(ModBus RTU)---> Microcontroller

I can't assure that the gateway is not adding any address offset, but again, this do not happen with other programs.

Reading on the internet I have seen that address offset is not such a uncommon problem, and many programs offer a way the configure this offset (at least for configuring the 0 or 1 based addressing). Maybe it would be possible to implement this, to allow greater compatibility.

sanny32 commented 1 week ago

Yes, the base address in Open Modscan is 1, not 0. If your device has base address 0 you can think, that the program has address offset.