Skip to main content

No project description provided

Project description

pfeiffer-turbo

Python versions on PyPI pfeiffer-turbo version on PyPI Code style: black
Python interface RS485 connections for Pfeiffer HiPace turbo drive units. Currently only the TM700 is implemented. Also supports connecting through a TCPIP socket, e.g. when using a serial to TCPIP converter for the turbo controller.

Example

RS485 connection example

from pfeiffer_turbo import TM700

pump = TM700(resource_name = "COM9", address = 1)

# get the rotation speed in Hz
pump.actual_spd

# start the pump
pump.start()

# stop the pump
pump.stop()

TCPIP connection example

from pfeiffer_turbo import TM700

pump = TM700(
    resource_name="10.10.222.8:12345", address=1, connection_type=ConnectionType.TCPIP
)

# get the rotation speed in Hz
pump.actual_spd

# start the pump
pump.start()

# stop the pump
pump.stop()

Implementation

A baseclass DriveUnit:

class DriveUnit:
    def __init__(
        self,
        resource_name: str,
        address: int,
        connection_type: ConnectionType,
        supported_parameters: Sequence[int],
    ):

takes in a set of integers that correspond to pfeiffer vacuum parameters supported by the particular drive unit. Implemented vacuum parameters are seen in parameters.py. The getters and setters are then dynamically generated based on the supported_parameters and info in parameters.py; the enum Parameters contains all implemented pfeiffer vacuum parameters, and the dictionary parameters contains key, value pairs of Parameters and ParameterInfo, where ParameterInfo is a dataclass containing the implemenation information for a particular parameter:

@dataclass
class Parameter:
    designation: str
    data_type: DataType
    access: StopIteration
    min: Optional[int] = None
    max: Optional[int] = None
    unit: Optional[str] = None
    default: Optional[Union[int, float, str]] = None
    options: Optional[dict[int, str]] = None

Implementing new drive units is be done by inheriting from DriveUnit and specifying which pfeiffer parameters are supported by the specific model. New parameters can be implemented by extending the Parameters enum and parameters dictionary. The class attributes are named similarly to the Pfeiffer vacuum parameters, with underscores inserted between uppercase - lowercase transitions and all lowercase letters. E.g. GasMode -> gas_mode.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pfeiffer-turbo-0.1.2.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

pfeiffer_turbo-0.1.2-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page