Passing variable(s) between subprograms popup

Hello, I’m new to working with UR, so I’m not sure what is causing the issue I’m running into.

I have a main program with multiple subprograms. One subprogram finds a waypoint and saves it as a variable. Other subprograms call on that variable for specific movements. That works fine, but every time I open the main program file, I get a series of popups asking to rename shared variable(s).

This is not only annoying, but makes it very easy to break the program if anyone hits the Rename Automatically prompt. Why does this happen? Using the same variable in multiple subprograms should be pretty common, right?

I’ve tried assigning the variable a different name in the main program, and calling the other in the later subprograms, but that doesn’t work either. (E.g. Sub1: ‘m’=pose1 , Main: ‘n’=‘m’, Sub2: move to ‘n’, just gives a popup to rename ‘m’ and ‘n’)

Is there a different way I am supposed to use the same variable in multiple subprograms to prevent this popup? Or is there some way to automatically cancel to the Rename Variable popup?

You shouldn’t encounter this issue, if you use global variables instead. :slight_smile: Go to Installation → Variables and create your variables here. Then you should update your programs to use these instead, of course.