This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-04-2412:12 AM
Cicode Function AlarmSetInfo
Hi,
(Citect version: v8.10.0.2086)
I'm currently using AlarmSetInfo (INT AN, INT Type, STRING Value) to apply a priority filter using the following code:
FUNCTION AlarmFilteringToggleShowingEvents (INT iAN, STRING sCluster)
INT hGrp = GrpOpen("Alarm_Group", 0);
IF hGrp = AlarmGetInfo (iAN, 7, sCluster) THEN
AlarmSetInfo(iAN, 8, 1);
AlarmSetInfo(iAN, 7, 0);
ELSE
AlarmSetInfo(iAN, 8, 1);
AlarmSetInfo(iAN, 7, hGrp);
END;
END
Where "Alarm_Group" is a defined group of priorities.
The issue that I am having is that when this function is called it clears all other filters that are already applied to the alarm table. For example it clears the equipment filter that is applied.
Why does filtering by priority affect the equipment filter?
There is no information in the help for the AlarmSetInfo function that states that all currently applied filters will be removed when using this function.
It would make sense that all current filters are overriden if I was using AlarmFilterEditSet but this is not the case.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-1311:13 AM
You are correct with your assumption the function AlarmSetInfo will overwrite other filters set by AlarmSetInfo. Its better to use the Alarm Filter Functions
The following is a copy from the help for AlarmFilterEditSet function