alarm server intialize

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
charlyprouteau
Posts: 33
Joined: Wed Jan 23, 2013 2:01 am

alarm server intialize

Post by charlyprouteau »

Hello,
I've developped an application on a TA150 with no text programmed in "normal"mode. I mean directly on the by alarm server.

The alarm texts are written in alarmserver scrip as :
Globals.AlarmServer.Alarm1.Text = "alarm 01";
But sometimes, at the application restart, alarm texts are empty.
How can I do to initialize my alarm server and to have always alarm texts programmed by my alarmserver scipt?

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

Re: alarm server intialize

Post by mark.monroe »

If you want to change the alarm text at runtime you need to call your code to set the alarm text when the unit first starts up. You can use the screen open event on your startup screen to do that.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

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

Re: alarm server intialize

Post by charlyprouteau »

Yes but if the alarm is already triggered I can not modify the alarm text... Is a way to initialize alarmserver at startup?

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

Re: alarm server intialize

Post by Edmund »

Try set the texts from a scriptmodule and the created function.

Below is a scriptmodule called AlarmServerInitialize, when it´s created (at startup) it sets the alarmtext for alarm1.

Code: Select all

namespace Neo.ApplicationFramework.Generated
{
    using System.Windows.Forms;
    using System;
    using System.Drawing;
    using Neo.ApplicationFramework.Tools;
    using Neo.ApplicationFramework.Common.Graphics.Logic;
    using Neo.ApplicationFramework.Controls;
    using Neo.ApplicationFramework.Interfaces;
    
    
    public partial class AlarmServerInitialize
    {
		/// <summary>
		/// Constructor for AlarmServerInitialize
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <returns></returns>
		void AlarmServerInitialize_Created(System.Object sender, System.EventArgs e)
		{
			Globals.AlarmServer.Default_Alarm1.Text = "Whatever";
		}
    }
}

NOTE!
The created function was not fired in previous version of iX (before 2.0), so if you put code in the created function i iX 1.3 nothing will happen.
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

Post Reply