stating position on first well instead X=-1,Y=-1 and do not wait

This commit is contained in:
2026-05-13 17:06:24 +02:00
parent ac297b7171
commit 22e5938b7c
+7 -6
View File
@@ -757,8 +757,7 @@ class ShapePath(MotionBase):
sdelay: (o) section shots count delay. Default is ssz[0]*ssz[1]. A the point will be reached after sdelay shots in the next loop
tmove: (m) time(in num of shots) to move to the next well
twait: (m) time(in num of shots) to wait at the well
if twait=0, the motion will will not stop but continue motion (as mode 4 or 6)
seccnt: (o) number of timmes a section motion is done (default=2)
(tmove+twait will be rounded to a multiple of fel_per)
'''
if mode not in (1,3,4,5,6,7): #### pvt motion
raise ValueError(f'unsupported mode:{mode}')
@@ -856,8 +855,8 @@ class ShapePath(MotionBase):
ox, oy=(0,0)
px, py=(1,1)
self.mot_pts=(np.hstack((pt, np.ones((pt.shape[0], 1))))*np.asmatrix(trf)).A # pt*trf
#prg+=f' linear abs\n X{ox:g} Y{oy:g}\n'
prg+=f' linear abs\n X{ox-px:g} Y{oy-py:g}\n' # start one position out of grid
#prg+=f' linear abs\n X{ox-px:g} Y{oy-py:g}\n' # start one position out of grid
prg+=f' linear abs\n X{ox:0} Y{oy:0}\n' # start with no motion first well
else: #mode in (6,7): #### pvt motion, hit and return using grid parameters
g=kwargs['grid']
nx,ny=g['count'] #total count of wells
@@ -886,8 +885,10 @@ class ShapePath(MotionBase):
except KeyError as e:
tsd=sx*sy
tsd+=1-sx*sy # sdl are shots to wait at position #(6)
prg+=f' linear abs\n X{ox-px:g} Y{oy-py:g}\n' # start one position out of grid
prg+=' dwell 10\n'
#prg+=f' linear abs\n X{ox-px:g} Y{oy-py:g}\n' # start one position out of grid with motion
prg+=f' linear abs\n X{ox:0} Y{oy:0}\n' # start with no motion first well
#prg+=' dwell 10\n' # wait on first well
prg+=' dwell 0\n' # do not wait on first well
try: prg+=self.sync_prg
except AttributeError:
#print('no sync code available')