i want to control the B&R PLC with an asyncua python script.
Everthing works. Readout of values, subscription a.s.o.
But i have problem to wite values
Here my code
# Get the node by its NodeId
path = "ns=6;s=::AsGlobalPV:ShortetStat2ndStack"
node = self.__client.get_node(path)
value = await node.get_value()
if value:
await node.write_value(False)
else:
await node.write_value(True)
or
dv = ua.DataValue(not val, ua.VariantType.Boolean)
# dv.ServerTimestamp = datetime.now()
# timestamp = datetime.now()
await node.set_value(dv)
I get always “BadWriteNotSupported” for the PLC Server
writing with UAExpert is possible and i have ua.AccessLevel.CurrentWrite for this value
Some ideas?