Pipette ok

This commit is contained in:
jens 2022-02-01 13:10:14 +01:00
parent 0ee454702d
commit c2a2ec492c
3 changed files with 21 additions and 14 deletions

View File

@ -249,7 +249,7 @@ chemopt1 = ttk.OptionMenu(fra1,chemlab,clabels[0],*clabels,command=doit)
chemopt1.grid(row=1,column=1,sticky='e')
chemerg = ttk.Label(fra1,textvariable=chemit)
chemerg.grid(row=1,column=2,sticky='ne')
## Pipettes
fra2 = ttk.LabelFrame(downrightframe2,text=' Pipettes')
fra2.grid(row=1,column=0,sticky='nw')
pips = tk.StringVar()
@ -264,12 +264,17 @@ def do_pipettes(*args):
pipet_config[pips.get()]['yspace'])
global pip
pip = lrb.LabPip(pipet_config[pips.get()]['tipvol'],
pipet_config[pips.get()]['tipup'],
pipet_config[pips.get()]['tiphub'],
pipet_config[pips.get()]['tipspeed'])
pipet_config[pips.get()]['tipspeed'],
pipet_config[pips.get()]['tipup'])
print(pip)
pipopt = ttk.OptionMenu(fra2,pips,pipettes[0],*pipettes,command=do_pipettes)
pipopt.grid(row=0,column=0,sticky='ew')
do_pipettes()
aktvol = tk.StringVar()
aktvol.set('----')
ttk.Label(fra2,textvariable=aktvol).grid(row=0,column=1,sticky='ew')
fra3 = ttk.LabelFrame(downrightframe2,text=' Vessels')
fra3.grid(row=2,column=0,sticky='nw')
@ -314,8 +319,13 @@ def downTip():
command.append(pip.down().encode('utf-8'))
b10.configure(command=downTip)
def top():
command.append(pip.go_top().encode('utf-8'))
b11.config(command=top)
def nextTip():
upTip()
top()
serialObj.write(pip.get_tip(lpb.next()).encode('utf-8'))
akttip.set(lpb.akt)
downTip()
@ -325,6 +335,7 @@ def load():
if pip.amIdown() == False:
command.append(pip.go_top().encode('utf-8'))
command.append(pip.go_down().encode('utf-8'))
command.append(pip.go_top().encode('utf-8'))
else:
command.append(pip.go_top().encode('utf-8'))
pip.setVolMax()
@ -349,9 +360,6 @@ def dispense():
b12.config(command=dispense)
def top():
command.append(pip.go_top().encode('utf-8'))
b11.config(command=top)
def takeChem():
upTip()

View File

@ -28,17 +28,16 @@ class LabPip(LabPis):
default_hub = 10 # piston max hub
default_fe = 2000 # speed piston
def __init__(self, x=LabPis.default_x, y=LabPis.default_y, z=LabPis.default_z, id=LabPis.default_id, e=LabPis.default_e,
vol=default_vol,hub=default_hub,fe=default_fe,top=default_top):
super().__init__(x=x, y=y, z=z, id=id, e=e)
def __init__(self,vol=default_vol,hub=default_hub,fe=default_fe,top=default_top):
super().__init__()
self.vol = float(vol)
self.fe = float(fe)
self.hub = float(hub)
self.top = float(top)
self.aktvol = 0
#def __str__(self) -> str:
# return super().__str__()[:-1]+f'|top={self.top}|hub={self.hub}|vol={self.vol}|fe={self.fe}>'
def __str__(self) -> str:
return super().__str__()[:-1]+f'|top={self.top}|hub={self.hub}|vol={self.vol}|fe={self.fe}>'
def sendE(self):
return f'<G1 P{self.e} F{self.fe}>\n'
@ -62,7 +61,7 @@ class LabPip(LabPis):
return self.sendE()
def amIdown(self):
if self.e == seft.top +self.hub :
if self.e == self.top +self.hub :
return True
else:
return False

View File

@ -1,6 +1,6 @@
[1000]
xoffset = 14.5
yoffset = 6.0
xoffset = 15.5
yoffset = 5.5
rows = 5
cols = 10
xspace = 12.0