Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

AlarmFilterEditSet

  • Last UpdatedJul 18, 2023
  • 2 minute read

The AlarmFilterEditSet function takes a session handle and a filter expression as parameters. It replaces the current filter session content by the provided expression without any validation. This does not apply to all filters on the list (see AlarmFilterEditCommit).

Syntax

INT AlarmFilterEditSet(INT hSession, STRING FilterCriteria)

hSession:

Session handle for the historical list previously returned by the function AlarmFilterEditOpen.

FilterCriteria:

Filter expression as a string. For example:"(Tag=A) OR (TAG=B)"

See the topic Implement Alarm Filters Using Cicode for more information about filter syntax.

Expression has been extended to allow:

• "REFCAT=XYZ" (this may have an asterisk as the first and/or last character, these are interpreted as wildcards)

• "PAGE=XYZ" (this is an exact literal match only)

What this means is:

• "PAGE=PageXYZ" becomes "EQUIPMENT=…" that includes all the equipment that have "PageXYZ" in the PAGE field in the Equipment table

• "REFCAT=*XYZ*" becomes "EQUIPMENT=…" that includes all the equipment defined in the Equipment References table that matches the supplied pattern and the CATEGORY field in that table. This value MAY contain an asterisk as the first, and or the last character, but the content between any bounding asterisks is treated as literal including an asterisk.

Note: If a requested filter is too complex (for example, it contains too many conditions or too many nested brackets), the filter is cleared (no filter is used). The hardware alarm "Too many alarms in filters" is generated on the client components, and a tracelog error message is logged.

Return Value

0 (zero) if the alarm filter session exists, otherwise an error code is returned.

Example

iHndl = AlarmFilterEditOpen(iAN);
iRet = AlarmFilterEditSet(iHndl,"Tag=Dig*;Category=1;Area=1;");
iRet = AlarmFilterEditAppend(iHndl, "Priority<20");
sRet = AlarmFilterEditFirst(iHndl); // Tag=Dig*;
sRet = AlarmFilterEditNext(iHndl); // Category=1;
sRet = AlarmFilterEditLast(iHndl); // Priority<20;
sRet = AlarmFilterEditPrev(iHndl); // Area=1;
iRet = AlarmFilterEditClose(iHndl);

AlarmFilterEditOpen, AlarmFilterEditClose, AlarmFilterEditAppend

See Also

Alarm Filter Functions

In This Topic
TitleResults for “How to create a CRG?”Also Available in