Ask Your Question

Modbus queries / responses

asked 2019-01-10 00:12:20 +0000

Steve Hargraves gravatar image

Modbus queries have the starting address, but the responses do not. Yet Wireshark lists the address es in the Modbus response. Does Wireshark 'assume' this address from the previous query ? I am having Modbus data values 'swapped' - volts being returned with the value for the amps, and amps returned with the value of volts. The issue is random & may not occur for several days at a time. Thanks Steve Hargraves

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-01-10 10:04:49 +0000

grahamb gravatar image

The Modbus dissector does just the same as a Modbus master when communicating with a slave, it assumes that a response matches the previous request as defined in the protocol.

As Modbus has no notion of the "semantic" values of the registers transferred from the slave to the master, the interpretation of registers as volts or amps is entirely down to the Modbus master application and the Modbus slave configuration.

One issue you may come across when looking at Modbus in a Wireshark capture is that the protocol itself uses 0-based addressing for registers, but many PLC configuration tools and master applications use 1-based addressing. The conversion between the offsets is handled in the software being used. This means that a read of the input register 30001 is actually transmitted as a read input registers command for starting address 0.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-01-10 00:12:20 +0000

Seen: 1,273 times

Last updated: Jan 10 '19