Files
Helmholtz_Test_Bench/main.py
T
2021-01-22 16:47:01 +01:00

29 lines
817 B
Python

import User_Interface as ui
import cage_func as func
import traceback
import settings as g
try: # start normal operations
print("Connecting to PSUs...")
func.setup_axes() # initiate communication, set handles
print("Connecting to Arduino...")
func.setup_arduino()
print("\nOpening User Interface...")
'''g.TestValuesX = ui.TestValues()
g.TestValuesY = ui.TestValues()
#g.TestValuesZ = ui.TestValues()
g.TestValues = [g.TestValuesX, g.TestValuesY]#, g.TestValuesZ]'''
application = ui.HelmholtzGUI()
application.mainloop()
except BaseException as e: # if there is an error, print what happened
print("\nAn error occurred, Shutting down.")
print(e)
print(traceback.print_exc())
finally: # safely shut everything down at the end
func.shut_down_all()