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:
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
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
PVCCommon(port, slave_address=1, check_hardware_version=True)¶
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
PVCiinplementation 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
fieldsdict of the common class and the sub-class. These fields names can then be used with
get_fields()method or accessed as if they were attributes of the class.
Remember to call
__init__(port, slave_address=1, check_hardware_version=True)¶
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
fieldsto 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
Driver for the PVCi device
For details of the functionality of this driver, see the docstring for the common base class
Convert 4 bytes to firmware type and version
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
Convert bytes to trip and digital input statuses
Convert a byte to a list of bits
raise_if_not_set(bits, index, parameter)¶
Raise a ValueError if bit is not set
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