Commit 03589ffc authored by Alén Arias Vázquez's avatar Alén Arias Vázquez 😎

remove power from the return

parent e488e1f7
......@@ -33,7 +33,7 @@ class CPX400DP(object):
return self.serial.readline()
def set_voltage(self, volts, chan=1):"Set oltage {}V in channel {}".format(volts,chan))"Set Voltage {}V in channel {}".format(volts,chan))
cmd = 'V'+str(chan)+' '+str(volts)+'\n'
......@@ -103,14 +103,14 @@ class CPX400DP(object):
self.CHAN_STATUS[j] = self.get_status_chan(chan=j+1)
def setup_chan(self, chan=1, volts=10.0, amps=0.3):"Setup Channel {}".format(chan))
self.set_voltage(volts=volts, chan=chan)
self.set_current(amps=amps, chan=chan)
def setup(self, volts_1=10.0, amps_1=0.3, volts_2=10.0, amps_2=0.3):"Setup Both Channels")
self.setup_chan(self, chan=1, volts=volts_1, amps=amps_1)
self.setup_chan(self, chan=2, volts=volts_2, amps=amps_2)
self.setup_chan(chan=1, volts=volts_1, amps=amps_1)
self.setup_chan(chan=2, volts=volts_2, amps=amps_2)
def get_parameters_chan(self, chan=1):
V = self.get_voltage(chan=chan)
......@@ -120,9 +120,7 @@ class CPX400DP(object):
def get_parameters(self):
V1, I1 = self.get_parameters_chan(chan=1)
V2, I2 = self.get_parameters_chan(chan=2)
return V1, V2, I1, I2, P1, P2
return V1, V2, I1, I2
def main():
parser = argparse.ArgumentParser(description='Control CPX400DP from USB', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment