Select [Tools] – [Script] or press the button to bring up the script editor as shown below.
Item | Description |
| Adds a new script. The [Add Script] window will appear. |
| Edits the selected script. The [Edit Script] window will appear. The window is the same as the [Add Script] window except that the user cannot edit the script name. |
| Compiles the selected script. The compile result will appear on the field marked as [Build]. |
| Compiles all scripts registered in the project. The compile result will appear on the field marked as [Build]. |
| Adds a detailed device address to the point where the cursor is located. |
| Adds a tag name to the point where the cursor is located. |
Item | Description | |
Script Name | Assigns the script name. This field is disabled in the [Edit Script] window. | |
Running Type | Start Up | The script will only be executed once on the project’s startup. |
Manual | The script will be executed once when it is called by a command such as ‘RunScript’ keyword. Refer to the example below for more details. | |
Period | The script will be executed periodically. | |
Running Period | Assigns the script execution interval. This option is enabled only when the ‘Period’ option is selected. You can assign the interval from 1 to 65535 seconds. | |
Priority | Assigns the priority of the script. The lowest priority is level 1, and the highest priority is level 10. | |
Example | A script named ‘TankLevel’ is set to have a [Manual] startup. Any action that can execute this program will be of the form: RunScript TankLevel(); The script named ‘ROTATE’ uses the RunScript keyword to execute ‘TankLevel’. |