As per the above. I have a series of expression tags that run shared scripts to return values. These worked fine before the upgrade to 8, but won’t work at all. I even created a new expression tag and script using this example from the help, and again can’t get it to work:
I’m sure it’s something obvious, but at the moment i’m stuck!
What script are you trying to run?
Thanks for the quick reply. None of my old shared scripts are working at the moment with runscript in an expression tag. To simplify, I followed the example in the (runscript) help. This doesn’t work either. I’m guessing it’s to do with the new inherited project architecture and probably me placing the script in the wrong place or something like that…
Is the “Gateway Scripting Project” set to “global” or whatever the name of your parent project is under
Config > System > Gateway Settings on the gateway?
Yes, and the “global” project is where the shared scripts were moved to on upgrade:
It looks like you’re trying to create and reference the “Test” package in a child project, though, which won’t work.
Can I copy / move the scripts into the project I want to run them from? They don’t have to be “Global” as I only need to call them from one project. I’m just a little confused as they worked immediately before the upgrade and nothing was changed configuration - wise after upgrade.
Tags don’t belong to a project, copying them isn’t going to do anything in this case. Any tag change script or expression runScript can only reference scripts defined in whatever the Gateway Scripting Project is.
I’m not sure it’s the same problem you’re seeing, but I am seeing some weird behavior where an expression tag with a runScript expression in it shows eval error on a fresh gateway start until I right-click -> Restart Tag.
So I re-ran the ignition 8 installer and all seems to be well now. I guess something must’ve broken the first time round. Thanks for your help.
@Kevin.Herron, I think I encounter a similar issue:
Gateway Scripting Project set to “global”
I’ve create a new tag expression with a runscript.
in the global project:
Expression return :
[null, Error_ExpressionEval("Error executing script for runScript() expression:shared.tag.alarm.test"), Thu Oct 17 17:04:44 CEST 2019 (1571324684504)]
if I supprim the import, tag expression is OK:
The same expression with the import inside the shared.tag.alarm.test, works with no issue in 7.9