from time import sleep
import usbtmc
import sys

idVendor = 10893
idProduct = 4098
instr = usbtmc.Instrument(idVendor, idProduct)
print(instr.ask("*IDN?"))

command = sys.argv[1]

curr_1 = 0.1
vol_1 = 3.3
curr_2 = 0.01
vol_2 = 3.3

if command == "on":
    instr.write(f"CURR {curr_1},(@1)")
    instr.write(f"VOLT {vol_1},(@1)")
    instr.write("OUTP ON,(@1)")

    instr.write(f"CURR {curr_2},(@2)")
    instr.write(f"VOLT {vol_2},(@2)")
    instr.write("OUTP ON,(@2)")

elif command == "off":
    instr.write("OUTP OFF,(@1)")
    instr.write("OUTP OFF,(@2)")