QModbusRtuSerialServer#
The QModbusRtuSerialServer
class represents a Modbus server that uses a serial port for its communication with the Modbus client. More…
Synopsis#
Functions#
def
interFrameDelay
()def
setInterFrameDelay
(microseconds)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
Communication via Modbus requires the interaction between a single Modbus client instance and multiple Modbus server. This class provides the Modbus server implementation via a serial port.
Since multiple Modbus server instances can interact with a Modbus client at the same time (using a serial bus), servers are identified by their serverAddress()
.
- class PySide6.QtSerialBus.QModbusRtuSerialServer([parent=None])#
- Parameters:
parent –
PySide6.QtCore.QObject
Constructs a QModbusRtuSerialServer
with the specified parent
. The serverAddress
preset is 1
.
- PySide6.QtSerialBus.QModbusRtuSerialServer.interFrameDelay()#
- Return type:
int
Returns the amount of microseconds for the silent interval between two consecutive Modbus messages.
See also
- PySide6.QtSerialBus.QModbusRtuSerialServer.setInterFrameDelay(microseconds)#
- Parameters:
microseconds – int
Sets the amount of microseconds
for the silent interval between two consecutive Modbus messages. By default, the class implementation will use a pre-calculated value according to the Modbus specification. A active or running connection is not affected by such delay changes.
Note
If microseconds
is set to -1 or microseconds
is less than the pre-calculated delay then this pre-calculated value is used as frame delay.
See also