Greeting all,
I am having a problem on R-J3iB, V6.4 robots that I am working on:
When they are rebooted they start up in ISOLATE mode and I can't run them in automatic until I manually turn them to INTERLOCK mode.
I tried to find a setting to automatically switch this or to control it via the PLC but I couldn't find anything.
I did find that it is controlled by $SHELL_WRK.$ISOL_MODE so I wrote a small Karel program to control this based on the status of the teach pendant keyswitch and as was suggested by the community in a previous post I ran this as the cold start and hot start auto execute program.
My code seems to work perfectly on a roboguide version of the robot I am trying it on, startup and everything however when I try and deploy it to the real robot it does not run from startup.
is there any way for me to have my code start up and properly run in the background or is there a way that I missed to control the ISOLATE/INTERLOCK mode?
Thank you,
--Here's my program
--KSENAB.KL
PROGRAM KSENAB
-----------------------------------------------------------
%COMMENT = ''
%NOLOCKGROUP
%NOABORT = ERROR + COMMAND + TPENABLE
%NOPAUSE = ERROR + COMMAND + TPENABLE
%NOBUSYLAMP -- DOES NOT TRIGGER THE BUSY LAMP WHEN RUNNING
-----------------------------------------------------------
VAR
I_STATUS : INTEGER
-----------------------------------------------------------
ROUTINE R_ENAB --ISOLATE ENABLE ROUTINE
BEGIN
KCL('SET VAR $SHELL_WRK.$ISOL_MODE = TRUE', I_STATUS)
END R_ENAB
-----------------------------------------------------------
ROUTINE R_DISAB --ISOLATE DISABLE ROUTINE
BEGIN
KCL('SET VAR $SHELL_WRK.$ISOL_MODE = FALSE', I_STATUS)
END R_DISAB
-----------------------------------------------------------
BEGIN --MAIN BODY
DELAY 15000 -- START UP DELAY
CONDITION[1]:
WHEN OPOUT[7] = ON AND $SHELL_WRK.$ISOL_MODE = FALSE DO -- WHEN TP KEY IS ON RUN ISOLATE ENABLE ROUTINE
R_ENAB
ENABLE CONDITION[1]
WHEN OPOUT[7] = OFF AND $SHELL_WRK.$ISOL_MODE = TRUE DO -- WHEN TP KEY IS OFF RUN ISOLATE DISABLE ROUTINE
R_DISAB
ENABLE CONDITION[1]
ENDCONDITION
ENABLE CONDITION[1]
REPEAT
DELAY 100
UNTIL 1 = 0
END KSENAB
Display More