Esempio n. 1
0
 def __init__(self, port):
     super(IGM401, self).__init__(
         SerialAdapter(port, 19200, timeout=0.5),
         "InstruTech IGM401 Ionization Vacuum Gauge",
         includeSCPI=False,
     )
     hw, sw = self.module_version()
     self.hardware_ver = hw
     self.software_ver = sw
Esempio n. 2
0
def test_separate_adapter_discards_additional_args():
    """When passing in a separate Adapter instance, all connection-specific args and settings
    are ignored.
    """
    ser = SerialAdapter(serial.serial_for_url("loop://"))
    instr = MultiprotocolInstrument(ser,
                                    baud_rate=1234,
                                    wrong_kwarg='fizzbuzz')
    assert instr.adapter.connection.baudrate == 9600  # default of serial
Esempio n. 3
0
def test_use_separate_SerialAdapter():
    """As a user, I want to be able to supply a self-generated Adapter instance
    (e.g. to enable serial connection sharing over RS-485/-422)
    """
    # note: baudrate, not baud_rate, as this goes to pyserial
    ser = SerialAdapter(serial.serial_for_url("loop://", baudrate=4800))
    instr = MultiprotocolInstrument(ser)
    # don't need visa_library here as this does not go to pyvisa, kwargs are ignored if provided
    assert instr.adapter.connection.baudrate == 4800
Esempio n. 4
0
 def __init__(self, port):
     super().__init__(
         SerialAdapter(port, 2400, timeout=0.5),
         "F.W. Bell 5080 Handheld Gaussmeter"
     )
Esempio n. 5
0
 def __init__(self, port):
     super(ParkerGV6, self).__init__(SerialAdapter(port, 9600, timeout=0.5),
                                     "Parker GV6 Motor Controller")
     self.setDefaults()
Esempio n. 6
0
def make_adapter(**kwargs):
    return SerialAdapter(serial.serial_for_url("loop://", **kwargs))
Esempio n. 7
0
 def __init__(self, port, rw_delay=None, **kwargs):
     super(ThorlabsTC200USB,
           self).__init__(SerialAdapter(port, baudrate=115200, timeout=0.1),
                          "Thorlabs TC200 Temperature Controller", **kwargs)