First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Modbus queries / responses

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

Steve Hargraves's avatar
1
Steve Hargraves
asked 2019-01-10 00:12:20 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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.

grahamb's avatar
23.8k
grahamb
answered 2019-01-10 10:04:49 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer