Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Continiously store data from QSerialPort

Continiously store data from QSerialPort

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.0k Views
  • 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.
  • R Offline
    R Offline
    rockon209
    wrote on last edited by VRonin
    #1

    Hello Everyone

    I want to record data from a device which is connected to my computer with USB. I can communicate with the device. Now i want to record the data from the device continuously and stored it. So to do this should i have to set the buffer length? If yes then how can i do it. Please help.
    Thanks in advance

    changed title to something more meaningful ~VRonin

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2
      QFile* storage=new QFile("storage.dat",serial);
      storage->open(QFile::WriteOnly);
      QObject::connect(serial,&QSerialPort::readyRead,[=]()->void{storage->write(serial->readAll());});
      

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2
      • R Offline
        R Offline
        rockon209
        wrote on last edited by
        #3

        Hello @VRonin
        I couldnt get your answer.
        if you refer following topic i want store data continuously. I am using NI device to record data from a sensor. I know how to communicate and read write the NI device using DAQmx libraries.
        https://forum.qt.io/topic/78216/how-to-continuously-acquire-signal/3

        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #4

          I'll mark this as duplicate and continue on the other one then

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          0

          • Login

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