Удалить 'Project/ammeter.py'

This commit is contained in:
Дмитрий Пунов 2022-12-10 17:01:10 +03:00
parent 78bf13af37
commit 5bf4a65f28

View File

@ -1,31 +0,0 @@
import check_connection
import serial
class B7_78():
def __init__(self, device_ID):
self.ID = device_ID
self.folder = check_connection.get_device_folder_tty(self.ID)
self.instr = serial.Serial(
self.folder, timeout=1, inter_byte_timeout=1)
self.instr.write(b'SYST:REM\n')
self.instr.write(b'SYST:REM\n')
print('init')
def getCurrentDC(self):
self.instr.write(b'MEAS:CURR:DC?\n')
return float(self.instr.read(100).decode().rstrip())
def getVoltageDC(self):
self.instr.write(b'MEAS:VOLT:DC?\n')
return float(self.instr.read(100).decode().rstrip())
def getCurrentAC(self):
self.instr.write(b'MEAS:CURR:AC?\n')
return float(self.instr.read(100).decode().rstrip())
def getVoltageAC(self):
self.instr.write(b'MEAS:VOLT:AC?\n')
return float(self.instr.read(100).decode().rstrip())