PV cell Measurement and control system Python code

Source: Internet
Author: User

""
Hardware Keithley Universal meter and programmable power supply
Visa is a set of standards developed by the Vxiplug&play System Alliance.
Python implements visa to form the Pyviva module
‘‘‘
## #IV测试系统的部分程序代码 fromVisaImport* fromStringImport* fromMathImport*classCurrentmiter (instrument): CurrentValue=[] datapoints=1ATRR="" def __init__(self,delaytime=0.2,dps=111): self=instrument ("gpib::23") Self.timeout=30datapoints=DPs Self.delay=delaytime Self.write ("*rst") Self.write (": Syst:pres") Self.write (": Form:data ASCII") Self.write (": Trigger:delay 0") Self.write (": Trigger:source External") Self.write (": Initiate:continuous on") Self.write (": Trigger:count 1") Self.write (":D ata:clear") Self.write (":d ata:points%d"%datapoints) Self.write (":d Ata:feed:control Next") Self.write (":d ata:feed Sense") Self.write (": FUNC ' CURRENT:DC '") Self.write (": CURRent:DC:RANGe:Auto 1") Self.write (": CURRent:DC:DIGits 7") Self.write (": CURRent:DC:AVERage:STATe off") defNewask (self,cmd):returnself.ask_for_values (cmd)classSourcegenerator (instrument): Vrangeselect=""Vstart=1Vstop=0 VStep=1Timestep=1def __init__(self,delaytime=0.2,v0=1.0,vt=-0.1,vs=0.01,ts=0.1,vr=4): 146 Self=instrument ("gpib::1") Self.delay=delaytime Self. Vrangeselect=Vr Self. Vstart=V0 Self. Vstop=Vt Self. VStep=Vs Self. Timestep=Ts Self.write ("C") Self.write ("RP1") Self.write ("PM2") Self.write ("v%s"%str (self. vrangeselect)) cmd="SP"+str (self. Timestep) +"SN"+str (self. Vstart) +","+str (self. Vstop) +","+str (self. VStep) +"ST0"self.write (cmd) Points=abs (self. Vstop-self. Vstart)/(self. VStep)) +1K2000=currentmiter (0.2, Points) self.write ("E") Self.write ("*cls ISE1 *sre8 S0") Self.write ("*TRG") Self.wait_for_srq ()##主程序 fromIvkeithleyImport* fromIvsourceImport* fromVisaImport*if __name__="__main__": Keithley=currentmiter (0.1,10) Source=sourcegenerator (0.2) Source.starttest () Source.write ("*TRG") #source.write ("H")

PV cell Measurement and control system Python code

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.