Quick Logic Issue in PLEG

I’ve gone through various permutations of this and can’t seem to get it to evaluate correctly. I am using 5 PLTS switches as a state engine (have been meaning to rewrite this using state variables, but it has been working great so have not bothered…) At any given time one PLTS should always be “On”.

This works great, except for at times I run into a situation where everything goes into an off state.

My attempted solution was to simply turn the default PLTS back on if this is detected.

However, having trouble getting PLEG to see that the PLTS are all off.

If A, B, C, D, and E are all true, then A and B and C and D and E should also be true.

Screen shot of status is attached.

Try it without all the parenthesis … let me know …

Richard,

Thanks for the reply… After I posted I realized you would probably say this…

Without parenthesis was my first attempt. I also tried using all the inputs in the expression before I created conditions for each input. I like less lines…

I added the parenthesis and additional conditions later thinking it may force an evaluation of the expression, but it made no difference either way.

Thanks!

PD

I do not see any problem …
Try building the expression up a couple terms at a time … and see where it fails.
The only thing I can think of is some invisible character in the expression.

Just following up… I restored a backup from before troubleshooting and now the following expression works, which is the one that I had put in initially. After one minute of all off the initialize function triggers and all is well:

LRAllOff = !LRS1 and !LRS2 and !LRS3 and !LRS4 and !LRSA
LRInit =LRAllOff and (LRAllOff;NOW>1:00)

???

Anyway, thanks for the help.

Cheers!

PD