Get multiple nodes at once #1377
Answered
by
AndreasHeine
Statkern15
asked this question in
Q&A
Replies: 2 comments 3 replies
-
import opcua
uri = "opc.tcp://127.0.0.1:4840"
client = opcua.Client(uri)
nodeids = ["ns=0;i=2256", "ns=0;i=2267"]
node_list = []
for nodeid in nodeids:
node_list.append(client.get_node(nodeid))
client.get_values(node_list) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Statkern15
-
|
Thanks for the quick repley. So there is no other way than looping over them. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For University I am working on a Siemens Sinumerik 840d Opc UA server. I need set multiple values at once. I've already figured
client.get_values()is the way to go. However for that i first need the individual nodes.Right now im getting the node with
client.get_node(). Since there are about 20-30 nodes I need to get this is a lot of copy paste. Is there a better way of getting multiple notes at once.thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions