The main purpose of writing DataHub scripts is to interact with the live data represented by DataHub points. The Gamma scripting language, has a few special provisions for working with DataHub points. Understanding these will make your task much easier.
First, a DataHub point name is not a legal symbol in the Gamma language. A DataHub point names uses a colon
(:) to separate the point name from the domain name, and
commonly use a dot (.) as well, like this:
DataSim:Sine or
MyDomain:Plant1.Tank3.Valve2. Colons and dots are not
normally allowed in a Gamma variable name, so we use the Gamma symbol character
operator
$ to turn the whole string of characters into a single, valid
Gamma variable. For example, these expressions:
$DataSim:Sine $MyDomain:Plant1.Tank3.Valve2
are valid Gamma variables.
The $ operator tells the Gamma engine that all characters
except white space (space, tab, newline, carriage return, form feed) and the the
set: []()",'; are accepted in the symbol name. To get any of
the above characters in a symbol name, you need to precede that character by a
backslash. So, for example, this DataHub point::
default:plant.water level[1]
would be written in a script like this:
$default:plant.water\ level\[1\]
In brief, you need to put a $ before any DataHub point name in
a DataHub script, and use a backslash within the name before any white space or
[]()",'; character.