Hysteresis value.

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
2 posts • Page 1 of 1
AGorbatykh
Posts:59
Joined: Thu Dec 17, 2015 1:01 pm

Hysteresis value.

Post by AGorbatykh »

Hello.
I tried to set hysteresis to alert andler from script, like this:

Code: Select all

dpSetWait( dp+".Value:_alert_hdl.4._u_hyst_limit",(float) (Val1 - hyst),
            dp+".Value:_alert_hdl.3._u_hyst_limit", (float) (Val2 - hyst),
            dp+".Value:_alert_hdl.2._u_hyst_limit", (float) (Val3 - hyst),
            dp+".Value:_alert_hdl.1._u_hyst_limit", (float) (Val4 - hyst));
But I cannot set any float value, only integer. For example, when I use hyst = 1.8, I set 1, etc.

How can I set float values for hysteresis from script&

nmnogueira
Posts:125
Joined: Thu May 05, 2011 12:59 pm

Re: Hysteresis value.

Post by nmnogueira »

Please confirm that Val1, Val2, Val3, Val4 are of type float, or else hyst will be cast to int before performing the subtraction, and only afterwards to float.
Or you can try with:

Code: Select all

dpSetWait( dp+".Value:_alert_hdl.4._u_hyst_limit", ( (float) Val1 - hyst),
                dp+".Value:_alert_hdl.3._u_hyst_limit", ( (float) Val2 - hyst),
                dp+".Value:_alert_hdl.2._u_hyst_limit", ( (float) Val3 - hyst),
                dp+".Value:_alert_hdl.1._u_hyst_limit", ( (float) Val4 - hyst));

2 posts • Page 1 of 1