forked from zietzm/Helmholtz_Test_Bench
Changed csv plots to show instantaneous field changes
This commit is contained in:
+4
-3
@@ -22,7 +22,7 @@ class Axis:
|
||||
def __init__(self, index, device, PSU_channel, arduino_pin):
|
||||
# static information
|
||||
self.index = index # index of this axis, 0->X, 1->Y, 2->Z
|
||||
self.device = device # power supply object for this axis (PS2000B class)
|
||||
self.device = device # power supply object for this axis (PS2000B class object)
|
||||
self.channel = PSU_channel # power supply unit channel (0 or 1)
|
||||
self.ardPin = arduino_pin # output pin on the arduino for switching polarity on this axis
|
||||
|
||||
@@ -94,7 +94,7 @@ class Axis:
|
||||
else: # no communications error
|
||||
self.connected = "Connected" # PSU is connected
|
||||
|
||||
def print_status(self): # print out the current status of the device (not used at the moment)
|
||||
def print_status(self): # print out the current status of the PSU channel (not used at the moment)
|
||||
ui_print("%s, %0.2f V, %0.2f A"
|
||||
% (self.device.get_device_status_information(self.channel),
|
||||
self.device.get_voltage(self.channel), self.device.get_current(self.channel)))
|
||||
@@ -235,7 +235,8 @@ def setup_all(): # main test stand initialization function
|
||||
# this throws an exception, which can be ignored
|
||||
|
||||
g.ARDUINO = ArduinoCtrl() # initialize the arduino object from the control class, connects and sets up
|
||||
except Exception as e: # some unforeseen error occurred
|
||||
|
||||
except Exception as e: # some unforeseen error occurred (not connected issue handled in ArduinoCtrl class)
|
||||
# show error messages to alert user
|
||||
ui_print("Arduino setup failed:", e)
|
||||
ui_print(traceback.print_exc())
|
||||
|
||||
Reference in New Issue
Block a user