I was hoping one of you could give me a little bit of enlightenment as to what the SYNC() command does, why it is needed, and how to get rid of the "SYNC()--CALL NOT PROGRAMMED" message upon shutting down the controller. The controller is a GM spec KRC2 running KSS 4.1.7 SP2.
The operator control manual states the following in under the section titled "power failure with the system running"
QuoteAn active application should react to the power failure with the KRL command “SYNC( )”.
If this message does not appear, a corresponding error message is generated.
It makes no difference whether the power failure was caused by failure of the mains supply
or by pressing the main switch during program execution.
The fault listing manual has the following to say:
QuoteMessage text SYNC()--CALL NOT PROGRAMMED
Cause -- In IRSTOPMESS, the user has failed to respond to $Power--Fail by calling the SYNC() function.
Monitor -- During power failure.
Effect -- None.
Remedy -- Correct the application program.
So does this mean that not calling SYNC() in ir_stopm has no effect? I find it hard to believe that kuka would have said message be displayed if SYNC() doesn't do anything.
It appears that SYNC( ) is called within my my ir_stopm.src file:
&ACCESS R
&COMMENT HandlerOnRobotFault
DEF IR_STOPM ( )
;---------------------------------
; Error Handling ROBOT CONTROLER
; Switch OFF and Switch ON process
;---------------------------------
;FOLD DECLARATIONS;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
;FOLD USER DECL;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
; Please insert user defined declarations
;ENDFOLD (USER DECL)
;FOLD BASIS DECL;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
BOOL APPL_RUN_L,TMP_$STOPM
DECL CHAR ID[3]
;ENDFOLD (BASIS DECL)
;ENDFOLD (DECLARATIONS)
;FOLD INIT;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
;FOLD BASIS INIT;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
INTERRUPT OFF 3
STOPM_FLAG=TRUE
ID[]="CTL"
IF $STOPMESS==TRUE THEN
BRAKE
ENDIF
;ENDFOLD (BASIS INIT)
;FOLD USER INIT;%{E}%V3.2.0,%MKUKATPBASIS,%CSPS,%VAUTOEXT,%P
; Please insert user defined initialization commands
;ENDFOLD (USER INIT)
;ENDFOLD (INIT)
;FOLD TOUCH STOP;%{E}%V3.2.0,%MKUKATPTS,%CSTOP,%VSTOP,%P
IF H70_OPTION THEN
IF (FG_ON_WORK AND ($OV_PRO==0)) THEN
H70 (4,CD0 )
ENDIF
ENDIF
;ENDFOLD (TOUCH STOP)
;FOLD ARC10 STOP;%{E}%V3.2.0,%MKUKATPARC,%CSTOP,%VSTOP,%P
IF A10_OPTION==#ACTIVE THEN
A10(#IR_ERROR)
ENDIF
;ENDFOLD (ARC10 STOP)
;FOLD ARC20 STOP;%{E}%V3.2.0,%MKUKATPA20,%CSTOP,%VSTOP,%P
IF ARC20==TRUE THEN
A20 (TECH_STOP1 )
ENDIF
;ENDFOLD (ARC20 STOP)
;FOLD USER STOP;%{E}%V3.2.0,%MKUKATPUSER,%CSTOP,%VSTOP,%P
;Make your modifications here
;ENDFOLD (USER STOP)
;FOLD BASIS STOP;%{E}%V3.2.0,%MKUKATPBASIS,%CSTOP,%VSTOP,%P
IF $STOPMESS==TRUE THEN
TMP_$STOPM=TRUE
P00 (#EXT_ERR,#PGNO_GET,ID[],128 )
APPL_RUN_L=FALSE
IF (APPL_RUN>0) THEN
IF $OUT[APPL_RUN] THEN
APPL_RUN_L=TRUE
$OUT[APPL_RUN]=FALSE
ENDIF
ENDIF
REPEAT
POWER=SYNC()
HALT
UNTIL (($STOPMESS==FALSE) AND ($POWER_FAIL==FALSE))
ELSE
TMP_$STOPM=FALSE
ENDIF
;ENDFOLD (BASIS STOP)
;FOLD BASIS RESTART;%{E}%V3.2.0,%MKUKATPBASIS,%CRESTART,%VRESTART,%P
IF TMP_$STOPM THEN
P00 (#EXT_ERR,#PGNO_GET,ID[],0 )
IF (($MOVE_BCO==FALSE) AND ($ON_PATH==FALSE) AND ( NOT ($MODE_OP==#T1)) AND ( NOT ($MODE_OP==#T2))) THEN
IF (VARSTATE("$AXIS_RET")==#INITIALIZED) THEN
PTP $AXIS_RET
ENDIF
ENDIF
IF APPL_RUN_L THEN
IF (APPL_RUN>0) THEN
$OUT[APPL_RUN]=TRUE
ENDIF
ENDIF
ENDIF
TMP_$STOPM=FALSE
;ENDFOLD (BASIS RESTART)
;FOLD USER RESTART;%{E}%V3.2.0,%MKUKATPUSER,%CRESTART,%VRESTART,%P
;Make your modifications here
;ENDFOLD (USER RESTART)
;FOLD ARC10 RESTART;%{E}%V3.2.0,%MKUKATPARC,%CRESTART,%VRESTART,%P
IF (A10_OPTION==#ACTIVE) THEN
A10(#IR_RESTART)
ENDIF
;ENDFOLD (ARC10 RESTART)
;FOLD ARC20 RESTART;%{E}%V3.2.0,%MKUKATPA20,%CRESTART,%CRESTART,%P
IF (ARC20==TRUE) AND B_RESTART THEN
A20 (13)
ENDIF
;ENDFOLD (ARC20 RESTART)
;FOLD ;%{H}
INTERRUPT ON 3
STOPM_FLAG=FALSE
;ENDFOLD
END
Display More