About the Object Scripts tab
- Last UpdatedJul 19, 2024
- 2 minute read
Use the Scripts tab to write and configure an executable script associated with the object.
|
Editor Option |
Associated Attribute |
Description |
Runtime Access (Supervisory, User, Read-Only, None) |
|---|---|---|---|
|
Script name |
(not applicable) |
The name of each script primitive associated with the object. Each attribute is appended to the primitive name for each script. |
None |
|
Configure execution order |
ScriptOrder |
An ordinal number indicating within a script execution group the script's relative order to other scripts. |
None |
|
Aliases |
Aliases, AliasReferences |
An array of names and their associated attribute references used in a script or expression. |
Aliases = None; AliasReferences = Supervisory, User |
|
Declarations |
DeclarationsText |
A set of valid QuickScript .NET declarations using dim. |
None |
|
Execution type |
ScriptExecutionGroup |
The type of script execution that occurs during object execution: Startup, On Scan, Execute, Off Scan and Shutdown. |
None |
|
Expression |
Expression |
A string that controls the script execution for all trigger types except Periodic when Execution Type is set to Execute. When the expression entered meets the trigger condition (While True, On True, On False, Data Change and While False), the script is executed. Click the ellipse button to access the Attribute Browser. |
None |
|
Trigger type |
TriggerType |
The function associated with the expression that together determines when the script is executed. |
Read-Only |
|
Trigger period |
TriggerPeriod |
Indicates the period at which to trigger an Execute type script when Trigger Type is set to Periodic. If set to zero (0), the script executes at the scan period of the host AppEngine. The script always executes at least once immediately after going onscan. The time format is: days hh:mm:ss.fffffff. |
Read-Only |
|
Deadband |
DataChangeDeadband |
Only used with Trigger Type Data Change. Specifies the amount the expression value must change before the script is executed. |
Supervisory, User |
|
Runs asynchronously |
RunsAsync |
Sets whether the script is to be run synchronously (cleared) or asynchronously (checked). |
Read-Only |
|
Timeout limit |
ExecuteTimeout.Limit |
Indicates the timeout limit, in milliseconds, for an asynchronous script. (For synchronous scripts, the timeout for the host AppEngine is used. A value of zero (0) disables the timeout. This value is accurate within the resolution of the configured scheduler scan period of the hosting AppEngine. |
Read-Only |
|
Report alarm on execution error |
ExecutionError.Alarmed |
If enabled, an alarm will be triggered when the script engine encounters an error condition in the script's last execution. |
None |
|
Priority |
ExecutionError.Priority |
See Alarm Attributes in the Attributes Help. |
Supervisory, User |
|
Historize script state |
State.Historized |
If enabled, the system will historize the state of the object script. |
None |
|
Script box |
StartupText OnScanText ExecuteText OffScanText ShutdownText |
Displays the script being developed. Must be a valid QuickScript .NET startup, on scan, execute, off scan or shutdown script. The script is parsed for language-specific key words, script functions, internal references (referencing attributes of the object that the script is assigned to) and external references. Syntax errors are raised, including usage of non-existing script functions. You can access the Script Function Browser and the Attribute Browser by clicking the appropriate button in the script box toolbar. |
None |