This commit is contained in:
2019-01-16 14:29:29 +01:00
parent ee70ff070a
commit 3e9485ee25
4 changed files with 197 additions and 72 deletions

View File

@@ -62,10 +62,11 @@ class MotionBase:
flag1='Gate3[1].Chan[1].UserFlag'
flag0='P0';flag1='P1'
prg = '''
Coord[1].Q[1]=1
Coord[1].Q[1]=-2
while({flag0}==0){{}}
Coord[1].Q[1]=-1
Gather.Enable=2
while({flag1}==0){{}}
Coord[1].Q[1]=2
'''.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)
@@ -77,9 +78,9 @@ class MotionBase:
flag0='P0';flag1='P1'
pt2pt_time=40
prg='''
Coord[1].Q[1]=1
//Gather.Enable=2 if done in the sync program
Coord[1].DesTimeBase=0
Coord[1].Q[1]=2
Coord[1].Q[1]=-1
'''.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)