I have the following code..
from opcua import ua, Client
try:
# Connect to the server
client = Client("opc.tcp://192.168.0.17:4840", timeout=5000)
client.set_user('user')
client.set_password('password')
client.connect()
# Call a method
method = client.get_node("ns=4;i=7014")
parent_obj = "ns=4;i=5002" # Nodeid of the object
obj = client.get_node(parent_obj)
out = obj.call_method(method, 0,0,0,0,0,0)
print("Result: ", out)
except Exception as e:
print("Error: ", e)
except KeyboardInterrupt:
print("Programm stopped by user")
finally:
# Disconnect from the server
print("Closing...")
client.disconnect()
exit(0)
however the programm stops with an error of "One or more arguments are invalid". I have tried many different variation on passing the arguments on, but I can't seem to get it right. Can anyone help?
Method name:
Method description:
Method call:
I tried different ways of passing the arguments on, but can't seem to get it right.