Script Definition tab

You can specify this information:
Add
If this option is selected, you can assign script definitions to the device. To connect a gauge and retrieve the required data, you must configure the device with at least one script.
Startup Classname
the name of the class that indicates the entry point for the selected script.

GaugeLight Data Entry Script

The GaugeLight Data Entry script is used for the data devices that provide simple values. Currently the script returns a single value and uses settings from the Data Device configuration to read data from a device.

These actions are performed by the script during initialisation:

  • Opens the specified port.
  • Sends an initialisation command to the device if specified in the Data Device configuration.

These actions are performed by the script during GetData:

  • Flushes the read buffer if specified in Device Args.
  • Sends a data request to the device if specified in the Data Device configuration.
  • Reads raw data from the device using options specified in the Data Device configuration.
  • Parses the value as specified in the Data Device configuration.

These actions are performed by the script during Termination:

  • Closes the port.
Note: When using the Generic signal type, only decimal numbers are parsed. Most gauges return decimal values, but there are some cases where integers are returned which cannot be parsed.

Multi-line GaugeLight Data Entry Script

The multi-line GaugeLight data entry script is an abstract class designed for gauges that produce multiple lines of data.

To use this script:

  • The data device must define Device Outputs.
  • Each inspection variable must be associated with a Device Output.
  • The gauge must terminate every output line using the same line delimiter.

The script cannot be used directly. You can create a simple custom data entry script that inherits from this class and implement the abstract members.

The custom data entry script specifies the number of output lines and maps the Device Output name to line index. The data device configuration specifies the line delimiter through the Read Delimiter field.