how to copy a boolean value to a variable
Posted: 14 Jul 2022, 15:52
Hi all
I am trying to change a Boolean variable from false to true in my plc. for changing the Int32 type there is no problem. but for the Boolean it shows the error "BadNotWritable". Any help?
Thanks
nodeToWrite.create(1);
nodeToWrite[0].AttributeId = OpcUa_Attributes_Value;
UaNodeId myNodeId("\"timer5\".Q", 3);
tempValue.setBoolean(OpcUa_True);
tempValue.copyTo(&nodeToWrite[0].Value.Value);
I am trying to change a Boolean variable from false to true in my plc. for changing the Int32 type there is no problem. but for the Boolean it shows the error "BadNotWritable". Any help?
Thanks
nodeToWrite.create(1);
nodeToWrite[0].AttributeId = OpcUa_Attributes_Value;
UaNodeId myNodeId("\"timer5\".Q", 3);
tempValue.setBoolean(OpcUa_True);
tempValue.copyTo(&nodeToWrite[0].Value.Value);