Hi There,
I use "ERR_DATA" in KAREL. Check KAREL docs. It resturns latest error or alarm in controller if you write MAXINT to seq_num etc. You can interpret the returned code using Alarm list doc.
An example it returns 11004.
Last three (004 here) digit is always related to error part, rest beginning digits (11 here) if its SRVO(11), MOTN, or other. This error would be SRVO-004 FENCE open.
ERR_DATA Built-In Procedure Purpose: Reads the requested error from the error history and returns the error Syntax :
ERR_DATA(seq_num, error_code, error_string, cause_code, cause_string, time_int, severity, prog_nam)