OPC tag that's in a Expression tag using case

I have an string expression tag that has a lot of inserted OPC tag using a case function, something like this in the expression.

case({[default]Seq100},
1, “IDLE / GROUND STATE”,
40, “MOTORS RUNNING”,
50, “SYSTEM FILL INITIATED”,
1000, “CHECK START UP”,
1105, concat(“START UP - WAITING [”, {[.]Seq_Time/T1105_Minutes},"min "),
1106, “START UP - INCREASE FLOW TO 100%”,
1107, concat(“START UP - WAITING [”, {[.]Seq_Time/T1107_Minutes},"min "),
1200, “START UP”,
1203, concat(“START UP - WAITING [”, {[.]Seq_Time/T1203_Minutes},"min "),

and so on

If OPC tags [.]Seq_Time/T1107_Minutes, [.]Seq_Time/T1107_Minutes and [.]Seq_Time/T1203_Minutes have a leased scan group. Will the tags use the leased rate when the case is not on them? So if [.]Seq_Time/T1107_Minutes is a leased mode tag with 30,000 as the rate and 1,000 as the leased/driven rate and if Seq100 = 40. What rate will ignition pull the tag from the OPC?

Thanks for your help,

If I recall correctly, the case() expression function evaluates all of its arguments all of the time, so those tags will probably be leased all of the time.

(Or you could just test it…)

I’m pretty confident all expression functions evaluate all of their arguments all of the time. There’s no true short-circuiting like a ‘real’ programming language; for instance:
if(true, 1, getSecond(now(1000))) will always poll at a 1 second rate, even though the false condition could never be reached.

Well, the author of an expression function could fail to call execute() on selected arguments passed in…

(:

1 Like

Thank you for the info. I was hoping that wasn’t the case.