#gauges #ip-address #instrument #pressure-sensors #driver #serial-port #tpg36x #vacuum

pfeiffer-tpg36x

A library to control Pfeiffer/Inficon TPG36x vacuum gauges from Rust using instrumentRs

1 unstable release

Uses new Rust 2024

0.1.0 Jul 30, 2025

#972 in Hardware support

MIT/Apache

64KB
841 lines

A rust driver for the Pfeiffer/Inficon TPG36x vacuum gauge controller.

This driver is by default set up to work with the dual gauge model (TPG362), but can also be set up to be used with the single gauge model (TPG361).

Example

This example shows the usage via the TCP/IP interface. An example for the serial port is shown in the Tpg36x documentation.

use instrumentrs::TcpIpInterface;
use pfeiffer_tpg36x::{SensorStatus, Tpg36x};

// IP address and port of the instrument. Adjust to your setup!
let addr = "192.168.1.10:8000";

// Create a new TCP/IP instrument interface and use it to create a new Tpg36x instance.
let tcpip_inst = TcpIpInterface::simple(addr).unwrap();
let mut inst = Tpg36x::try_new(tcpip_inst).unwrap();

// Check if the the first pressure sensor is on and if so, read the pressure and print it.
let mut sensor1 = inst.get_channel(0).unwrap();
let status = sensor1.get_status().unwrap();

if status == SensorStatus::On {
    println!("Current pressure: {}", sensor1.get_pressure().unwrap());
}

Pfeiffer/Inficon TPG36x

Instrument driver for the Pfeiffer/Inficon TPG36x series of vacuum gauges.

To run the examples, you can use the following command:

cargo run --example $NAME

Here, $NAME should be replaced with the name of the example you want to run.

Dependencies

~3–14MB
~126K SLoC