Metadata-Version: 2.4
Name: pfeifferhicube
Version: 0.1.1
Summary: Library for basic control of the Pfeiffer Vacuum HiCube Neo
Author: Jonas Grage
Author-email: Jonas Grage <grage@physik.tu-berlin.de>
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Instrument Drivers
Requires-Dist: opcua>=0.98.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# PfeifferHiCube

A Python library for basic control of the Pfeiffer Vacuum HiCube Neo vacuum pump system via OPC-UA.

## Usage

Connect to the HiCube Neo by providing its IP address or hostname. The recommended way is to use a `with` statement, which ensures the connection is cleanly closed after use:

```
from pfeifferhicube import HiCubeNeo

with HiCubeNeo("192.168.1.100") as cube:
    cube.evacuate()
    
    # Now both pumps of the system should be turned on
    print(cube.turbopump)   # True
    print(cube.backingpump) # True
```

The object can also be instantiated directly, in which case the connection is closed when the object is garbage collected:

```
cube = HiCubeNeo("192.168.1.100")
cube.evacuate()
```
### Constructor Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `host` | `str` | — | IP address or hostname of the HiCube Neo |
| `port` | `int` | `4840` | TCP port of the OPC-UA server |
| `timeout` | `float` | `4` | Timeout in seconds for server responses |

### Pump control

| Method | Description |
|---|---|
| `evacuate()` | Enable backing pump and turbopump |
| `vent()` | Disable turbopump and backing pump |
| `enable_turbopump()` | Enable turbopump only |
| `disable_turbopump()` | Disable turbopump only |
| `enable_backingpump()` | Enable backing pump only |
| `disable_backingpump()` | Disable backing pump only |

The pump states can also be read and set directly via properties:

```
cube.turbopump = True   # enable turbopump
cube.turbopump = False  # disable turbopump
print(cube.turbopump)   # read turbopump state

cube.backingpump = True   # enable backing pump
cube.backingpump = False  # disable backing pump
print(cube.backingpump)   # read backing pump state
```

### Relay control

| Method | Description |
|---|---|
| `enable_relay1()` | Switch relay 1 |
| `disable_relay1()` | Return relay 1 to normal position |
| `enable_relay2()` | Switch relay 2 |
| `disable_relay2()` | Return relay 2 to normal position |

Relay states can also be read and set via properties:

```
cube.relay1 = True
print(cube.relay1)
cube.relay2 = True
print(cube.relay2)
```

## License

**MIT License** - Copyright (c) 2026 Jonas Grage
