I am having trouble with an interrupt function. I want to have the robot move down until a sensor is made and then stop and run a different move. It gets to the interrupt, the sensor comes on, and then I get "Inadmissible instruction." I am not sure what I have done wrong.
Code
;Pick pounce
;FOLD PTP PkPnc CONT Vel=100 % PkPnc Tool[2]:VACUUM Base[1]:B CONTAINER;%{PE}%R 8.3.44,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:PkPnc, 3:C_DIS, 5:100, 7:PkPnc
$BWDSTART=FALSE
PDAT_ACT=PPkPnc
FDAT_ACT=FPkPnc
BAS(#PTP_PARAMS,100)
PTP XPkPnc C_DIS
;ENDFOLD
;Pick
INTERRUPT DECL 1 WHEN $IN[33]==TRUE DO Liner()
PickLiner()
INTERRUPT OFF 1
;Liner pick
;FOLD LIN LINERPICK Vel=0.5 m/s LINERPICK Tool[2]:VACUUM Base[0];%{PE}%R 8.3.44,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:LINERPICK, 3:, 5:0.5, 7:LINERPICK
$BWDSTART=FALSE
LDAT_ACT=LLINERPICK
FDAT_ACT=FLINERPICK
BAS(#CP_PARAMS,0.5)
LIN XLINERPICK
;ENDFOLD
Display More
Code
DEF PickLiner ( )
INTERRUPT ON 1
;FOLD LIN PICK Vel=2 m/s PICK Tool[2]:VACUUM Base[1]:B CONTAINER;%{PE}%R 8.3.44,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:PICK, 3:, 5:2, 7:PICK
$BWDSTART=FALSE
LDAT_ACT=LPICK
FDAT_ACT=FPICK
BAS(#CP_PARAMS,2)
LIN XPICK
;ENDFOLD
;Wait 0 to prevent prescan
;Needed for INTERRUPT to function
;FOLD WAIT Time=0 sec;%{PE}%R 8.3.44,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 3:0
WAIT SEC 0
;ENDFOLD
END
Display More