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}")
|
print(f"Error connecting to OPC UA server: {e}")
|
||||||
return 99
|
return 99
|
||||||
|
|
||||||
|
|
||||||
def establish_connection(OPCcon):
|
def establish_connection(OPCcon):
|
||||||
"""State 1: Establish connection to OPC UA server."""
|
"""State 1: Establish connection to OPC UA server."""
|
||||||
print("---- State 1 ----")
|
print("---- State 1 ----")
|
||||||
@ -30,12 +31,13 @@ def establish_connection(OPCcon):
|
|||||||
print(f"Error establishing connection: {e}")
|
print(f"Error establishing connection: {e}")
|
||||||
return 99
|
return 99
|
||||||
|
|
||||||
|
|
||||||
def push_btn(OPCcon, btn_name):
|
def push_btn(OPCcon, btn_name):
|
||||||
"""State 2:"""
|
"""State 2:"""
|
||||||
print("---- State 2 ----")
|
print("---- State 2 ----")
|
||||||
try:
|
try:
|
||||||
if btn_name == 'INIT':
|
if btn_name == 'INIT':
|
||||||
OPCcon.adapt_access_rights(OPCcon)
|
OPCcon.adapt_access_rights()
|
||||||
else:
|
else:
|
||||||
OPCcon.press_btn(btn_name)
|
OPCcon.press_btn(btn_name)
|
||||||
print("Press button done.")
|
print("Press button done.")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user