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. Qt and National Instrument Device Drivers
Forum Update on Monday, May 27th 2025

Qt and National Instrument Device Drivers

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 3.7k 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.
  • M Offline
    M Offline
    MrShawn
    wrote on 13 Apr 2018, 12:43 last edited by
    #1

    Hey guys,

    Been working to replace my LabVIEW work with Qt. Soon I am going to have to dig into the interfacing . In particular I am interested in using their GPIB board, RS232 board, and some IO boards that install right into the motherboard. I know when you install the drivers you can also install libraries for C use, but I have not been able to link them in yet and get it to compile.

    I am wondering if anyone has had some experience with this, and if so I would love some tips / knowledge.

    Cheers,
    MrShawn

    A J 2 Replies Last reply 13 Apr 2018, 13:28
    0
    • M MrShawn
      13 Apr 2018, 12:43

      Hey guys,

      Been working to replace my LabVIEW work with Qt. Soon I am going to have to dig into the interfacing . In particular I am interested in using their GPIB board, RS232 board, and some IO boards that install right into the motherboard. I know when you install the drivers you can also install libraries for C use, but I have not been able to link them in yet and get it to compile.

      I am wondering if anyone has had some experience with this, and if so I would love some tips / knowledge.

      Cheers,
      MrShawn

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 13 Apr 2018, 13:28 last edited by
      #2

      Hi @MrShawn,

      Which platform are you on? And which compiler intend you to use?

      For RS-232, you can use QSerialPort.
      I have also used GPIB at work under Windows with MSVC and MinGW.
      No sure which I/O boards you use and how they are controlled.

      Maybe you can post some more information and maybe errors you encounter so we can help you.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      5
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 13 Apr 2018, 14:10 last edited by
        #3

        Hi
        Qt is just normal c++ so nothing stops you from using C libs.
        You might need to read about extern "C" and such to use them but
        it Qt do not impose any restrictions versus a plain c++ project.

        1 Reply Last reply
        3
        • M MrShawn
          13 Apr 2018, 12:43

          Hey guys,

          Been working to replace my LabVIEW work with Qt. Soon I am going to have to dig into the interfacing . In particular I am interested in using their GPIB board, RS232 board, and some IO boards that install right into the motherboard. I know when you install the drivers you can also install libraries for C use, but I have not been able to link them in yet and get it to compile.

          I am wondering if anyone has had some experience with this, and if so I would love some tips / knowledge.

          Cheers,
          MrShawn

          J Offline
          J Offline
          JKSH
          Moderators
          wrote on 14 Apr 2018, 03:10 last edited by JKSH
          #4

          @MrShawn said in Qt and National Instrument Device Drivers:

          I know when you install the drivers you can also install libraries for C use, but I have not been able to link them in yet and get it to compile.

          The process is the same for any 3rd-party library, including National Instruments ones. See :

          • http://doc.qt.io/qt-5/third-party-libraries.html
          • http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

          I think the first link is easier to follow. The key things to add to your *.pro file are INCLUDEPATH and LIBS.

          @aha_1980 said in Qt and National Instrument Device Drivers:

          For RS-232, you can use QSerialPort.

          +1

          This is the easiest way to do it in Qt. No need for external libraries.

          No sure which I/O boards you use and how they are controlled.

          I'm guessing they are boards that use the NI DAQmx drivers. These provide C libraries.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          4
          • M Offline
            M Offline
            MrShawn
            wrote on 16 Apr 2018, 16:35 last edited by
            #5

            I am mostly on Windows.

            @aha_1980
            What board do you use for GPIB?

            Will the QSerialPort work with the NI Serial Boards like the PCIe-8432 - this is an example of a few that I have.
            If that is the case it will be really sweet, I haven't looked at the QSerialPort class but I bet it is a lot nicer than VI for the same devices....

            The I/O boards look like DAQmx pci boards so i should be able to follow the links showing to how bring in 3rd party libraries.

            Thanks for the responses guys I'll look into some of those links.

            -MrShawn

            A J 2 Replies Last reply 16 Apr 2018, 16:48
            0
            • M MrShawn
              16 Apr 2018, 16:35

              I am mostly on Windows.

              @aha_1980
              What board do you use for GPIB?

              Will the QSerialPort work with the NI Serial Boards like the PCIe-8432 - this is an example of a few that I have.
              If that is the case it will be really sweet, I haven't looked at the QSerialPort class but I bet it is a lot nicer than VI for the same devices....

              The I/O boards look like DAQmx pci boards so i should be able to follow the links showing to how bring in 3rd party libraries.

              Thanks for the responses guys I'll look into some of those links.

              -MrShawn

              A Offline
              A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on 16 Apr 2018, 16:48 last edited by
              #6

              @MrShawn said in Qt and National Instrument Device Drivers:

              I am mostly on Windows.

              Which compiler do you intend to use? I had some problem including the NI-GPIB DLL with MinGW, but finally succeeded (with help of a thread in the NI forums. With MSVC it should work out of the box.

              What board do you use for GPIB?

              We have PCI cards as well as the GPIB-USB-HS (which I got running with Linux-GPIB recently too).

              Will the QSerialPort work with the NI Serial Boards like the PCIe-8432 - this is an example of a few that I have.

              I can't tell you, I don't have these boards. If the register themselves as RS-232 (COM) port in the system, then I guess it is possible.

              If that is the case it will be really sweet, I haven't looked at the QSerialPort class but I bet it is a lot nicer than VI for the same devices....

              QSerialPort is just the backend for data exchange. You will have to code the UI yourself.

              Regards

              Qt has to stay free or it will die.

              1 Reply Last reply
              4
              • M MrShawn
                16 Apr 2018, 16:35

                I am mostly on Windows.

                @aha_1980
                What board do you use for GPIB?

                Will the QSerialPort work with the NI Serial Boards like the PCIe-8432 - this is an example of a few that I have.
                If that is the case it will be really sweet, I haven't looked at the QSerialPort class but I bet it is a lot nicer than VI for the same devices....

                The I/O boards look like DAQmx pci boards so i should be able to follow the links showing to how bring in 3rd party libraries.

                Thanks for the responses guys I'll look into some of those links.

                -MrShawn

                J Offline
                J Offline
                JKSH
                Moderators
                wrote on 29 Apr 2018, 13:33 last edited by
                #7

                @MrShawn said in Qt and National Instrument Device Drivers:

                Will the QSerialPort work with the NI Serial Boards like the PCIe-8432

                Yes.

                As far as Windows is concerned, the NI board looks just like any other PCI/PCIe serial board. Your code won't know the difference between a serial port that's built directly into the motherboard, a serial port that's plugged into a PCIe slot, or a USB-to-serial converter.

                I haven't looked at the QSerialPort class but I bet it is a lot nicer than VI for the same devices....

                When it comes to device comms (including RS-232), I personally find VIs nicer than most (all?) C++ classes out there. See section #3.1.2. at https://forum.qt.io/topic/90276/showdown-qt-vs-labview. But, this is a matter of personal (and team/company) preference.

                Note: I do find QSerialPort nicer than QModbusTcpClient, so don't let the example put you off. Try coding it in both languages yourself and then decide which you like more.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                2

                • Login

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