it seems that some “bad” expression for Ignition 8 take lot of time to be evaluated in the gateway when creating new tags.
We have a tag with an expression coming from 7.9, we need to adapt for 8.0,
but these “bad” expression take lot of time to be evaluated in the gateway
// Alarm Priority : Diagnostic(0), Low(1), Medium(2), High(3), Critical(4).
forceQuality(
binEnc(
//bit 0 : defautCom
switch(tag(replace("[default]{PathToTag}","/TS/STATUS","/")+"{qualityPath}"+".Quality"),192,0,1),
//bit 1 : alarmeInhibe
{[.]../TC/INHIBER_ALARMES},
//bit 2 : synthèse alarme faible : Low(1)
isAlarmActiveFiltered(replace("[default]{PathToTag}*","/TS/STATUS","/TA"), "", "", 1, 1, 0, 1, 0),
//bit 3 : synthèse alarme moyenne : Medium(2)
isAlarmActiveFiltered(replace("[default]{PathToTag}*","/TS/STATUS","/TA"), "", "", 2, 2, 0, 1, 0),
//bit 4 : synthèse alarme majeure : High(3)
isAlarmActiveFiltered(replace("[default]{PathToTag}*","/TS/STATUS","/TA"), "", "", 3, 3, 0, 1, 0),
// bit 5 : desactive
{[.]../TC/DESACTIVER_EQT},
// bit 6 : mode local
0,
// bit 7 : mode manu
0
),
192
)
with tags.json logger set to DEBUG :
|provider|29May2019 09:17:49|Finished import in 3 minutes, 0 seconds|
|expr|29May2019 09:15:44|Error evaluating tag|
|expr|29May2019 09:15:43|Error evaluating tag|
|expr|29May2019 09:15:42|Error evaluating tag|
|expr|29May2019 09:15:41|Error evaluating tag|
|expr|29May2019 09:15:40|Error evaluating tag|
|expr|29May2019 09:15:39|Error evaluating tag|
|expr|29May2019 09:15:38|Error evaluating tag|
|expr|29May2019 09:15:37|Error evaluating tag|
|expr|29May2019 09:15:36|Error evaluating tag|
|expr|29May2019 09:15:35|Error evaluating tag|
|provider|29May2019 09:15:34|Starting read of 1 paths|
|expr|29May2019 09:15:34|Error evaluating tag|
|expr|29May2019 09:15:33|Error evaluating tag|
|expr|29May2019 09:15:32|Error evaluating tag|
|expr|29May2019 09:15:31|Error evaluating tag|
|expr|29May2019 09:15:30|Error evaluating tag|
|expr|29May2019 09:15:29|Error evaluating tag|
|expr|29May2019 09:15:28|Error evaluating tag|
com.inductiveautomation.ignition.common.expressions.ExpressionException: Error parsing/subscribing path '[default]{PathToTag}{qualityPath}.Quality' in tag() expression.
at com.inductiveautomation.ignition.common.expressions.functions.TagFunction.execute(TagFunction.java:111)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:66)
at com.inductiveautomation.ignition.common.expressions.DefaultFunctionFactory$SwitchFunction.execute(DefaultFunctionFactory.java:1231)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:66)
at com.inductiveautomation.ignition.common.expressions.DefaultFunctionFactory$BinaryEncFunction.execute(DefaultFunctionFactory.java:3157)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:66)
at com.inductiveautomation.ignition.common.expressions.DefaultFunctionFactory$ForceQualityFunction.execute(DefaultFunctionFactory.java:1340)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:66)
at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.expression.ExpressionTagActorFactory$ExpressionTagActor.runInternal(ExpressionTagActorFactory.java:154)
at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.AbstractExpressionActor.run(AbstractExpressionActor.java:120)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: com.google.common.collect.ComputationException: com.inductiveautomation.ignition.common.tags.paths.parser.TagPathFormatException: Illegal character '{' (Line 1 , Char 10)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathParser.parse(TagPathParser.java:154)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathParser.parse(TagPathParser.java:112)
at com.inductiveautomation.ignition.common.expressions.functions.TagFunction.execute(TagFunction.java:100)
... 15 common frames omitted
Caused by: com.google.common.collect.ComputationException: com.inductiveautomation.ignition.common.tags.paths.parser.TagPathFormatException: Illegal character '{' (Line 1 , Char 10)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathParser$ParseFunction.load(TagPathParser.java:355)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathParser$ParseFunction.load(TagPathParser.java:348)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)
at com.google.common.cache.LocalCache.get(LocalCache.java:4147)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathParser.parse(TagPathParser.java:145)
... 17 common frames omitted
Caused by: com.inductiveautomation.ignition.common.tags.paths.parser.TagPathFormatException: Illegal character '{' (Line 1 , Char 10)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathLexer.errMsg(TagPathLexer.java:218)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathLexer.errMsg(TagPathLexer.java:222)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathLexer.yylex(TagPathLexer.java:731)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathParser._parse(TagPathParser.java:174)
at com.inductiveautomation.ignition.common.tags.paths.parser.TagPathParser$ParseFunction.load(TagPathParser.java:353)
... 26 common frames omitted
Moreover some bad expression in alarms fields seem to be very long to be evaluated.