LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analog input reading changes when DAQmx channel order is changed

I'm running LabView v7 on a Windows XP machine. My code is using DAQmx global channels to read 20 channels from a 4-slot SCXI box through a PXI-6052E. The first slot is a 1520 and the remaining cards are 1121's. I've been running my code for awhile with no problems but all of the sudden the first two channels on slot 2 look like they're maxed out, even though I can test the global channels from MAX and the reading is fine.
 
The code creates a DAQmx task from a DAQmx channel control which just lists the 20 global channels in order (slot1ch0, slot1ch2,...). If I move just the slot2 ch0 channel to a different order in the channel control list then it reads correctly and slot2 ch1 reads correctly as well. Why are only 2 channels out of 20 reading incorrectly and why does changing the order in the channel control fix it?
 
I suspect that I'm not really using the DAQmx VI's quite right but it has worked fine up until now. And why should rearranging the scan order (if that's really what I'm doing) fix it? Please help!
 
Jason
 
P.S.
I thought you had to scan 1121 channels in order. Does the order of my channels in the DAQmx channel control not determine the scan order? Or does DAQmx let me scan in any order now?
 
 
0 Kudos
Message 1 of 4
(2,638 Views)

Update:

I've discovered the apparent cause although I don't know why it's the cause. We had disconnected the instrument on the 1520 channels in the first slot so those channels were just floating. The gains were set pretty high and the A/D was pegged on all those channels. Apparently that was causing the first two channels on the 1121 in slot 2 to also peg. No idea why. When I lowered the gains or shorted the inputs on the 1520 channels then the readings on the 1121 slot 2 channels were fine.

So lesson learned: don't leave channels floating. I'd still like to know what the root cause of the problem is.

0 Kudos
Message 2 of 4
(2,618 Views)
Floating inputs have capacitance. That capacitance charges to a value which depends on leakage to adjacent (physically) channels or to power supply rails. The single A/D converter is multiplexed to the different channel inputs. If some of those have floated to a value outside the input range of the A/D, then you can strange effects.

Simple rule: Connect all unused inputs to some source, usually analog ground. If the used inputs share a common mode voltage, connecting the unused inputs to that voltage may also work.

There is information about this in some of the DAQ device documentation, but I do not recall exactly where.

Lynn
0 Kudos
Message 3 of 4
(2,612 Views)
Thanks for the response. I'll do some digging in the documentation but I like your summary: "strange" things can happen. It does appear to be related to the A/D card receiving the multiplexed signals and an out of range signal affect the next signal(s). I'll have to do some more reading on exactly how the list of channels is scanned in the SCXI box and then multiplexed to the A/D.
0 Kudos
Message 4 of 4
(2,603 Views)