Specify a Trip Sequence for an SQL Export Object
You can use an Object trip sequence to specify information about the SQL Export database item itself. This type of trip sequence can be used to include information on:
- Any of the SQL Export item’s properties in the Geo SCADA Expert database (such as the SQL Export item’s Id)
- Any property of any database item that the SQL Export references directly (such as properties of the SQL Export item’s Parent Group)
- Any property of any database item that the SQL Export references indirectly (such as the SQL Export item’s Grandparent Group (the Group in which the SQL Export item’s Parent Group is located)).
To specify the trip sequence for a SQL Export Object, you enter the trip code:
%O<field>[.<field>][;<format>]%
where:
the first <field> is one of the following:
- A Reference field—A field that provides a link to an associated database item, such as an SQL Export’s parent Group (the database Group in which the SQL Export item is located).
With a Reference field, you can optionally specify a further <field> in the referenced database item.
- An Aggregate field—A field that provides a link to an associated ‘aggregate’, or tab on a database item’s configuration Form. For instance, the AlarmRedirection aggregate on the SQL Export Form.
With an Aggregate field, you can optionally specify a further <field> in the referenced aggregate.
- Any Configuration or Data field associated with the SQL Export database item, or a database item that the SQL Export item references.
If <field> is a reference field or an aggregate field, then you can include further <field>(s) in the trip sequence, in order to specify further database item(s), that are themselves referenced by the database item listed in the preceding <field>.
Use the final <field> in the trip sequence to specify the required Configuration or Data field (OPC property) in the database item or aggregate that is specified in the preceding <field>.
<format> is optional and can be used to control the appearance of the information that Geo SCADA Expert substitutes in place of the Object’s trip sequence. You only need to specify a format if:
- The format is to differ from the default for the type of field. (For instance, with a trip sequence that queries a String field, Geo SCADA Expert will supply the value of that field, using whatever capitalization that applies to the string’s value, unless you specify a different format, such as > to force the whole string to appear in upper case.)
or if:
- The final field is a Time field for which the default format includes a colon (:) (for instance, to produce a time in the form 12:30:00)
and the trip sequence is:
- Used to specify a file name (as a colon is not a valid character for a file name)
or:
- Used elsewhere, where similar restrictions exist (for instance, if used to specify an ODBC Table name).
- Used to specify a file name (as a colon is not a valid character for a file name)
The custom formats that you can specify for an Object field are the standard custom value formats that are supported by Geo SCADA Expert (see Date and Time Syntax, see Numeric Syntax, see Text String Syntax, and see Boolean Syntax—all are sections in the Geo SCADA Expert Guide to Core Configuration).
You can ascertain the configuration, data, reference, and aggregate fields that you can specify using an Object trip sequence, along with an indication of each field’s type, using either of the following:
- The database Schema (see Working with the Database Schema in the Geo SCADA Expert Guide to the Database)
- The OPC Data Bar.
You can also click on the relevant configuration field on a Form and observe its name and type in the Status Bar. (Remember that a field’s name often differs from the label that is shown for that field on the configuration Form. (The label is displayed in the language that is associated with the logged on user’s specified Locale.) It is a field’s name, rather than its label, that has to be specified in any Object trip sequence.) Data fields (and some Configuration fields, such as ParentGroupName) are not displayed on configuration Forms—use the database Schema or OPC Data Bar to ascertain information about such fields.
Example:
%OParentGroupId.Name%
(Provides the name of the Group or Group Instance in which the SQL Export is located. For instance, ‘Zone 1’, for an SQL Export that is located in the Group ‘Zone 1’.)
%OParentGroupId.ParentGroupId.FullName%
(Provides the full name (including the path) of the SQL Export’s ‘grandparent’ Group or Group Instance—the Group or Group Instance in which the SQL Export’s Group or Group Instance is located. For instance, ‘My Database.Eastern Region’, for an SQL Export that is located in the Group ‘Zone 1’, which itself is within the Group ‘Eastern Region’. (With ‘Eastern Region’ being in the Group ‘My Database’.))
%OAlarmRedirection.Trigger1%
(Provides the value of the Trigger1 property. ‘AlarmRedirection’ is the name of the field that links to the SQL Export’s Alarm Redirection aggregate. Trigger1 defines the first Trigger State on the Alarm Redirection aggregate. (On the Redirection tab, ‘Trigger State’ is the label that identifies the column of trigger state fields—the label is displayed in the language that is associated with the logged on user’s specified Locale.) This trip sequence can only be used if an SQL Export has Alarm Redirection enabled.)
%OId;000000%
(Provides the SQL Export item’s Id—the number that uniquely identifies the SQL Export item in the Geo SCADA Expert database. The 00000
formatting is included to force the Id to be displayed as a series of five digits (if the Id is smaller then five digits, it will be preceded by one or more zeros).)