update motion sync
This commit is contained in:
@@ -95,23 +95,24 @@ close
|
||||
# - waits raising edge of <flag> and the sets DesTimeBase=ServoPeriod
|
||||
|
||||
# flag ='PowerBrick[0].GpioData[0].0.1==1'
|
||||
flag = 'Gate3[1].Chan[0].UserFlag==0'
|
||||
flag0 = 'Gate3[1].Chan[0].UserFlag==0'
|
||||
flag1 = 'Gate3[1].Chan[1].UserFlag==0'
|
||||
prg = '''
|
||||
//L0=Sys.PhaseCount
|
||||
//send 1"sync0 %d:%d\\n",Sys.PhaseCount,Sys.PhaseCount-L0
|
||||
while({flag}){{}}
|
||||
while({flag0}){{}}
|
||||
//send 1"sync1 %d:%d\\n",Sys.PhaseCount,Sys.PhaseCount-L0
|
||||
//L1=Sys.PhaseCount
|
||||
while(1)
|
||||
{{
|
||||
if({flag})
|
||||
if({flag1})
|
||||
{{
|
||||
//PowerBrick[0].GpioData[0].16.8=255
|
||||
//send 1"sync2 %d:%d\\n",Sys.PhaseCount,Sys.PhaseCount-L1
|
||||
break
|
||||
}}
|
||||
}}
|
||||
'''.format(plcId=plcId, crdId=crdId, flag=flag)
|
||||
'''.format(plcId=plcId, crdId=crdId, flag0=flag0, flag1=flag1)
|
||||
self.sync_prg = prg
|
||||
self.sync_run = '&{crdId}b{prgId}r'''.format(prgId=prgId, plcId=plcId, crdId=crdId)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user