Chapter 6. Example Scripts

Table of Contents
AutoCalculation.g — automatically calculates formulas based on data points.
SimpleAverage.g — computes average point values over a period of time.
LogFile.g — logs data to a text file when a point changes value.
ReadCSV.g — reads a CSV file and writes the points and values to the DataHub instance.
WriteCSV.g — writes data to CSV files.
XMLReader.g — reads an XML file from a URL.
ParseExcel.g — parses data from an Excel spreadsheet.
LinearXform.g — performs linear transformation functions on points.
MakeArray.g — creates an array point from individual points.
BreakArray.g — breaks an array point into individual points.
IntToBit.g — converts an integer data point into a set of single-bit points.
BitsToInt.g — converts a set of boolean data points into an integer point.
MaskedBridge.g — copies a data point, applying a mask and shift operation.
ConnectionTrack.g — changes a point when a connection is made or broken.
QualityTrack.g — writes the quality of a point as the value of another point.
TagMonitor.g — monitors DataHub points for changes in quality or failure to change value.
TimedUpdate.g — periodically updates the timestamp on a set of DataHub points without changing their values.
FixQuality.g — changes point quality for OPC clients that treat bad quality as a disconnection.
OPCItemLoader.g — reads a list of OPC DA tags from a CSV file and configures DataHub points for them.
OPCReconnect.g — disconnects and reconnects an OPC DA server.
OPCReload.g — requests a reload of OPC DA server data with no disconnect.