National Instruments 1141 User Manual

Page of 86
Chapter 5
Using the SCXI-1141/1142/1143 Module
© National Instruments Corporation
5-11
LabWindows/CVI
LabWindows/CVI works with the DAQ Assistant in MAX to generate 
code for an voltage measurement task. You can then use the appropriate 
function call to modify the task. To create a configurable channel or task in 
LabWindows/CVI, complete the following steps:
1.
Launch LabWindows/CVI.
2.
Open a new or existing project.
3.
From the menu bar, select Tools»Create/Edit DAQmx Tasks.
4.
Choose Create New Task In MAX or Create New Task In Project 
to load the DAQ Assistant.
5.
The DAQ Assistant creates the code for the task based on the 
parameters you define in MAX and the device defaults. To change 
a property of the channel programmatically, use the 
DAQmxSetChanAttribute
 function.
Note
Refer to the NI LabWindows/CVI Help for more information on creating NI-DAQmx 
tasks in LabWindows/CVI and NI-DAQmx property information.
Measurement Studio (Visual Basic 6, .NET, and C#)
When creating an voltage measurement task in Visual Basic 6, .NET and 
C#, follow the general programming flow in Figure 5-1. You can then use 
the appropriate function calls to modify the task. This example creates a 
new task and configures an NI-DAQmx voltage measurement channel on 
the SCXI-1141/1142/1143. You can use the same functions for Visual 
Basic 6, .NET and C#.
The following text is a function prototype example:
void AIChannelCollection.CreateVoltageChannel(
System.String physicalChannelName,
System.String nameToAssignChannel,
System.Double minVal,
System.Double maxVal);