Hello Nic,
You cannot programmatically open the DAQ Assistant in a VI, however there are many ways to deploy tasks and channels. This topic is discussed in the NI-DAQmx Help file (
Start>>All Programs>>National Instruments>>NI-DAQ), in the section entitled "Deployment". I have copied some of the information from that topic below for your reference.
Deploying Tasks and Channels
Your tasks and channels deploy automatically with your application
under the following circumstances:
- You use LabVIEW Express VIs for your DAQ applications.
- You save your tasks within a LabWindows/CVI or Measurement project, and the
tasks use local channels only.
- You create your tasks and channels programmatically using the NI-DAQmx
API.
You must deploy your tasks and channels using the MAX Export
Wizard if you create your tasks and channels in the following ways:
- You create your tasks and channels directly in MAX.
- You create your tasks and channels in LabVIEW from the Task Name and Channel
Name controls and do not generate configuration code.
- You create your tasks in LabWindows/CVI and neither generate configuration
code nor copy the tasks to your project.
The important thing to keep in mind is how you are attempting to deploy your task. If you are using the first method described above where tasks and channels are deployed automatically, then you will need to programmatically change your task attributes using the NI-DAQmx palette in LabVIEW. You can add controls to these VIs to programmatically change all the properties that are set in the DAQ Assitant configuration window. For example, the "Timing Settings" section of the DAQ Assistant (shown below) allows you to configure the Acquisition Mode, number of Samples to Read, and the Rate in Hz.
These same parameters can be changed programmatically in LabVIEW using the Sample Clock instance of the DAQmx Timing.vi. As you can see from the description of the VI below, the
samples per channel,
sample mode and
rate inputs to this VI address the same properties as the DAQ Assistant.
Finally, if you use the second method described in the help file where you explicitly export your NI-DAQmx tasks from MAX, then you can simply edit these tasks on your deployment machine in MAX. The tasks should be saved under
Data Neighborhood in the section called
NI-DAQmx Tasks. You should recognize the configuration window from the DAQ Assistant, as the interface is very similar. I have posted an example interface from a task in MAX below.
Either of these methods should allow you to deploy your NI-DAQmx application on either a machine with LabVIEW or one without. Let us know if you have any other questions about deployment or need any additional help.
Message Edited by Matt A on
03-24-2008 01:01 PM
Matt Anderson
Hardware Services Marketing Manager
National Instruments