The documentation does not cover setting up local and global variables. From reading various forum posts I deduce…
1 Global variables are set up in the VARS table. These can be used in every (sub) program. Values are transferred between (sub)programs, although a later subprogram may over-write the value allocated by an earlier (sub) program
2 Local variable can only be used in a single (sub)program. It is not clear how a local variable is defined. Is it defined just by including its name in a statement? Name can be any alpha-numeric combination - but not a global variable name.
Is the above correct? Are there any other rules that apply.
Thanks
Global Vars: Your writeup is accurate, global vars can be used in any program on a given controller as you state. They are shown in blue at Tab1 once you send and then reload the program. Notice at Tab4 you can hit the INS key or right click to see the global point definition.
Local Variables: Again correct, you can create them on the fly in your programming. They are visible only in the program they are created in and they will show up as grey color at Tab2 to highlight the difference from global vars.
Note to Temco Team: Global vars are supposed to be system wide variables for use in ANY controller in the system with automatic background updating. My test just now at Tab3 in a remote controller shows this is not working.