I know that you can run and stop BG Logic by going to MENU->SYSTEM->BG Logic and pressing the Stop soft key for the programs.
I was wondering if there is a Karel operation (similar to ABORT_TASK) that can stop the BG Logic?
I know that you can run and stop BG Logic by going to MENU->SYSTEM->BG Logic and pressing the Stop soft key for the programs.
I was wondering if there is a Karel operation (similar to ABORT_TASK) that can stop the BG Logic?
Just use a flag that you check at the top of your BG Logic program.
IF (!F[1]), JMP LBL 999
.... Do stuff
LBL 999
END
I should have mentioned that I want to abort the BG logic so that I can overwrite the program.
The solution you suggested would allow me to essentially stop the execution of the program via a flag. But the BG Logic status would still be 'running'. If I try to overwrite the program via FTP, I get an error stating that the 'the specific program is in use'.
I am looking for a similar solution. I am able to navigate to the BG logic page through karel but could not find an way to input the soft function keys without using the Teach pendant. Could someone suggest a method?
Okay. I found one function called SIM_KEY (Not documented in Karel programming manual ) which does this. I tested it in roboguide and it works. There are two arguments for this function. Unfortunately, I dont know what the first argument is (Its a string, maybe someone knows what it is). The second argument is the function key number F1 to F5 which is mapped to 129 to 134.
Okay. I found one function called SIM_KEY (Not documented in Karel programming manual ) which does this. I tested it in roboguide and it works. There are two arguments for this function. Unfortunately, I dont know what the first argument is (Its a string, maybe someone knows what it is). The second argument is the function key number F1 to F5 which is mapped to 129 to 134.
Does SIM_KEY require a specific library to run? if so could you let me know which one you're using please.
U need to call %ENVIRONMENT UIF at the beginning of your karel program so that u can use SIM_KEY routine.