From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple channels definitions for AI

All examples for analog input use one channel only.  I would like to see and example using multiple channel inputs.
0 Kudos
Message 1 of 4
(2,444 Views)
You just have to enter multiple channels in the physical channel control. Click on the little arrow on the right side and select Browse. Use the Shift or Ctrl keys with the mouse to select multiple channels.
0 Kudos
Message 2 of 4
(2,436 Views)

Let me rephrase.  Multiple channels with different ranges.  I guess it seems stange to me that I go to all the trouble to make global virtual channels definintions in MAX but only have the option of physical channels using the AI definitions.

 

I would love to see just one AI example using the MAX definitions with differing ranges and using the scales definitions in MAX.

0 Kudos
Message 3 of 4
(2,422 Views)

Hi rlbrehm,

 

If you have already created Global Virtual Channels in MAX, you can use the DAQmx Create Task vi to create the task from those in LabVIEW.

 

If you have a Task configured in MAX, you may use it in LabVIEW as follows:

Using a DAQmx Task in LabVIEW

 

 

If you want to define the channels in LabVIEW with multiple characteristics, you can also use the DAQmx Create Channel multiple times in your code to define channels with different characteristics (scales, ranges, etc.).  The following code shows how this can be done, although a more elegant solution would use an array of channel configurations in conjunction with a for loop.

DAQmx Acquire with Multiple Channel Input Ranges

 

 

The one thing to take away from this is that there are multiple ways to define your task and the parameters associated with each channel--any of the above methods should be able to produce the same result so it's up to you how you want to define your task and channels.  I hope this is helpful.

 

 

-John

John Passiak
0 Kudos
Message 4 of 4
(2,412 Views)