LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ai config and read problem

Solved!
Go to solution

Hi,

 

I have some problem when i use ai config and read structure. 

 

I use Labview v12.0 ,PXI 1042 chasis  and NI6120 daq card.

 

If i use NI MAX, i can measure  approximately 1 V (which is minumum value for sensor) or i can measure 1 V by using voltmeter.

(@ NI MAX, i configure for analog input- voltage - NI 6120- ai0 -  0/5V DC - sample rate 20KHz and  number of samples 4KHz)

 

When i use ai config and read structure, i cant measure 1V!!! Value for ai0 channel is kinda 0. 

 

Ai config and read structure for ai0 channel is attached .

 

Do you have any idea what is the problem when i use config and read structure.

 

Best Regards,

 

Serdar 

0 Kudos
Message 1 of 3
(3,188 Views)
Solution
Accepted by serdaryilmaz

Two thoughts:

 

1. Looks like your acquisition is set to finite samples, so are you exciting the sensor before you run the code? Or have you tried changing it to continuous so you can change the sensor voltage as the code runs?

 

2. You mention DC in your MAX configuration, but your coupling in your code "10045" means AC coupling. Do you intend to use AC or DC? If you want DC, your coupling value should be 10050 (or you should create a constant off the input so you get the enum instead of using a numeric).

 

Hope that helps!

 

--Ryan_S

0 Kudos
Message 2 of 3
(3,145 Views)

Thnks for reply,

 

i didnt notice that 10050 is or DC coupling code. I updated my code and it works properly,

 

Thank you again

 

 

0 Kudos
Message 3 of 3
(3,123 Views)