-
Notifications
You must be signed in to change notification settings - Fork 669
Open
Description
I try to aceess node value but exception "The access level does not allow reading or subscribing to the Node."(BadNotReadable) is reported.It's quite simple in C# but I don't know how to do it with python-opcua
the code(which is quite simple but still reports error) is below:
from opcua import client as OpcUaClient
class OpcUaClass():
def __init__(self, url:str):
self.url = url
self.Client = OpcUaClient.client.Client(url=self.url,timeout=1)
self.Client.session_timeout = 100000
try:
self.Client.connect()
node = self.Client.get_node("ns=2;s=/Channel/MachineAxis/aaIm[2]")
try:
data = node.get_value()
print(data)
except Exception as e:
print(e)
self.Client.disconnect()
except Exception as e:
print(e)
if __name__ == "__main__":
client = OpcUaClass(url="opc.tcp://192.168.100.1:4840")Metadata
Metadata
Assignees
Labels
No labels