<< Click to Display Table of Contents >> Script properties |
|
List of script properties:
Property |
Description |
---|---|
Group |
Select group for the script. |
Subgroup |
Select subgroup for the script. |
Name |
Name of the script. |
Comment |
Optionally specify a meaningful comment. |
Background color |
Background color of the screen for developing script using FBD language. It's not affect on script execution. |
Script type |
Select type of the script: ▪General - is binded to the whole project. ▪Screen - is binded to the screen. ▪Tag - is executed depending on tag's value. ▪Object - is binded to the object. ▪Report - is binded to the report. |
Language |
Choose language for the script - FBD or ST. Description of the language you can find below in this tutorial. |
Dimension |
Screen's dimension for developing script using FBD language. It's not affect on script execution. |
Every cycle |
Check if you want this ST script to be executed every update period of the project. You can find out this period in Project properties (Update interval (ms)). |
Execution |
Choose if you want to use ST script and don’t want it’s executed every cycle: •OnDataChange - script is executed when tag’s values used in this script are changed. •OnStart (OnOpen, OnCreate) - script is executed when project is started (for general script type) or screen is opened (for screen script type) or object is created (for object script type). •OnStop (OnClose, OnDestroy) - script is executed when project is stopped (for general script type) or screen is closed (for screen script type) or object is destroyed (for object script type). •OnClick - script executed when screen is clicked (for general and screen script types) or object is clicked (for object script type) •OnMouseEntered - script executed when mouse is entered over the object (only for object script type). •OnMouseExited - script executed when mouse is exited the object (only for object script type). |
Run in UI |
Check if you want to run this script in UI thread. It's helpful if you want to update graphical objects after executing this script. |
Types of scripts:
Script type |
Description |
Additional binding |
Execution type |
---|---|---|---|
General |
bound to the whole project |
No need |
OnDataChange (executed when the tag's values used in the script change), OnStart (executed when the project starts), OnStop (executed when the project is closed), OnClick (executed when the mouse button is cliked)
|
Screen |
bound to the screen. |
It is necessary to bind the script to a specific screen. In the Screen properties go to the "Scripts" field and add the script to the collection. |
OnDataChange (executed when the tag's values used in the script change), OnOpen (executed when the screen opens), OnClose (executed when the screen closes), OnClick (executed when clicking on the screen) |
Tag |
executed depending on tag's value. |
It is necessary to bind the script to a specific tag and specify the value of the tag at which the script will be executed. Go to the Tag properties/General tab find the Scripts field and add the script to the collection. |
--- (when binding a script to a tag you should specify the tag value (interval) at which the script is executed) |
Object |
bound to the object. |
It is necessary to bind the script to a specific object. Go to the Object properties/General tab, find the "Scripts" field and add the script to the collection. |
OnDataChange (executed when the tag's values used in the script change), OnCreate (executed when the object is created), OnDestroy (executed when the object is destroyed), OnClick (executed when clicking the object ) OnMouseEntered(executed when mouse entered the object) OnMouseExited(executed when mouse exited the object) |
Report |
bound to the report. |
It is necessary to bind the script to a specific report. Go to the Report properties, find the "Scripts" field and add the script to the collection. |
executed when generating the report |