Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is the DAQmx C API cross-platform compatible?

Solved!
Go to solution

Given the same NI hardware and the latest DAQmx software is installed. Would the same DAQmx related C source compile and work on Windows, Linux, and Mac OS X?

 

I am asking this, because I produced already a special measurement application using the DAQmx C API for addressing PCI NI hardware in a Windows XP box, and I am now thinking about porting my app to Linux and Mac OS X.

 

Would I need to re-program the DAQmx related part of my app for every platform, or would it be likely that it simply works at every supported platform as is (perhaps with small changes).

 

Best regards

 

Rolf

 

0 Kudos
Message 1 of 5
(4,046 Views)

Hi Rolf,

 

Windows use NI-DAQmx driver to comunicate with DAQ hardware, but LINUX and MAC OS use NI-DAQmx Base driver to do it.

 

Not any hardware model are compatible wth NI-DAQmx Base, you needsee at NI-DAQmx Base readme file if your hardware are compatible or not.

 

Here are the links to the different driver versions.

 

http://joule.ni.com/nidu/cds/fn/p/sb/navsRel/lang/en?q=daqmx+base&x=13&y=14

 

http://joule.ni.com/nidu/cds/fn/p/sb/navsRel/lang/en?q=daqmx&x=13&y=10

 

Note: Exists a version of NI-DAQmx for Linux, but this version is too old.

 

Regards,

 

Abel

National Instruments Brazil

Abel Souza
Engenheiro Eletrônico
LabVIEW User since 8.5
0 Kudos
Message 2 of 5
(4,025 Views)

Abel,

 

many thanks for your reply.

 

I checked already that the hardware that I am interested in (basically M series PCI boards) is compatible with all platforms. I now understood also the difference between NI-DAQmx and NI-DAQmx Base. I will check out the C API in the DAQmx Base 3.0 for Windows and compare it with the Mac and Linux DAQmx Base versions. This should give me an idea on how much work is involved with cros-platform DAQmx coding.

 

Best regards

 

Rolf 

0 Kudos
Message 3 of 5
(4,013 Views)
Solution
Accepted by topic author rolfheinrich

Rolf-

 

You don't mention which PCI M Series you're using, but most of the M Series line is supported by NI-DAQmx for Linux.  As of July 2009, the latest released version is NI-DAQmx 8.0.1.  The readme lists devices supported.  If your device and Linux distribution are supported I would strongly suggest using NI-DAQmx on Linux.  Your "C" programs for NI-DAQmx for Windows should port directly to NI-DAQmx for Linux with few to none programming changes. 

 

You should note that NI-DAQmx Base is the only driver package available for Mac OSX.  Also note that there is no support for USB DAQ device in NI-DAQmx for Linux, so if you end up using any USB DAQ on Linux you will need to use NI-DAQmx Base to program those devices.

 

Hopefully this helps-

Tom W
National Instruments
Message 4 of 5
(3,982 Views)

Tom!

 

Many thanks for your reply and for the provided information.

 

In the moment I am talking only about the NI-PCI 6251. In the past I developed a cross platform (Mac, Windows, Linux) electrochemical data analysis/graphing application, and recently I added to the Windows port the feature of doing electrochemical measurements for direct evaluation in the same application, using the DAQmx C API to address said NI-PCI 6251 board.

 

I am not very much interested in USB devices. Perhaps at one day, I may want to experiment with electrochemical impedance spectroscopy using one of the PCI(e) S series boards. However, for this either of two things should happen before; the economic crisis should have gone or NI lowers the prices.

 

In the meantime, I had a close look to the DAQmxBase C API and I found out, that this is the real cross-platform API. NIDAQmxBase.h for Windows, Linux, and Mac OS X are exactly identical.

 

Almost everything that I used from the DAQmx C API is there in DAQmxBase too, and that for each of the said platforms. Only the equivalents for DAQmxRegisterEveryNSamplesEvent() and DAQmxRegisterDoneEvent() are missing from DAQmxBase -- besides many other things that I don't use and don't miss. Unfortunately, my measurement routines heavily rely on the event handling that is provided by the way of the registered callback routines, and DAQmxBase is now out of question for my purpose.

 

Since Mac OS X (my favourite computing environment) is not supported by DAQmx, I will step back for a while from the plans to make the measurement extension cross-platform. Perhaps at some day, I will continue my efforts with the DDK. I achieved already quite promising results with it for Darwin/Mac OS X and I am sure that I would succeed in repeating this for Windows and Linux, which will "only" be time consuming.

 

Anyway, my original question is answered, and I know how to proceed now.

 

Many thanks again for the answers.

 

Best regards

 

Rolf

 

 

0 Kudos
Message 5 of 5
(3,963 Views)