There are two
Data Scripting Services; Standard Functions for pre-defined translations and the
Scripting Service that gives the ability to create custom functions using
VBScript or JScript.
The
Standard Functions can be utilized to change Communication Service data into a
more usable format or one that the user has a preference for. The functions may
be applied to incoming or outgoing data and include:
Temperature conversion between Fahrenheit, Centigrade and Kelvin
Length conversion between feet and metres
Time manipulation functions e.g. offset time/date to a given time-zone
Data scaling e.g. offset, scale (multiply)
Data functions e.g. maximum, minimum, average, sum
Data
manipulation e.g. convert to hexadecimal, get bit value from number, get digit
from number
Equality operators
Replace
functions to insert a value into a structured Tag. Useful for example with
Distech Controls® internal values
Scripting
services allow for custom Data Service scripts to be created using VBScript or
JScript. This is an extremely powerful feature that provides the user with a
further level of data manipulation for custom data processing. Example uses of
this feature could be the generation of Key Performance Indicators (KPI’s),
Data Conversion and filtering.
The
scripts are written using the built-in editor, which will accept any of the
standard VBScript or JScript commands. Once written, the editor contains a test
function that allows the script to be run, using dummy data entered by the
user, and the output verified against the expected result. After testing, these
scripts are stored and can be used and applied to any Communication Service
variables in the same way as the Standard Functions. Every time the script is
used the input value and the result can be added to the Altitude log file,
which the user can reference to verify the integrity of the function when used
with real-time data.