How to Read and Write to a WAGO Modbus 750-841

  • My current project requires me to connect to a WAGO Modbus 750-841 and be able to read from each coil and write to each coil. I was able to establish a connection but now my problem is read and writing. I don't know where to start or what approach I should take. I have used a basic write method and bytesAvailable method but each one doesn't want to communicate to the Modbus. I don't know what i'm doing wrong. My code is as follows any help would greatly appreciated.

    socket->connectToHost("IP address of Modbus",502);
        qDebug() << "Connected!!";
        qDebug() << "Bytes to write" << socket->bytesToWrite();
        qDebug() << "Reading:" << socket->bytesAvailable();
        qDebug() << "Not Connected!!";

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.