Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianPix committed Nov 26, 2021
1 parent 7b4aef2 commit d2added
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
venv
.idea
26 changes: 26 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from opcua import Client
from opcua import ua


def main():
with Client("opc.tcp://141.30.154.211:4850") as client:
client.connect()
client.load_type_definitions()
root = client.get_root_node()
objects = client.get_objects_node()
idx = client.get_namespace_index("http://141.30.154.212:8087/OPC/DA")
for child in root.get_children():
if child.nodeid.Identifier == 85:
for chil in child.get_children():
if chil.nodeid.Identifier == 'XML DA Server - eats11Root':
for chi in chil.get_children():
if chi.nodeid.Identifier == 'F:Schneider':
for ch in chi.get_children():
try:
print(ch.nodeid.Identifier, ch.get_value())
except:
print(ch)


if __name__ == "__main__":
main()

0 comments on commit d2added

Please sign in to comment.