Alarm Banner

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
jcjelektro
Posts: 40
Joined: Tue Nov 22, 2011 3:54 am
Location: Gjerlev, Denmark
Contact:

Alarm Banner

Post by jcjelektro »

Hello

Is it possible to make a Alarm banner (With the alarm text included)

- Emil
--
Emil Gundersen
JCJelektro.dk

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Alarm Banner

Post by mark.monroe »

One way is to create a script in the alarm server and then write the alarm text to a tag. Then associate that tag with an AnalogNumeric box on your screen. What ever is in the tag is then displayed.

Code: Select all

    public partial class AlarmServer
    {
		
		void Default_AlarmItem0_AlarmActive(System.Object sender, System.EventArgs e)
		{
			Globals.Tags.Tag1.Value = "My Alarm Text";
		}
		
		void Default_AlarmItem0_AlarmAcknowledge(System.Object sender, System.EventArgs e)
		{
			Globals.Tags.Tag1.Value = "";
		}
    }
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

charlyprouteau
Posts: 33
Joined: Wed Jan 23, 2013 2:01 am

Re: Alarm Banner

Post by charlyprouteau »

To continue this topic : I would like to know how can I write on a tag (string) the last active alarm appears to display it on a "text baneer". Could you help me?

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: Alarm Banner

Post by Edmund »

You can create a banner (that shows the first active alarm).

Add a alarmviewer that you remove the column headers from and set the number of rows to 1 and handle set the filter option to hide normal alarms.

Below is a example I made from the alarm sample included in iX.
Attachments
Alarm_Banner_1.png
Alarm_Banner_1.png (103.5 KiB) Viewed 18340 times
Alarm_Banner_2.png
Alarm_Banner_2.png (106.62 KiB) Viewed 18340 times
Alarm_Banner_3.png
Alarm_Banner_3.png (104.42 KiB) Viewed 18340 times
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

charlyprouteau
Posts: 33
Joined: Wed Jan 23, 2013 2:01 am

Re: Alarm Banner

Post by charlyprouteau »

I tried this solution but I can't modify the background color of the "alarm banneer" and it stays white... And I don't want white...

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: Alarm Banner

Post by Edmund »

Sorry, the first poster just asked for a alarm baner ;)

No there is no way of changing the background color in this version, but from what I have heard from Beijer there will be more options avalible for the alarmviewer in future releases.

Best Reagards
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

charlyprouteau
Posts: 33
Joined: Wed Jan 23, 2013 2:01 am

Re: Alarm Banner

Post by charlyprouteau »

Yes but now, how can i do to have the last alarm appears on a string tag?

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Alarm Banner

Post by mark.monroe »

The below code will write the text "My Alarm Text" when AlarmItem0 becomes active. If you do that for each alarm, then the last active alarm will have its text displayed in Tag1.

Code: Select all

    public partial class AlarmServer
    {
      
      void Default_AlarmItem0_AlarmActive(System.Object sender, System.EventArgs e)
      {
         Globals.Tags.Tag1.Value = "My Alarm Text";
      }
      
      void Default_AlarmItem0_AlarmAcknowledge(System.Object sender, System.EventArgs e)
      {
         Globals.Tags.Tag1.Value = "";
      }
    }
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

charlyprouteau
Posts: 33
Joined: Wed Jan 23, 2013 2:01 am

Re: Alarm Banner

Post by charlyprouteau »

But with this script code, if the first alarm is acknowledge, the string tag will be ' ' whereas the second alarm is active. I just want to read the first active alarm on the alarm viewer objet.

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Alarm Banner

Post by mark.monroe »

You are correct, there can be multiple alarms active, and that is why there is no active alarm tag. You are going to need to create an array and keep track of the alarms and when they are acknowledged or not acknowledged.

You can create a script module with a C# array and populate the array with any/all active alarms. Then when an alarm is acknowledged you will have to remove that item from the array.

You can use the AlarmItem0_AlarmActive and the AlarmItem0_AlarmAcknowledge events to populate/remove the array values.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply