T7 + LabJackTickDAC communication issues | LabJack
 

T7 + LabJackTickDAC communication issues

6 posts / 0 new
Last post
Luis Rodriguez
luisar3's picture
T7 + LabJackTickDAC communication issues

Hello,

I'm working on generating a valid sinewave with the LJ-T7 and LJTick completely in Python. However I can't seem to communicate with the Tick through my code. I acquire the serial number just fine but my voltmeter doesn't pick up the change in voltage from the example provided: "LJM_eWriteName(handle, "TDAC11", 7.5)"

My code:

def set_volt(handle, name, value=0.0):
    ljm.eWriteName(handle, name, value)
    v = ljm.eReadName(handle, name)
    return "\t%s = %f" % (name, v)

# Open first found LabJack
# openS: open a device based on String parameters
T7_id = "ANY"
T7_handle = ljm.openS("T7", "USB", T7_id)
T7_pin = "DAC0"

print("Attempting connection to LJt7...")
serial = "SERIAL_NUMBER"
result = ljm.eReadName(T7_handle, serial)

print("--- LabJack T7 tests --- \n- device id: scarlet \n- eReadName results: ")
print("\t%s = %f" % (serial, result))

print("\ntest1: Alter voltage on pin = 'DAC0' ----- increment by '0.1'")
err = set_volt(T7_handle, "TDAC0", 2.2)
print(err)

Any help is greatly appreciated,

Luis 

LabJack Support
labjack support's picture
The TDAC registers are write

The TDAC registers are write only, you should not try to read them using eReadName. Are you getting any errors returned from your program?

When testing the output with a DMM, please ensure you have good electrical connections to both the TDAC output and LabJack GND:

https://labjack.com/support/app-notes/screw-terminals

Luis Rodriguez
luisar3's picture
Thank you for the response, I

Thank you for the response, I'm fairly new to using DACs like this one.

 

Yes I am getting this error and I think it's definitely what you pointed out:

LJMError: LJM library error code 2763 TDAC_CAL_READ_FAILURE

 

I have an Analog Discovery; channel 1 is connected to DAC0 on the TDAC; grounded; all screw terminals are tight and secure.

Where do I read the voltage I send instead of off the TDAC? FIO# pins? The refence sheet points out the DAC# are the outputs:

DAC#:  DAC0 & DAC1 are the 2 analog outputs.  Each DAC can be set to a voltage between about 0.01 and 5 volts with 12-bits of resolution.

LabJack Support
labjack support's picture
There is not any way to read

There is not any way to read back what you sent to the TDAC directly with a register, but you could feed the output back to an AIN and read the AIN for testing.

The error you are seeing indicates that you may be writing to the wrong TDAC register, or the TDAC is set up on the wrong screw terminal block. The TDAC should be connected to a screw terminal block with FIO/EIO/CIO/MIO terminals. DACA corresponds to the even DIO, DACB corresponds to the odd DIO. If you connected to the screw terminal block with FIO2 and FIO3, you would write to TDAC2 to output to DACA and TDAC3 to output to DACB.

Luis Rodriguez
luisar3's picture
Awesome! I've rewired it to

Awesome! I've rewired it to follow that.

If I wanted to output a voltage from the LJ-T7 to some other device, would that be done with eWriteName along FIO0 where the TDAC is connected?

For right now, I'm just trying to read the voltage from it with my Oscope tool; but in the future I'm connected a microcontroller to it.

Thank you again!

LabJack Support
labjack support's picture
If you have the TDAC

If you have the TDAC connected to FIO0/FIO1 you would use eWriteName on TDAC0, and that should output a voltage on DACA. You should also ensure you have LabJack GND connected to your external device GND.