Screen Scripts
– which run only run when the associated Screen is displayed or are
called by a Pushbutton on a Screen. Screen Scripts run on the
Client. Screen Scripts run at the frequency specified by the
Graphic Parameters (Set Graph Param) as fast as every 25
milliseconds.
Run Once when
display first opened
Run
continuously while display is open by user
Run Once when
display closed
The language
of WebAccess scripts is derived from TCL, an open-source scripting
language commonly used for hardware-control programs.
WebAccess scripts do not need to be compiled.
The components
of a WebAccess Script are grouped into five Areas:
ACTION – these
are commands specific to WebAccess. They are usually similar to
keymacro and pushbutton commands. They address the need for scripts
to interact with real-time data, controls and users. For
example, Alarm Acknowledge, GO TO a Graphic Display, Set a
Value. ACTION commands enhance the standard Tcl script
commands.
KEYWORD –
these commands are based on the Tcl programming language and
introduce an "open source" feature to WebAccess
scripts. Many standard Tcl programs are the programming
language of WebAccess Scripts. The language of WebAccess
scripts is derived from TCL, a scripting language commonly used for
hardware-control programs. This is the If, THEN, ELSE of a
programming language.
FUNCTIONS –
these are mostly the advanced arithmetic functions (sine, cosine,
rounding, logarithmic functions)
OPERATORS – a
simpler math operators (multiply, divide, addition, greater than,
equal to, etc) and grouping characters (parenthesis, square
brackets etc.)
Additional
components of WebAccess are the Tags (the real-time data)
that WebAccess reads from Automation Equipment and
internal tags describing WebAccess:
IO TAGS – this
is the real-time data collected from Automation Equipment such as
PLCs, Controllers, VAVs, OPC Servers, etc.
FIELD – these
are Fields associated with IO TAGS, for example description, High
Span, Alarm Limits, Alarms States etc.
Daq TAG –
these are internal system tags that describe the state WebAccess ,
for example Serial Number, Last Button Pushed, communication port
status.
LOCAL TAG –
These are user defined “screen tags” internal to WebAccess and
commonly used for display animation or reformatting data before
presentation.
Please see
Chapter 12 for
detailed description of Scripts in
WebAccess.
The next
section shows a Step-by-Step Guide of creating the most common
screen script to Rotate a
Fan or Pump based on the On/Off state of a Digital Tag.