REGISTRY

The REGISTRY function is only available for use in client expressions.

The REGISTRY function returns a specified value from the Windows registry. The value is read from the registry on the client PC that is displaying the Mimic or Trend that uses the expression. The values are located in the following registry key:

HKEY_CURRENT_USER\SOFTWARE\Schneider Electric\ClearSCADA\ViewX/Mimics

If the value is not present, a new value is created with the specified default value. The default value can be a string or a numerical expression.

By using the registry on the client PCs, the expression allows the same Mimic or Trend to behave differently on different clients (as each client can have a different value).

Function Name

REGISTRY

Description

Returns a specified value from the Windows registry. The value is read from the registry on the client PC that is displaying the Mimic or Trend that uses the expression.

Arguments

REGISTRY(STRING, STRING or INTEGER or REAL)

The first value in the argument is a STRING and it is the name of the value that is to be read.

The second value in the argument can be a string, integer or real value and it is the default value for the registry.

If the registry already exists and has a value, the type of value you define for the second value in the argument has to match the type of value that is already in the Windows registry. If the Windows registry does not contain a value, a new registry will be created using the name that is specified in the argument. The type of the new registry is dependent on the second value in the argument - depending on what is defined as the second value, the new registry will be a STRING or a DWORD.

For more information on strings, integers and real floating values, see Data Types.

Returns

STRING, INTEGER or REAL depending on the data type of the inputs.

The result is a value from the Windows registry.

Example:

REGISTRY('Test', 'Default String')

If there is a value named 'Test' in the registry, the REGISTRY function will read the value and return it as a string value or integer value (depending on the type of value in the registry). If there is not a value named 'Test', the REGISTRY function will create a 'Test' value and will apply the 'Default String' value to it (in this case, the 'Test' registry will contain a string). The REGISTRY function will then return the value from the registry which is 'Default String'.


Disclaimer

ClearSCADA 2017 R3