• Not Answered

Write Alarm count in control module parameter

Hi is there any way to write Total system alarm count in a control module, as i have to trend the alarm counts?

7 Replies

  • I would not recommend this.  First it adds loading to each an every module, which effectively takes away capacity to perform the primary function of the controller, and that is to control.  You have to consider how this information persists and what happens if the counter is somehow reset?  Hmm.  It's getting more complicated already.

    Alarms are recorded in the event chronicle.  You could querry the database for the count on alarm messages that have a state of ACT/UNACK, indicating a new instance of the alarm.  SQL queries can return counts. You'd would have some data mining to do, but you would not have to modify any control modules.

    I'd recommend you get the DetlaV Analyze product.  It queries the A&E database and shows you isntantly all the alarm counts for Process, Device and hardware alarms/alerts, and group them by user, area, site etc, and is designed to give you the information on how your alarm system is performing.  

    If you want to count the alarm activations, use a Positive edge trigger and a count block.  Read the alarm state (HI.ACT) and feed that to the PDET, then on to COUNTER.  you'll increment by one each time the alarm goes TRUE.  But I don't recommend this approach.

    Andre Dicaire

  • This will be difficult as the Alarms are either Workstation/Area/User based at the consoles or control module based in the controller and need to be counted for each alarm on all CMs and then summed with all controller results.

    I would recommend doing as Andre has suggested but another option is If you have a console that has all areas assigned to it, User Logged in has all areas assigned, and DeltaV Operate is always open, you could write a VB script on custom toolbar or alarm banner to write a value to a control module when the value changes and then the control module value could be trended.

    Use DVSYS.THISUSER/ALMCNT.F_CV to show all alarms or DVSYS.THISUSER/AREAALMCNT[xxx].F_CV (xxx = 0 - 249) to find alarms by individual area. To find the number associated with the areas, the easiest way is to open the AlarmFilter display and they are listed in order 0, 1, 2, etc.

    Obviously if this station is off, User not logged in or Area Filters turned off, your number will be incorrect. To get the accurate number would requiire the suggestion of putting logic in each module and summed somewhere which is taking away from your control functions. The more elegant, foolproof and correct way is as Andre suggested - use SQL of Alarms and Events or DetlaV Analyze.

  • In reply to Matt Stoner:

    hi Matt this is what i have done before , I used Thisuser/almcnt and displayed the values and my problem is to write those values in to control module i tried few VB codes within my knowledge but my code is not executing i was looking for a code which could write variable to variable in the VB

  • In reply to bobgally:

    The below Sample Code, I think this will work =), assumes that there is a Picture variable named pn_AlarmCount defined on the picture your are putting this logic into and the CurrentValue is animated to "DVSYS.THISUSER/ALMCNT.F_CV".

    I also added a check for Computer Name so you could put into whatever picture you are using and it rename common among all your stations. I commented out a line so you could see what it would look like if you used a time out function on your display instead of the variable. You may have to put more error checking for the frsWriteValue so you don't continue to get error messages if a user isn't logged in.

    Private Sub pn_AlarmCount_OnChange()

    Dim intAlarmCount As Integer

    Dim lngError As Long

    On Error GoTo ErrorHandler

       If (StrComp(frsGetComputerName, "NODENAME", vbTextCompare) = 0) Then

    '        intAlarmCount = frsReadValue("DVSYS.THISUSER/ALMCNT.F_CV", lngError)

           intAlarmCount = Me.pn_AlarmCount.CurrentValue

           frsWriteValue CStr(intAlarmCount), "DVSYS.MODULE_TAG/PARAMETER.F_CV"

       End If

       Exit Sub

    ErrorHandler:

       frsHandleError

    End Sub

  • In reply to Matt Stoner:

    One comment to use of DVOperate for this. It will be better to create a new scheduler to implement this and leave alarmbanner and toolbar untouched.

    It will be possible to define where this scheduler will be running (may be only in the workstations storing historical data??)

  • In reply to Matt Stoner:

    Hi,

    how do i remove this from PHV? I can just simply assign new area and not assign it from alarm and event, but i don't think an event will not allow write to a control module

    will this prevent from logging if I filtered this from DeltaV Operate Area Filter?

    (sorry i have yet to test it)

    Thanks.