aboutsummaryrefslogtreecommitdiff
path: root/run.py
diff options
context:
space:
mode:
authorMichael Vorobiov <mvorobiov@wm.edu>2024-11-05 16:23:42 -0500
committerMichael Vorobiov <mvorobiov@wm.edu>2024-11-05 16:23:42 -0500
commit1ef08671d000dec11e81467e8c9b3765fd155233 (patch)
tree12ab389477dc0606bf53a3c061a5727699ab3c39 /run.py
parent30343811e779792a51275891bb10300525d11e7b (diff)
downloadqolab-1ef08671d000dec11e81467e8c9b3765fd155233.tar.gz
qolab-1ef08671d000dec11e81467e8c9b3765fd155233.zip
updated run.py script (vscode specific)
Diffstat (limited to 'run.py')
-rw-r--r--run.py39
1 files changed, 29 insertions, 10 deletions
diff --git a/run.py b/run.py
index 15a0dfa..2f7a3bc 100644
--- a/run.py
+++ b/run.py
@@ -2,6 +2,8 @@ from qolab.hardware.multimeter.hp3457a import HP3457A
from qolab.hardware.multimeter.bk_5491 import BK_5491
from qolab.hardware.multimeter.hp_34401 import HP_34401
from qolab.hardware.vacuum_gauge.mks390 import MKS390
+from qolab.hardware.power_supply.psw25045 import PSW25045
+
from qolab.hardware.scope.sds800xhd import SDS800XHD
@@ -11,28 +13,42 @@ import pyvisa
if __name__ == "__main__":
import matplotlib as mpl
import matplotlib.pyplot as plt
+ import time
+
+ #mpl.style.use('custom-style')
rm = pyvisa.ResourceManager()
- instruments_list = rm.list_resources()
+ address_dict = {
+ 'scope': 'TCPIP0::192.168.110.191::inst0::INSTR',
+ 'dmm_hpa': 'visa://192.168.194.15/GPIB1::22::INSTR',
+ 'dmm_hp': 'visa://192.168.194.15/ASRL9::INSTR',
+ 'dmm_bk': 'visa://192.168.194.15/ASRL12::INSTR',
+ 'vacgauge': 'visa://192.168.194.15/ASRL13::INSTR',
+ 'psu_anode': 'visa://192.168.194.15/ASRL10::INSTR'
+ }
#----------------------------------------------
# Open visa resources and initialize intruments
dmm_hpa = HP3457A(
- rm.open_resource(instruments_list[6])
+ rm.open_resource(address_dict['dmm_hpa'])
)
dmm_bk = BK_5491(
- rm.open_resource(instruments_list[4])
+ rm.open_resource(address_dict['dmm_bk'])
)
dmm_hp = HP_34401(
- rm.open_resource(instruments_list[3])
+ rm.open_resource(address_dict['dmm_hp'])
)
scope = SDS800XHD(
- rm.open_resource(instruments_list[8])
+ rm.open_resource(address_dict['scope'])
)
gauge = MKS390(
- rm.open_resource(instruments_list[5])
+ rm.open_resource(address_dict['vacgauge'])
+ )
+
+ psu_anode = PSW25045(
+ rm.open_resource(address_dict['psu_anode'])
)
#-----------------------------------------------
@@ -42,10 +58,13 @@ if __name__ == "__main__":
print(f'BK5491 reading: {dmm_bk.getAdc()}')
print(f'HP34401 reading: {dmm_hp.getAdc()}')
print(f'MKS390 reading: {gauge.get_pressure()}')
- print(f'IG status: {gauge.get_ignition_status()}')
- gauge.enable_ignition(False)
- print(f'IG status: {gauge.get_ignition_status()}')
- trace = scope.getTrace(5)
+ print(psu_anode.get_idn())
+ psu_anode.set_voltage(5)
+ psu_anode.enable_output(True)
+ time.sleep(20)
+ psu_anode.enable_output(False)
+
+ trace = scope.getTrace(4)
trace.plot()
plt.show() \ No newline at end of file