示例#1
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {
         "*PP0?\n": "0",
         "*PP0 1\n": "",
         "*DC1\n": "",
     }
     self.i = Ieee4881(socket)
示例#2
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {
         ":r 007\r": ":r 007\r\n:1234\r\n:OK   \r\n",
         ":r 00E\r": ":r 00E\r\n:0\r\n:OK   \r\n",
         ":r 60B\r": ":r 60B\r\n:5\r\n:OK   \r\n",
         ":w 60B 5\r": ":w 60B 5\r\n:OK   \r\n"
     }
     self.i = CS400(socket)
示例#3
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {
         "GETD00\r": "012003\rOK\r",
         "GETS00\r": "012003\rOK\r",
         "GMAX00\r": "400500\rOK\r",
         "VOLT00014\r": "OK\r",
     }
     self.i = Pt1885(socket)
示例#4
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {
         "SOUR:VOLT?\n": "1.7\n",
         "SOUR:CURR?\n": "0.5\n",
         "SYST:VERS?\n": "1.2345\n",
         "*RST\n": "",
     }
     self.i = ScpiPowerSupply(socket)
示例#5
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {
         "DS\r": "0\r",
         "ID\r": "0\rFLUKE 89,V0.39,123456789\r",
         "QM\r": "0\rQM,+47.66 KOhms\r",
         "SF 10\r": "0\r"
     }
     self.i = Fluke18x(socket)
示例#6
0
 def setUp(self):
     socket = drv.TesterSocket()
     # socket.msg = {} such as: dict(send message: receive message)
     socket.msg = {
         "? PB1\r": "\x13\x1111\r",  # send lhs, receive rhs
         "= DE1 3\r": "\x13\x11",
         "? C1\r": "\x13\x1150\r",
         "= SP1 25\r": "\x13\x11"
     }
     self.i = Series982(socket)
示例#7
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {
         "? SP1\r": "\x13\x1125\r",
         "? PWR\r": "\x13\x115\r",
         "? ER2\r": "\x13\x110\r",
         "? AMB\r": "\x13\x1172\r",
         "= SP1 32\r": "\x13\x11",
         "= PB1A 12\r": "\x13\x11"
     }
     self.i = Series988(socket)
示例#8
0
    def setUp(self):
        from .ieee488_1 import Ieee4881
        class Driver(Ieee4881, Ieee4882): pass

        socket = drv.TesterSocket()
        socket.msg = {"*TST?\n": "1\n",
                      "*IDN?\n": "TEST, UNIT, 488, 2\n",
                      "*RST 2\n": "",
                      "*RST\n": "",
                      "*DC1\n": ""
                     }
        self.i = Driver(socket)
示例#9
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {# DPL
                   "U\n": "13\r\n\x04",
                   "FU\n": "70\r\n\x04",
                   "FI\n": "35\r\n\x04",
                   # 488.2
                   "*IDN?\n": "TEST, UNIT, 488, 2\n",
                   # SCPI
                   "SO:VO?\n": "0.25\r\n\x04",
                   "SO:VO 0.25\n": "",
                   "SO:FU:RSD?\n": "0\r\n\x04",
                   "SO:FU:RSD OFF\n": "",
                   "CA:CU:ME:GA?\n": "14810\r\n\x04",
                   "SO:VO:MA?\n": "70\r\n\x04",
                   "SO:CU:MA?\n": "37\r\n\x04"
                  }
     self.i = Sm700Series(socket)
示例#10
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {
         # 3.10.1: set setpoint node 3 to 50%
         ":06030101213E80\r\n": ":0403000005\r\n",
         # 3.10.3: request setpoint node 3 (-> 50%)
         ":06030401210121\r\n": ":06030201213E80\r\n",
         # 3.10.5: request measure from node 3 (50%)
         ":06030401210120\r\n": ":06030201213E80\r\n",
         # 3.10.6: request counter value from node 3, process 104, float
         ":06030468416841\r\n": ":0803026841459cffae\r\n",
         # set alarm.max_limit to 10 (secured UINT)
         ":0C0301800A40E121000A000A52\r\n": ":040300000b\r\n",
         # set fluid to "WATER" (secured str)
         ":110301800A40817100574154455200000A52\r\n": ":040300000f\r\n",
         # req control mode (process 1, parameter 4, CHAR), ret 10
         ":06030401010104\r\n": ":05030201040A\r\n",
         # req valve output (process 114, parameter 1, ULONG), ret 93.75
         ":06030472417241\r\n": ":080302724100f00000\r\n",
         # req usertag (process 113, parameter 6, STRING), ret USER
         ":0703047161716600\r\n": ":0A03027166005553455200\r\n"
     }
     self.i = Controller(socket)
示例#11
0
from pyhard2.driver.digitek import DT80k
from pyhard2.driver.fluke import Fluke18x
from pyhard2.driver.ieee.scpi import ScpiPowerSupply, ScpiDCVoltmeter
from pyhard2.driver.keithley import Model6487
from pyhard2.driver.peaktech import Pt1885
from pyhard2.driver.pfeiffer import Maxigauge
from pyhard2.driver.virtual import VirtualInstrument
from pyhard2.driver.watlow import Series988

from graph import generate_graph

for driver_type in (Ngc2d,
                    CS400,
                    Controller,
                    Daq,
                    Sm700Series,
                    DT80k,
                    Fluke18x,
                    ScpiPowerSupply,
                    ScpiDCVoltmeter,
                    Model6487,
                    Pt1885,
                    Maxigauge,
                    VirtualInstrument,
                    Series988):
    driver = driver_type(drv.TesterSocket())
    name = driver.__class__.__name__
    generate_graph(name, driver, os.path.join("documentation", "gv",
                                              ".".join((name, "txt"))))

示例#12
0
 def setUp(self):
     socket = drv.TesterSocket()
     # Return a pressure of 1.3e-7 mbar.
     socket.msg = {"*S0\r\n": "GI1\x65\x001.3E-07,M0\r\n"}
     self.i = Ngc2d(socket)
示例#13
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {"PR1\r\n": "\x06\r\n0,1.234E-2\r\n",
                   "UNI\r\n": "\x06\r\n0\r\n",
                   "\x05\r\n": ""}
     self.i = Maxigauge(socket)
示例#14
0
 def setUp(self):
     socket = drv.TesterSocket()
     socket.msg = {"CALC:STAT ON\n": "",
                   "CALC:KMAT:MMF 0.002\n": "",
                   "CALC:DATA?\n": "12",}
     self.i = Model6487(socket)