Qt and National Instrument Device Drivers



  • 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


  • Qt Champions 2017

    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 Champions 2017

    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.


  • Moderators

    @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 :

    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.



  • 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


  • Qt Champions 2017

    @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


Log in to reply
 

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