Script Type

 

The scripts that can be written in the studio can be broadly categorized into

(1) scripts related to the entire SCADA Server(LocalMain.exe),

(2) scripts related to the graphics module, and (3) scripts for each graphic element.

 

Scripts related to the entire SCADA Server

If you select 'File|Script' from the main menu, module editor, or reporter editor in Studio,

you will see a sub-menu like <Figure 1> where each script consists of the same type and content as shown in <Table 1>.

 

<Figure 1> Script section menu in File text menu

 

Script Type Description Number of scripts
At Program Start Run once when the SCADA Server starts No more than 1
At Program Running While the SCADA Server is running, it continues at a specific scanning cycle (in seconds) As many as the number created
At Program End Run once when the SCADA Server is terminated No more than 1
Key Script Scripts that run when a specific keyboard is pressed or released As many as the number created
Menu Script Script for using user menu MENU_SCRIPT_000 ~ MENU_SCRIPT_999 0 ~ 1000
Log In Script A script that runs once for each user login. No more than 1
Before Log Out Script A script that runs once just before each user logs out. No more than 1
After Log Out Script A script that runs once immediately after each user logs out. No more than 1

<Table 1> Types and contents of scripts related to the entire SCADA Server.

 

Note) The keys that can be used in the key script are F1 ~ F24, the number 0 ~ 9, the letters A ~ Z, etc., and you can use a combination of Ctrl and Shift keys.

 

Scripts related to the graphics module

When the studio is in the module editor, selecting the 'Etcr' text menu will bring up a menu like <Figure 2>,

and each script is composed of the same type and content as shown in <Table 2>.

 

1

<Figure 2> Script menu associated with the graphics module

 

Script Type Description Number of scripts
Script On Module Opened Run once when the current graphics module is opened No more than 1
Script On Module Running Always runs while the current graphics module is open
Script On Module Closed Executes once when the current graphics module shuts down(closes)
Script On Module Activated Run once when the graphics module is activated
Script On Module Deactivated Executes once when the current graphics module is inactive

<Table 2> Types and contents of scripts related to graphics modules

 

Run Script button

In the module editor's 'Insert Element|Run Script Button' settings dialog, create an external file or an internal script.

 

Scripts for each graphic element

Most graphical element settings dialogs have an extension tab where you can write scripts.

 

Related Helps)

File text menu in Studio

Etc text menu in the module editor

Studio Main Help

Script Main Help