Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can we able to plot the graph of wire which has to show the diameter in qt software
Forum Updated to NodeBB v4.3 + New Features

Can we able to plot the graph of wire which has to show the diameter in qt software

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 3 Posters 715 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chandana
    wrote on last edited by aha_1980
    #1

    Hi,
    In my project i am receiving the data from the embedded device in which we are receiving the diameter measurement value from the embedded device and we are storing these data to PC through the usb cable to RS232 converter in which the data's are storing in excel format. So here my question is can we able to plot the graph of these data which i am storing in excel sheet and next is can we able to plot this below attached format graph in qt software0_1557305839646_Capture.PNG

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Do you mean you would like to make Excel render this or within your Qt application.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chandana
        wrote on last edited by
        #3

        Anything is fine for me

        1 Reply Last reply
        0
        • C Offline
          C Offline
          chandana
          wrote on last edited by
          #4

          i want to try in qt software where i need to read the data from the usb to rs232 cable and need to plot the graph in real time
          can you plz give me the example program for reading the data from this port

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chandana
            wrote on last edited by
            #5

            Hi,
            I am using qt software for reading the data from the usb to rs232 converter and i have tried this program
            #include <QCoreApplication>
            #include <QtSerialPort/QSerialPort>
            #include <QSerialPortInfo>
            #include <QDebug>
            #include <QFile>
            #include <QByteArray>
            #include<QString>

            int main(int argc, char *argv[])
            {
            QCoreApplication a(argc, argv);
            QSerialPort serialPort;
            QByteArray buf;

            serialPort.open(QIODevice::ReadOnly);
            serialPort.setPortName("COM10");
            serialPort.setBaudRate(QSerialPort::Baud38400);
            serialPort.setDataBits(QSerialPort::Data8);
            serialPort.setParity(QSerialPort::EvenParity);
            serialPort.setStopBits(QSerialPort::OneStop);
            serialPort.setFlowControl(QSerialPort::NoFlowControl);
            

            // while(1)
            //{
            //serialPort.write("h");
            buf=serialPort.readAll();
            qDebug() << "buf1 "<< buf;
            serialPort.close();
            //}

            return a.exec();
            

            }

            and serial port.pro
            QT = core
            QT -= gui #-
            QT += serialport

            TARGET = Serial-port
            CONFIG += console
            CONFIG -= app_bundle

            TEMPLATE = app

            SOURCES += main.cpp

            INSTALLS += target

            but i am getting like serial port is not open how to resolve this issue plz tell me
            i am here by attaching the file0_1557400980078_Capture123.PNG

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You are blocking the event loop the way you wrote it.

              Please take the time to review the examples of the QtSerialPort module.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2
              • K Offline
                K Offline
                kuzulis
                Qt Champions 2020
                wrote on last edited by
                #7

                @chandana said in Can we able to plot the graph of wire which has to show the diameter in qt software:

                serialPort.open(QIODevice::ReadOnly);
                serialPort.setPortName("COM10");

                Besides, this sequene is wrong and makes not sense!

                1 Reply Last reply
                3

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved