Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

Close
Important Announcement: WELCOME to the new Schneider Electric Community! Community is now no longer part of Exchange, and is now rebranded under se.com. If you have any bookmarks and links saved, we request you to update them to ensure that you continue accessing our community from this new location. For any issues that you might encounter as part of this change, please reach out to SchneiderCommunity.Support@se.com, and the team will help to get your issues resolved.
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
82501members
350088posts

Cicode Function AlarmSetInfo

Industry Automation and Control Forum

This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.

bprobertson
Ensign
Ensign
0 Likes
1
1056

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.

1 Reply 1
RobertSanders
Lieutenant Lieutenant
Lieutenant
0 Likes
0
1013

Re: Cicode Function AlarmSetInfo

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 

 

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);

 

Regards

 

Rob