ClassicDIY / ModbusTool

A modbus master and slave test tool with import and export functionality, supports TCP, UDP and RTU.
Apache License 2.0
673 stars 201 forks source link

Slave ignores writes to addresses other than 0 #7

Closed DennisKuypers closed 6 years ago

DennisKuypers commented 6 years ago

Writes are denied, slave says:

Received address is not within viewable range, Received address: 1

See https://github.com/graham22/ModbusTool/blob/master/ModbusSlave/SlaveForm.cs#L340 Checks are always denied, because it's using https://github.com/graham22/ModbusTool/blob/master/CommonControls/BaseForm.cs#L20 which is always 0

ThomasvLingen commented 6 years ago

Can confirm this is a problem, I've reproduced it with the following steps (TCP mode):

Something I want to point out: The value is never written in the simulated slave, but this is in no way signaled back to the Modbus Client. The response sent back is just a normal response, which implies the write has succeeded.