Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Use QModbusRtuSerialMaster with RS485



  • I'm trying to modify the Modbus Master example (https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/modbus/master?h=5.15) in order to use an RS485 serial line.

    I must change the DE signal by hand, before and after a transmission.
    I'm using the libgpiod and I'm able to change the state of the DE pin.

    I wonder if this is going to work, because I need to set the pin high just before start a transmission (this is easy) and set it low just after the transmission ends. I'm not sure if this may be accomplished because how to know when the Qt framework has completed the transmission of methods like connectDevice() or sendReadRequest() ?

    Do you have any other suggestion?


Log in to reply