set_on_tp_progress (Manual Mode)
This section explains how to use set_on_tp_progress during Manual (Teach) operations. This function registers a callback function that receives progress updates from the Teach Pendant (TP). It is primarily used for monitoring execution progress, such as the percentage of a running program, or displaying visual progress feedback during manual teaching sequences.
Typical usage
Display real-time progress or completion percentage during a teaching task.
Monitor multi-step DRL procedures executed in Manual mode.
Log and visualize progress data on a host PC or teaching UI.
Synchronize TP progress updates with host-side feedback (e.g., a progress bar) to improve user awareness.
Note
The callback is triggered whenever the TP sends progress update data.
The received structure contains the fields
_iCurrentCountand_iTotalCount.
Example: Monitor progress feedback during manual teaching
// Callback for TP progress messages
void OnTpProgress(LPMESSAGE_PROGRESS tProgress)
{
printf("-------------------------------------------\n");
printf("[TP PROGRESS UPDATE]\n");
printf("Step : %d / %d\n", tProgress->_iCurrentCount, tProgress->_iTotalCount);
printf("-------------------------------------------\n");
// Example: log a message when all steps are complete
if (tProgress->_iCurrentCount >= tProgress->_iTotalCount)
printf("All steps completed.\n");
}
drfl.open_connection("192.168.137.100");
drfl.set_on_tp_progress(OnTpProgress);
printf("[Teach] Waiting for progress updates from TP...\n");
while (true)
this_thread::sleep_for(chrono::seconds(1));
When registered, this callback is executed automatically when a progress message is reported from the Teach Pendant (TP). It provides real-time information about the current and total operation steps to enhance manual teaching visibility and synchronization with host-side feedback systems.
Tips
Use to monitor long or multi-step teaching procedures in real time.
Log progress values on the host PC for later analysis.