Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW drivers for the PXI-6230

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.

0 Kudos
Message 1 of 2
(3,505 Views)

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 🙂

  1. Yes, the MHDDK and DAQmx can simultaneosly exist together on the same system, but this requires changing the MHDDK's Linux kernel module source to only identify and claim the 623x boards. As it is currently written, it will associate with any NI card.
  2. The examples show the alogrithm for programming the hardware to perform certain functions and exercise features. They do not provide an API for programming the hardware in general. There are certain source file that aggregate some of the logic (the common subsystem files -- ai.cpp, ao.cpp, etc...), but the overall order of operations is given in the examples which call into these common files. Any driver written with the DDK would need to know both the logic and order of operations, and it's my opinion that the examples are not suitable for general device control and direct inclusion into a LabVIEW driver.

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)
0 Kudos
Message 2 of 2
(2,801 Views)