09-20-2012 03:29 PM
We have both, a USB-6259 and PCI-6259 installed on a single computer, tied to an SBC-68, along with Matlab and the Data Acquisiution toolbox.
For basic testing purposes, I have written a script that outputs a basic sine wave from Matlab, to a single DAC output. I have wired this single DAC output to two channels of the ADC input. For every DAC output sample, the script also takes one ADC input sample on each channel.
--> Ideally, if everything is working correctly, after running the script, I should see two ADC input vector channels. Plotting each channel should give me a nice sine wave in Matlab.
--> When I actually plot the data, here's what I get (see attachment).
--> I have looked at the DAC output with an oscilloscope, and the DC offset is very close to 0 (this tells me that the DAC output part is working fine).
Why is there this negative DC drift on the two inputs?
Solved! Go to Solution.
09-20-2012 05:12 PM
You need to provide some critical information such as what pins (input and output) you have wired up and the configuration (RSE, Diff) that you are using. It seems the configuration does not match the wiring. If you are acquiring two channels, why does only one appear in your plot?
09-21-2012 07:19 AM - edited 09-21-2012 07:24 AM
Sorry about my explanation!
--> I am using AI0 (pin 68 on SBC-80) and AI1 (pin 33) as my ADC channels, and AO0 (pin 22) as my DAC channel. I have tied AI-GND (pin 67) and AO-GND (pin 22) together with the oscilloscope probe ground, as a common ground point.
If you look very closely at the two plots (one is for the USB-6259, the other is for the PCI-6259), there are actually two plots that are overlapping (as expected). This is good - in a sense - because it shows that both ADC channels are tracking each other very closely, BUT both ADC channels suffer from the same drift problem. It leads me to believe that it could be an internal hardware problem with the computer?
09-21-2012 09:22 AM
You only answered half of my questions. You did not mention how you have the analog in configured. Explicitly set it for RSE and see if that makes a difference.
09-21-2012 12:01 PM
Forgive my lack of knowledge - I know the difference between the DIFF and RSE connections, but I'm not sure where the "setting" for DIFF/RSE is (is it a button/toggle switch on the USB-6259? Is it a software command in the code?)
09-21-2012 03:14 PM - edited 09-21-2012 03:17 PM
It's a software command. I don't use matlab but it should be part of the Create Analog Channel function.