From 6c26c69fa254124c5665f8b8d4496b62e8eda94a Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 17 Jun 2021 18:22:45 -0400 Subject: new default for ue9: bipolar ADC regime from -5V to 5V --- ue9qol.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ue9qol.py') diff --git a/ue9qol.py b/ue9qol.py index 6436552..e95fe6b 100644 --- a/ue9qol.py +++ b/ue9qol.py @@ -21,8 +21,14 @@ class UE9qol: # fixing missing slope for gain '0' c['AINSlopes']['0']= 0.0000775030 - def getInputCh(self, chNum): - return self.daq.getAIN(chNum) + def getInputCh(self, chNum, BipGain = 8): + # 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) def setOutputCh(self, chNum=None, volts=None): if chNum == None or volts == None: -- cgit v1.2.3