aboutsummaryrefslogtreecommitdiff
path: root/qolab/feedback/__init__.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-29 22:14:54 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-29 22:14:54 -0500
commited26f6dcbbcd39942644f310836ee1e7c13d3454 (patch)
tree3ce5524373f716d72dd76906428ec56a5d320ef0 /qolab/feedback/__init__.py
parent9cc643cd1e0f270e0af36a1674ab0768988fe71f (diff)
downloadpyExpControl-ed26f6dcbbcd39942644f310836ee1e7c13d3454.tar.gz
pyExpControl-ed26f6dcbbcd39942644f310836ee1e7c13d3454.zip
pid feedbacks logs to tsdb
Diffstat (limited to 'qolab/feedback/__init__.py')
-rw-r--r--qolab/feedback/__init__.py25
1 files changed, 18 insertions, 7 deletions
diff --git a/qolab/feedback/__init__.py b/qolab/feedback/__init__.py
index e92df18..c0a79d2 100644
--- a/qolab/feedback/__init__.py
+++ b/qolab/feedback/__init__.py
@@ -2,47 +2,58 @@ import time
from qolab.hardware.basic import BasicInstrument
class PID(BasicInstrument):
- def __init__(self, Gp=0, Gi=0, Gd=0, sign=1):
- super().__init__()
+ def __init__(self, Gp=0, Gi=0, Gd=0, sign=1, *args, **kwds):
+ super().__init__(*args, **kwds)
self.config['Device model'] = 'Generic Software PID loop'
self.config['Device type']='PID loop'
self.config['FnamePrefix'] = 'pid'
self.deviceProperties = ['Gp', 'Gi', 'Gd', 'Sign', 'Enable' ];
- self.Gp = Gp
- self.Gi = Gi
- self.Gd = Gd
- self.sign = sign
- self.enable = True
+ self.setGp(Gp)
+ self.setGi(Gi)
+ self.setGd(Gd)
+ self.setSign(sign)
+ self.setEnable(True)
self.reset()
+ @BasicInstrument.tsdb_append
def getGp(self):
return self.Gp
+ @BasicInstrument.tsdb_append
def setGp(self,val):
+ print('setting Gp')
self.Gp=val
+ @BasicInstrument.tsdb_append
def getGi(self):
return self.Gi
+ @BasicInstrument.tsdb_append
def setGi(self,val):
self.Gi=val
+ @BasicInstrument.tsdb_append
def getGd(self):
return self.Gd
+ @BasicInstrument.tsdb_append
def setGd(self,val):
self.Gd=val
+ @BasicInstrument.tsdb_append
def getSign(self):
return self.sign
+ @BasicInstrument.tsdb_append
def setSign(self,val):
self.sign=val
+ @BasicInstrument.tsdb_append
def getEnable(self):
return self.enable
+ @BasicInstrument.tsdb_append
def setEnable(self,val):
self.enable=val