aboutsummaryrefslogtreecommitdiff
path: root/qolab
diff options
context:
space:
mode:
Diffstat (limited to 'qolab')
-rw-r--r--qolab/hardware/daq/labjack_ue9.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/qolab/hardware/daq/labjack_ue9.py b/qolab/hardware/daq/labjack_ue9.py
index 5b293f4..a467746 100644
--- a/qolab/hardware/daq/labjack_ue9.py
+++ b/qolab/hardware/daq/labjack_ue9.py
@@ -17,8 +17,8 @@ class LabJackUE9(DAQ):
self.AnalogInputsNum=4
self.AnalogOutputsNum=2
- # self.daq = ue9.UE9(debug=debug, autoOpen=autoOpen, ethernet=ethernet, ipAddress=ipAddress)
- self.daq = ue9.UE9(debug=debug, autoOpen=autoOpen)
+ self.daq = ue9.UE9(debug=debug, autoOpen=autoOpen, ethernet=ethernet, ipAddress=ipAddress)
+ # self.daq = ue9.UE9(debug=debug, autoOpen=autoOpen)
# For applying the proper calibration to readings.
c=self.daq.getCalibrationData()
@@ -27,17 +27,21 @@ class LabJackUE9(DAQ):
# fixing missing slope for gain '0'
c['AINSlopes']['0']= 0.0000775030
- def getChanVoltage(self, chNum, BipGain):
+ def getAIN(self, chNum):
+ """ get analog input (AIN) voltage """
BipGain = 8
+ Resolution = 12
+ SettlingTime = 0
# BipGain = 8 -> bipolar range (-5V, +5V) gain 1
# UE9 default BipGain = 0 -> signal range (0V, +5V) gain 1
# other BipGain could be:
# 0 = Unipolar Gain 1, 1 = Unipolar Gain 2,
# 2 = Unipolar Gain 4, 3 = Unipolar Gain 8,
# 8 = Bipolar Gain 1
- return self.daq.getAIN(chNum, BipGain = BipGain)
+ return self.daq.getAIN(chNum, BipGain = BipGain, Resolution = Resolution, SettlingTime = SettlingTime)
- def setChanVoltage(self, chNum, volts):
+ def setDAC(self, chNum, volts):
+ """ set digital to analog (DAC) output voltage """
if chNum == None or volts == None:
print("setOutputCh needs chNum and volts to be set")
return 0