First, in the situation you describe in code, you have both the laptop (Kepware) and Pi(Client??) as MASTER devices. One of them needs to be a SLAVE device.
The SLAVE does not need the address of the MASTER as you show in your code snippet.
If you are just starting with libmodbus, I suggest you start by programming a MASTER to a known SLAVE device and get that working. Jumping to programing a SLAVE device is a big jump in complexity.
Unintuitively, programming a MASTER is a LOT simpler than programming a SLAVE device. Also, the SLAVE examples are overly complex in my opinion so you need some libmodbus experience first.
Chuck Watson BS, CEM, CMVP
Direct USA 724-799-1529
--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/libmodbus/6db56607-18a6-4a08-9fd0-9c85fde942edn%40googlegroups.com.