Files
HVDistributionBox/live_measurement.py

32 lines
661 B
Python

from pymeasure.instruments.keithley import Keithley2400
import serial.tools.list_ports
import pandas as pd
from ModuleTestBox import ModuleTestBox
from time import sleep
import matplotlib.pyplot as plt
channel = 1 # Set the channel you want to use
hints=["VID:PID=CAFE:4001"]
try:
with ModuleTestBox(hints=hints, verbose=True) as mtb:
print("Connected to Device")
mtb.SelectChannel(channel)
mtb.Bias_Enable(False)
mtb.HV_Enable(True)
sleep(1)
while True:
current = mtb.GetI() / 1e6
print(current) # in uA
sleep(0.5)
except Exception as e:
print(e)
exit()