LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why does labview forget the connections to the virtual channels in MAX?

I create a bunch of virtual channels in MAX - some with double assignment to a single AI port.

 

Context - a digital output controls a MUX to switch the inputs into the AI ports of my USB-6361(BNC) DAQmx; thereby allowing me to double up on the number of AI ports I can access (switching every 5ms).

 

I can run the code without any troubles. I have now completed my hardware set up and and am now testing the integration with the code. This is where things become a little unstuck.

 

Problem: some ports, over time, start displaying erroneous data that is not correct. It is not until I delete the virtual channel and re-create it in MAX, does everything settle and work. This 'bad' data is seen in the MAX test panels tab and virtual channels tab.

 

What is going on - should I bite the bullet and program all port assignments (channels) within my code?

 

Am i mistakenly killing a link between MAX and the DAQmx?

0 Kudos
Message 1 of 16
(4,437 Views)

 

LV2014 - v14.0f1 (32-bit)

 

OS - Win7 x86; running on a virtual machine using Parallels (on a macbook)

 

DAQmx MAX - v14.0

0 Kudos
Message 2 of 16
(4,435 Views)

 

is it a problem with the USB port - by moving my laptop and DAQmx to the lab I may choose a different USB port. Even though I have given the device a name is there a background assignment of dev1 and dev2 that is messing up my saved channels?

 

 

0 Kudos
Message 3 of 16
(4,423 Views)

 

just running the channel in MAX for a one of the AI ports, I would expect a floating value around 0V. Instead I get ~2.2V, slowly ramped up over a 5 sec period.

 

even deleting and re-creating this channel I still get the same result; even on a different USB port. So, this tells me the USB port doesn't matter.

0 Kudos
Message 4 of 16
(4,415 Views)

Why do you expect a value of 0?  Do you have something driving the channel that is 0V or is the channel open?

0 Kudos
Message 5 of 16
(4,403 Views)

 

I have tested the AI with no connection to the DAQmx, creating a floating input. I would expect this to be around 0V.

0 Kudos
Message 6 of 16
(4,398 Views)

 

I shut everything down, including Windows. On power up, my inputs and code seem as I would expect - i no longer see the ~2.2V.

 

this brings me to my original post - why are the virtual channels disconnecting and generating erroneous data?

 

 

0 Kudos
Message 7 of 16
(4,397 Views)

I can't find the white paper at this moment, but the behavior you're seeing is expected.

 

If you're not driving anything to the channel, you can't expect any specific value.  Typically, the value increases up until the channel rails at its maximum reading.  If you want to test for a 0V reading, you need to apply something with 0V.

 

When you see unusual readings in your measurements from the original question, is this a time when you're not driving anything to the channel?

0 Kudos
Message 8 of 16
(4,387 Views)

natashw already told you that it's expected behaviour when you leave the analog input open. There are two aspects to this:

 

1) The analog input amplifier is a high impedance operation amplifier. It's minimal stray capacitance is high enough that it gets charged through very small leakage currents in the amplifier input stage, but the high input impedance doesn't allow those capacitance to discharge quick enough to stay at a defined voltage. So your input is usually very slowly floating to one of the power supply rails depending what transistor side has a slightly higher leakage.

 

2) You only have one analog to digital converter. To get multiple channels there is a multiplexer than connects the different input channels to this single ADC. When the multiplexer switches between from a connected signal to an unconnected signal those stray capacitance at the ADC amplifier input has been charged to a certain voltage from the connected channel. With only the internal impedance of the amplifier to discharge this capacitance after the multiplexer switched to an unconnected input, the ADC will simply see the voltage that the stray capacitance has been charged to.

 

Having a low impedance amplifier input would solve that problem but create many more problems that would affect the measurement accuracy significantly.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 16
(4,355 Views)

 

Thanks, Rolf, for your explanation. As you would understand I only left the input floating to test the measurement in MAX. If it is meant to be around 2.2V, then fine, okay, got it. Let's move on...

 

As I told you already, when my hardware is connected (read: inputs are hard wired and not left open) I get erroneous or incorrect values. This is resolved with a delete and re-create of the global virtual channels (in MAX).

 

As you may understand, I don't wish to keep removing and replacing these channels. So, coming back to my original post - why is LabVIEW (and MAX) forgetting my connections to the DAQmx ?

0 Kudos
Message 10 of 16
(4,330 Views)