News:

  • September 26, 2026, 07:35:38 AM

Login with username, password and session length

Author Topic: ALDEV Function  (Read 7911 times)

RBPLC

  • Hero Member
  • *****
  • Posts: 586
ALDEV Function
« on: December 08, 2021, 02:21:50 PM »
Is the attached allowed? When OnBit is on, ALDEV no longer seems to evaluate.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: ALDEV Function
« Reply #1 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.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: ALDEV Function
« Reply #2 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.

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: ALDEV Function
« Reply #3 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.
« Last Edit: December 08, 2021, 03:59:56 PM by RBPLC »