Pfeiffer Vacuum Instruments

TPG36x Vacuum Gauge Controller

class instruments.pfeiffer.TPG36x(filelike)[source]

The Pfeiffer TPG361/2 is a vacuum gauge controller with one/two channels.

By default, the two channel version is intialized. If you have the one channel version (TPG361), set the number_channels property to 1.

Example usage:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> ch = inst.channel[0]
>>> ch.pressure
4.7634 millibar
class Channel(parent, chan)[source]

Class representing a sensor attached to the TPG 362.

Warning

This class should NOT be manually created by the user. It is designed to be initialized by the TPG36x class.

class SensorStatus(*values)[source]

Enum to get the status of the sensor.

CANNOT_TURN_ON_OFF = 0
OFF = 1
ON = 2
property pressure

The pressure measured by the channel, returned as a pint.Quantity with the correct units attached (based on instrument settings).

This routine also does error checking on the pressure reading and raises an IOError with adequate message if, e.g., no sensor is connected to the channel.

Returns:

Pressure on given channel.

Return type:

u.Quantity

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> ch = inst.channel[0]
>>> ch.pressure
4.7634 millibar
property status

Get/set the status of a channel (sensor).

Returns:

The status of the sensor.

Return type:

TPG36x.Channel.SensorStatus

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> ch = inst.channel[0]
>>> ch.status
SensorStatus.ON
class EthernetMode(*values)[source]

Enum go get/set the ethernet mode of the device when configuring.

DHCP = 1
STATIC = 0
class Language(*values)[source]

Enum to get/set the language of the device.

ENGLISH = 0
FRENCH = 2
GERMAN = 1
class Unit(*values)[source]

Enum for the pressure units.

HPASCAL = 4
MBAR = 0
MICRON = 3
PASCAL = 2
TORR = 1
VOLT = 5
query(cmd)[source]

Query the TPG36x with the enquire command.

Returns:

The response from the TPG36x.

property channel

Gets a specific channel object.

Note that the channel number is pythonic, i.e., the first channel is 0.

Return type:

TPG36x.Channel

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> ch = inst.channel[0]
property ethernet_configuration

Get / set the ethernet configuration of the TPG36x.

Note

If you set the configuration to DHCP, you should simply send TPG36x.EthernetMode.DHCP as the sole value. To set it to static, you must provide a list of 4 elements: [EthernetMode, IP, Subnet, Gateway]. The types are as follows: TPG36x.EthernetMode, str, str, str.

Returns:

List of the current configuration: 0. Configuration enum TPG36x.EthernetMode 1. IP address as string (or ipaddress.ip_address) 2. Subnet mask as string (or ipaddress.ip_address) 3. Gateway as string (or ipaddress.ip_address)

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> inst.ethernet_configuration = [inst.EthernetMode.STATIC, "192.168.1.42", "255.255.255.0", "192.168.1.1"]
>>> inst.ethernet_configuration
[<EthernetMode.STATIC: 0>, "192.168.1.42", "255.255.255.0", "192.168.1.1"]
property language

Get/set the language of the TPG36x.

Return type:

TPG36x.Language

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> inst.language
Language.ENGLISH
property mac_address

Get the MAC address of the TPG36x.

Returns:

MAC address of the TPG36x.

Return type:

str

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> inst.mac_address
"00:1A:2B:3C:4D:5E"
property name

Get the name from the TPG36x.

Return type:

str

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> inst.name
"TPG362"
property number_channels

The number of channels on the TPG36x.

This defaults to two channels. Set this to 1 if you have a one gauge instrument, i.e., a TPG361.

Return type:

int

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> inst.number_channels
2
property pressure

The pressure measured by the first channel.

To select the channel, get a channel first and then call the pressure method on it.

Return type:

pint.Quantity

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> inst.pressure
0.02 * u.mbar
property unit

Get/set the unit of the TPG36x (global to the instrument).

Returns:

The current unit.

Return type:

TPG36x.Unit

Example:
>>> import instruments as ik
>>> inst = ik.pfeiffer.TPG36x.open_serial("/dev/ttyUSB0", 9600)
>>> inst.unit
Unit.MBAR