Issue receiving data weighing scale Ohaus aviator 7000
Solved
General and Desktop
-
Hello
I am trying to establisch a serial port connection to my Aviator 7000 weighing scale. The expected result would be a succesfull communication through the use of a byte command.
Sadly I don't receive any bytes back from the scale. below you can find what I tried so far:const int Max_attempts = 5; const int Max_sleep = 125; int attemps; attemps = 0; while (true) { int enq {5}; QByteArray bytes; bytes.setNum(enq); m_serial->write(bytes); m_serial->waitForReadyRead(Max_sleep); if (m_serial->bytesAvailable() !=0) { qDebug() << m_serial->bytesAvailable() ; qDebug() << "connected" << m_serial->readAll(); break; } attemps += 1; if (attemps == Max_attempts) { qDebug() << "no connection established"; break; } }
Kind regards,
Yina -
Hi,
How are you connecting to that scale ?
Physical cable ?
Can you connect to it by another program ?
Which OS are you running ?
Which Qt version are you using ?