aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--run.py36
1 files changed, 27 insertions, 9 deletions
diff --git a/run.py b/run.py
index 1576fa3..509d068 100644
--- a/run.py
+++ b/run.py
@@ -9,6 +9,7 @@ from qolab.hardware.power_supply.gpp3610h import GPP3610H
from qolab.hardware.scope.sds800xhd import SDS800XHD
import pyvisa
+import numpy as np
# Example usage
if __name__ == "__main__":
@@ -61,24 +62,41 @@ if __name__ == "__main__":
# Get DMM readings
print(dmm_hpa.get_idn())
- print(f'HP4357A reading: {dmm_hpa.getAdc()}')
- print(f'BK5491 reading: {dmm_bk.getAdc()}')
- print(f'HP34401 reading: {dmm_hp.getAdc()}')
- print(f'MKS390 reading: {gauge.get_pressure()}')
+
+ dmm_hpa.set_function('DCI')
+
+ n = 5
+ readings = np.zeros(n)
+ for i in range(n):
+ pressure = gauge.get_pressure()
+ print(f'Pressure: {pressure} +- {0.1*pressure} Torr')
+ print(f'MCOUNT: {dmm_hpa.get_memory_count()}')
+ readings[i] = dmm_hpa.get_reading()
+ print(f'HP4357A reading: {readings.mean()} +- {readings.std(ddof=1)} V')
+
+ plt.hist(readings)
+ plt.show()
+
+ print(f'BK5491 reading: {dmm_bk.getAdc()} A')
+ print(f'HP34401 reading: {dmm_hp.getAdc()} A')
+ print(f'MKS390 reading: {gauge.get_pressure()} Torr')
print(psu_anode.get_idn())
- psu_anode.set_voltage(5)
+ psu_anode.set_voltage(1)
psu_anode.enable_output(True)
- time.sleep(2)
+ print(psu_anode.get_out_voltage())
+ print(psu_anode.get_out_current())
+ time.sleep(1)
psu_anode.enable_output(False)
print(psu_disp.get_idn())
- psu_disp.set_voltage(0.2)
+ psu_disp.set_voltage(1.0)
+ psu_disp.set_current(0.1)
psu_disp.enable_output(True)
- time.sleep(3)
+ time.sleep(1)
print(psu_disp.get_out_current())
print(psu_disp.get_out_voltage())
- time.sleep(2)
+ time.sleep(1)
psu_disp.enable_output(False)
#trace = scope.getTrace(4)