Skip to content

Gripper Get Process Data

SUMMARY

Get Process Data returns the pump's full decoded process-data record - vacuum pressure, grasp/secure flags, service warnings, and PCB temperature - in a single read.

This skill is used for diagnostics and condition monitoring, where the raw booleans of Get Part Present are not enough.

UNITS

vacuum_pressure_kpa in kPa, hours_to_membrane_service in hours, pcb_temperature_c in degrees Celsius. The remaining fields are booleans.

PROTOCOL

Available on Piab with MODBUS_RTU only. On Piab with URCAP or ISAACSIM the pump exposes no process-data record - use Get Part Present instead. Not supported at all on custom.SuctionGripper, which has no get_process_data() method.

The Skill

python
data = gripper.get_process_data()

The Code

Safety first!

A real robot will faithfully do whatever you ask of it - so please take a moment to clear the workspace, keep an E-Stop within reach, and be ready to disconnect.

Operating real hardware is at your own risk.

python
"""
Demonstrates reading the decoded process data of a suction gripper pump.

Supports Piab grippers on MODBUS_RTU protocol only. Not supported for the
simulation-only custom.SuctionGripper - it has no get_process_data() method
at all, since it models no pump.

Usage:
    python get_process_data.py --serial-port COM3
"""

import argparse
from loguru import logger

from telekinesis.synapse.tools.suction_grippers import piab


def main(serial_port: str) -> None:
    """Reads the decoded process data of a Piab gripper pump."""

    #===================== Create Gripper ======================================
    gripper = piab.PiabPiCobotElectric()

    # ==================== Run Skill ===========================================
    try:
        gripper.connect(serial_port=serial_port, protocol="MODBUS_RTU")
        data = gripper.get_process_data()
        logger.success(f"Vacuum pressure: {data.vacuum_pressure_kpa} kPa")
        logger.success(f"Part present: {data.part_present}, "
                       f"part secured: {data.part_secured}")
        logger.success(f"Energy saving: {data.energy_saving}, "
                       f"atmospheric pressure: {data.atmospheric_pressure}, "
                       f"automated function complete: {data.automated_function_complete}")
        logger.success(f"Motor stall: {data.motor_stall}, "
                       f"membrane service warning: {data.membrane_service_warning}, "
                       f"hours to membrane service: {data.hours_to_membrane_service}")
        logger.success(f"PCB temperature: {data.pcb_temperature_c} °C")
    except (ConnectionError, OSError) as e:
        logger.error(f"Error occurred: {e}")
    finally:
        gripper.disconnect()


if __name__ == "__main__":
    p = argparse.ArgumentParser(description="Piab gripper get process data")
    p.add_argument("--serial-port", dest="serial_port", default="COM3",
                   help="Serial port for MODBUS_RTU")
    args = p.parse_args()

    main(serial_port=args.serial_port)

Parameter Configuration

This skill takes no input parameters.

Returns

Returns a PiabProcessData record with the following fields:

FieldTypeDescription
vacuum_pressure_kpaintCurrent vacuum pressure in kPa.
part_presentboolWhether the part-present setpoint is achieved.
part_securedboolWhether the part-secured setpoint is achieved.
energy_savingboolWhether the energy-saving setpoint is achieved.
atmospheric_pressureboolWhether atmospheric pressure is achieved.
automated_function_completeboolWhether the automated function (AFC) is complete.
membrane_service_warningboolWhether the pump warns that membrane service is due.
motor_stallboolWhether a motor stall was detected.
hours_to_membrane_serviceintHours remaining until membrane service is due.
pcb_temperature_cintCurrent PCB temperature in degrees Celsius.

Raises

ExceptionCondition
RuntimeErrorThe gripper is not connected, or the status request fails
NotImplementedErrorCalled on Piab with URCAP or ISAACSIM - the pump exposes no process-data record on those transports
ConnectionErrorThe backend is not connected
ValueErrorThe raw process-data record returned by the pump is not the expected length
AttributeErrorCalled on custom.SuctionGripper - this class does not define get_process_data()

How to Tune the Parameters

This skill takes no parameters. Poll it periodically rather than in a tight loop - each call is a full Modbus read. Watch membrane_service_warning and hours_to_membrane_service for predictive maintenance, motor_stall and pcb_temperature_c for fault detection, and vacuum_pressure_kpa together with part_secured to confirm a stable grasp before moving a heavy part.

Where to Use the Skill

  • Condition monitoring - Log vacuum pressure, temperature, and service hours over a shift to spot drift
  • Predictive maintenance - Trigger a service alert when membrane_service_warning is set or hours_to_membrane_service runs low
  • Fault diagnostics - Inspect motor_stall and pcb_temperature_c when a pick fails unexpectedly

When Not to Use the Skill

Do not use Get Process Data when:

  • On Piab with URCAP or ISAACSIM, or on custom.SuctionGripper - the record is unavailable; use Get Part Present for a simple held/not-held check
  • You only need grasp status - Get Part Present is a lighter read for a single boolean
  • The gripper is not connected - always call connect before issuing commands