5.8. Script

Most of the scripts (or logics) can be placed and execute within the browser or at the client side. However, there may be time that some logics doesn't need to interact with user via web page. Or, some critical logics need to be running at all time regardless which page user is viewing and even when browser is closed. These scripts can be run from server side and they can perform most efficiently especially when scripts need to access server tag values.

On top of standard JavaScript function, IntegraXor comes with a few additional functions for server relevant execution. Two most commonly used functions are getTag('tagname') and setTag('tagname', data) .

Name

Script name to be called when 'trigger_type' is set as 'User'. For consistence sake, always make script filename same as this name.

Description

Description of the server script.

File Name

Directory to the Javascript file.

Triggered By

Method to trigger the script. Can be triggered by predefined timer, or change of value of a specific tag.

Trigger

Depending on the column "Triggered By", this column can either be a predefined timer in Timer section, or a tag in I/O section.

ActiveX

Enable or disable the ActiveX functions. Enable ActiveX only when need to use ActiveX functions to interact with Windows O.S.

[Tip] Tip

Use system tag app.startup to trigger any script that only need to run once during startup, typically any script that needs initialation.

Use alarm system tag to trigger any script on any event.