Repository navigation
How to set a bolean value? #1193
Unanswered
TomasTrnkaPLC
asked this question in
Q&A
Replies: 3 comments 5 replies
|
Because you overwrite the variable with is value. Store the result of |
1 reply
|
I tell this to everyone that is new. Use a high quality IDE like PyCharm so you can set break points and inspect the objects. OPCUA has many complex objects that are not easily understood without inspection. |
3 replies
|
Many thanks now are it ok. I have one more question how to wrote a string? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi I try to set a value like this
PC_Valve_1_1_Close_var = root.get_child(["0:Objects", "4:new_Controller_0", "3:GlobalVars","4:PC_Valve_1_1_Close"]) PC_Valve_1_1_Close_var = PC_Valve_1_1_Close_var.get_value() print (PC_Valve_1_1_Close_var) PC_Valve_1_1_Close_var.set_value(False)But I get an error. AttributeError: 'bool' object has no attribute 'set_value'
Why?
All reactions