Syntax of Search Key Tags

NOTE: Tags do not apply to Template expressions, instead you use Template Parameters.

The syntax for a search key tag in an expression is similar to that for database items. The only difference is that <Item> is replaced by <Search Key>.

For referencing a database item:

"<Search Key>"

"<Search Key>.<Property>"

"<Search Key>.<Database Aggregate>"

"<Search Key>.<Database Aggregate>.<Property>"

These work in the same way as the Syntax of OPC Property Tags except that the <Search Key> replaces the <Item>.

Example 1:

"100.CurrentState"

This is a reference to the CurrentState property of the point that has 100 as a search key value.

For calling a method:

"<Search Key>.<Method>( <Argument1>, <Argument2> ... )"

"<Search Key>.<Database Aggregate>.<Method>( <Argument1>, <Argument2> ... )"

These work in the same way as the Method Tags except that the <Search Key> replaces the <Item>.

Example 2:

"100.GetForecastCount()" calls the GetForecastCount method of the forecast item that has 100 as its search key.

For referencing a historic tag:

"<Search Key>.<Database Aggregate>;<OPC Historic Algorithm>;<Start Time>;<Interval>"

"<Search Key>;<OPC Historic Algorithm>;<Start_Date>;<Interval>"

These work in the same way as the Syntax of an OPC Historic Tag except that the <Search Key> replaces the <Item>.

Example 3:

"3214.Forecast1;Max;D;1D" is a reference to the maximum value since the start of the current day for the Forecast item that has 3214 as a search key value. The maximum value is calculated from the values stored in the Forecast1 aggregate for the forecast item.

For referencing a historic calculation tag:

"<Search Key>.<Database Aggregate>:<Offset>:<Search Range>:<Maximum Search Range>"

"<Search Key>:<Offset>:<Search Range>:<Maximum Search Range>"

These work in the same way as the syntaxes in Syntax of a Historic Calculation Tag except that the <Search Key> replaces the <Item>.

Example 4:

"1121:-5M:1H:6H" is a reference to a historic calculation tag where 1121 is a search key value for the source point, -5M is the offset, 1H is the search range and 6H is the maximum search range.


Disclaimer

Geo SCADA Expert 2019