The control unit's internal error log stores the firmware errors in a log.
The error log can be read using a library functions LOG_ERROR and LOG_GET_EVENT in device specific Ext libraries (for example 4000Ext).
For more information about the logs and how to read them, refer to Epec Programming and Libraries Manual.