I recently got a U3-LV device with amplifier and I need to write python code to simply read the temperature of the k-type thermocouple. I have downloaded the LabJackPython folder and saw a ktype example for u6 but was wondering if there are any python codes for u3. Any help would be greatly appreciated, thanks!
The U6 example is currently the only Python K type example we provide right now, though it can be modified for the U3 whose code would be similar.
First, take a look at the U3 with LJTick-InAmp thermocouple app note:
https://labjack.com/support/app-notes/thermocouples/u3
Next in the ktypeExample.py example, replace:
import u6
#...
d = u6.U6()
#...
TCmVolts = d.getAIN(0, resolutionIndex = 8, gainIndex = 3) * 1000
With these calls instead:
import u3
#...
d = u3.U3()
d.getCalibrationData() # This should be in the example
#...
TCmVolts = ((d.getAIN(0) - 0.4) / 51) * 1000
The above assumes you are using an LJTick-InAmp set with offset of 0.4 volts and a gain of x51. Refer to the linked thermocouple app note for details as you'll want to measure the voltage offset.
I still am having some complications. I do in fact have the LJTick-InAmp amplifier to go with the U3-LV device but I am confused about the wiring. So I inserted the LJTick-InAmp into the side with the VS GND FIO0 FIO1 ports first (it is a very loose fit though). However, I am not sure where to place the yellow and red wire from the k-type thermocouple after that. Additionally, do I need a AC/DC power supply to run this or is the USB a good enough power source for the system? Thanks for the help!
Make sure that the LJTick-InAmp has a secure connection in the U3's VS, GND, FIO0 and FIO1 screw terminals. If they are loose, screw down on the terminals for better contact with the LJTick-InAmp pins.
Connect the yellow wire (positive) to the INA+ and red wire (negative) to INA- on the LJTick-InAmp.
Thermocouples don't require power, so just the USB power is adequate for the system..