Hi there!
I ve a robot intalled on a machine, controlled by a PLC, and i noted that when we had a emergency stop the robot stops the movement, but when it back again the robot keep its move from the line that stopped. And this is very dangerous for the operator.
I want that the robot goes back to my main, and after the acknwoleged the PLC will sent the new command.
Example (code Below) :
If im in the case 1 i will call the Station_Pick() func. and if i had an emergency stop, i will remove my flag I_Kuka_PLC_Start (FALSE) and remove the code pointer from the Station_Pick() and bring it again to my main().
it is possible do this ?
Obviously im not an expert in robots, i just want to reolve this situation on my machine. I will apreciate your help!
THKS
Quote
DEF Main ( )
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;FOLD PTP HOME Vel=100 % DEFAULT;%{PE}%R 8.5.19,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT, 9:0
$BWDSTART=FALSE
PDAT_ACT=PDEFAULT
FDAT_ACT=FHOME
BAS(#PTP_PARAMS,100)
SET_CD_PARAMS( 0)
$H_POS=XHOME
PTP XHOME
;ENDFOLD
LOOP
IF ( I_Kuka_PLC_Start ) THEN
SWITCH Kuka_Command
CASE 0
Execute_State_mirror = 0
CASE 1
Execute_State_mirror = 1
Station_pick ( )
Execute_State_mirror = 0
Case 4
Execute_State_mirror = 4
Setup ( )
Execute_State_mirror = 0
DEFAULT
MsgQuit("Numero de programa invalido")
HALT
ENDSWITCH
ENDIF
ENDLOOP