diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-04-03 22:23:03 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-04-03 22:23:03 -0400 |
commit | 8ec5fd64a29a7189c581ac620c3a0028a8dd396c (patch) | |
tree | 797f5331430f616e1d9e644e5bb0c60ad725b5f3 /qolab/hardware/daq/labjack_ue9.py | |
parent | 81ff68030bf288f330fbef6cc339e1859b98fb97 (diff) | |
download | qolab-8ec5fd64a29a7189c581ac620c3a0028a8dd396c.tar.gz qolab-8ec5fd64a29a7189c581ac620c3a0028a8dd396c.zip |
updates for labjack_ue9
Diffstat (limited to 'qolab/hardware/daq/labjack_ue9.py')
-rw-r--r-- | qolab/hardware/daq/labjack_ue9.py | 14 |
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 |