If statement with more than 1 true and false return

Below expression changes from grey to green if either are true.

I need to also show from grey to red w/ blink if either of two other tags are true.

if ({[default]Area1 Tags/RMWCAM004f/PV} = 1 || {[default]Area1 Tags/RMWCAM004r/PV} = 1, COLOR (60,154,60,255), COLOR (144,144,144,255))

Consider using the binEnc expression: binEnc - Ignition User Manual 8.1 - Ignition Documentation and then tie the ensuing integer to a style customizer on the object

2 Likes

You can nest if statements, like

if (a, blue,
    if (b, red,
        black
    )
)

This works well enough for simple cases but at some point you might want to look into something else than expression’s if

Where you mention blinking, to do that though an expression, you would need something else that cycles at the rate you want to blink. You can do that with another expression tag that you tie into your binEnc that @bschroeder mentioned. The other expression could be as simple as something like(one second pulse):

getSecond(now())%2

@JamesUalto, there’s a </> code formatting button on the editor toolbar that renders your code readable and preserves linebreaks and indentation. You can edit your question to fix it.