12.1.2 Settings

12.1.2 Settings

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 compiled result will appear on the field marked as [Build].

Compiles all scripts registered in the project. The compiled 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 the β€˜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’.

Β