Goodmorning, I have an opcua python client. I need to connect to a server and to write in a specific node in first place a 0, to wait 1 second, and after to write an 1. How can I do that? I attach the code, witch doesn't crash but doesn't produce nothing on the server
def avvio_selezione_1(client):
time.sleep(1)
dv = ua.DataValue(ua.Variant(0, ua.VariantType.Int32))
dv.ServerTimestamp = None
dv.SourceTimestamp = None
nodo = client.get_node("ns=1;i=68") #nodo per avvio/stop selezione
nodo.set_value(dv)#ua.DataValue(ua.Variant(0, ua.VariantType.Int32)))
time.sleep(1)
dv2 = ua.DataValue(ua.Variant(1, ua.VariantType.Int32))
dv2.ServerTimestamp = None
dv2.SourceTimestamp = None
nodo = client.get_node("ns=1;i=68") #nodo per avvio/stop selezione
nodo.set_value(dv2)
time.sleep(1)