Files
skills-market/plugins/halcon/references/examples/drive_hdevengine.py
T

11 lines
439 B
Python
Raw Normal View History

"""Remote-control a .hdev program via HDevEngine: run it, read variables back."""
from halcon.hdevengine import HDevProgram, HDevProgramCall
program = HDevProgram("demo_prog.hdev")
call = HDevProgramCall(program)
call.execute() # runs the exact same code HDevelop would run
# pull any control variable back out by name
for name in ("Total", "Area", "RowC", "ColC", "Message"):
print(f"{name} =", call.get_control_var_by_name(name))