reset_workpiece_weight

This function resets the workpiece weight data stored in the controller, initializing the internal algorithm used to estimate or manage payload information. It should be called before performing a new workpiece weight measurement to ensure accurate results.

Definition
DRFLEx.h within class CDRFLEx, public section (line 679)

bool reset_workpiece_weight() {
    return _reset_workpiece_weight(_rbtCtrl);
};

Parameter
None

Return

Value

Description

0

Failed: weight reset not applied due to communication or mode restriction

1

Success: workpiece weight data successfully reset and ready for new measurement

Example

// Initialize the weight measurement algorithm
bool success = drfl.reset_workpiece_weight();

if (success)
    printf("Workpiece weight reset successfully.\n");
else
    printf("Failed to reset workpiece weight.\n");

This example resets the current workpiece weight data before performing a new measurement, ensuring that the internal payload estimation algorithm starts from a clean state.