I’m supporting a project that has a UR20 robot, the program is over 3000 lines total. The main program calls sub programs depending on what part type the operator chooses. All the actual moves are in the sub programs. When running the program from teach mode, the blue arrow is supposed to indicate the current running line. Instead it shows only down to the case or if statement and doesn’t show the actual move that is running in the sub program.
Is this a known bug or limitation with UR or is there a way to make this function as expected?
Are the sub programs defined in script files? If so, that’s a known limitation. Any call to a function defined in a script file will simply highlight the line where the function is called for the entire duration of the function. For this reason the standard practice at out company is to keep all move commands contained to the main URP and only use function calls for things that don’t take much physical time.
Thanks for the response. I’m calling the sub programs using the normal Call command. I’m aware they can also be called using a script which I’m using for a few commands that are called from within a sub due to UR not supporting nested subs but those don’t contain any moves. I’m going to test next time I’m on site to see if taking everything in the sub putting it in a folder and moving it to where it is called eliminating the sub. Not easy to do with Polyscope but AI can do the copy and paste.
It has always been like this from what I remember. It only happens if the If statement has the “Continuously checking” feature enabled, though, doesn’t it?
You also mention cases in a Switch command? I don’t recall that giving problems.
It has always been like this, yeah.
But if you do not need the function of jumping out of those If statements, you could just disable it.
You also have to take into account that exiting a movement abrubtly can put unwanted wear on the joints and potentially harm the robot if it is not done right (with script commands stopl() and stopj()).