Hello everyone,
I wanna ask you people if its possible to turn back to first line of cell() when an input comes from PLC on Auto External.
(KRC4 )
Hello everyone,
I wanna ask you people if its possible to turn back to first line of cell() when an input comes from PLC on Auto External.
(KRC4 )
Yes, it's possible.
Look up $CMD in the forum archives. Many discussions of this. Also, your default SPS.SUB probably includes an example that automatically selects CELL when the robot is switched from Teach to Auto, assuming no other program is selected.
yes, $CMD can be used but ... why would that be needed? the only reason to reset CELL that i can think of is that somehow one is stuck in specific scenario meaning that CELL.src or AutoExtern logic or handshaking are not correct.
Well, scenario will be like : when robot on the progress of sealing if operator see a mistake, operator will stop the robot. I want robot to start over process if something like this happens. Or it can be return to the selected Program Number. I tried "INTERRUPT" but didn't worked.
why not leave CELL as is and just let program finish?
DEF SEALING_PROGRAM()
;INI
;PTP HOME....
INTERRUPT DECL 10 WHEN $IN[33] DO ABORT_SEALING()
INTERRUPT ON 10
SEALING_MOTIONS() ; actual motions must be in a subprogram...!
INTERRUPT OFF 10 ; turn that interrupt off..!
;PTP HOME ; return robot to home safely
END
DEF SEALING_MOTIONS()
; add here whatever process related motions you want
WAIT SEC 0 ; keep this line
END
DEF ABORT_SEALING()
BRAKE
$OUT[77]=FALSE ; shut off dispenser...
LIN_REL {X -200} #TOOL ; retract robot in tool direction
RESUME ; abandon SEALING_MOTIONS()
END
Allright, I will try that and let you know about result. Thank you !
Display Morewhy not leave CELL as is and just let program finish?
DEF SEALING_PROGRAM()
;INI
;PTP HOME....
INTERRUPT DECL 10 WHEN $IN[33] DO ABORT_SEALING()
INTERRUPT ON 10
SEALING_MOTIONS() ; actual motions must be in a subprogram...!
INTERRUPT OFF 10 ; turn that interrupt off..!
;PTP HOME ; return robot to home safely
END
DEF SEALING_MOTIONS()
; add here whatever process related motions you want
WAIT SEC 0 ; keep this line
END
DEF ABORT_SEALING()
BRAKE
$OUT[77]=FALSE ; shut off dispenser...
LIN_REL {X -200} #TOOL ; retract robot in tool direction
RESUME ; abandon SEALING_MOTIONS()
END
It works! Thank you...
Just an annotation:
Interrupt off 10
should be first line in Abort_sealing().