devctrl.devices.pressure_sensor.impl.ionivac_itr90.Ionivac_ITR90#
- class Ionivac_ITR90(port)[source]#
Bases:
PressureSensorCommunication with a Ionivac ITR90 pressure sensors. This class supports: - reading the current pressure - setting the unit that is displayed on the device - start/stop a degas process
The communication protocol is described in detail the device manual.
Methods
Manually add a specific device.
Connect an instance of the device's dummy implementation
Return a flat dictionary of all base classes below this class :param recurse: If True, recursively search for base classes :return: dict of {class name: class}
Query whether the device is (still) connected
Get a list of all devices for this type.
Read information from the sensors.
Read the device status.
Attributes
- COMMANDS = {'degas_off': [16, 93, 105], 'degas_on': [16, 93, 148], 'set_Pa': [16, 62, 2], 'set_Torr': [16, 62, 1], 'set_mbar': [16, 62, 0], 'store_unit': [32, 62, 62]}#
- _CLASS_TYPE = 'implementation'#
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'_manual_devices': list[str]}#
- __dict__ = mappingproxy({'__module__': 'devctrl.devices.pressure_sensor.impl.ionivac_itr90', '__firstlineno__': 12, '__doc__': '\nCommunication with a Ionivac ITR90 pressure sensors.\nThis class supports:\n- reading the current pressure\n- setting the unit that is displayed on the device\n- start/stop a degas process\n\nThe communication protocol is described in detail the device manual. \n', '_CLASS_TYPE': 'implementation', '__init__': <function Ionivac_ITR90.__init__>, 'read_sensor': <function Ionivac_ITR90.read_sensor>, 'read_status': <function Ionivac_ITR90.read_status>, 'get_status': <function Ionivac_ITR90.get_status>, 'read_error': <function Ionivac_ITR90.read_error>, 'COMMANDS': {'set_mbar': [16, 62, 0], 'set_Torr': [16, 62, 1], 'set_Pa': [16, 62, 2], 'store_unit': [32, 62, 62], 'degas_on': [16, 93, 148], 'degas_off': [16, 93, 105]}, 'flush': <function Ionivac_ITR90.flush>, 'send_cmd': <function Ionivac_ITR90.send_cmd>, '_send_cmd': <function Ionivac_ITR90._send_cmd>, '_calc_pressure': <staticmethod(<function Ionivac_ITR90._calc_pressure>)>, 'get_pressure_mbar': <function Ionivac_ITR90.get_pressure_mbar>, 'is_connected': <function Ionivac_ITR90.is_connected>, '_enumerate_devices': <staticmethod(<function Ionivac_ITR90._enumerate_devices>)>, 'connect_device': <staticmethod(<function Ionivac_ITR90.connect_device>)>, '__repr__': <function Ionivac_ITR90.__repr__>, '__static_attributes__': ('dev',), '__abstractmethods__': frozenset(), '_abc_impl': <_abc._abc_data object>, '_children': {}, '_manual_devices': []})#
- __firstlineno__ = 12#
- __module__ = 'devctrl.devices.pressure_sensor.impl.ionivac_itr90'#
- __repr__()[source]#
- Returns:
The name of the device. If applicable, this should include serial port, GPIB address, etc.
- __slots__ = ()#
- __static_attributes__ = ('dev',)#
- __weakref__#
list of weak references to the object
- _abc_impl = <_abc._abc_data object>#
- static _calc_pressure(hi_byte, lo_byte, unit='mbar') float[source]#
Calculate the pressure from the high and low bytes and the unit. Formulas are given in the device manual.
- _children = {}#
- _dummies_only = False#
- static _enumerate_devices() list[str][source]#
Require a serial device with: - no product field - non-empty serial number - manufacturer = FTDI (Manufacturer if the Ionivac ITR-90s serial chip)
- _manual_devices: list[str] = []#
- classmethod add_device(connect_info)#
Manually add a specific device. The device will show up when list_devices() is called for the device type. Call this from the device class implementation, e.g. use ModelXYZ9000.add_device(‘GPIB:1234:5678’) to add a specific device with a fixed GPIB address. This is useful when automatic discovery is undesired/impossible, either because it is not implemented or it disturbs other devices which can’t handle a identification request. :param cls: The device implementation class :param connect_info: A string argument that is passed to the connect() method of the device implementation, when the device is being connected.
- static allow_only_dummy_devices()#
- classmethod connect(device_type_name: str, device_name: str | None, **kwargs) Device#
- Parameters:
device_type_name – The name of the device class
device_name – The name of the device class
- static connect_device(device_name: str)[source]#
- Parameters:
device_name – Name as returned by enumerate_devices. Must contain ‘port=(<port>)’
- Returns:
Device instance
- classmethod connect_dummy(**kwargs) Device#
Connect an instance of the device’s dummy implementation
- classmethod get_base_classes(recurse=True) dict[str, type[Device]]#
Return a flat dictionary of all base classes below this class :param recurse: If True, recursively search for base classes :return: dict of {class name: class}
- classmethod get_device_name() str#
- Returns:
The specific type name of the device, e.g., SR830 or Keithly2600
- classmethod get_device_type_name() str#
- Returns:
The general type name of the device, e.g., Lock-In Amplifier or Voltmeter
- classmethod list_devices() list[tuple[str, str]]#
Get a list of all devices for this type. The list made up of: - Manually added devices - Available devices (those returned by _enumerate_devices) - A dummy device (if a dummy implementation exists) - List of all devices of child classes
- Returns:
list of available devices
- read_sensor(strict=True, max_tries=10) tuple[int, int, int, int, int][source]#
Read information from the sensors.
The device sends information every 20 ms, so we simply wait until the next package is sent.
- Parameters:
strict – Disregard sent information if fixed bytes differ from what is stated in the manual.
max_tries – Maximum number of lines to read until raising an error. Set to a higher value if the communication is unstable.
- Returns:
status byte, error byte, pressure high byte, pressure low byte, version byte
- read_status(status=None, **read_sensor_kw) tuple[str, str, str][source]#
Read the device status. :param status: The device status byte. If not given, read_device will be used. :param strict: See read_sensor :return: emission status string, calibration status string, current unit string. Strings may be empty if an invalid byte was received.