Skip to content
Discussion options

You must be logged in to vote

You are correct the battery returns a wrong length (0x04) ! and yes that causes the framer to look for a non-existing byte, which leads to a retry and finally to a raised exception.

As you can see your device do NOT send a modbus exception, and thus there is nothing that can be returned to the app. I am pretty sure your emulator returns a modbus exception, which you then receive.

Returning an exception code would obviously be wrong, because returned exception codes are real messages coming from the device. Whenever something goes wrong in pymodbus itself an exception is raised ! This is an important distinction.

A solution to your problem is to add a trace function that changes the 0x04 t…

Replies: 2 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants