09-27-2010 08:39 AM
We need to operate the PXI-6230 M series card from LabVIEW. From what I have read, the Linux DAQmx and DAQmx Base fucntions do not ocver the PXI-6230 card. I beleive that the MHDDK drivers support the 6230 but I am not familiar with the MHDDK drivers, so I have a few questions.
1) Can we use these drivers installed on a PXI system with the DAQmx drivers installed? Can the MHDDK exist simultaniously with the DAQmx?
2) I see examples for the MHDDK in C++. What is the best way to interface these drivers to LabVIEW?
Thanks for the help.
09-28-2010 10:11 AM
Hi Julia,
Before answering your questions, I would like to give a brief disclaimer or caution about the MHDDK.
The main intent of the DDK is to allow its users to write a custom driver for their device and operating system; it is not intended to be a stand-alone driver.
To that end, the DDK demonstrates how to program a DAQ device -- the hardware calls and firmware messages that need to be made to program a device to take and return a measurement. In order to bootstrap a new user, NI provides the OS Interface component as a bare-bones implementation to get a handle on the device. The OS Interface is not intended to serve as a model for a driver's architecture, but as a bridge to get the device up and running quickly. NI knows that the OS Interface is not full-featured and, for certain OSes, may even circumvent OS security, and so we encourage the DDK users to write their own OS extensions rather than use the OS Interface.
In particular, the Linux kernel module for the MHDDK maps the device's registers and associated DMA buffers from kernel-mode to user-mode, which is rather contradictory to the OS's design and goal. If your application requires that drivers conform to the Linux conventions, then it will take some effort to refactor the code to be compliant.
Now, on to your questions 🙂
By re-working the code, it would be possible to implement a driver-like API for creating a task, configuring and starting it, reading from/writing to it, stopping and clearing it. Since this code would be written in C++, you could use a Call Library Function Node in LabVIEW to wrap each API function call, giving you one VI for each entry point.
Call Library Function Node
http://zone.ni.com/reference/en-XX/help/371361G-01/glang/call_library_function/
Joe
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)