I am using some script in my ur robots to offset the position of a placement position. Only in X and Y reference to base. These offsets are done within a subprogram which is called by the main program.
Every now and then one of the robots decides that the variable I am using is no longer initialized and it will not run, the only way round it is disabling that line and restarting. Then later on clearing the subprogram and reloading it.
Has anyone experienced anything like it? It’s happened twice this week on programs that previously ran fine and no alterations have been made. The only thing I think is different between the two robots is the other robot that hasn’t shown this issue doesn’t have a subprogram, this one does because its actions are more complicated, and its within the subprogram where I am doing this offset.
See photos of error, lines of code and variables.


