2 sys.path.insert(0,
"..")
5 from opcua
import Client
9 if __name__ ==
"__main__":
10 logging.basicConfig(level=logging.WARN)
12 client = Client(
"opc.tcp://admin@localhost:4840/freeopcua/server/")
16 objects = client.get_objects_node()
17 folder = objects.add_folder(
"ns=2;i=3007",
"2:Folder1")
18 var = folder.add_variable(
"ns=2;i=3008",
"2:Variable1", 3.45)
22 results = client.delete_nodes([folder, var])
26 except ua.UaStatusCodeError:
27 print(
"The variable has been removed OK")