Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

why do i get an offset while acuiring analog input

HI all,
 
I have posted the question before but no body replied to that. Plese tell me how to acquire analog input for example sine wave of 5volts pk-2-pk using analog channels. When i connect the wires and using a labview or visual basic 6.0 software, try to acquire the voltage then i do get a wave but that has an offset included with it. like the wave starts from 5 volts and goes upto 10 volts. So please help me out for this. I will be very much grateful to you.
0 Kudos
Message 1 of 3
(7,145 Views)
Hello shami81,

There are several things that can be occuring for you to see the behaivior you are discribing. The most basic is that the signal you are inputting from your source has a DC offset. Assuming this is not the case, there are several other things that it could be.  If the device is wired with the incorrect grounding setup, that could cause an offset.  The way to check this is to use our Field Wiring and Noise Considerations for Analog Signals developer zone article to make sure everyting is hooked up correctly.

In order to make sure that the code is not a factor, the best way to look at the signal is with Measurement and Automation Explorer.  If you open a test panel (My System»Devices and Interfaces»NI DAQmx Devices, then right click your device) that will allow you to see exactly what the hardware is seeing.  If this still has the offset, then we know that the issue is not with the signal analysis, but in the hardware or the actual signal.

Many of our devices allow you to change the input coupling as well.  If your device has this functionality, then you could use AC coupling, which would remove the DC offset.

In order to help narrow down the possibilities, some more information about your setup would be helpful. Specifically, information about the device you are using, the driver you are programming with, how you have your signal hooked up, which program are you using (example program or your own code), and possibly a screen shot of your code or what you are seeing would help greatly.

I hope this gives you a starting point, please post back with that information if you still cannot find the source of the offset.
Neal M.
Applications Engineering       National Instruments        www.ni.com/support
0 Kudos
Message 2 of 3
(7,130 Views)
Thank you very much for your concern. I am using NI-PCI 6025E to acquire an analog signal from a function generator. I have tried the same things to make sure that there is no problem with my code i have tried to use max and created a task using NI-DAQmx. But there is still a problem. I have noticed that when configuring a task there are some options of input mode, which are "Differential, RSE, NRSE" which one of them should i use when i want to acquire the input from a function generator.
 
I was trying to get help using the connection diagram so see where i should connect my signals and then i hooked up the wires according to the diagram, but still no result. Sometimes acquired wave form is just arbitrary data and some times it starts accumulating and stops when it reaches 10Volts.
 
One of my friends suggested me to hook up a big resistance between AI GND and AI0 channel and then use it. I have tried this method and now i get almost accurate results. Please guide me is it the right way to do it. by the way I used RSE input mode in this case and got the acquired voltage waveform almost accurate. I am saying almost accurate as the peak value is a little below 5 volts, its about 4.6Volts, similarly towards negative side. I gave a sine wave of -5V to +5V amplitude with frequency of 50Hz.
 
Please tell me did i do it the right way or there are some other methods also. Correct me if i m doing it wrongly. Moreover after i want to analyze the voltage waveform also after the proper acquisition. I want to calculate the average or you can say mean of the input signal. How can i do it using the VB? Can i call the LabView function VIs in VB 6.0? In labView there is a function VI named Signal Compression that can do it can I call it in VB and if yes then how?
0 Kudos
Message 3 of 3
(7,124 Views)