HF
This commit is contained in:
parent
a05456e8ad
commit
ebd8e67ef0
@ -16,6 +16,7 @@ def check_opcua_server(OPCcon):
|
||||
print(f"Error connecting to OPC UA server: {e}")
|
||||
return 99
|
||||
|
||||
|
||||
def establish_connection(OPCcon):
|
||||
"""State 1: Establish connection to OPC UA server."""
|
||||
print("---- State 1 ----")
|
||||
@ -30,12 +31,13 @@ def establish_connection(OPCcon):
|
||||
print(f"Error establishing connection: {e}")
|
||||
return 99
|
||||
|
||||
|
||||
def push_btn(OPCcon, btn_name):
|
||||
"""State 2:"""
|
||||
print("---- State 2 ----")
|
||||
try:
|
||||
if btn_name == 'INIT':
|
||||
OPCcon.adapt_access_rights(OPCcon)
|
||||
OPCcon.adapt_access_rights()
|
||||
else:
|
||||
OPCcon.press_btn(btn_name)
|
||||
print("Press button done.")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user