Skip to content

Modbus Error: [Input/Output] Unable to decode request #2474

Closed Locked Answered by janiversen
MrWaloo asked this question in Help
Discussion options

You must be logged in to vote

You do not write which version of pymodbus you use, nor whether is sync/async and which call you are using ?

The Send

send: 0x0 0x1 0x0 0x0 0x0 0x6 0xa 0x4 0x0 0x12 0x0 0x1

Looks like a tcp/socket connection.
Length is 6,
Slave is 10
Function code is read input registers
address is 12
count is 1

So that is all correct.
The device responds with:

0x0 0x1 0x0 0x0 0x0 0x8 0xa 0x4 0x2 0x0 0xdc 0x1d 0x68 0x0

Length is 8,
Slave is 10
Function code is read input registers
byte count is 2
BUT the there are 5 data bytes, which is WRONG, first of all data are a multiple of 2, and byte count must correspond with that.

This is the reason the packet cannot be decoded.

I have no idea, why it repeats i…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by janiversen
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants