Hi everyone,
I'm running Ignition 8.1.50 and I'm having trouble using a script function inside an Expression Tag.
Setup
-
I have a Gateway Scripting Project configured (a global project).
-
Inside that project, I created a script in
project.Funcs_Util. -
If I call the function through the Script Console, it works correctly.
-
The script simply returns a string.
Example:
def formatarTitulo():
return "Hello World"
What I'm trying to do
Inside a String Expression Tag, I'm trying to call the script like this:
runScript("project.Funcs_Util.formatarTitulo")
Problem
The Expression Tag shows the error Error_ExpressionEval and does not execute the script at all.
It looks like the Expression Tag can validate the syntax (Designer editor accepts it), but during runtime the script is not executed.
What I already checked
-
The Gateway Scripting Project is correctly set in Project Properties.
-
The script runs normally when called from:
-
Perspective Events
-
Tag Change Scripts
-
Script Console
-
-
Only the Expression Tag fails to execute
runScript.
Question
Is runScript() supported inside Expression Tags in Ignition 8.1.50?
If not, what is the recommended approach to call shared project scripts from tags?
Should I move the logic to:
-
A Tag Change Script?
-
A Gateway Timer Script that writes to the tag?
-
A Tag Event Script?
Or is there any setting that allows Expression Tags to call Gateway scripts directly?
Any guidance would be appreciated!
Thanks in advance.