Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

All AI channels have the same value - NI PCI-6221 and NI PCI-6229

Solved!
Go to solution

Hello,

 

I use the example aiex1.cpp for a multichannel AI read with the mseries devices 6221 and 6229.

This example works for one channel, but the other channels have the same value (+- 0.001 Volt difference).

 

For example: I set 5Volt on the first channel and then the other channel have 5Volt too.

What should I consider in the configuration?

 

Please, can someone help me?
 
Best regards,
Heiko

 

0 Kudos
Message 1 of 4
(8,586 Views)
Solution
Accepted by topic author HeikoM

Hello Heiko!

 

your description sounds like that the effect you encounter is "Ghosting".

For further Informations on ghosting and on how to get rid of it, check these links: 

 

http://digital.ni.com/public.nsf/allkb/73CB0FB296814E2286256FFD00028DDF?OpenDocument

 

and

 

http://digital.ni.com/public.nsf/allkb/C6C7DE575301A379862572DD00480A01?OpenDocument

 

Best Regards

 

Moritz M. 

0 Kudos
Message 2 of 4
(8,559 Views)
Hi Heiko,

Like Moritz, I'm curious what signals you have connected to your AI channels. What voltage do you expect to read on each channel?

Tom gave me your initialization code and it looks like you've modified aiex1.cpp. Does the example work without any changes?

I have some more questions that will help me determine where the problem could be coming from, but these two are the easiest. We'll keep getting more and more specific as we remove possible causes.
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 3 of 4
(8,543 Views)

Hello,

 

thanks for all answers.

The cause of the same value on all AI-Channel have I found: I didn't connect all AI-Channels to a source. Smiley Mad

 

@Joe F.: The aiex1.cpp didn't work with NI6221 and NI6229 without some changes.

The changes are:

in aiConfigureChannel(..), I use the constant tMSeries::tAI_Config_FIFO_Data::kAI_Config_PolarityUnipolar, instead kAI_Config_PolarityBipolar

and in aiPersonalize(...) I use tMSeries::tAI_Output_Control::kAI_CONVERT_Output_SelectActive_High, instead kAI_CONVERT_Output_SelectActive_Low.

I found this changes in some threads in this forum.

 

Thanks a lot!
Best regards,
Heiko Mayer

 

 

 

0 Kudos
Message 4 of 4
(8,527 Views)