Closed GoogleCodeExporter closed 8 years ago
It appears that the problem is with ModPoll.exe as it subtracts 1 from the –r
argument. For example, the command “.\modpoll.exe -m tcp -t 4 -r 101 -c 5
127.0.0.1”
creates a Read Holding Registers request for address 100, rather than the
specified 101.
The NModbus DataStore is a little funky as it is meant to simulate the 1-n plc
address space using 0-n collections. This is why when retrieving or setting a
DataStore address we actually set/get the provided address – 1.
In your example you try and read from address 1 which ModPoll converts to 0,
then
the DataStore tries to read from the invalid address -1, throwing an exception.
A bug should be logged against the ModPoll tool.
Thanks for the very thorough bug report and let me know if you disagree.
Scott
Original comment by sja...@gmail.com
on 25 Jul 2007 at 1:34
Thanks for your answer.
I agree with You.
The problem is that I thought that modpoll.exe behaviour (subtracting 1 from
specified address) had to define the standard for any modbus master.
Thank You.
Andrea.
Original comment by andrea.p...@gmail.com
on 25 Jul 2007 at 2:04
Original issue reported on code.google.com by
andrea.p...@gmail.com
on 24 Jul 2007 at 4:00Attachments: