Hello everyone..
I have a krc2 robot working in External automatic mode and it is controlled by a PLC through its I/O, everything works fine.
I only want to restore the program that is being executed and that the pointer remains in the first line of that program without exiting it... the signal for the RESET comes from the PLC to the $in[80] of the robot, I have already read Manuals on this and I think it would be like this:
IF ($IN[80]==TRUE) AND ($MODE_OP==#EX) AND ($PRO_STATE1==#P_ACTIVE) THEN
CWRITE($CMD,STAT,MODE,"STOP")
RESET=TRUE
ENDIF
IF (RESET==TRUE) AND ($MODE_OP==#EX) AND ($PRO_STATE1==#P_STOP) THEN
CWRITE($CMD,STAT,MODE,"RESET")
RESET=FALSE
ENDIF
The reset of the program will be done from the SPS, is it ok, did I do it?