NI recommends starting with a new VI and using the old VIs written in Traditional NI-DAQ (Legacy) as a guide. Although many of the programming techniques are similar, there are some slight differences that will be pointed out in this document. Please note that this article is intended to be a supplement to the other help documents available, not a substitution. After you understand what is described in this article, you should have a clear idea of the main differences to keep in mind when programming in NI-DAQmx.
Since it is recommended to start code from scratch, here are a few guidelines and suggestions to make that transition as easy as possible. A helpful tool available since LabVIEW 7.0 and later is the DAQ Assistant. With this assistant, you can designate what you want your code to do in Measurement & Automation Explorer (MAX), and then generate code based on that task. After generating the code, you can then edit it by adding property nodes or changing the configuration to meet the needs of your specific application. If you would like more information on how the DAQ Assistant works, refer to Taking an NI-DAQmx Measurement in LabVIEW.
One major difference between the two drivers is in the palettes. In Traditional NI-DAQ (Legacy), there is a different palette for each type of operation, such as a digital palette for digital operations, an analog input palette for all analog input operations, and so on. In NI-DAQmx, just one set of VIs is used for all operations, and you can configure each VI for a specific type of acquisition. For example, in Traditional NI-DAQ (Legacy), you use the
AI Config.vi to configure a channel or set of channels for analog input. In NI-DAQmx, you use the
DAQmx Create Channel.vi, and configure this VI for Analog Input::Voltage. This distinction makes it easier to become familiar with the specific VIs needed to perform various operations.