import numpy as np # global variables set in other files XY_DEVICE = None Z_DEVICE = None ARDUINO = None X_AXIS = None Y_AXIS = None Z_AXIS = None AXES = None # list containing [X_AXIS, Y_AXIS, Z_AXIS] app = None AXIS_NAMES = ["X-Axis", "Y-Axis", "Z-Axis"] global XY_PORT global Z_PORT global PORTS global threadLock exitFlag = True # False when main window is open, false otherwise # Default Constants and maximum/minimum values (warning messages will be generated if these are exceeded) # format: [[default values], [maximum values], [minimum values]] # ToDo: check actual maximum ratings # ToDo: Add maximum current: 5A (BA Blessing page 30), remove max_watts (there for testing with resistors) # ToDo: put this into a config file default_arrays = { "coil_const": np.array([[38.6, 38.45, 37.9], [50, 50, 50], [0, 0, 0]]) * 1e-6, # Coil constants [x,y,z] [T/A] "ambient_field": np.array([[30, 30, 30], [200, 200, 200], [-200, -200, -200]]) * 1e-6, # background magnetic field [T] "resistance": np.array([[1.7, 1.7, 1.7], [5, 5, 5], [1, 1, 1]], dtype=float), # resistance of circuits [Ohm] "max_volts": np.array([[14, 14, 14], [16, 16, 16], [0, 0, 0]], dtype=float), # max. allowed voltage, limited to 16V by used diodes! [V] "max_amps": np.array([[4.5, 4.5, 4.5], [6, 6, 6], [0, 0, 0]], dtype=float), # max. allowed current (A) "relay_pin": [[15, 16, 17], [15, 16, 17], [15, 16, 17]] # pins on the arduino for reversing [x,y,z] polarity } default_ports = { "xy_port": "COM1", # Serial port where PSU for X- and Y-Axes is connected "z_port": "COM2", # Serial port where PSU for Z-Axis is connected }