I ran into an issue where it is throwing Error_ExpressionEval error in SCADA. I have a few tags that those are link to the script and their value is showing above error.
is there any fix to this? I encountered these error after I restored the backup.
I might be way off here, but try opening one of the tags and look at the expression being used. You might could even post the expression here.
In the docs, Error_ExpressionEval is described as "The source expression was unable to be executed."
For us to help you the best, we'd have to see the actual expression.
And in this case, the script, as it's a runScript expression.
That's the expression, not the script. The error is coming from the script that the expression is calling.
Also, once you fix the error, I would look to change the expression tags to memory tags and use a gateway timer or scheduled script to write to them.
RunScript should only be used with scripts the have very fast execution times, like single digit millis. Otherwise, other tags might be delayed in their execution.
Okay..I will look into the script and check with my seniors with next step.
Thank you.
Have you checked and made sure that the project where the script is located is the one you have selected in the Gateway config page for the Gateway Scripting Project? Otherwise, it can't be called from tags.
The project file name is Copy_of_TGW_Ama_TX_1 and in the Gateway scripting project it name as a TGW_Ama_TX
So you just have to make sure that the project name specified in the Gateway Scripting Project actually is the project that contains the script. If not, the script can't be called from the tags.
From your message answer it seems like this is the culprit, if the project with the script is called Copy_of_TGW_Ama_TX_1 and the Gateway Scripting Project is pointing to TGW_Ama_TX. Then the scripts defined in the expression tags can't be called. Try changing the Gateway Scripting Project to Copy_of_TGW_Ama_TX_1 and see if that works.


