Scripts

<< Click to Display Table of Contents >>

Navigation:  Project >

Scripts

Previous pageReturn to chapter overviewNext page

At the moment in TeslaSCADA2 you can use two languages for writing scripts - FBD (Functional Block Diagram) and ST(Structured Text). They are similar to languages used in PLC programming. Depending on the task at hand, you can choose one or another language. For most tasks, it is better to use ST language as it is more functional. ST language can be bound to an object or tag as opposed to FBD language and ST language scripts has more call options. FBD language script is called only when tag's values used in this script are changed. But FBD language is more descriptive and may be more familiar to PLC program developers. Also, FBD language has functions that are not available in ST language. These functions are mainly related to time management such as timers, multivibrators, etc. In any case, the choice of the language in which your scripts will be written is yours. Below will be described how to create a particular script and its properties.

Create script


To create a new script select the menu item Project-> New Script or choose Scripts on the Project Window, click right button on it and choose New Script item.

You’ll see the script properties window:

scriptproperties

 

Open script


To open script on Scripts tab of the Project window:

1. Right click on the script you want to open and choose Open script item.

or

2. Double click on the script you want to open.

 

Copy script


To copy script on Scripts tab of the Project window right click on the script you want to copy and choose Copy script item.

 

Delete script


To delete script on Scripts tab of the Project window right click on the script you want to delete and choose Delete script item.

 

Edit script properties


To edit script properties on Scripts tab of the Project window right click on the script you want to edit and choose Script properties item.

 

Export script


To export script on Scripts tab of the Project window:

1. Right click on the script you want to export and choose Export script item.

2.  Now select the location and click the button Save (TeslaSCADA2 screen extension .tsp2script).

 

Import script


To import script on Scripts tab of the Project window:

1. Right click on the script window and choose Import script item.

2. Now select the script file and click Open (TeslaSCADA script extension .tsp2script).

 

See Project Window->Scripts tab for more information about possible operation with scripts.