forked from zietzm/Helmholtz_Test_Bench
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
import numpy as np
|
|
|
|
# global variables set in other files
|
|
XY_DEVICE = None
|
|
Z_DEVICE = None
|
|
ARDUINO = None
|
|
|
|
X_AXIS = None # object structure: (device, channel, arduino pin, axis index)
|
|
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 CONFIG_FILE
|
|
|
|
global XY_PORT
|
|
global Z_PORT
|
|
global RELAY_PINS
|
|
|
|
global PORTS
|
|
|
|
# Default Constants:
|
|
default_arrays = {
|
|
"coil_const": np.array([38.6, 38.45, 37.9]) * 1e-6, # Coil constants [x,y,z] [T/A]
|
|
"ambient_field": np.array([30, 30, 30]) * 1e-6, # ambient magnetic field in measurement area [T]
|
|
"resistance": np.array([1.7, 1.7, 1.7]), # resistance of [x,y,z] circuits [Ohm]
|
|
"max_watts": np.array([15, 15, 15], dtype=float), # max. allowed power for [x,y,z] circuits [W]
|
|
"max_volts": np.array([16, 16, 16], dtype=float), # max. allowed voltage, limited to 16V by used diodes! [V]
|
|
}
|
|
defaults = {
|
|
"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
|
|
"relay_pins": [15, 16, 17] # pin on the arduino for reversing [x,y,z] polarity
|
|
}
|