Ignition 8.1. I built a Gateway Timer script to make an error count each time an OPC hearbeat tag doesnât update. The script did not work, so in debugging I stripped the script down to simply incrementing the tag each time the script runs. The tag does not increment. I looked at the logs, and found a JythonExecException Traceback; âunsupported operand type(s) for +: âjava.util.ArrayListâ and âintââ. Casting to int makes it an unsupported operand type between a âcom.inductiveautomation.ignition.common.model.values.BasicQualifiedValueâ and an int. Read / write blocking does not work either. What am I doing wrong? The tag is an integer and is a memory tag.
The script:
"
inputVal = system.tag.readBlocking("[default]intHeartbeat_Error_Count")
new = inputVal + 1
system.tag.writeBlocking("[default]intHeartbeat_Error_Count",new)
"
The log:
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File ââ, line 2, in TypeError: unsupported operand type(s) for +: âjava.util.ArrayListâ and âintâ
at org.python.core.Py.TypeError(Py.java:265)
at org.python.core.PyObject._basic_add(PyObject.java:2159)
at org.python.core.PyObject._add(PyObject.java:2137)
at org.python.pycode._pyx155.f$0(:3)
at org.python.pycode._pyx155.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1614)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:796)
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:678)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:744)
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:659)
at com.inductiveautomation.ignition.common.script.TimerScriptTask.run(TimerScriptTask.java:92)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.runAndReset(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: org.python.core.PyException: Traceback (most recent call last): File ââ, line 2, in TypeError: unsupported operand type(s) for +: âjava.util.ArrayListâ and âintâ
⌠19 common frames omitted