Always false even when the conditions are met

Hey there, i am trying to figure out this problem. I have the following IF statement (see picture), but it keeps sending false even when the conditions are met. The TagPaht parameter is [default]Rockwell PLC1 slot 11/Program:BP_Tank_vullen/F56.

Close, you need &&, instead of &.

The single & is a bitwise AND operator, the double && is a logical opeator.

1 Like

Guess he also needs tag(tagpath), as he now is trying to check if a string is 1.

1 Like

True. But I would put that in a separate custom property so it can be an indirect binding rather than using the tag() expression function as that will be more performant


Much better performance.

If I need to indirect something I will add a custom property somewhere, indirect bind to that and then bind to the property in an expression or script.

I think it's always best to avoid the tag function entirely.