Ejemplo n.º 1
0
from pyinstrument import PSupply

# instrument address

PSN5744USB = "USB0::2391::38151::US15J0384P::0::INSTR"
PSN5744Eth = "TCPIP0::169.254.57.0::inst0::INSTR"
PSTektronix = "USB0::1689::913::081001126668003045::0::INSTR"

rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)
ps.on()

ps.setCurr(3)  # set current to 3 amp
ps.setVolt(0)
ps.delay(5)
print("voltage=" + ps.measureVolt())
print("Current=" + ps.measureCurr())

ps.setVolt(26)
ps.delay(1)
print("voltage=" + ps.measureVolt())
print("Current=" + ps.measureCurr())

ps.setVolt(3)
ps.delay(.5)
Ejemplo n.º 2
0

def test(volt, delay):
    ps.setVolt(volt)
    print(ps.measureVolt())
    print(ps.measureCurr())
    ps.delay(delay)
    return "success"


rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' + PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp

ps.setVolt(0)
ps.delay(5)  # power supply off for 5 sec

for i in range(1, 10):
    ps.setVolt(10.8)
    ps.delay(1)  # 10.8 V for 1 SEC
    ps.setVolt(9)
    ps.delay(.5)  # 9 v for 500mS

ps.off()
PS.close()
Ejemplo n.º 3
0
# instrument address
PSN5744USB = "USB0::2391::38151::US15J0384P::0::INSTR"
PSN5744Eth = "TCPIP0::169.254.57.0::inst0::INSTR"
PSTektronix = "USB0::1689::913::081001126668003045::0::INSTR"

# instrument Setup

rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(
    PSN5744Eth)  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)
wb = Workbook()  # setup excel sheet

sheet1 = wb.add_sheet('readings')
# excel sheet templet

sheet1.write(3, 2, 'Project Name')
sheet1.write(3, 8, 'Setup No.')
sheet1.write(4, 8, 'Voltage')
sheet1.write(5, 8, 'Current')

ps.on()
ps.setCurr(3)  # set current to 3 amp

# step 1 => Usmax(16) to Usmin(8)
import pyvisa as visa
from pyinstrument import PSupply

# instrument address
PSN5744USB = "USB0::2391::38151::US15J0384P::0::INSTR"
PSN5744Eth = "TCPIP0::169.254.57.0::inst0::INSTR"
PSTektronix = "USB0::1689::913::081001126668003045::0::INSTR"

rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(rm.list_resources()[0])   # choose the proper address for your instrument
print('Power supply detected=> ' + PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp
# ps.setVolt(0)  # set current to 3 amp
step = 1
for i in range(1 , 50):  # set the range from 9 to 16 V
    step = step + .05
    print(ps.setVolt(step))
    ps.delay(5)

ps.off()
PS.close()
print("process complete")
Ejemplo n.º 5
0
import pyvisa as visa
from pyinstrument import PSupply

rm = visa.ResourceManager()
rm.list_resources()
print(rm.list_resources()[0])
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

maxVoltage = 10  # set max voltage limit
minVoltage = 0  # set Min voltage limit
delaySec = 2  # set delay time between on and off

# turn on Power supply
ps.on()
# set max current limit
ps.setCurr(5)

ps.setVolt(9)
ps.delay(1)
print("Voltage ==> " + ps.measureVolt() + "current ==>" + ps.measureCurr())
ps.delay(5)

ps.setVolt(13.5)
ps.delay(1)
print("Voltage ==> " + ps.measureVolt() + "current ==>" + ps.measureCurr())
ps.delay(5)
def test(volt, delay):
    ps.setVolt(volt)
    print(ps.measureVolt())
    print(ps.measureCurr())
    ps.delay(delay)
    return "success"


rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp

ps.setVolt(0)
ps.delay(5)  # power supply off for 5 sec
ps.setVolt(16)  # UMIN
ps.delay(2)  # 16V on for 2 SEC

for i in range(1, 100):
    ps.setVolt(18)
    ps.delay(.4)  # 18 V for 400ms
    ps.setVolt(17)
    ps.delay(.6)  # 17 v for 600mS
    ps.setVolt(16)
Ejemplo n.º 7
0
import pyvisa as visa
from pyinstrument import PSupply

rm = visa.ResourceManager()
rm.list_resources()
print(rm.list_resources()[0])
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

maxVoltage = 10  # set max voltage limit
minVoltage = 0  # set Min voltage limit
delaySec = 2  # set delay time between on and off

# turn on Power supply
ps.on()
# set max current limit
ps.setCurr(3)
ps.setVolt(0)

for i in range(10):
    ps.setVolt(maxVoltage)  # set max voltage
    ps.delay(delaySec)  # delay
    ps.setVolt(minVoltage)  # Set min voltage
    ps.delay(delaySec)  # delay

ps.off()
PS.close()
Ejemplo n.º 8
0
import pyvisa as visa
from pyinstrument import PSupply

# instrument address
PSN5744USB = "USB0::2391::38151::US15J0384P::0::INSTR"
PSN5744Eth = "TCPIP0::169.254.57.0::inst0::INSTR"
PSTektronix = "USB0::1689::913::081001126668003045::0::INSTR"

rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(10)  # set current to 3 amp
print('program started')
ps.setVolt(0)
ps.delay(5)
for i in range(1, 50):
    ps.setVolt(9)  # umin
    ps.delay(5)  # tr = 20ms
    print(ps.setVolt(20))  # Umax 16V
    print(i)
    ps.delay(0.02)  # 2 milli sec
    ps.setVolt(9)  # tf = 400ms
    ps.delay(5)

def test(volt, delay):
    ps.setVolt(volt)
    ps.delay(delay)
    return "success"


# instrument Setup

rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' + PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)
ps.on()
ps.setCurr(3)  # set current to 3 amp

# step 1 => Usmax(16) to Usmin(9)

for i in range(16, 9, -1):  # set the range from 16 to 8 V
    test(i, 60)
    i -= .5
    test(i, 60)
print(ps.measureVolt())
print(ps.measureCurr())

# step 2 =>  Usmin(9V) to 0V
for i in range(9, 0, -1):  # set the range from 16 to 8 V
    test(i, 60)
def test(volt, delay):
    ps.setVolt(volt)
    print(ps.measureVolt())
    print(ps.measureCurr())
    ps.delay(delay)
    return "success"


rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp

ps.setVolt(0)
ps.delay(5)  # power supply off for 5 sec

for i in range(1, 10):
    ps.setVolt(10.8)
    ps.delay(1)  # 10.8 V for 1 SEC
    ps.setVolt(6)
    ps.delay(.02)  # 20ms v for 20mS
    ps.setVolt(8)
    ps.delay(.18)  # 8 v for 180mS
    ps.setVolt(9)
Ejemplo n.º 11
0
"""
pulse 2 a simulation without accurate timing


"""
import pyvisa as visa
from pyinstrument import PSupply

# instrument address
PSN5744USB = "USB0::2391::38151::US15J0384P::0::INSTR"
PSN5744Eth = "TCPIP0::169.254.57.0::inst0::INSTR"
PSTektronix = "USB0::1689::913::081001126668003045::0::INSTR"

rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.off()
PS.close()
print("Good Bye go to hell :)")
Ejemplo n.º 12
0

# instrument address
PSN5744USB = "USB0::2391::38151::US15J0384P::0::INSTR"
PSN5744Eth = "TCPIP0::169.254.57.0::inst0::INSTR"
PSTektronix = "USB0::1689::913::081001126668003045::0::INSTR"

rm = visa.ResourceManager()
rm.list_resources()
print(rm.list_resources()[0])
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp
var = 1
while var == 1:
    ps.setVolt(13.5)
    ps.delay(.4)
    ps.setVolt(0)
    ps.delay(.4)
"""
for i in range(16, 20):  # set the range from 9 to 16 V flashing
    test(i, .4)
    test(0, .4)
    i += .5
    test(i, .4)
Ejemplo n.º 13
0
sshete requirment for VW216 E09.2


"""
import pyvisa as visa
from pyinstrument import PSupply

rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp

ps.setVolt(0)
ps.delay(5)  # power supply off for 5 sec

for i in range(1, 10):
    ps.setVolt(11)
    ps.delay(5)  # 11 V for 5 SEC
    ps.setVolt(7)
    ps.delay()  # 15.5 v for 5S
    ps.setVolt(16)
    ps.delay(10)  # 16 V for 10 SEC
    ps.setVolt(i - 1)

# instrument address
PSN5744USB = "USB0::2391::38151::US15J0384P::0::INSTR"
PSN5744Eth = "TCPIP0::169.254.57.0::inst0::INSTR"
PSTektronix = "USB0::1689::913::081001126668003045::0::INSTR"

rm = visa.ResourceManager()
rm.list_resources()
print(rm.list_resources()[0])
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp
var = 1

for i in range(16, 20):  # set the range from 9 to 16 V flashing
    test(i, .4)
    test(0, .4)
    i += .5
    test(i, .4)
    test(0, .4)
for i in range(19, 16, -1):  # set the range from 9 to 16 V flashing
    test(i, .4)
    test(0, .4)
    i -= .5
Ejemplo n.º 15
0
"""

sshete requirment for VW216 E03

"""
import pyvisa as visa
from pyinstrument import PSupply


rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' + PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp

ps.setVolt(0)
ps.delay(5)  # power supply off for 5 sec

for i in range(1, 10):
    ps.setVolt(13.5)
    ps.delay(60)  # 13.5 V for 60 SEC
    ps.setVolt(27)
    ps.delay(.3)  # 27 v for 300mS

ps.off()
PS.close()
print("process complete")
import pyvisa as visa
from pyinstrument import PSupply

# instrument address
PSN5744USB = "USB0::2391::38151::US15J0384P::0::INSTR"
PSN5744Eth = "TCPIP0::169.254.57.0::inst0::INSTR"
PSTektronix = "USB0::1689::913::081001126668003045::0::INSTR"

rm = visa.ResourceManager()
rm.list_resources()
PS = rm.open_resource(
    rm.list_resources()[0])  # choose the proper address for your instrument
print('Power supply detected=> ' +
      PS.query('*IDN?'))  # chk communication is established or NOT

ps = PSupply(PS)

ps.on()
ps.setCurr(3)  # set current to 3 amp
print('program started')
ps.setVolt(0)
ps.delay(1)

ps.setVolt(11.8)  # umin
ps.delay(.4)  # tr = 400ms
ps.setVolt(16)  # Umax 16V
ps.delay(2)  # 2 sec
ps.setVolt(11.8)  # tf = 400ms
ps.delay(.4)
ps.setVolt(0)
ps.delay(1)