diff options
-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__': |