LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use AI_Configure NIDAQ function with LabWindows/CVI?

How to use AI_Configure() NIDAQ function with LabWindows/CVI? I want to configure Analog input channels without using the NI Explorer.
0 Kudos
Message 1 of 4
(4,273 Views)
The AI_Configure function permits you to setup some configuration parameters for an acquisition card installed in the system. You cannot avoid completely using the Measuremente and Automation Explorer, since for example the board logical device number can be seen only with MAX.
Besides it, with AI_Configure you can specify some parameters for your daq device. Be careful to the characteristics and limitations of the specific device you are using.
For a help in using the function, you can right click on individual parameters to show specific help for the parameter; if you right click anywhere in the function panel, you get the function help.
When configuring programmatically a daq device, be sure to check the return value from your function, since some o
perations are illegal on some boards and result in an error code. You can obtain an explanation of the error passing this error code to GetNIDAQErrorString () function.

Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(4,273 Views)
But how do I configure the individual analog input channels on the board in my application??
0 Kudos
Message 3 of 4
(4,273 Views)
Here an example for configuring one AI channel (channel 0 in board 1) for bipolar acquisition. The rest of the board was originally configured with MAX for unipolar acquisition (actual board permitted this configuration. Check the limitations implicit in your daq card in the device documentation before configurint it in software).

// Other code here

if ((error = AI_Configure (1, 0, 0, 20, 0, 0)) < 0) goto outDAQ;

// Other board configuration lines here

outDaq:
if (error < 0)
sprintf (msg, "Error %d:\n%s.", error, GetNIDAQErrorString (i));
else
strcpy (msg, "OK");
return error;


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(4,273 Views)