Trouble with runScript

Im trying to figure out how to use runScript in an expression tag, starting with a simple exercise:

I created the script

def CalcCurStat(cond1):
  import system
  if cond1 == 1: return 2

then in my tags expression:


but my tag is null. any ideas where im going wrong?

Right, so this is a bit unfortunate, but you can’t access script modules from the runScript() expression function on a tag.

Tags are globally scoped (belong to the gateway, basically), whereas a script module belongs to a specific project, so there’s no access.

This is one of the problems that the introduction of a globally-scoped script module area will solve in Ignition 7.7.

when does 7.7 come out? is there a beta?

Next year, nothing even approximating a beta yet.

OK, looking forward to the update - the global script module will be a huge help. thank you!