Skip to content

pgva_interface

PGVA Interface class.

Abstract interface description for exportation to CoDeSys libraries and other systems for consistent integration

PGVAInterface

Bases: ABC

Interface class for PGVA that needs to be implemented by the user.

Source code in src/pgva/pgva_interface.py
class PGVAInterface(ABC):
    """Interface class for PGVA that needs to be implemented by the user."""

    @abstractmethod
    def __init__(self, config):
        """Abstract function for constructor of the driver class."""
        pass

    @abstractmethod
    def set_output_pressure(self, pressure: int):
        """Abstract function for setting output pressure."""
        pass

    @abstractmethod
    def trigger_actuation_valve(self, actuation_time: int):
        """Abstract function for running the actuation valve."""
        pass

    @abstractmethod
    def set_pressure_chamber(self, pressure: int):
        """Abstract function for setting internal pressure chamber."""
        pass

    @abstractmethod
    def set_vacuum_chamber(self, vacuum: int):
        """
        Sets the internal vacuum chamber.

        Args:
            vacuum: mBar
        """
        pass

    @abstractmethod
    def get_pressure_chamber(self):
        """
        Returns the current reading of the pressure chamber in mBar.

        Returns:
            Chamber pressure
        """
        pass

    @abstractmethod
    def get_vacuum_chamber(self):
        """
        Returns the current reading of the vacuum chamber in mBar.

        Returns:
            Vacuum pressure
        """
        pass

    @abstractmethod
    def get_output_pressure(self):
        """
        Returns the output port pressure in mBar.

        Returns:
            Output Pressure
        """
        pass

    @abstractmethod
    def get_internal_sensor_data(self):
        """
        Returns all the internal sensor data in mBar.

        Returns:
            Dictionary: All current readings of internal sensors
        """
        pass

    @abstractmethod
    def toggle_pump(self, toggle: bool):
        """
        Enable / Disables the pump.

        Args:
            toggle: 1 for on, 0 for off
        """
        pass

    @abstractmethod
    def get_status_word(self):
        """
        Gets the status word from the PGVA.

        Returns:
            Status word: Dictionary of status
        """
        pass

    @abstractmethod
    def get_warning_word(self):
        """
        Gets the warning word from the PGVA-1.

        Returns:
            Warning word: Dictionary of warning word
        """
        pass

    @abstractmethod
    def get_error_word(self):
        """
        Gets the error word from the PGVA-1.

        Returns:
            Error word: Dictionary of error word
        """
        pass

    @abstractmethod
    def get_modbus_error_word(self):
        """
        Get the error word from the PGVA-1.

        Returns:
            Modbus error word: Dictionary of modbus error word
        """
        pass

    @abstractmethod
    def toggle_trigger(self, trigger: bool):
        """
        Toggles the trigger.

        Args:
            trigger: boolean value for on or off
        """
        pass

__init__(config) abstractmethod

Abstract function for constructor of the driver class.

Source code in src/pgva/pgva_interface.py
@abstractmethod
def __init__(self, config):
    """Abstract function for constructor of the driver class."""
    pass

get_error_word() abstractmethod

Gets the error word from the PGVA-1.

Returns:

Type Description

Error word: Dictionary of error word

Source code in src/pgva/pgva_interface.py
@abstractmethod
def get_error_word(self):
    """
    Gets the error word from the PGVA-1.

    Returns:
        Error word: Dictionary of error word
    """
    pass

get_internal_sensor_data() abstractmethod

Returns all the internal sensor data in mBar.

Returns:

Name Type Description
Dictionary

All current readings of internal sensors

Source code in src/pgva/pgva_interface.py
@abstractmethod
def get_internal_sensor_data(self):
    """
    Returns all the internal sensor data in mBar.

    Returns:
        Dictionary: All current readings of internal sensors
    """
    pass

get_modbus_error_word() abstractmethod

Get the error word from the PGVA-1.

Returns:

Type Description

Modbus error word: Dictionary of modbus error word

Source code in src/pgva/pgva_interface.py
@abstractmethod
def get_modbus_error_word(self):
    """
    Get the error word from the PGVA-1.

    Returns:
        Modbus error word: Dictionary of modbus error word
    """
    pass

get_output_pressure() abstractmethod

Returns the output port pressure in mBar.

Returns:

Type Description

Output Pressure

Source code in src/pgva/pgva_interface.py
@abstractmethod
def get_output_pressure(self):
    """
    Returns the output port pressure in mBar.

    Returns:
        Output Pressure
    """
    pass

get_pressure_chamber() abstractmethod

Returns the current reading of the pressure chamber in mBar.

Returns:

Type Description

Chamber pressure

Source code in src/pgva/pgva_interface.py
@abstractmethod
def get_pressure_chamber(self):
    """
    Returns the current reading of the pressure chamber in mBar.

    Returns:
        Chamber pressure
    """
    pass

get_status_word() abstractmethod

Gets the status word from the PGVA.

Returns:

Type Description

Status word: Dictionary of status

Source code in src/pgva/pgva_interface.py
@abstractmethod
def get_status_word(self):
    """
    Gets the status word from the PGVA.

    Returns:
        Status word: Dictionary of status
    """
    pass

get_vacuum_chamber() abstractmethod

Returns the current reading of the vacuum chamber in mBar.

Returns:

Type Description

Vacuum pressure

Source code in src/pgva/pgva_interface.py
@abstractmethod
def get_vacuum_chamber(self):
    """
    Returns the current reading of the vacuum chamber in mBar.

    Returns:
        Vacuum pressure
    """
    pass

get_warning_word() abstractmethod

Gets the warning word from the PGVA-1.

Returns:

Type Description

Warning word: Dictionary of warning word

Source code in src/pgva/pgva_interface.py
@abstractmethod
def get_warning_word(self):
    """
    Gets the warning word from the PGVA-1.

    Returns:
        Warning word: Dictionary of warning word
    """
    pass

set_output_pressure(pressure) abstractmethod

Abstract function for setting output pressure.

Source code in src/pgva/pgva_interface.py
@abstractmethod
def set_output_pressure(self, pressure: int):
    """Abstract function for setting output pressure."""
    pass

set_pressure_chamber(pressure) abstractmethod

Abstract function for setting internal pressure chamber.

Source code in src/pgva/pgva_interface.py
@abstractmethod
def set_pressure_chamber(self, pressure: int):
    """Abstract function for setting internal pressure chamber."""
    pass

set_vacuum_chamber(vacuum) abstractmethod

Sets the internal vacuum chamber.

Parameters:

Name Type Description Default
vacuum int

mBar

required
Source code in src/pgva/pgva_interface.py
@abstractmethod
def set_vacuum_chamber(self, vacuum: int):
    """
    Sets the internal vacuum chamber.

    Args:
        vacuum: mBar
    """
    pass

toggle_pump(toggle) abstractmethod

Enable / Disables the pump.

Parameters:

Name Type Description Default
toggle bool

1 for on, 0 for off

required
Source code in src/pgva/pgva_interface.py
@abstractmethod
def toggle_pump(self, toggle: bool):
    """
    Enable / Disables the pump.

    Args:
        toggle: 1 for on, 0 for off
    """
    pass

toggle_trigger(trigger) abstractmethod

Toggles the trigger.

Parameters:

Name Type Description Default
trigger bool

boolean value for on or off

required
Source code in src/pgva/pgva_interface.py
@abstractmethod
def toggle_trigger(self, trigger: bool):
    """
    Toggles the trigger.

    Args:
        trigger: boolean value for on or off
    """
    pass

trigger_actuation_valve(actuation_time) abstractmethod

Abstract function for running the actuation valve.

Source code in src/pgva/pgva_interface.py
@abstractmethod
def trigger_actuation_valve(self, actuation_time: int):
    """Abstract function for running the actuation valve."""
    pass