I have a few visuals I want to toggle depending on machine states, which I have setup without any issue. My current problem is that I need to find an expression statement to control visibility when multiple tag states are considered:
Tag 1 = {[default]Internal/HMI_Pump}
Tag 2 = {[default]Internal/Process/Machine Steps/Pump/Status_Ready}
Tag 3 = {[default]Internal/Process/Start Process}
Essentially Tag 1 is triggering the visibility because it's a machine mode. The issue is I need to add a section into the visibility expression to turn off the visibility. I need the visibility to change when the process is complete (Tag 2 enabled), but I want this Tag 2 condition to only be evaluated while Tag 3 is active.
If {[default]Internal/HMI_Pump} is turning it on, what would be the logic to include after to disable the visibility?
It will clarify your thinking and help us no end.
Copy and paste my table into your question to edit. If it doesn't preserve the formatting then select the text and hit the </> button.
The solution is likely to be something of the form,
case(
binEnc({tag1}, {tag2}, {tag3}), // Replace with proper tag paths.
0, False, // I haven't worked out what you actually need here.
1, False,
2, True,
3, True,
4, False,
5, False,
6, True,
7, False,
False
)
1 0 0 Visible - (Initial running state of machine)
1 0 1 Visible - (Secondary process triggered = Tag 3)
1 1 0 Visible - (Initial running state finishes = Tag 2 active)
1 1 1 Invisible - (Initial state running, secondary process triggered, waiting for initial state to complete)
The last line would be the state where the visibility of this component finally is released, and the next component visibility becomes active and is overlayed.
I wouldn't do it this way if it was me, that's far too hard to diagnose. I would be using the logic expression from the result of the karnaugh map, (if it's really that complicated), or otherwise just writing it stepping through logically.
Thanks for this. It's working except under one condition. When Tag 3 is false and Tag 2 comes on, it goes away.. which of these lines should I edit for this?