Showing results 1 to 3 of 3

Thread: Alarms in RUN-TIME

  1. #1
    Join Date
    07.10.2009
    Posts
    5

    Default Alarms in RUN-TIME

    Hi,
    I have some question about alarms management in run-time only (not editor)
    1. It's possible to get alarm classes list? (read only is enought .. I don't need to set anything)
    2. It's possible to get alarm groups list? (read only is enought ... I don't need to set anything)
    3. It's possible to query historic alarms in any way like it's possible for archives? (Will be enough get alarm list from date to date) (Is it the export function the only way i have to get alarms?..and its runtime dynproperties?)


    I think any of these are possible, but please confirm or suggest if there are some possible workarounds or future developements in progress

    Thanks a lot
    Matteo

  2. #2
    martins Gast

    Default Re: Alarms in RUN-TIME

    Quote Originally Posted by matteo.fabbri View Post
    Hi,
    I have some question about alarms management in run-time only (not editor)
    1. It's possible to get alarm classes list? (read only is enought .. I don't need to set anything)
    2. It's possible to get alarm groups list? (read only is enought ... I don't need to set anything)
    3. It's possible to query historic alarms in any way like it's possible for archives? (Will be enough get alarm list from date to date) (Is it the export function the only way i have to get alarms?..and its runtime dynproperties?)
    hi,

    as far as I know it is not possible to receive a full list of alarm classes or alarm groups that are defined in the project.
    The best solution to this in my opinion is the following:
    Get the alarm classes / groups out in the editor (e.g. MyWorkspace.ActiveDocument.DynProperties("AlarmClasses.Name") ) and save it in a file which you open during runtime start and parse through the entries.
    Another way to do this would be to go through all variables (depends on how many you have) during runtime start and read out the alarm group and alarm class that is linked. Another one would be to generate dummy alarms for each alarm group and alarm class during runtime start and read out the alarm group/class from the AlarmItem.

    Depends on what you want to do in the end

    Regarding the historical alarms:

    you can do this by defining a dummy screen switch function (e.g. name it scrsw) to a screen type AML where you define that you want to use historical alarms and set the number of alarms you want to display.
    In the code then, you access the alarm items by setting the name of the screen switch function as the filter.

    Dim zItem As AlarmItem
    Set zItem = thisProject.Alarm.AlarmItems("scrsw").Item(0)

    would set the first item of historical alarms to the zItem variable.

    Hope I could help,
    best regards

  3. #3
    Join Date
    25.05.2010
    Location
    Dallas, TX
    Posts
    7

    Default Re: Alarms in RUN-TIME

    Quote Originally Posted by matteo.fabbri View Post
    Hi,
    I have some question about alarms management in run-time only (not editor)
    1. It's possible to get alarm classes list? (read only is enought .. I don't need to set anything)
    2. It's possible to get alarm groups list? (read only is enought ... I don't need to set anything)
    3. It's possible to query historic alarms in any way like it's possible for archives? (Will be enough get alarm list from date to date) (Is it the export function the only way i have to get alarms?..and its runtime dynproperties?)


    I think any of these are possible, but please confirm or suggest if there are some possible workarounds or future developements in progress

    Thanks a lot
    Matteo
    Matteo,

    It may be possible to read (read-only) the alarm class information from amlcel.cmp binary file. We had the same need, so we developed a class which contains a method that can read the configuration of the alarm classes and return it as a list.

    Method call example:
    var infos = UseAtYourOwnRisk.AMLCELReaderDemo.GetAlarmClassInf os(zPrj);

    I have attached a zip archive which contains the class in a single .cs file. You should be able to drop the file into your C# project and use it immediately.

    Because the class is static, all you have to do is 1) Include the attached .cs file in your project. 2) Use the method call example I've provided above, where the parameter 'zPrj' is a zenOn.Project object.

    We worked this out manually, by inspecting the contents of the amlcel.cmp file. So, it's important to note that this class may not work with all versions of zenOn. For example, the structure of the amlcel.cmp file may change in future versions.

    Scott
    Attached Files Attached Files

Similar Threads

  1. Time Stamp Issue in Alarms and Events List
    By shikra in forum zenon Energy Edition
    Replies: 1
    Last Post: 4th July 2011, 15:06
  2. how to remove windows elements during run time
    By tanveerali in forum zenon Supervisor
    Replies: 1
    Last Post: 25th May 2011, 23:28
  3. Replies: 0
    Last Post: 23rd March 2010, 04:16
  4. How to have cumulative alarms time in report
    By fabios in forum zenon Supervisor
    Replies: 6
    Last Post: 21st May 2008, 10:08
  5. straton does not run cyclically
    By wolfgangm in forum straton / zenon Logic
    Replies: 0
    Last Post: 7th May 2008, 12:15

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •