LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set a delay between the measurement of different channels...?

Hello everyone,
 
I am using Labview 8.0, and a PCI 6221 card. (windows XP).
 
I am using the 8 AI of the card to measure 8 Voltages (diff. mode).
 
The problem I have is that I get an offset except on the first channel I measure. If I set the DAQ assistant like this : AI0;AI1;AI1. This is what I measure : 0.320V;0.1695V;0.168V
 
 
 I only get the offset  with the first AI1 and not the second AI1 (0.168 is the correct value). I suppose the multiplexer hasn't got the time to change impedance when changing from AI0 to AI1.
 
I have attached a simplified version of my program where I am measuring 3 channels, and generating a square wave analog output.
 
My idea is to introduce a delay between the change of channels....  Is that a good idea...? and I am sure there is a very simple way to do this based on my program, but I don't know how. How long should the delay be?  Or any other idea...?
 
Thanks for your help,
 
Marc
 
0 Kudos
Message 1 of 10
(3,162 Views)
Did you connect something to those Input?
If they are not connected it's could be normal.
If you connected someting to it, try using a multimeter to be sure and try with the Max explorer to.
 
Benoit Séguin
Benoit Séguin
Software Designer
0 Kudos
Message 2 of 10
(3,143 Views)
Hi Benoit,
 
Thanks for answering.
 
None of my inputs are in the air. The unused ones are connected to AIground. I have checked the offset with a multimeter.
 
Regards,
 
Marc
0 Kudos
Message 3 of 10
(3,139 Views)
Forgot to say I have checked with MAX. The first channel red is always ok ( which ever it is)
0 Kudos
Message 4 of 10
(3,137 Views)
So if i understand, You only have this problem with Labview?
 
If it's the case, did you make an auto calibration of the card in the pass with LabView?
 
I already had that problem.
Benoit Séguin
Software Designer
0 Kudos
Message 5 of 10
(3,132 Views)

Yes excatly, I only have this problem with Labview ( the PCI card infact). The signals are ok when red with a multimeter.  I don't know if I was clear, but the PCI card and Labview do the correct measure if the signal is red first ( MAX, Daq Assistant, and DAQmx say the same).

That's why I think there is a problem with the multiplex when changing impedance at a "high" speed....... I haven't got this problem if I mesaure 2 voltages from 2 power supplies ( which have  the same impedance I suppose).

I have tried with another computer and another PCI 6221 card, and it is exactly the same.

I  also did an auto calibration. Nothing changed.

0 Kudos
Message 6 of 10
(3,124 Views)
If you use just that channel, What's happen!
 
If just that channel work, and it doesn't with multiple channel, try with multiple sample in each channel. by this way you will be able to see if theire is an error on the first sample taken by the card. You will just have to check all the sample taken in each channel. if it's the case, take a sample and reject it before making any measurement.
 
Benoit
Benoit Séguin
Software Designer
0 Kudos
Message 7 of 10
(3,111 Views)
If I choose just one channel ( AI0, AI, AI2,....or AI7) I have no offset. The offset only occurs when I set more than one channel to be measured ( but the first channel in the order of reading is always fine what ever it is). I have explained my problem in a previous post :
 
 
I have some noise on my measures (roughly +/5 mV), so for the moment I am taking 1000 samples every 1ms on each channel and making an average of the 1000 samples. 
 
I will try your solution : taking a look at the first points of my measures to see if the offset goes away quickly or not. However since I have been  making an average on 1000 points at 1Khz, if I get a 2mV offset (after making the average), it means there are many points conerned by the offset.... I will see that anyway when looking at the 1000pts.
 
I don't have much experince in this, but I am surprised I have to deal with this kind of multiplex problem on a NI card. What do you think about it...?  Does it surprise you...? What could I be doing wrong ?
 
Thanks a lot for your help anyway 
 
Marc
0 Kudos
Message 8 of 10
(3,105 Views)

I had a similar problem and to solve it, I just add a delay to be sure that the buffer had time to refresh at least one. after that my problem was gone. The delay was about 10 second. I had a huge buffer and a sample time quite slow.

 

Benoit Séguin

Benoit Séguin
Software Designer
0 Kudos
Message 9 of 10
(3,104 Views)

You may want to re-post thsi to the DAQ forum.

Typically it can be fixed by setting the inter-channel delay or using a buffer (i.e. Op amp gain =1) so that the input cap. can charge.

Sorry about the lack of details, but these hardware inteface issue get sticky and complicated and as I am a volunteer, I can't spend to much time working out the details.

Still trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 10
(3,095 Views)