DAC outputs lower than set | LabJack
 

DAC outputs lower than set

3 posts / 0 new
Last post
TimOster
DAC outputs lower than set

I'm using the easy function to set the DAC0 output, using a VB form application. I set the DAC and read it using AINO. When I set the DAC to 1V, I read 0.943, 2V I read 1.789, 3V I read 2.636.

I have the output pin of DAC0 connected via a wire to AIN0.

I set the DAC with this code: LJUD.eDAC(u6.ljhandle, 0, dblValue, binary, 0, 0), I pass dblValue in when I call my function.

I read AIN0 like this: LJUD.eAIN(u6.ljhandle, 0, 199, dblValue, -1, -1, -1, binary), I left out the part about creating a new U6 object...

I see the information about Slope and Offset correction, but it says this is automatically done doesn't it?

Thanks,

Tim

LabJack Support
labjack support's picture
The UD driver automatically

The UD driver automatically uses the calibrated slopes and offsets when it performs voltage calculations. When performing your eDAC and eAIN calls, make sure the binary parameter is set to 0 (false) so the voltage value you pass and read is in volts, and not the raw binary value.

To troubleshoot:

Are you using a U6 or U6-Pro?

What are all the connections on your U6? If you only connect DAC0 to AIN0 with a secure connection in the screw terminals, do you see the issue?

If you use LJControlPanel and its test panel, do you still see the same kind of readings when setting DAC0 to 1.0 V, 2.0 V and 3.0 V?

Does switching to a different USB port help?

TimOster
I must have just had a bad

I must have just had a bad connection. I tried the things you suggested and when I went back it was reading right on. I soldered the wires I was using together rather than just twisted them together. I guess I had a bit of corrosion on the surface of the wires.

Thanks again. My sample code seems to work fine.

Tim