forked from zietzm/Helmholtz_Test_Bench
27 lines
739 B
Python
27 lines
739 B
Python
# import platform
|
|
# import time
|
|
import numpy as np
|
|
import globals as g
|
|
import cage_func as func
|
|
# from pyps2000b import PS2000B
|
|
|
|
# User Inputs/Configuration----------------------------------
|
|
# Desired output:
|
|
mag_vec1 = np.array([10, 10, 5])*1e-6
|
|
|
|
# Constants:
|
|
g.Coil_const = np.array([38.6, 38.45, 37.9])*1e-9 # Coil constants [x,y,z] in T/A
|
|
g.ambientField = np.array([80])*1e-6 # ambient magnetic field in measurement area, to be cancelled out
|
|
|
|
# COM-Ports for power supply units:
|
|
xPort = "COM1" # placeholders
|
|
yPort = "COM3"
|
|
zPort = "COM5"
|
|
|
|
func.set_devices(xPort, yPort, zPort) # initiate communication, set handles
|
|
func.activate_all() # activate remote control and outputs
|
|
|
|
func.set_field_simple(mag_vec1)
|
|
|
|
func.deactivate_all()
|