Hi,
INFO:YRC1000 controller
I would like to know how to force stop a subprogram that is stuck in a loop.
My 2 jobs:
Clear_station.JBI (MASTER)
---------------------------
PSTART JOB:DOCKING_MEASURE SUB1
MOVL P087 V=75.0 PL=0 UNTIL IN#(3930)=ON (linked to OT#3930)
IFTHENEXP IN#(3930)=ON
MOVL P086 V=I0023 PL=0
'********************************
'*Move above pallet pos *
'********************************
MOVL P081 V=I0024 PL=0
CALL JOB:61_RECOVERY
SET B0002 74
RET
ELSE
(force stop sub1)
CALL JOB:CHK_LAST_POS_REACHED ARGFP087 ARGF63 ARGF5
IFTHENEXP B0002>0
RET
ENDIF
ENDIF
SFTOF
---------------------------
DOCKING_MEASURE.JBI (SUB1)
'********************************
'*Docking measure *
'********************************
SET D0001 0
SET LB001 0
WHILE LB001=0
TIMER T=0.20
DIN LB000 IG#(I1085)
SET LD000 EXPRESS LB000 * 10000 - 10000
IFTHENEXP LD000>D0001
SET D0001 LD000
ENDIF
IFTHENEXP D0001>D0100
PULSE OT#(3930) T=1.00
SET LB001 1
ENDIF
ENDWHILE
END
---------------------------
If the measure is successful i would like to force stop sub1
I know i can set an other condition in the WHILE function. That is not the point
I would like to know if you can stop the subprogram without programming it in the subprogram it self. But my sending an signal form the master to stop it.
In the masterjob I would like to be flexible if i start it in sub1, sub2 etc. and select whenever to force stop a subprogram.
Thank you in advance