Toggle group visible

I know this is a simple question so bear with me.

I am trying to make a group visible when a int tag from my PLC equals 2. I tried this but it didn’t work:

if({hmi_SpindleStatus} = 2, {Root Container.WarmingUp.visible} = true, {Root Container.WarmingUp.visible} = false)

What am I doing wrong? What is a good resource for syntax and examples?

So I am assuming you are putting an expression binding in the visible property of your group, it should look something like this:

if({hmi_SpindleStatus}=2, 1, 0)

as long as {hmi_SpindleStatus} is the proper path to your tag.

1 Like

Hi Bellm,

The “=” operator in the expression language cannot be used to assign a value. It is only used to compare if two values are equal.

What you need to do is create an expression binding on the Root Container.WarmingUp.visible property.
Here is an expression that will work:

{hmi_SpindleStatus} = 2

true is returned if {hmi_SpindleStatus} equals 2, otherwise false is returned.