Programmatic Channel Saves in NI-DAQmx

Overview

The National Instruments Getting Started with NI-DAQmx Series is aimed at helping you learn NI-DAQmx programming fundamentals. Through video and text tutorials, this series will take you from verifying your device's operation in Measurement & Automation Explorer (MAX) to programming data acquisition applications using LabVIEW. It is intended for both the beginner who wants to learn how to use the DAQ Assistant, as well as the experienced user who wishes to take advantage of advanced NI-DAQmx functionality.

Programmatic Task and Channel Saving

Many professional data acquisition system developers eventually need to deploy the developed system to one or more targets. Deployment refers to developing an application so that it can be distributed, or deployed, on a different computer than the one on which the application was developed. To deploy an application, developers need the saved application and any configuration information the application and system requires. NI-DAQmx and Measurement & Automation Explorer (MAX), using the MAX Export Wizard, allow users to export configurations, including device, task, channel, and scale configurations. To complete the deployment the developer simply needs to Import the configurations on the target system.

With NI-DAQmx 7.4 and later, professional developers can now programmatically create and save tasks, global channels, and scales. The programmatically saved objects appear in MAX and are available for use in DAQ Assistant and all your applications. This provides the developer with a second option for deployment of configuration information. This new option does not require the developer to import task, channel, and scale configurations using the MAX Import Wizard.

To programmatically save tasks and channels use the DAQmx storage functions located on the function palette under Measurement I/O->DAQmx->DAQmx Advanced-> System Setup->Storage as shown in Figure 1.


Figure 1. NI-DAQmx Storage Functions

The ability to programmatically save tasks, channels, and scales helps professional developers to simplify system configuration and deployment to multiple locations, as well as reduces the chance for error and need for debugging.

Figure 2 shows a LabVIEW example that programmatically saves an analog input task. Refer to NI-DAQmx Help to learn more about this professional tool:



Figure 2. Developers can use NI-DAQmx to programmatically create and save tasks, channels, and scales