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.2.tar.gz
.
File metadata
- Download URL: pfeiffer-turbo-0.1.2.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 | 394550e785cf6bce6f18cff0b28849c0dfec14f35d46cb386293ffd753a6c4ca |
|
MD5 | 952ea35bd9d243cbf1b263dbdee9f56b |
|
BLAKE2b-256 | b2d96ee777ed12b81e3b4876c41c6f7472da20b2b8527b03f585c1a8a285aefc |
File details
Details for the file pfeiffer_turbo-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pfeiffer_turbo-0.1.2-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 | 19ca97dee8dcada7a99dd2439de848b7381bddc9a4edc14308c960bed7ccd765 |
|
MD5 | ed638a1e10ccbf507fb6308a127de98a |
|
BLAKE2b-256 | 64608dcdd89ed82d78143c2d39dc03802d231433e67176eea96c8a7899bc1fee |