LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting analog input range channel-by-channel

How does one set different input ranges on different channels when doing an analog voltage measurement? My hardware is a USB-6009 and my software is LV8.5.
 
I thought the attached vi would do it, and it runs without announcing any error, but measurements that are about 3 V or so on the channel I specify as +/- 5 V all get reported as 1.05 using this method. Removing both the channel property nodes makes the values look correct for both channels. Is the +/- 0.5 V range selected on the other channel somehow limiting this channel too, albeit to a range larger than 0.5 V?
 
I don't see anything in the USB-6009 docs about whether range is by channel versus all the same.
 
If I do eliminate the channel property nodes that specify the ranges, will LV automatically choose appropriate ranges for each channel? Or will it automatically choose the largest range and let the channel with the smaller signal suffer with a big digitization error?
 
Thanks!
0 Kudos
Message 1 of 5
(3,450 Views)
Just like all other property nodes, the order of the properties is important. You are selecting the active channel last and that is incorrect. You need to select the channel first.
 
You can also call the DAQmx Create Channel inside a for loop as shown below.
 


Message Edited by Dennis Knutson on 04-23-2008 12:41 PM
Message 2 of 5
(3,440 Views)

You're right! I just reversed the order of my properties, and it works!

Where did you learn that?

I had no idea the order of the properties mattered.

Thanks!

0 Kudos
Message 3 of 5
(3,430 Views)
It's documented in the on-line help.
 
"The node executes each property in order from top to bottom."
Message 4 of 5
(3,426 Views)

"The node executes each property in order from top to bottom. If an error occurs..."

Gee, sure does, and I missed it.

Well, thanks!

0 Kudos
Message 5 of 5
(3,410 Views)