Alert action

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
8 posts • Page 1 of 1
Dag-Are.Trydal@nov.com
Posts:37
Joined: Fri Feb 26, 2016 11:52 am

Alert action

Post by Dag-Are.Trydal@nov.com »

I have created both _alert_class and _alert_hdl for a bool signal. Also an alert action is defined for "No alert", "CAME/unack." and "CAME/ack.".

I cannot seem to get any of these alert actions to execute.

Example:
main(string dp, time t, int i, time cameTime)//, string text, bool value)
{
DebugN("Alert action - No alert");
}

Are there any settings I need to remember to activate to get these actions to be executed?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Alert action

Post by mkoller »

Start with a very simple example. I did that now by changing the existing System1:alert.:_alert_class and I used the DPE System1:ExampleDP_AlertHdl1.
Everything works nicely

Dag-Are.Trydal@nov.com
Posts:37
Joined: Fri Feb 26, 2016 11:52 am

Re: Alert action

Post by Dag-Are.Trydal@nov.com »

I still cannot got this to work. Will include a screenshot to make things more visible.

As you can see I have included an action in all three states. This action shuld print to the log viewer using "DebugN". But no text appears when I trigger the alarm by setting the value to "TRUE".

Image https://www.winccoa.com/fileadmin/image ... _class.png Image
Attachments
_alert_class.png
_alert_class.png

Dag-Are.Trydal@nov.com
Posts:37
Joined: Fri Feb 26, 2016 11:52 am

Re: Alert action

Post by Dag-Are.Trydal@nov.com »


mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Alert action

Post by mkoller »

Are you sure you are using exactly THIS alert class in your alert_hdl config ?
I'm pretty sure it's not.
Try changing the alert_class config on the corresponding _AlertClass DP

Dag-Are.Trydal@nov.com
Posts:37
Joined: Fri Feb 26, 2016 11:52 am

Re: Alert action

Post by Dag-Are.Trydal@nov.com »

Now I put the alert action in alert (DP of type _AlertClass) and it works. The alert action is executed when I change ExampleDP_AlertHdl1.

I have two questions still.

1. Where is the connection between alert and ExampleDP_AlertHdl1? What tells the system that changes in ExampleDP_AlertHdl1 to be handled with the actions described in alert.

2. How can different DPs be handled with different actions? Why is not the actions defined in a specific DPs _alert_class executed?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Alert action

Post by mkoller »

ad 1)In the alert_hdl config you define which alert_class to use. The ones which are shown in the combobox are all _alert_class configs put on the internal DPs of DP-Type _AlertClass. If you want to use any other alert_class config, you need to specify the DPE on which this config is on, in your case it would be the ExampleDP_AlertHdl1 DPE itself (use the button to the right of the combobox in the alert_hdl Para panel).

ad 2) the actions are specified on the alert_class. You can either create a script, which checks from which alert_hdl DPE it was called and do different things, or you need to use different alert_class configs which then have different scripts attached.

Dag-Are.Trydal@nov.com
Posts:37
Joined: Fri Feb 26, 2016 11:52 am

Re: Alert action

Post by Dag-Are.Trydal@nov.com »

Thanks for the clarification.

8 posts • Page 1 of 1