New in the Community? Get started here

Schneider Electric Exchange Community

Discuss and solve problems in energy management and automation. Join conversations and share insights on products and solutions. Co-innovate and collaborate with a global network of peers.

Register Now
Geo SCADA Expert Forum
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Lt. Commander

[import] Filtered version of Alarm State and Severity on CGroup

>>Message imported from previous forum - Category:ClearSCADA Software<<
User: AaronJust, originally posted: 2019-02-06 04:55:29 Id:361
In the ClearSCADA database, objects of type CGroup have data fields AlarmSeverity and AlarmState - which aggregate the alarm severity and states of ****all**** children of the group.

I would like to do something similar, only the result is based on only ****some**** children of the group (i.e. only the alarm severity and state of children matching a certain criteria).

I can generate logic that achieves what I want (i.e. query all database objects matching my criteria, and analyse AlarmSeverity and AlarmState as I require, saving the result to an internal point), but I don't think that's ideal to use as an animation for 200+ different groups.

Is there a way (e.g. custom dynamic metadata, etc.) where this can be calculated on a CGroup which could then be accessible as an OPC Tag in an expression?


Reply User: dmercer, posted: 2019-02-06 21:59:06
It is feasible to create a custom metadata property for CGroup and then use a structured text program to set that value for each group where it is required. These are accessable like any other OPC tag. You 'll have to do some testing on how it effects the performance of the server.


Reply User: BevanWeiss, posted: 2019-02-07 00:41:03
Doing SQL from within Logic is frowned upon, and can cause DB performance issues.
The 'ideal' performance-wise method would be to have a set of Calculation Points with each sub-point of interest's AlarmSeverity/AlarmState referenced in the expression so that the calculation only triggers on change.
But this would be horrible from a configuration perspective.
It would almost border on custom driver territory, which would register for notifications on certain points / groups and then update some custom metadata as required. But it would be painful to do what you want all the same...


Reply User: adamwoodland, posted: 2019-02-07 02:24:53
Few other suggestions. Could use the alarm summary table somehow, but it is file based so be careful with that (i.e. with logic as per Bevan's comment)

Could do it with alarm redirection on the root group, i.e. event driven, and trigger some logic that perhaps write the alarm to some datatable as a scratch pad type thing, and then process that somehow.


Reply User: hardin4019, posted: 2019-02-27 16:19:06
Not sure if this is resolved, or if my solution is helpful, but I have made a custom alarm screen for a client at their request. The alarm screen is split into 3 different groups of alarms, those with a "Critical Severity", second those with "Medium" or "High" severity, and the third has "Alert" and "Low" severity. Each list is the "Alarm List" type.

Just using the Alarm List doesn't give you a count of Uncleared / Unacknowledged, or Uncleared / Acknowledged alarms the way the built in Alarm banner does. So I made two ODBC Queries to give me a count for each Severity grouping and display those numbers along side the Alarm List to roughly replicate the Alarm Banner.

The query looks like this;

Select
Count(ID) AS "Uncleared Unack Count"
From
CAlarm
Where
( State between 3 and 4 ) and ( Severity between 4 and 11)

Then I setup an ODBC point looking at this query, row 1, column 1. The result is the number of Uncleared and Unacknowledged alarms with a severity of 5 (alert) and 10 (Low).

Same query and ODBC point setup used for Uncleared, but acknowledged with minor changes in State and column name.

Select
Count(ID) AS "Uncleared"
From
CAlarm
Where
( State between 2 and 3 ) and ( Severity between 4 and 11)

The Query WHERE section could be used to narrow the results to only specific sub folders or alarm conditions.