Greetings…
I am having an issue writing a value to an memory tag via script. The error generated is:
GatewayException: Error serializing parameters.
caused by NotSerializableException: org.python.core.ReflectedArgs
Ignition v7.9.3 (b2017060210)
Java: Oracle Corporation 1.8.0_131
The memory tag is configured as Type: Integer and Read/Write. It will write to the tag if using binding, but chokes on script. The component I am firing this from is a One-Shot button on the actionPerformed handler, and the value being written is the property: Set Value (in this case, the integer 180)
The script causing the error:
OSvalue = event.source.setValue
if event.source.parent.parent.parent.getComponent('ExecuteGroup').getComponent('Toggle Button 1').componentEnabled:
system.tag.write("ASRS/CraneMove/CraneDestPos_Abs", OSvalue)
else:
system.tag.write("ASRS/CraneMove/CraneStartPos_Abs", OSvalue)
Documentation says that the ‘value’ argument for system.tag.write is of type Int, so I’m a little confused why this will not write to the tag. The path to component and tag were generated using the browse method, so they are correct. I would appreciate any assistance. I hope it is common problem with an easy fix.
Kind regards,
Steve