This sounds like something really simple but I think it's slightly complicated by the fact that I'm using a lot of RUN commands to operate multiple motion groups at the same time.
I'm starting programs with an RSR, which then calls a RUN command for the required program. This RSR then ends leaving the program I called running. But because of this, the RSR is the program shown on the screen, and when I pause the program, and go to step through the program using the teach pendant, I find I have to go to SELECT and then pick the program which was running. It jumps to the correct line it was paused at and allows me to step forward or backward through the program. I can then go back to AUTO and resume. If I load any other program , the paused task which was running is cleared and I lose the ability to resume.
All I really want to do is automatically switch the TP screen to show the running program in edit mode when I switch over to teach mode. I'd have expected this to happen automatically but I assume it's to do with the RUN command.
I found a variable called $SHELL_WRK.$ROUT_NAME which I can set in Roboguide and it does exactly what I want - but this isn't writable either from TP or Karel programs. Is there some other way I can set this variable - or another way to achieve what I want?
I'm hoping that if I can find how to sort this it may also be possible to show the currently running program on the pendant while it's running.
Thanks in advance guys!