renamed test stand to test bench

This commit is contained in:
Martin Zietz
2021-03-14 21:08:35 +01:00
parent 606cfa1f40
commit 3e8490d353
5 changed files with 57 additions and 35 deletions
+7 -7
View File
@@ -47,7 +47,7 @@ class ExecCSVThread(Thread):
def execute_sequence(self, array, delay, parent, controller):
# main execution method of the class
# runs through array with times and desired fields and commands test stand accordingly
# runs through array with times and desired fields and commands test bench accordingly
# array format: [time (s), xField (T), yField (T), zField (T)]
func.power_down_all() # sets outputs on PSUs to 0 and Arduino pins to LOW before starting
@@ -73,12 +73,12 @@ class ExecCSVThread(Thread):
field_vec = array[i, 1:4] # extract desired field vector
ui.ui_print("%0.5f s: t = %0.2f s, target field vector ="
% (time.time() - t_zero, array[i, 0]), field_vec * 1e6, "\u03BCT")
func.set_field(field_vec) # send field vector to test stand
func.set_field(field_vec) # send field vector to test bench
controller.StatusDisplay.update_labels() # update status display after change
# log change to the log file if user has selected event logging in the Configure Logging window
logger = controller.pages[ui.ConfigureLogging] # get object of logging configurator
if logger.event_logging: # data should be logged when test stand is commanded
if logger.event_logging: # data should be logged when test bench is commanded
logger.log_datapoint() # log data
i = i + 1 # next row
@@ -115,17 +115,17 @@ def read_csv_to_array(filepath): # convert a given csv file to a numpy array
def check_array_ok(array):
# check if any magnetic fields in an array exceed the test stand limits and if so display a warning message
# check if any magnetic fields in an array exceed the test bench limits and if so display a warning message
values_ok = True
for i in [0, 1, 2]: # go through axes/columns
max_val = g.AXES[i].max_comp_field[1] # get limits the test stand can do
max_val = g.AXES[i].max_comp_field[1] # get limits the test bench can do
min_val = g.AXES[i].max_comp_field[0]
data = array[:, i + 1] # extract data for this axis from array
# noinspection PyTypeChecker
if any(data > max_val) or any(data < min_val): # if any datapoint is out of bounds
values_ok = False
if not values_ok: # show warning pop-up if values are exceeding limits
messagebox.showwarning("Value Limits Warning!", "Found field values exceeding limits of test stand."
messagebox.showwarning("Value Limits Warning!", "Found field values exceeding limits of test bench."
"\nSee plot and check values in csv.")
@@ -140,7 +140,7 @@ def plot_field_sequence(array, width, height): # create plot of fixed size (pix
figure.suptitle("Magnetic Field Sequence") # set figure title
# modify data to show instantaneous jumps in field to reflect test stand operation
# modify data to show instantaneous jumps in field to reflect test bench operation
new_array = np.array([[0, 0, 0, 0]], dtype=float) # initialize modified array, zeros to show start from no fields
last_vals = [0, 0, 0] # [x,y,z] field values from last data point (zero here), used to create step in data