Adding Global Variables in an Online Edit
The Global Variable Table can be edited as an Online edit
Sometimes we wish to define a Global Variable which performing an Online Edit in a Sysmac Controller. An Online Edit is when we change the code in the controller while the program continues to execute, and is extremely handy to do, especially during commissioning of a program, we do not need to perform a download to the controller (stopping execution) to make a program change.
During an Online Edit of a user program, we can only create new Internal variables to support our new code. It is not possible to define a new variable as a Global type just as we would do for instance when writing a program offline. This must be created first, we Online Edit the Global Variable Table.
Assuming you arealready online with a controller, the method to add a Global Variable is as follows;
- Double click on the Global Variable Table
- Press Control + E to start an online edit. It is now possible to right click on the variable table and create a new variable. Make sure you create the variable correctly, as it will not be possible to edit this variable once it is committed. In particular, ensure that you set the Network Publish settings, Constant or Retained parameters before commiting the change.
- To send the new variable to the Controller, press Control + Shift + E just as you would to send an Online Edit change to the controller.
You can now go to your program, perform an Online Edit and use this new Global Variable in your program just like any other variable that previously existed.