Page 1 of 2 1 2 LastLast
Showing results 1 to 10 of 20

Thread: Alarm List

  1. #1
    Join Date
    08.06.2018
    Posts
    12

    Default Alarm List

    Good morning forum, 
    i'm new to zenon Integration.
    I would like to export all alarms from my zenon with an external C# program, i admit that i already search in the forum for a solution.

    This is my code:

    zenonApp = new zenOn.Application();
    zenonApp = GetObj(1, "zenOn.Application");
    projects = (zenOn.Projects)zenonApp.Projects();
    prj = projects.Item(0);
    alarm = prj.Alarm();
    al_items = alarm.AlarmItems("*");

    al_items.Count always return 0, why? 
    Am i doing something wrong ?
    Or am i searching in the wrong method?

    Thanks in advance 

  2. #2
    Join Date
    15.11.2016
    Posts
    94

    Default Re: Alarm List

    Hello,

    The method should be correct.
    See: http://onlinehelp.copadata.com/help/760/com/html/Alarm-Methods-AlarmItems.htm

    Maybe the Projects.Item(0) is a Global-Project and thus does not have Alarms?

    Try with projects.Item("PROJECTNAME");

    Please note that you can easily export Alarms in zenon using the zenon function "Export AML/CEL".

  3. #3
    Join Date
    08.06.2018
    Posts
    12

    Default Re: Alarm List

    Quote Originally Posted by georgk View Post
    Hello,

    The method should be correct.
    See: http://onlinehelp.copadata.com/help/760/com/html/Alarm-Methods-AlarmItems.htm

    Maybe the Projects.Item(0) is a Global-Project and thus does not have Alarms?

    Try with projects.Item("PROJECTNAME");

    Please note that you can easily export Alarms in zenon using the zenon function "Export AML/CEL".

    Hi georgk, thanks for your quick reply.

    I did this try, but i get the same result.
    I printed project.IsGlobal and it returns false.

    If alarms are already read, do i find it in alarmitems or in another class? Maybe Archive ? 

    I didn't mention it, but i'm doing these tests with zenon runtime opened.


  4. #4
    Join Date
    15.11.2016
    Posts
    94

    Default Re: Alarm List

    I tested this and it worked.

    See attached Code.

    Hope this helps.
    Attached Files Attached Files

  5. #5
    Join Date
    08.06.2018
    Posts
    12

    Default Re: Alarm List

    Quote Originally Posted by georgk View Post
    I tested this and it worked.

    See attached Code.

    Hope this helps.

    This code also works, but items count returns 0 alarms, but as you can see in my attachment, alarms are present.


    Attached Thumbnails Attached Thumbnails alarms.png  

  6. #6
    Join Date
    10.12.2007
    Posts
    177

    Default AW: Alarm List

    I think the standard filter AlarmItems("*") only returns alarms wich are still in the ringbuffer. In the screenshot i can only find alarms which are already gone (=historic). Therefore you may need different Filtersettings than "*".

  7. #7
    Join Date
    08.06.2018
    Posts
    12

    Default Re: AW: Alarm List

    Quote Originally Posted by mst View Post
    I think the standard filter AlarmItems("*") only returns alarms wich are still in the ringbuffer. In the screenshot i can only find alarms which are already gone (=historic). Therefore you may need different Filtersettings than "*".

    Thank you for your reply, where can i find these filter types ? 

  8. #8
    Join Date
    10.12.2007
    Posts
    177

    Default AW: Alarm List

    Phew, good question...
    In help (v7.60) it says "...AlarmItems(String strFilter) As AlarmItems.... The filtering is not implemented at this time. For later use...."
    Maybe this isn't possible until now...

  9. #9
    Join Date
    28.02.2013
    Posts
    118

    Default Re: AW: Alarm List

    Hello,

    can we go one step back?
    Why do you want to access historical alarms via the API?
    This is quite slow and will also slow the zenon runtime down.

    I suggest to use a zenon standard function to exoprt the alarms to a file and go on using this file within your application.
    It is also possible to trigger the export via the API if needed.

    Best regards,
    Felix

  10. #10
    Join Date
    08.06.2018
    Posts
    12

    Default Re: AW: Alarm List

    Quote Originally Posted by felixst View Post
    Hello,



    can we go one step back?

    Why do you want to access historical alarms via the API?

    This is quite slow and will also slow the zenon runtime down.



    I suggest to use a zenon standard function to exoprt the alarms to a file and go on using this file within your application.

    It is also possible to trigger the export via the API if needed.



    Best regards,

    Felix

    The objective is to avoid manual operations, so i would like to implement something that export Alarms.

    It is also possible to trigger the export via the API if needed.
    Can you please tell me more about this?
    Thank you in advance

Similar Threads

  1. Time format in Event list & Alarm list
    By Mustafa.SA in forum zenon Energy Edition
    Replies: 2
    Last Post: 13th March 2018, 22:03
  2. Time format in Event list & Alarm list
    By Mustafa.SA in forum zenon Supervisor
    Replies: 2
    Last Post: 13th March 2018, 22:03
  3. Alarm doesn't appear at alarm Message List
    By marco.naccini@goriziane.it in forum zenon Supervisor
    Replies: 3
    Last Post: 19th January 2018, 14:38
  4. Replies: 10
    Last Post: 20th October 2013, 23:53
  5. Problems with alarm list and alarm time
    By dario in forum zenon Supervisor
    Replies: 4
    Last Post: 9th November 2012, 13:52

Posting Rules

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