Showing results 1 to 6 of 6

Thread: alarm status from variable

  1. #1
    Join Date

    Default alarm status from variable


    i'm writing some macro. I have a variable, and i need to know if it's value is alarm or no and if it is alarm if alarm of variable is Acknowledge. I use REMA for variable stati.

  2. #2

    Default Re: alarm status from variable

    could you please explain what your macro should do? zenon is very diverse, maybe there is functionality already build in, which does exactly that what you are trying to achieve in your VB macro

  3. #3
    Join Date

    Default Re: alarm status from variable

    i am trying create some list there will be all signals of power station. It must be very similar to alarm list, but all filter parameters a done by VBA.
    LIST ITEM: identification - stati from REMA - if stati is alarm (TAIP)and background color is red if no (NE)

    You can filter BY:
    Alarm class
    It is alarm or no

    The main difference from alarm list is that this list item don't show in time line, it just show signal state.

  4. #4

    Default Re: alarm status from variable

    which zenon version and which servicepack are you using?

    in zenon 6.22 SP1 the alarm window possibilities have been enhanced, and with zenon 6.50 there will be even more possibilities.

    I don't understand exactly what you mean with "don't show in time line". Do you mean red variable status bar? The position and size of this red line can be configured in the template editor. Also, the status line can be completely disabled.

    You can filter on identification using the picture switch function to the alarm window as well. In this function you can specify which alarms should be displayed (active, non active, acknowledged not ackowledged) and which alarm classes to show and which alarm groups.

    It is also possible to colorize the background color of the line in the alarm window, using the color of the alarm class.

    If you need to filter by identification in VBA and then open the alarm list, it would be the easiest to create the picture switch function to the zenon alarm window the way you would like it to be displayed, and in the runtime modify this function through VBA before it is executed, to set the identification filter you need.

  5. #5
    Join Date

    Default Re: alarm status from variable

    i am using 6.22 sp1 build0 Sprecon v460

    i have created some list using "MSFlexGrid"

    1) i filter variables which is (single point information ) and (double point information )

    Dim zVariables As Variables
    Set zVariables = thisProject.Variables

    Dim kintamieji() As String
    ReDim kintamieji(0 To zVariables.count) ' declares the array variable with the necessary size

    Dim galune As String

    Do While Counter1 <= zVariables.count - 1

    Set kintamsis1 = zVariables.Item(Counter1)

    'atrenkam tinkamus
    If Right(kintamsis1.Name, 4) = ".DRV" And (InStr(kintamsis1.Name, ".T02.DRV") > 0 Or InStr(kintamsis1.Name, ".T31.DRV") > 0) Then

    kintamieji(i) = kintamsis1.Name
    i = i + 1

    End If

    Counter1 = Counter1 + 1


    2) so i whant to put in list

    MSFlexGrid.AddItem -> "identification" --- "rema stati text" ---- "is alarm?" ---- "alarm class" ---- "is acknowledge the last alarm"

    identification --> no problem +
    rema stati --> text i read because i use the same structure in all remas +/-
    is alarm i --> read using "variable.value" and ".isalarm()"
    alarm class --> no problem +

    but i don't know how to get the last alarm item of variable?

  6. #6

    Default Re: alarm status from variable

    You can learn more about the zenon object model from the online help. Take a look at the VBA help in the chapters "AlarmItem" and "AlarmItems".

    However I would recommend using standard functionality, (the standard zenon alarmlist) where this is availabe!

    Please note, that incorrect usage of VBA in the zenon runtime can lead to unexpected behaviour, including lock-ups of the zenon runtime and even crashes of the.

Similar Threads

  1. Normal status (NORM)
    By westbaaam in forum zenon Supervisor
    Replies: 3
    Last Post: 30th September 2009, 23:40
  2. Status variable for alarm areas
    By hicom in forum zenon Supervisor
    Replies: 2
    Last Post: 24th February 2009, 09:56
  3. Alarm Status Line and Alarm List
    By tomaslipa in forum zenon Supervisor
    Replies: 1
    Last Post: 21st January 2009, 12:02
  4. Limiting Alarm-status line to one monitor
    By micko in forum zenon Supervisor
    Replies: 1
    Last Post: 15th September 2008, 13:20
  5. Change variable status
    By brada in forum VBA
    Replies: 5
    Last Post: 13th February 2008, 17:55

Posting Rules

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