LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Legacy Ni-Daq to Ni-Daqmx in CVI

Hi All,

I'm running on a new PCI-6281 board and thus have upgraded to CVI 7.1 with Ni-DAQmx.  However, my application was written in CVI 6.0 using Ni-DAQ legacy, and I need to migrate the software to Ni-DAQmx.  Unfortunately the FAQs on NI's site talk mostly about how to migrate using some other NI app which is not CVI.  I am using the DAQ I/O Assistant, but I'm having some trouble as there seems to be a large discrepancy between the functions it offers and what was available for DAQ legacy.  The legacy functions also aren't exactly in one-to-one correspondence with mx, so can someone direct me to some good examples or FAQs that talk in greater detail on how to migrate CVI applications?  Thanks.
0 Kudos
Message 1 of 3
(3,313 Views)
 

Hello,

As you said, unfortunately, the tutorials on migrating applications from Traditional DAQ to DAQmx are targeted at LabVIEW users, and therefore refer to VIs instead of functions.  However, in about every case, a VI has a direct equivalent in the C API (some VIs, like the DAQmx Create Virtual Channel VI, are actually replaced by a number of functions: DAQmxCreateAIVoltageChan, DAQmxCreateAOVoltageChan, etc).

This document shows you some of the basics of converting an application from Traditional DAQ to DAQmx.

This document describes how to use some of the most common DAQmx functions, which relate to task-based nature of DAQmx.

Both of the above documents are linked from a more general FAQ on the differences between Trad DAQ and DAQmx.

There really is no universal "replace-this-function-with-that-one" method to do a direct translation of a Traditional DAQ  application to DAQmx.  If the tutorials leave you wanting something more specific to the C API, you can take a look at the DAQmx examples installed under CVI71\samples\DAQmx (or the simpler, UI-less ANSI C examples under National Instruments\DAQmx\Examples\DAQmx ANSI C) which distill out the essentials of various DAQmx programming concepts.  If you are using the DAQ Assistant from CVI to configure a task, keep in mind that you can have it generate code, so you can see what function calls are used to set up a task in a particular way.

Hopefully using a combination of these resources will help you migrate your application without much difficulty.

Mert A.
National Instruments

 
0 Kudos
Message 2 of 3
(3,292 Views)

Also don't forget you can look at the Traditional NI-DAQ Function Reference Help and the NI-DAQmx C Reference Help for detailed explanations of all DAQ functions.  Both of these documents can be found at:  Start >> All Programs >> National Instruments >> NI-DAQ.

If you can't find a shipping example applicable to your original application, you can search for more example programs online at:  https://forums.ni.com/t5/Example-Programs/ct-p/code-documents

I hope this helps.

Regards,
Sean C.

 
0 Kudos
Message 3 of 3
(3,289 Views)