Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on December 08, 2021, 02:21:50 PM

Title: ALDEV Function
Post by: RBPLC on December 08, 2021, 02:21:50 PM
Is the attached allowed? When OnBit is on, ALDEV no longer seems to evaluate.
Title: Re: ALDEV Function
Post by: franji1 on December 08, 2021, 03:01:03 PM
Is the attached allowed? When OnBit is on, ALDEV no longer seems to evaluate.

I would think the first one would evalulate and the 2nd one would do nothing.  But the 2nd one may be turning off the bits when it does NOT have power flow.
Title: Re: ALDEV Function
Post by: franji1 on December 08, 2021, 03:07:38 PM
I would think the first one would evalulate and the 2nd one would do nothing.  But the 2nd one may be turning off the bits when it does NOT have power flow.

Nope.  When it does NOT have power, it turns OFF the Alarm bits.  Hence, the 2nd one "always" wins, regardless of whether OnBit is ON or OFF.  So when when OnBit is ON, the 2nd one does NOT have power, so it turns the alarm bits OFF.
Title: Re: ALDEV Function
Post by: RBPLC on December 08, 2021, 03:54:31 PM
I would think the first one would evalulate and the 2nd one would do nothing.  But the 2nd one may be turning off the bits when it does NOT have power flow.

Nope.  When it does NOT have power, it turns OFF the Alarm bits.  Hence, the 2nd one "always" wins, regardless of whether OnBit is ON or OFF.  So when when OnBit is ON, the 2nd one does NOT have power, so it turns the alarm bits OFF.

"Nope.  When it does NOT have power, it turns OFF the Alarm bits.  Hence, the 2nd one "always" wins, regardless of whether OnBit is ON or OFF.  So when when OnBit is ON, the 2nd one does NOT have power, so it turns the alarm bits OFF."

This is the behavior I was seeing. In my mind this doesn't jive with how instructions would normally behave. If no changes are made to the ALDEV function, I recommend adding some verbiage to the help file to explain this behavior. Took me a while to figure out what was going on.

As an additional question, are the positive and negative alarm bits associated with the input? In this case rTemp. This appears to be the case as I can use multiple ALDEV functions as long as the input is different.