You're reading the documentation for an older, but still supported version (GL013300).
For information on the latest version, please have a look at GL013301.

get_last_alarm

This function checks the latest log and alarm code that occurred in the robot controller.

It returns a pointer to a structure containing detailed alarm information, such as the group, level, index, and message parameters.

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

LPLOG_ALARM get_last_alarm()
{
    return _get_last_alarm(_rbtCtrl);
};

Parameter
None

Return

Value

Description

LOG_ALARM *

Refer to definition of structure

Example

LPLOG_ALARM pLogAlarm = Drfl.get_last_alarm();
switch(pLogAlarm->_iGroup)
{
    case LOG_GROUP_SYSTEMFK:
        switch(pLogAlarm->_iLevel)
        {
            case LOG_LEVEL_SYSINFO:
                cout << "index(" << pLogAlarm->_iIndex << "), ";
                cout << "param(" << pLogAlarm->_szParam[0] << "), ";
                cout << "param(" << pLogAlarm->_szParam[1] << "), ";
                cout << "param(" << pLogAlarm->_szParam[2] << ")" << endl;
                break;

            default:
                break;
        }
        break;

    default:
        break;
}

This example retrieves the most recent alarm from the controller and prints its group, level, index, and parameter values to the console. You can use this function to monitor error states or diagnose robot system issues.