diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-04-02 22:30:28 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-04-02 22:30:28 -0400 |
commit | 06dd01df02343a2e5d9fb97e32b083a84beb60b8 (patch) | |
tree | 0310f660e218da7b984a9af0f7f35b61d8b912fe /panel.py | |
parent | ed6a05fd4515ffd89de70da37bc9c12bd52c18e8 (diff) | |
download | pyExpControl-06dd01df02343a2e5d9fb97e32b083a84beb60b8.tar.gz pyExpControl-06dd01df02343a2e5d9fb97e32b083a84beb60b8.zip |
added redraw timer
Diffstat (limited to 'panel.py')
-rw-r--r-- | panel.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -34,7 +34,7 @@ class Experiment: self.hardware = {} self.hardwareSetup() self.sweeper = Sweeper(0, 100, 100, 10) - self.root.after(1, self.hello ) + self.root.after(1000, self.hello ) def hardwareSetup(self): self.hardware['LabJack'] = ue9qol.UE9qol() @@ -68,11 +68,11 @@ class Experiment: self.canvas.get_tk_widget().pack() def hello(self): - self.root.after(1, self.hello ) + self.root.after(1000, self.hello ) tic = self.tic self.sweeper.incr() tic = self.sweeper.getCnt() - self.hardware['LabJack'].setOutputCh(0, tic % 5) + self.hardware['LabJack'].setOutputCh(0, tic % 6) self.data['tic'].append(tic) self.data['ch1'].append( self.hardware['LabJack'].getInputCh(1) ) self.tic = self.tic + 1 @@ -82,7 +82,7 @@ class Experiment: self.canvas.draw() stop = datetime.now() runTime = (stop-start).seconds + float((stop-start).microseconds)/1000000 - print("Replot took %s seconds." % runTime) + print("Replot took %s seconds to plot %s points." % (runTime, tic) ) if __name__ == '__main__': |