Hi everyone,
i am trying to get a homing sequence working for my robot.
I have setup my CELL.SRC with an interrupt. which will be triggered by a homing button.
my questions are:
1)I have commented out the CHECK HOME and PTP HOME in my CELL.SRC. Since when the interrupt is triggered the robot would not be at home. Will this cause any unforseen issues?
2)While in interrupt i get $Advance and $GEAR JERK Variable write-protected in module BAS, Errors. how do i fix these?
i believe for $advance i can set a WAITFOR but im not sure whats the best way to do so. i have read the INTERRUPT threads in the manuals page as well.
I have tried initiating my interrupt_test.src from a .SUB as well and get the same errors as above.
MY CELL.SRC
Code
&ACCESS RVP
&COMMENT HANDLER on external automatic
DEF CELL ( )
;FOLD EXT DECL
EXT assytray();EXT EXAMPLE1 ( )
EXT CYL();EXT EXAMPLE2 ( )
EXT P15_inlet_to_platform45()
EXT P16_inlet_to_rightassy()
EXT P17_inlet_to_leftassy()
EXT P18_recipe_rose()
EXT P19_recipe_lavender()
EXT P20_recipe_eucalyptus()
EXT P21_recipe_teatree()
EXT P22_recipe_sadalwood();EXT EXAMPLE3 ( )
EXT P23_recipe_citronella()
EXT P24_recipe_peppermint()
EXT P25_rightassy_to_home()
EXT P26_leftassy_to_home()
EXT P27_platform45_to_home()
EXT P28_execute_recipe_right()
EXT P30_EOATchange_1_to_2()
EXT P32_EOATchange_2_to_1()
EXT P43_RFID_to_outletTray1()
EXT P44_RFID_to_outletTray2()
EXT P45_RFID_to_outletTray3()
EXT P46_RFID_to_outletTray4()
EXT P47_RFID_to_outletTray5()
EXT P48_home_to_RFIDout()
EXT P54_Assy_CB()
EXT P55_Assy_CH()
;ENDFOLD
;FOLD INIT
DECL CHAR DMY[3]
DMY[]="---"
INTERRUPT DECL 20 WHEN di_bInitRecoveryfrmPLC == TRUE DO Interrupt_test ( )
INTERRUPT ON 20
;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
Display More
My Interrupt_test