Hi folks,
in some threads, like Fault-reset from TP-program and $ALM_IF variables and reading errors, the meaning of the content of the system variable $ALM_IF.$LAST_ERCODE was a topic that could not be solved so far. The wait is over now!
After a mail to the german support regarding a list of errors related to the numbers shown in $ALM_IF.$LAST_ERCODE I received the decisive hint for understanding this number. They recommended to use the Error Code Output Function described in B-83284EN-2/10 Optional Function (Edition 10, Jan. 2022, Chapter 20) which you can use to output any error via DO to external devices like a PLC. After playing around a bit I realized that this values are structured exactly like the ones in $LAST_ERCODE (or may just use exactly THIS value). Of course the description of the Error Code Output Function doesn't mention it.
Say you have the error MOTN-018 Position not reachable to be shown at the TP. [MENU] -> [SYSTEM] -> [Variables] -> $ALM_IF shows the following values:
This $LAST_ERCODE looks far away from anything to be found in the B-83284EN-1/08 Alarm code list (Edition 08, Sep. 2021) including the facility codes (Chapter 2.2.2, Page -8-). Anyway, the facility code of MOTN is 15 (0xF) and the error number is 18 (0x12). Converting the $LAST_ERCODE to hex and binary reveals:
638517266 = 0x260F0012 = 0b00100110000011110000000000010010
Wait ... separating the values at the right position comes to this:
0x26_0F_0012 = 0b00100110_00001111_0000000000010010
The leading part of the binary value shows the described severity of the Error Code Output Function:
Program control (bit 25+26)
26 25 Meaning
_0 _0 Program execution is not affected
_1 _0 The program is paused
_1 _1 The program is aborted
Motion Control (bit 27+28)
28 27 Meaning
_0 _0 Motion execution is not affected
_0 _1 Motion is stopped
_1 _0 Motion is stopped and canceled
Servo control (bit 29)
29 Meaning
_0 Servo power supply remains on
_1 Servo power supply is off
Local/global (bit 30)
30 Meaning
_0 The error is effective only for one task
_1 The error is effective for all tasks
Recovery (bit 31)
31 Meaning
_0 You do not need to cycle power to recover
_1 You must cycle power to recover
Display (bit 32)
32 Meaning
_0 The error is displayed
_1 The error is not displayed
For MOTN-018 this remaining part is 0b00100110... (with the MSB to the left) and reads as:
Program control (bit 26 + 25) 10 = The program is paused
Motion Control (bit 28 + 27) 01 = Motion is stopped
Local/global (bit 30 ) 1 = The error is effective for all tasks
I checked for some other errors, too, and so far it looks like it might fit:
Alarm | Facility code (dec) (hex) | $LAST_ERCODE (dec) (hex) | MSB of $LAST_ERCODE (bin) | Severity |
---|---|---|---|---|
PROG-048 | 03 - 048 0x03 - 0x030 | 67305520 0x04_03_0030 | 0b00000100_... | Motion is stopped |
TPIF-104 | 09 - 104 0x09 - 0x068 | 589928 0x00_09_0068 | 0b00000000_... | WARNING |
INTP-234 | 12 - 234 0x0C - 0x0EA | 101449962 0x06_0C_00EA | 0b00000110_... | STOP.L Program is paused Motion is stopped |
MOTN-018 | 15 - 018 0x0F - 0x012 | 638517266 0x26_0F_0012 | 0b00100110_... | STOP.G Program is paused Motion is stopped The error is effective for all tasks |
SYST-325 | 24 - 325 0x18 - 0x145 | 1573189 0x00_18_0145 | 0b00000000_... | WARNING |