Contents:
Device class for Pfeiffer TPG controllers.
The Pfeiffer TPG control units are used to control Pfeiffer Compact Gauges. Models: TPG 251 A, TPG 252 A, TPG 256A, TPG 261, TPG 262, TPG 361, TPG 362 and TPG 366.
Manufacturer homepage: https://www.pfeiffer-vacuum.com/en/products/measurement-analysis/ measurement/activeline/controllers/
PfeifferTPG
Bases: hvl_ccb.dev.base.SingleCommDevice
hvl_ccb.dev.base.SingleCommDevice
Pfeiffer TPG control unit device class
PressureUnits
Bases: hvl_ccb.utils.enum.NameEnum
hvl_ccb.utils.enum.NameEnum
Enum of available pressure units for the digital display. “0” corresponds either to bar or to mbar depending on the TPG model. In case of doubt, the unit is visible on the digital display.
Micron
Pascal
Torr
Volt
bar
hPascal
mbar
SensorStatus
Bases: enum.IntEnum
enum.IntEnum
An enumeration.
Identification_error
No_sensor
Ok
Overrange
Sensor_error
Sensor_off
Underrange
SensorTypes
Bases: enum.Enum
enum.Enum
CMR
IKR
IKR11
IKR9
IMR
None
PBR
PKR
TPR
noSENSOR
noSen
config_cls
Return the default configdataclass class.
a reference to the default configdataclass class
default_com_cls
Get the class for the default communication protocol used with this device.
the type of the standard communication protocol for this device
get_full_scale_mbar
Get the full scale range of the attached sensors
full scale range values in mbar, like [0.01, 1, 0.1, 1000, 50000, 10]
SerialCommunicationIOError – when communication port is not opened
PfeifferTPGError – if command fails
get_full_scale_unitless
Get the full scale range of the attached sensors. See lookup table between command and corresponding pressure in the device user manual.
list of full scale range values, like [0, 1, 3, 3, 2, 0]
identify_sensors
Send identification request TID to sensors on all channels.
measure
Get the status and measurement of one sensor
channel – int channel on which the sensor is connected, with 1 <= channel <= number_of_sensors
measured value as float if measurement successful, sensor status as string if not
measure_all
Get the status and measurement of all sensors (this command is not available on all models)
list of measured values as float if measurements successful, and or sensor status as strings if not
number_of_sensors
set_display_unit
Set the unit in which the measurements are shown on the display.
set_full_scale_mbar
Set the full scale range of the attached sensors (in unit mbar)
fsr – full scale range values in mbar, for example [0.01, 1000]
set_full_scale_unitless
Set the full scale range of the attached sensors. See lookup table between command and corresponding pressure in the device user manual.
fsr – list of full scale range values, like [0, 1, 3, 3, 2, 0]
start
Start this device. Opens the communication protocol, and identify the sensors.
SerialCommunicationIOError – when communication port cannot be opened
stop
Stop the device. Closes also the communication protocol.
unit
The pressure unit of readings is always mbar, regardless of the display unit.
PfeifferTPGConfig
Bases: object
object
Device configuration dataclass for Pfeiffer TPG controllers.
Model
TPG25xA
TPGx6x
is_valid_scale_range_reversed_str
Check if given string represents a valid reversed scale range of a model.
v – Reversed scale range string.
True if valid, False otherwise.
clean_values
force_value
Forces a value to a dataclass field despite the class being frozen.
NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.
fieldname – name of the field
value – value to assign
is_configdataclass
keys
Returns a list of all configdataclass fields key-names.
a list of strings containing all keys.
model
optional_defaults
Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.
a list of strings containing all optional keys.
required_keys
Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.
a list of strings containing all required keys.
PfeifferTPGError
Bases: Exception
Exception
Error with the Pfeiffer TPG Controller.
PfeifferTPGSerialCommunication
Bases: hvl_ccb.comm.serial.SerialCommunication
hvl_ccb.comm.serial.SerialCommunication
Specific communication protocol implementation for Pfeiffer TPG controllers. Already predefines device-specific protocol parameters in config.
query
Send a query, then read and returns the first line from the com port.
cmd – query message to send to the device
first line read on the com
PfeifferTPGError – if the device does not acknowledge the command or if the answer from the device is empty
send_command
Send a command to the device and check for acknowledgement.
cmd – command to send to the device
PfeifferTPGError – if the answer from the device differs from the expected acknowledgement character ‘chr(6)’.
PfeifferTPGSerialCommunicationConfig
Bases: hvl_ccb.comm.serial.SerialCommunicationConfig
hvl_ccb.comm.serial.SerialCommunicationConfig
baudrate
Baudrate for Pfeiffer TPG controllers is 9600 baud
bytesize
One byte is eight bits long
parity
Pfeiffer TPG controllers do not use parity
stopbits
Pfeiffer TPG controllers use one stop bit
terminator
The terminator is <CR><LF>
timeout
use 3 seconds timeout as default