No project description provided
Project description
pfeiffer-turbo
Python interface for RS485 connections to Pfeiffer HiPace turbo drive units. Supports the TM700 and TC110 electronic drive units, and can also communicate through a TCP/IP socket, for example when using a serial-to-TCP/IP converter for the turbo controller.
Supported drive units
- TM700
- TC110
Examples
RS485 connection example
from pfeiffer_turbo import TC110, SerialTransport
pump = TC110(address=1, transport=SerialTransport(port="COM9"))
# or: pump = TC110.from_serial("COM9", address=1)
# get the rotation speed in Hz
pump.actual_spd
# start the pump
pump.start()
# stop the pump
pump.stop()
TCP/IP connection example
from pfeiffer_turbo import TM700, TcpTransport
pump = TM700(address=1, transport=TcpTransport(host="10.10.222.8", port=12345))
# or: pump = TM700.from_tcp("10.10.222.8", 12345, address=1)
# get the rotation speed in Hz
pump.actual_spd
# start the pump
pump.start()
# stop the pump
pump.stop()
Writable parameters and validation
Parameters marked read-write or write-only by the parameter metadata can be assigned. When assigning values, the library validates:
- type (bool/int/float/str as defined per parameter)
- allowed options (
optionsmap when present) - value limits (
min/maxwhen present)
Write-only parameters raise AttributeError when read.
Example:
# writable
pump.set_rot_spd = 600
pump.error_ackn = True
# raises ValueError (invalid option)
# pump.gas_mode = 999
# raises AttributeError (write-only parameter)
# pump.error_ackn
Implementation
A baseclass DriveUnit:
class DriveUnit:
def __init__(
self,
transport: BaseTransport,
address: int,
supported_parameters: Sequence[int],
):
takes a set of integers that correspond to Pfeiffer vacuum parameters supported by a particular drive unit. Implemented vacuum parameters are defined in parameters.py. Getters and setters are then generated dynamically from supported_parameters and the metadata in parameters.py.
The enum Parameters contains all implemented Pfeiffer vacuum parameters, and the dictionary parameters maps Parameters values to ParameterInfo objects, where ParameterInfo is a dataclass containing the implementation details for a particular parameter:
@dataclass
class ParameterInfo:
designation: str
data_type: DataType
access: Access | str
min: Optional[Union[int, float]] = None
max: Optional[Union[int, float]] = None
unit: Optional[str] = None
default: Optional[Union[int, float, str]] = None
options: Optional[dict[int, str]] = None
New drive units can be implemented by inheriting from DriveUnit and specifying which Pfeiffer parameters are supported by the model. New parameters can be implemented by extending the Parameters enum and the parameters dictionary. Generated class attributes are named similarly to the Pfeiffer parameter names, with underscores inserted between uppercase-to-lowercase transitions and all letters lowercased, for example GasMode becomes 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pfeiffer_turbo-0.3.0.tar.gz.
File metadata
- Download URL: pfeiffer_turbo-0.3.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be45b199ef71297f093ea27c74913aa412525a9c44e0f97cb0c3d829886eea75
|
|
| MD5 |
1b77dd0277427cfb94d5c32c3d416b07
|
|
| BLAKE2b-256 |
c8c988102d939c5231c573ba54b2b3bc34cb82bd2c69587edb757a211ac765ed
|
Provenance
The following attestation bundles were made for pfeiffer_turbo-0.3.0.tar.gz:
Publisher:
publish.yml on ograsdijk/pfeiffer-turbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pfeiffer_turbo-0.3.0.tar.gz -
Subject digest:
be45b199ef71297f093ea27c74913aa412525a9c44e0f97cb0c3d829886eea75 - Sigstore transparency entry: 1355795801
- Sigstore integration time:
-
Permalink:
ograsdijk/pfeiffer-turbo@3d91bc1ff3e8a2d7f0bca8fdcf3c5bb3d1af5a5f -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ograsdijk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3d91bc1ff3e8a2d7f0bca8fdcf3c5bb3d1af5a5f -
Trigger Event:
push
-
Statement type:
File details
Details for the file pfeiffer_turbo-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pfeiffer_turbo-0.3.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78324faeb1f7fc00ac29819d9198275b57f4d7487978bd709f73f8a7a25f8d26
|
|
| MD5 |
cf5e205242e323ba4c7d9eaceed49480
|
|
| BLAKE2b-256 |
d261c32639b6f0e541a019a6b946aecdf05be479af35b455bb2217b5dada50e3
|
Provenance
The following attestation bundles were made for pfeiffer_turbo-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on ograsdijk/pfeiffer-turbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pfeiffer_turbo-0.3.0-py3-none-any.whl -
Subject digest:
78324faeb1f7fc00ac29819d9198275b57f4d7487978bd709f73f8a7a25f8d26 - Sigstore transparency entry: 1355795806
- Sigstore integration time:
-
Permalink:
ograsdijk/pfeiffer-turbo@3d91bc1ff3e8a2d7f0bca8fdcf3c5bb3d1af5a5f -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ograsdijk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3d91bc1ff3e8a2d7f0bca8fdcf3c5bb3d1af5a5f -
Trigger Event:
push
-
Statement type: