The epimax module

Autogenerated API documentation for epimax

Driver for the Epimax PVCi process vacuum controller

There are three controllers share the same kind of communication:

  • PVCX
  • PVCi
  • PVCiDuo

The structure of the communication to these devices is the same and a part of the parameters are also the same, but there are also some parameters that differ. Therefore, the driver is implemented in such a way, that there is a base class (PVCCommon) that contains the communication functionality and the parameter from the common parameter definition. There can then be one class for each of the 3 specific devices, that adds in the parameters that are specific to this device. To see how that works, look at the PVCi class.

The implementation in this file is based on the documents:

  • “EMComm MODBUS Communications Handbook” version 3.10
  • “PVCX, PVCi & PVCiDuo EMComm Parameter List Handbook” version 3.00 (hereafter referred to as the parameter list)

Unfortunately, these documents are not (that I could find) available on the web and must be fetched by emailing Epimax support.


At present only the PVCi driver is implemented and only partially


At present no writing is implemented

class PyExpLabSys.drivers.epimax.PVCCommon(port, slave_address=1, check_hardware_version=True)[source]

Bases: minimalmodbus.Instrument

Common base for the PVCX, PVCi and PVCiDuo devices

This common class must be sub-classed and the global_id and firmware_name class variables overwritten and the self.fields dict updated if necessary. See the PVCi inplementation for details.

All requests for values (parameters) goes via value field names. To get a list of the available fields, have a look at the keys in the fields dict of the common class and the sub-class. These fields names can then be used with get_field() and get_fields() method or accessed as if they were attributes of the class.

Remember to call .close() after use.

__init__(port, slave_address=1, check_hardware_version=True)[source]

Initialize communication

  • port (unicode) – The port specification of the device e.g. ‘/dev/????’
  • slave_address (int) – The address of the slave device, default is 1
  • check_hardware_version (bool) – Indicated whether a check should be performed for correct hardware at __init__ time

Close the serial connection


Return the value for the field named field_name

Parameters:field_name (str) – The name of the field to get. The names used are adapted parameter names from the command list turned. See the keys in fields to see all possible values.
Returns:An object with type corresponding to the value (int, float or str)
Return type:object
Raises:KeyError – If the requested field_name is unknown

Return a dict with fields and values for a list of fields

This method is specifically for getting multiple values in the shortest amount of time. It works by always reading the maximum amount of registers (32) at a time and then using the remaining payload for subsequent values if they happen to be contained in the registers that have already been read.

Parameters:fields (sequence or unicode) – A sequence (list, tuple) of fields names or ‘common’ which indicates fields with an address between 0x80 and 0x9E (this is the default) or ‘all’.
Returns:Field name to value mapping
Return type:dict
class PyExpLabSys.drivers.epimax.PVCi(*args, **kwargs)[source]

Bases: PyExpLabSys.drivers.epimax.PVCCommon

Driver for the PVCi device

For details of the functionality of this driver, see the docstring for the common base class PVCCommon

__init__(*args, **kwargs)[source]

For specification for __init__ arguments, see PVCCommon.__init__()


Convert 4 bytes to firmware type and version

PyExpLabSys.drivers.epimax.bytes_to_string(bytes_, valid_chars=None)[source]

Convert the 16 bit integer values from registers to a string

Parameters:valid_chars (sequence) – Sequence of two integers indicating the start and end of a range of valid bytes (both values included). All chars outside the range will be filtered out.

Convert 2 16 bit registers to a float


Convert 4 bytes to the slot ID

PyExpLabSys.drivers.epimax.bytes_to_status(bytes_, status_type)[source]

Convert bytes to trip and digital input statuses


Convert a byte to a list of bits

PyExpLabSys.drivers.epimax.raise_if_not_set(bits, index, parameter)[source]

Raise a ValueError if bit is not set

PyExpLabSys.drivers.epimax.ion_gauge_status(bytes_, controller_type=None)[source]

Read of ion gauge status


Returns the bakeout flags from bytes


Tests basic functionality

Will init a PVCi on USB0 and out all info fields and gauge 1 pressure and bakeout info continuously