Example Code

Multiple Voltage Ranges in one Analog Input Task using a For Loop

This example uses a for loop to configure the voltage ranges for three different analog input channels in one task.

For this method to work, the arrays must all be of the same size. If the arrays are not all the same size, not all of the channels will be created. Additional channels can be configured by adding additional rows to the arrays.

Front panel - Multiple voltage ranges using a for loop.png

Block diagram - Multiple voltage ranges using a for loop.png

Catherine B.
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors