18
133
18 - External units
Alternatively you might be interested in statistical values rather than all the individual values. The
script language includes a routine for handling groups of external units of the same type. You can
use the routine to calculate the mean value, the highest and lowest value and other statistics from a
group of sensors. This means there is no need to link a channel to each sensor – the function works
regardless of the number of sensors. The script language and the GROUP routine can also be used
for more advanced functions as described in the reference manual.
18�2 Type denitions
Before a device can be connected via GFBI or AeACom, a snippet must be created to dene commu-
nication with that particular type of unit. In programming, a snippet is a small script. Snippets con-
taining a type denition (or anything else) are distributed in les with the extension .gpss (Goliath
Platform Script Snippet).
To import a type denition, go to Settings/Advanced/Script. A script editor opens, where you can
view and edit the script code in the user script area.
Click the Snippets button to see a list of all available snippets.
We will not go into any more detail here, except to mention that you can click the Insert from File
button to add snippets from a .gpss le. Click Apply to close the window. (The Close button closes
the window without applying the changes you made.) Finally, click the Save button in the script edi-
tor to save the script to the device. The device will restart if everything is OK.
If there is a script error, the script will not be saved. Instead, an error message appears in the Mes-
sage window at the bottom. To nd out more about scripts, please see the reference manual.