No project description provided
Project description
pfeiffer-turbo
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
Release history Release notifications | RSS feed
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
File details
Details for the file pfeiffer-turbo-0.1.1.tar.gz
.
File metadata
- Download URL: pfeiffer-turbo-0.1.1.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.9.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 456a116b58db1c8d466f9b11e3a79c412cae257e41ac8b3c568f09dedd2f2c68 |
|
MD5 | 9e2b0393662e2d9a4a6e493d122fac1f |
|
BLAKE2b-256 | eae8ade3137f467747562344710e7fd216f3eced2c137eb53a9fc284d2248164 |
File details
Details for the file pfeiffer_turbo-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pfeiffer_turbo-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.9.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36c971377c52262b44ad88971a63b111bb3564784baed3e358ab4f5d5ba2a2a7 |
|
MD5 | dbf9732c64a0d41e85bcdc3909872b6a |
|
BLAKE2b-256 | 0f1f1188b067838411b5db71796e2549b3b4269631b9920226053220f92ed379 |