The pfeiffer_turbo_pump module

Autogenerated API documentation for pfeiffer_turbo_pump

Self contained module to run a Pfeiffer turbo pump including fall-back text gui and data logging.

class PyExpLabSys.drivers.pfeiffer_turbo_pump.CursesTui(turbo_instance)[source]

Bases: threading.Thread

Text gui for controlling the pump

__init__(turbo_instance)[source]

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

stop()[source]

Cleanup terminal

class PyExpLabSys.drivers.pfeiffer_turbo_pump.TurboReader(turbo_instance)[source]

Bases: threading.Thread

Keeps track of all data from a turbo pump with the intend of logging them

__init__(turbo_instance)[source]

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class PyExpLabSys.drivers.pfeiffer_turbo_pump.TurboLogger(turboreader, parameter, maximumtime=600)[source]

Bases: threading.Thread

Read a specific value and determine whether it should be logged

__init__(turboreader, parameter, maximumtime=600)[source]

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

read_value()[source]

Read the value of the logger

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class PyExpLabSys.drivers.pfeiffer_turbo_pump.TurboDriver(adress=1, port='/dev/ttyUSB3')[source]

Bases: threading.Thread

The actual driver that will communicate with the pump

__init__(adress=1, port='/dev/ttyUSB3')[source]

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

comm(command, read=True)[source]

Implementaion of the communication protocol with the pump. The function deals with common syntax need for all commands.

Parameters:
  • command (str) – The command to send to the pump
  • read (Boolean) – If True, read only not action performed
Returns:

The reply from the pump

Return type:

Str

crc_calc(command)[source]

Helper function to calculate crc for commands :param command: The command for which to calculate crc :type command: str :return: The crc value :rtype: Str

read_rotation_speed()[source]

Read the rotational speed of the pump

Returns:The rotaional speed in Hz
Return type:Float
read_set_rotation_speed()[source]

Read the intended rotational speed of the pump

Returns:The intended rotaional speed in Hz
Return type:Int
read_operating_hours()[source]

Read the number of operating hours

Returns:Number of operating hours
Return type:Int
read_gas_mode()[source]

Read the gas mode :return: The gas mode :rtype: Str

read_vent_mode()[source]

Read the venting mode :return: The venting mode :rtype: Str

read_sealing_gas()[source]

Read whether sealing gas is applied :return: The sealing gas mode :rtype: Str

is_pump_accelerating()[source]

Read if pump is accelerating :return: True if pump is accelerating, false if not :rtype: Boolean

turn_pump_on(off=False)[source]

Spin the pump up or down :param off: If True the pump will spin down :type off: Boolean :return: Always returns True :rtype: Boolean

read_temperature()[source]

Read the various measured temperatures of the pump :return: Dictionary with temperatures :rtype: Dict

read_drive_power()[source]

Read the current power consumption of the pump :return: Dictionary containing voltage, current and power :rtype: Dict

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.