OpenModScan icon indicating copy to clipboard operation
OpenModScan copied to clipboard

Write register window edit wrong address

Open ghostolo90 opened this issue 1 year ago • 9 comments

When I try to write a register, the new value is set on the address-1.

Same behaviour on both coil status and holding register.

Steps to reproduce:

  • Double click on a value to write or its address Image

  • Edit the value and press OK Image

  • The value edited is set on the address -1 Image

ghostolo90 avatar Mar 05 '25 17:03 ghostolo90

Please test at version 1.9.0

sanny32 avatar Mar 05 '25 17:03 sanny32

Done, not working.

ghostolo90 avatar Mar 05 '25 18:03 ghostolo90

Sorry, can’t reproduce. Can you add video that reproduce bug?

sanny32 avatar Mar 05 '25 18:03 sanny32

Hi, here is the video

https://github.com/user-attachments/assets/4e477f91-a814-49f8-ad31-fde63b12bf65

ghostolo90 avatar Mar 06 '25 08:03 ghostolo90

Can you tell me what is modbus server used? A device or a simulator program?

sanny32 avatar Mar 06 '25 08:03 sanny32

Yes, i'm using a Beckhoff PLC

Image

ghostolo90 avatar Mar 06 '25 09:03 ghostolo90

Please follow the steps below

  1. Connect to your modbus device
  2. Open Display Definition dialog (menu Setup ->Data Definition) and set Scan Rate to 10000
  3. Through the menu Setup -> Text Capture make a log.txt file

Image

  1. Make a write to registers
  2. Through the menu Setup -> Capture Off stop a log capture
  3. Upload log.txt file here

sanny32 avatar Mar 07 '25 05:03 sanny32

Hello, Done, log and video attached.

log.txt

https://github.com/user-attachments/assets/b3647702-e79e-4da1-aa9f-885f4c995f52

ghostolo90 avatar Mar 10 '25 12:03 ghostolo90

Hello @ghostolo90. Thanks for what you did to understand how the bug occurred. Based on the log data I see that you send WRITE SINGLE REG request to address 30 (0-based).

Image

Then, application send READ HOLDING REGS request to read 31 holding registers data that starts at address 0 (0-based)

Image

The response from the server returns the value at 29 address (0-based)

Image

I suppose that problem at the modbus server.

sanny32 avatar Mar 10 '25 18:03 sanny32