diff --git a/RUN_BTN.py b/RUN_BTN.py index 485f73c..76b6d2d 100644 --- a/RUN_BTN.py +++ b/RUN_BTN.py @@ -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.")