How to change alert class in alert_hdl config using dpSet()?

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
NFedorenko
Posts:45
Joined: Wed Jun 15, 2016 5:41 pm

How to change alert class in alert_hdl config using dpSet()?

Post by NFedorenko »

Hello to all!

I got some problem with new patch, such as my old code doesn't work.
I need to change alert class in _alert_hdl of dpe in ctrl script.

To get current alert class (AC) i use dpGet():

Code: Select all

anytype c;
dpGet(DPS + ":_alert_hdl.._class",c);
DebugN(c);
The result is:

Code: Select all

System1:BAC0_. (Type: 0 Sys: 55 Dp: 48140 El: 1 : 0..0)
To set new AC I used

Code: Select all

dpSet(DPS + ":_alert_hdl.2._class",COMBO_BOX1.text())
COMBO_BOX1.text() value is "System1:S7_AC"

But it doesn't work now.

So how to change alert class in alert_hdl config using dpSet()?
Please help =)

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: How to change alert class in alert_hdl config using dpSet()?

Post by leoknipp »

Maybe the problem is the missing "." at the end of the datapoint name for the alert class datapoint.

Best Regards
Leopold Knipp
Senior Support Specialist

NFedorenko
Posts:45
Joined: Wed Jun 15, 2016 5:41 pm

Re: How to change alert class in alert_hdl config using dpSet()?

Post by NFedorenko »

Ah!
That's true!
Thank you, Leopold!

3 posts • Page 1 of 1