SFELPHOTON-1128: debug stup-and-go motion(2)

This commit is contained in:
2024-05-15 17:03:50 +02:00
parent 13d010dd7e
commit 5a26b7f47c
2 changed files with 31 additions and 26 deletions

View File

@@ -45,7 +45,7 @@ class MotionBase:
else:
ServoPeriod=comm.gpascii.servo_period*1000
self.meta={'srv_per':ServoPeriod,'pt2pt_time':40,'sync_flag':0,'sync_mode':2}
self.meta={'srv_per':ServoPeriod,'fel_per':10,'sync_flag':0,'sync_mode':2}
self.meta.update(kwargs)
def setup_sync(self, crdId=1, prgId=2,verbose=False, timeOfs=0.,timeCor=0.):
@@ -67,11 +67,11 @@ class MotionBase:
1 : simulated start and real frame trigger
2 : real start and simulated frame trigger
3 : simulated start and frame trigger
pt2pt_time : time point to point (needed sor sync code)
fel_per : FEL-period: time FEL-pulse to FEL-pulse in ms (needed for sync code)
'''
sync_mode=self.meta['sync_mode']
sync_flag=self.meta['sync_flag']
pt2pt_time=self.meta['pt2pt_time']
fel_per=self.meta['fel_per']
_log.info({0:'no sync at all',1:'sync at start only',2:'sync on each shot'}[sync_mode])
if sync_mode!=0:
@@ -129,7 +129,7 @@ Coord[1].Q[0]=-3 //motion program started and waits. Arm(-2) is done in triggerS
sftp.chmod(dst, 0o755)
cmd = 'LD_LIBRARY_PATH=/opt/ppmac/libppmac/ ' + dst
#cmd+=' %d %g %g %g'%(mode,pt2pt_time,timeOfs,timeCor)
cmd+=' %d %g %g'%(mode,pt2pt_time+timeCor,timeOfs)
cmd+=' %d %g %g'%(mode,fel_per+timeCor,timeOfs)
self.cmdSync = cmd
print ('starting '+cmd)
self.syncShell=comm.shell_channel(cmd)