enhance triggering

This commit is contained in:
2019-03-20 14:34:12 +01:00
parent eda8caf985
commit 399282cba9
9 changed files with 36 additions and 23 deletions

View File

@@ -44,7 +44,7 @@ class MotionBase:
self.meta={'srv_per':ServoPeriod,'pt2pt_time':40,'sync_flag':0,'sync_mode':2}
self.meta.update(kwargs)
def setup_sync(self, crdId=1, prgId=2,verbose=False):
def setup_sync(self, crdId=1, prgId=2,verbose=False, timeOfs=0.):
'''setup the timing synchronization for the motion program
kwargs:
sync_mode : default=2
@@ -122,7 +122,7 @@ class MotionBase:
sftp.put(src, dst)
sftp.chmod(dst, 0o755)
cmd = 'LD_LIBRARY_PATH=/opt/ppmac/libppmac/ ' + dst
cmd+=' %g %d'%(pt2pt_time,arg)
cmd+=' %g %g %d'%(pt2pt_time,timeOfs,arg)
self.cmdSync = cmd
print ('starting '+cmd)
self.syncShell=comm.shell_channel(cmd)