Skip to content

How to set unit_id for ModbusTCPClient #1652

Answered by maba2402
maba2402 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
I found the issue. It was a problem with so called alias adresses for the holding registers.
Subtracting 40001 from the register adresse solved the problem.
Sorry for bothering you.

Setting the device identifier was not the issue. This works BTW with

rr = client.read_holding_registers(1633, 1, slave=2)

BR
Marc

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@maba2402
Comment options

Answer selected by maba2402
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