small changes

This commit is contained in:
jfsScience 2021-11-24 12:01:05 +01:00
parent d319f348b4
commit 0200b8e5e5

View File

@ -40,7 +40,7 @@ class LabPip(LabPis):
return f'<G1 P{self.e} F{self.fe}>\n'
def sendXYZ(self):
return f'<G1 X{self.x} X{self.y} Z{self.z} F{self.fe}>\n'
return f'<G1 X{self.x} Y{self.y} Z{self.z} F{self.fe}>\n'
def go_top(self):
self.e=self.top
@ -58,13 +58,19 @@ class LabPip(LabPis):
class LabPipBlock():
""" Pipettenblock description"""
""" Pipettenblock description
x_offset, y_offset of first tip,
z for take a tip,
number of rows and columns,
deltax,deltay space between first and last tips
"""
def __init__(self,xoffset,yoffset,z,anz,rows,deltax,deltay):
self.xoffset = xoffset
self.yoffset = yoffset
self.anz = anz
self.rows = rows
self.columns = anz / rows
self.deltax = deltax
self.deltay = deltay
self.z = z
@ -78,26 +84,19 @@ class LabPipBlock():
m = self.akt % r # column
c = self.akt // r # row
self.akt += 1
x = self.xoffset - (m * self.deltax)
y = self.yoffset - (c * self.deltax)
x = self.xoffset + (m * self.deltax/self.columns)
y = self.yoffset + (c * self.deltay/self.rows)
return x,y,self.z
#Job 100myl of A in Vial 1
v1 = LabPis(200,200,100,21)
a1 = LabPis(100,100,100,1)
p1 = LabPis()
lpb = LabPipBlock(200,200,100,20,5,8,10)
#for n in range(22):
# print (lpb.next())
#v1 = LabPis(200,200,100,21)
#a1 = LabPis(100,100,100,1)
#p1 = LabPis()
if __name__ == '__main__':
lpb = LabPipBlock(16,1,78,20,5,116,86)
pip = LabPip(vol=500)
pip.fe =5000
#print(pip)
for i in range(20):
print(pip.get_tip(lpb.next()))
#print(pip.up())
print(pip)