Ignition 7.9 vision
I’m trying to do a simple tag read in a custom method called “init” defined in the root container of a window. This “init” is called from the visionWindowOpened event of the same window.
visionWindowOpened:
root = system.gui.getParentWindow(event).getRootContainer()
root.init()
init:
root = self
path = 'Line ' + str(root.LineNumber) + '/Saddle Plating Data/' + str(root.SaddleIndex) + '/core_weight'
root.UnplatedWgt = system.tag.read(path).value
The error message that I am getting is:
File "<event:visionWindowOpened>", line 4, in <module>
File "<custom-function init>", line 11, in init
AttributeError: 'com.inductiveautomation.ignition.common.script.Imm' object has no attribute 'tag'
I don’t understand why ‘tag’ would not be on ‘system’ especially when in a script on the client.