04-27-2009 12:40 AM - edited 04-27-2009 12:45 AM
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.
Solved! Go to Solution.
04-27-2009 01:39 AM
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.
04-27-2009 03:08 AM
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 ?
04-27-2009 03:15 AM
04-27-2009 07:19 AM - edited 04-27-2009 07:24 AM
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
04-27-2009 11:57 PM
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...
04-28-2009 03:44 AM
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
04-28-2009 02:04 PM
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
04-28-2009 11:10 PM - edited 04-28-2009 11:13 PM
Hi Abram
Is National Instruments is renamed as National Instumens?
Abram Rose
Applications Engineer
National Instumens
04-29-2009 03:49 AM
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.