LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i measure voltage of a signal ?

Solved!
Go to solution
Highlighted

well!

 

   i m trying to read the voltage of a signal using PCI-6229 DAQ card.i am giving signal as an input to the DAQ card and trying to read its voltage level.The range of my signal is 4.8~5.5 VDC  but the results are not coming accurate as measured with DMM.My code is as follows:

 

1.i  m using DAQmx create channel to create an analog input channel

2.Then a sample clock with finite samples,sampels per channel and setting rate iteratively

3.then i start the task

4.Read Analog 1D DBL 1Channel N sample

 

The voltage readings that am i getting differ widely than the actual.e.g a signal measured with DMM is 5v but when applied to DAQ and measured gives 6v.also i have to set the minimum and maximum values in the VI .... if i set it 4 for minimum and 5 for maximum for measuring a 5vDC signal it gives good result but if i change the maximum setting to 6v then it gives me wrong results.also the behaviour is different for different signals for e.g. when i measure a 6.5 VDC signal it shows me the voltage as 7.3V...

 

my code VI's picture is attached..plz reply...or give me any other code that works fine in reading voltage of a signal.

 

 

 

 

Message Edited by Saibi on 04-27-2009 12:45 AM
0 Kudos
Message 1 of 14
(2,442 Views)
Highlighted

 


The voltage readings that am i getting differ widely than the actual.e.g a signal measured with DMM is 5v but when applied to DAQ and measured gives 6v.also i have to set the minimum and maximum values in the VI .... if i set it 4 for minimum and 5 for maximum for measuring a 5vDC signal it gives good result but if i change the maximum setting to 6v then it gives me wrong results.also the behaviour is different for different signals for e.g. when i measure a 6.5 VDC signal it shows me the voltage as 7.3V...

 

   From this i can say your voltage source will have fluctuations,because ur using the array minimum and maximum function to get the voltage min and max.Plot the array in a waveform graph to analyze the acquired signal.

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 2 of 14
(2,418 Views)
Highlighted

well Dear !

 

                 i know the source has little fluctuations...but how sholud i overcome this problem...and i have plotted the graph ,,its like a sinosoid even for a DC signal....it is sinosoid if i take many samples....for few samples offcourse its type of a straight line....what should i do nw with my code to get the correct reading ?

0 Kudos
Message 3 of 14
(2,402 Views)
Highlighted
To avoid this,use averaging filters or average the 1d array to get near to exact value.
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 4 of 14
(2,400 Views)
Highlighted

Saibi wrote:

well Dear !

 

                 i know the source has little fluctuations...but how sholud i overcome this problem...and i have plotted the graph ,,its like a sinosoid even for a DC signal....it is sinosoid if i take many samples....for few samples offcourse its type of a straight line....what should i do nw with my code to get the correct reading ?


 

WHAT IS THE CORRECT READING ?

 

Very philosophical question 🙂

 

The best answer is: There is no correct answer unless you defined it !

 

If you want a result near your DMM reading: How does your DMM measure the voltage? 

 

Welcome to the real world of analog signals and hum 😉 

 

Maybe none of your results had been really wrong, they just didn't fit to your expectation!

 

Ok, back to start, why do want to read the signal? Will the RMS value answer this question?

 

BTW  Someone who can write programs in LabVIEW should be able to use the spell checker 😉 SCNR

 

 

Message Edited by Henrik Volkers on 04-27-2009 02:24 PM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 5 of 14
(2,376 Views)
Highlighted

 dear

           plz see the code i have attached.... actually this is not the problem that the measured voltage is offset to the reading measured with DMM or how i have measured the voltage through DMM...the problem is that i am unable to measure the voltage actually...

 

when i give my daq card a signal of 6VDC it shows me minimum of 9v and maximum of 10 v...what is this problem ?

 

plz see the code attached...

0 Kudos
Message 6 of 14
(2,351 Views)
Highlighted

It looks like your input is floating, i.e. the input channel you are using is not connected to anything. The PCI-6229 has two connectors. You should use connecter 0. Also are you using the connector block (SCB-68) correct?

I will strongly recommend you download this manual http://www.ni.com/pdf/manuals/371022k.pdf Please emphasize on chapter 4 and table 3.1.  You will find the SCB-68 pinout diagram here http://digital.ni.com/public.nsf/allkb/F011AD8B0F4BD35086257050006CBB70 In your fist testing phase I will recommend using the MAX (Measurement & Automation). You will find it in the "National Instruments" folder in the start menu. I think your test program are missing the input configuration setting. Besides this it looks OK. But do not run it with "Run continuously" button. This button is for debugging only. I often use it then testing small non I/O program segments alone.

Good luck



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 14
(2,330 Views)
Highlighted

Hello Saibi,

 

I believe the issue might be related to how you are connecting your device. I have a few questions that will hopefully help me solve your issue.

 

1. What connector block are you using?

2. Is your source grounded or ungrounded?

3. How do you currently have things wired up?

 

Abram Rose

Applications Engineer

National Instumens

0 Kudos
Message 8 of 14
(2,297 Views)
Highlighted

Hi Abram

   Is National Instruments is renamed as National Instumens?Smiley Wink


Abram Rose

Applications Engineer

National Instumens


 

Message Edited by Baji on 04-29-2009 09:43 AM
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 9 of 14
(2,263 Views)
Highlighted

well!

       i am already using connector 0....my source has a ground point and a +ve point as well...

 

right now the connections are like ..i m giving the signal at AIO and i have connected the ground of the source with AI SENSE.

 

actually when i use the test panel in the measurement and automation explorer to measure voltage it gives me correct reading..but when i use my VI it gives me wrong results with nothing changed in physical connections...xo i hope the physical connections are all right ...the problem is with the code actually which i am still unable to make out.

0 Kudos
Message 10 of 14
(2,241 Views)