Qt Modbus
Modbus è un protocollo di tipo richiesta/risposta che prevede un unico client Modbus nella rete e può avere più server Modbus. I server possono controllare solo i propri stati interni, mentre i client possono leggere e scrivere dati al loro interno.
Ogni server Modbus dispone di quattro tabelle in cui può memorizzare i dati.
| nome | intervallo di dati in un campo | autorizzazioni per il client |
|---|---|---|
| Ingressi discreti | 0-1 | Lettura |
| Bobine | 0-1 | Lettura/Scrittura |
| Registri di ingresso | 0-65535 (0xffff) | Lettura |
| Registri di mantenimento | 0-65535 (0xffff) | Lettura/scrittura |
L'API Modbus fornisce alcune API comuni per accedere ai dispositivi Modbus:
- QModbusDevice fornisce un'API per le funzionalità comuni tra client e server.
- QModbusClient fornisce un'API per l'accesso diretto al client Modbus.
- QModbusServer fornisce un'API per l'accesso diretto al server Modbus.
- QModbusDataUnit rappresenta un valore di dati.
- QModbusReply viene creato d QModbusClient e come handle per le operazioni di scrittura/lettura.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.