runScript in Expression tag

Hey. We are trying to display the connection state of our AB PLC’s and the only ones we have an issue with is the V24 PLC’s because we need to use the Logix Driver which doesn’t give us a diagnostics file.

So, I am trying to use the runScript(“system.tag.read(‘Sawline/Status’).quality.isGood()”) attached to a boolean expression tag. It keeps giving me evaluation error. I ran the same line of scripting in the Script Console and is returns True. I have tried with and without polling with same result.

Sawline/Status is just an arbitrary OPC tag from that PLC.

If I use the tag path [~]Sawline/Status, it evaluates fine, but gives False quality even though quality is Good.

Any ideas? Thanks

Try a boolean expression tag with this expression:

{[~]Sawline/Status.Quality}=192

192 is the numeric value for good quality.

Thank you. Didn’t know I could reference the quality directly from expression tag.

In the tag chooser thing when you’re building the expression, you can expand the tag and select any of its properties.