I have a script to read specific value of an OPC tag
currentVal = system.tag.readBlocking(event.source.parent.parent.PID.Meta.TagPath +'/SV')
print currentVal
and it output as:
[[23.0, Good, Thu Aug 31 12:41:11 SGT 2023 (1693456871880)]]
Now I wanna get only the value "23.0" on my array.
I tried this code: (I am using this before using python to get the first value of array)
currentVal = system.tag.readBlocking(event.source.parent.parent.PID.Meta.TagPath +'/SV')
print currentVal
print currentVal[0][0]
But I am having error:
Caused by: org.python.core.PyException: TypeError: 'com.inductiveautomation.ignition.common.model.values.BasicQualifiedValue' object is unsubscriptable
... 45 common frames omitted
Anyone encountered this?
Or is there a way to get only the value in the ArrayList?
Thanks and Regards,