Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Developing a new driver

I need to develop drivers to use my PCIe cards under LabVIEW. The PCIe cards have Adcs and Dacs. I already have C++ libraries for accessing the PCIe cards and I want to build on top of the C++ libraries. I have seen the "Developing LabVIEW Plug and Play Instrument Drivers" article about the Wizard in LabVIEW 8.0, but that assumes that SCPI is used to communicate with the hardware. Should I use the wizard, then replace SCPI commands with calls to a DLL that I develop? Or is there a better approach I should take?

0 Kudos
Message 1 of 6
(6,415 Views)

Hi John,

You might want to explore the X Series DDK examples for LabVIEW on Linux ( https://decibel.ni.com/content/docs/DOC-24083 ) to see one way to connect a C/C++ driver to LabVIEW.

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 6
(6,401 Views)

Hi Joe,

Thanks. I need to support both Windows and Linux. Will your suggested route support both?

0 Kudos
Message 3 of 6
(6,396 Views)

John_Owen wrote:

 

Thanks. I need to support both Windows and Linux. Will your suggested route support both?


Yes. There are two different ways:

  1. Configure the Call Library Node to use multi-platform searching and resolution. If your driver library is called "custom_daq.dll" on Windows and "custom_daq.so" on Linux, specify "custom_daq.*" as the library name. This is the implementation for NI-DAQmx Base (which supports Windows, Mac, and Linux).
  2. If you want to use OS-conventional names like "custom_daq.dll" and "libcustomdaq.so", use conditional structures to configure a Call Library Node for each platform.
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 4 of 6
(6,393 Views)

Thanks. I am developing on Windows at present and do not have a Linux platform today. Are you confirming my approach should be to develop a DLL, not a NI-DAQmx driver? Are there any examples that I can load in Windows that helps me see how I develop the VI's to communicate to the DLL? Or is it just a case of using the same method the Plug & Play Instrument Driver Model shows but replace the SCPI calls with my DLL? 

0 Kudos
Message 5 of 6
(6,377 Views)

Hi John,

 


John_Owen wrote:

Are you confirming my approach should be to develop a DLL, not a NI-DAQmx driver?


Hmmm... Now I'm not sure we're using the same meanings. If you have custom hardware, you cannot extend NI-DAQmx to support it.

 


Are there any examples that I can load in Windows that helps me see how I develop the VI's to communicate to the DLL?

Take a closer look at the LabVIEW Example Finder -- you'll see reference designs for nearly every kind of task you can accomplish with the language. To learn about the Call Library Node, navigate to Communicating with External Applications » Using External Code » Integrating DLLs » External Code (DLL) Execution.vi.

 

lvexfinder.png

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 6 of 6
(6,373 Views)