aboutsummaryrefslogtreecommitdiff
path: root/ue9qol.py
diff options
context:
space:
mode:
Diffstat (limited to 'ue9qol.py')
-rw-r--r--ue9qol.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/ue9qol.py b/ue9qol.py
index f25a8ca..6436552 100644
--- a/ue9qol.py
+++ b/ue9qol.py
@@ -37,13 +37,28 @@ class UE9qol:
self.daq.close()
class UE9qolDummy:
+ from funcGenerator import Sweeper, SinGen, TriangleGen, RampGen, PulseGen
# to be used for graphics debugging
- def __init__(self, debug = False, autoOpen = True, **kargs):
+ def __init__(self, debug = False, autoOpen = True, sweeper=None, **kargs):
+ self.sweeper = sweeper
# do nothing
return
def getInputCh(self, chNum):
- return random.normalvariate(chNum, 0.1)
+ a =.3
+ if chNum == 0:
+ val = self.SinGen(ampl=a, offset=chNum, sweeper=self.sweeper).getValue()
+ elif chNum == 1:
+ val = self.PulseGen(ampl=a, sweeper=self.sweeper).getValue()
+ val += chNum
+ elif chNum == 2:
+ val = self.TriangleGen(start=chNum-a/2, stop=chNum+a/2, sweeper=self.sweeper).getValue()
+ elif chNum == 3:
+ val = self.RampGen(start=chNum-a/2, stop=chNum+a/2, sweeper=self.sweeper).getValue()
+ else:
+ val = self.SinGen(ampl=.2, offset=chNum, sweeper=self.sweeper).getValue()
+ val += random.normalvariate(0, 0.01)
+ return val
def setOutputCh(self, chNum=None, volts=None):
# do nothing