Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Are there any differences in the base C APIs accross the version of NI-DAQ?

I need to know, apart from supporting new functions, are there any differences (name changes, function prototype changes)
in the NI-DAQ 5.0 and current NIDAQmx C APIs?

Thanks for your help.

Boniface

0 Kudos
Message 1 of 10
(4,259 Views)

NI-DAQ 5.0 was Traditional DAQ.  If you are going to be upgrading to DAQmx then yes there are numerous changes in the API between Traditional DAQ and DAQmx.  If you really mean you are going from Traditional DAQ 5.0 to Traditional DAQ 7.x then no there shouldn't be too many changes.

 

StuartG

0 Kudos
Message 2 of 10
(4,247 Views)
Thanks StuartG,

So is there a document that can provide me with details of the changes?

For example I need a document which will specify how, for example, functions like

        AI_Configure (deviceNumber, chan, inputMode, inputRange, polarity, driveAIS)
        Configure_HW_Analog_Trigger (deviceNumber, onOrOff, lowValue, highValue, mode, trigSource)
         DAQ_Clear (deviceNumber)
        etc

have changed.

Thanks for your help.
0 Kudos
Message 3 of 10
(4,239 Views)
Hello bmuser,

When you install the latest version of the NI-DAQmx driver, documentation for the function calls will be installed under Start > All Programs > National Instruments > NI-DAQ > NI-DAQmx C Reference Help.  This is your best reference tool for using the NI-DAQmx C API.  There is a similar document titled Traditional NI-DAQ Function Reference Help installed in the same location that can be used to compare the differences between the NI-DAQmx and Traditional NI-DAQ function calls.

In addition, the following Developer Zone tutorials might also be helpful:

Using NI-DAQmx in Text Based Programming Environments

NI-DAQ C to NI-DAQmx Terminal Names Translation Guide


Using NI-DAQmx in LabWindows/CVI


I hope this helps,

Travis G.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 4 of 10
(4,231 Views)

To follow up what Travis said I would also encourage you to look at the examples.  My guess is there is a shipping example which will do something very similar to what you are trying to do

 

StuartG

0 Kudos
Message 5 of 10
(4,218 Views)
Thanks Stuart and Travis. I have seen most of these documents including the C API Reference Help, but it is not clear to me how to take a piece of code written in ANSI C and port it to NI-DAQmx. I have
tried to match the APIs to avail.
For example in Traditional NI-DAQ, for "Analog Input" - the following APIs can be employed:

               AI_Change_Parameter

               AI_Check

               AI_Clear

               AI_Configure

               AI_Mux_Config

               AI_Read

               AI_Setup

               AI_VRead

               AI_VScale

               //Double Buffer - DAQ

               DAQ_DB_Config

               DAQ_DB_HalfReady

               DAQ_DB_Transfer

               //High level

Can someone tell me, which NI-DAQmx function(s) can be used in place of these functions - something similar to the "NI-DAQ C to NI-DAQmx Terminal Names Translation Guide"  that matches functions on both ends.

Thanks for your assistance.

0 Kudos
Message 6 of 10
(4,170 Views)

To my knowledge there is not.  My suggestion is that it is going to be much easier for you to define what you want to do and then find an example that does this.  It looks like for the most part what you want to do is take a continuous voltage acquisition.  There is an example which shows how to do this.  Then you can get into more complicated things.  For instance, it looks like you might be configuring the FIFO transfer conditions.  This can be done with some of the more advanced properties.  If there is something specific you are trying to do let me know and I can try and best match-up what you need.

 

STuartG

0 Kudos
Message 7 of 10
(4,143 Views)
Thanks Stuart,

The problem is that when do a search I see only VI examples. Where can I find only C examples?
It's real awkward that one has to look for examples instead of APIs.


0 Kudos
Message 8 of 10
(4,136 Views)
Hello bmuser,

The DAQmx ANSI C shipping examples are installed under C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C.  For a basic finite or continuous analog input acquisition program, I would recommend taking a look at the examples titled Acq-Int Clk.c (finite example) and Cont Acq-Int Clk.c (continuous example).

Travis G.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 9 of 10
(4,129 Views)

bmuser

Look at the API all you want.  My personal taste is that I can find a solution quicker by looking at an example, but if you can do it faster by looking at an API then by all means do.  You originally wanted a mapping of Trad DAQ to DAQmx which we don't have (to my knowledge), so I thought examples would be the easiest place to get you started.  If it is the API you prefer then I suggest looking at the C API reference manual.  You can find it at Start>>National Instruments>>NI-DAQmx C Reference Help.

Enjoy

StuartG

0 Kudos
Message 10 of 10
(4,114 Views)