Scripts Syntax Reference
The scripts language is JavaScript. The script instructions may include control and calculation statements as well as conditional operators and loops. It is also possible to test the status of field objects and send out commands. Additionally, intermediate results can be stored in local or global variables and then used for further processing.
Scripts can operate on variables, such as internal memory locations identified by a label. Variables can be local to a single script, or global and therefore visible to all scripts.
- Local variables are initialized each time the script is launched and remain available until the script ends.
- Global variables are instead stored in the system memory and are available for all scripts and macros.
- Browse and Search for Objects Types and Functions
- Browse the Tree Structure Types and Functions
- Command Objects Types and Functions
- Debug with Console and Trace Messages Types and Functions
- Date- and Time-related Functions
- File Access Types and Functions
- Import Function from External DLLs
- Include Scripts Functions
- Math Functions
- Read Object Properties, Values, and Attributes Types and Functions
- Read and Subscribe to Alarms Functions
- Read Historical Values (Time Series) Functions
- String Operators
- Subscribe and Unsubscribe Types and Functions
- Sessions Types and Functions
- Wait Statements
- Functions to Get Information on the Current Execution
- Miscellaneous
- JSON Syntax for Passing Parameters to Scripts
- Scripts Code Samples