Hi guys,
I am using KSS 8.6 END V6
I am trying to create a global interrupt that will initiate a recovery.src in my cell( interrupt 20). it should be always running.
i have a few questions regarding it.
&ACCESS RVO
&COMMENT HANDLER on external automatic
DEF CELL ( )
;FOLD EXT DECL
;ENDFOLD
;FOLD INIT
DECL CHAR DMY[3]
DMY[]="---"
;ENDFOLD (INIT)
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS == TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD CHECK HOME
$H_POS=XHOME
IF CHECK_HOME==TRUE THEN
P00 (#CHK_HOME,#PGNO_GET,DMY[],0 ) ;Testing Home-Position
ENDIF
;ENDFOLD (CHECK HOME)
;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT
PDAT_ACT=PDEFAULT
FDAT_ACT=FHOME
BAS (#PTP_PARAMS,100 )
$H_POS=XHOME
PTP XHOME
;ENDFOLD
;FOLD AUTOEXT INI
P00 (#INIT_EXT,#PGNO_GET,DMY[],0 ) ; Initialize extern mode
;ENDFOLD (AUTOEXT INI)
GLOBAL INTERRUPT DECL 20 WHEN $IN[18] == TRUE DO Recovery ( )
LOOP
P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 )
INTERRUPT ON 20
Display More
1) I am trying to replicate and have placed my own interrupt below it, at first.
:: GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS == TRUE DO IR_STOPM ( )
INTERRUPT ON 3
but my global interrupt does not seem to work,
2) if it is global interrupt, why is this line declared, being written in every .src file that is created.
3) would a .sub be better suited for this?
if so, i tried calling the file but get $ACC-AXIS variable write-protected in module BAS, line 411.
I tried searching in the forum to find a solution but i do not understand it fully.
Thanks for your help.