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?
alarm server intialize
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: alarm server intialize
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
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 33
- Joined: Wed Jan 23, 2013 2:01 am
Re: alarm server intialize
Yes but if the alarm is already triggered I can not modify the alarm text... Is a way to initialize alarmserver at startup?
Re: alarm server intialize
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.
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.
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.