ID 21500
| There are pending invalid control blocks at local subroutine end. | ||||
| Description | In a local subroutine, an invalid control block statement (e.g. $IF-$ENDIF) was not closed, i.e. an assigned $ENDIF is missing. Invalid in this context means that the programmed condition is false and the NC blocks in this branch are not executed. 
 Example: Wrong: %L sub1 N10 G00 X0 Y0 Z0 N20 P1=0 N30 $IF P1 == 1 N40 Y100 N100 X100 N110 M29 ← $ENDIF of $IF P1.. is missing. %main N010 X0 Y0 Z0 N020 LL sub1 : N1000 M30 Correct: %L sub1 N10 G00 X0 Y0 Z0 N20 P1=0 N30 $IF P1 == 1 N40 Y100 N100 X100 N105 $ENDIF ← Invalid $IF is terminated N110 M29 % main N010 X0 Y0 Z0 N020 LL sub1 : N1000 M30 | |||
| Response | Class | 2 | Abort NC program processing. | |
| Solution | Class | 3 | Check and modify NC program. Close the control block statement correctly. Complete the missing $ENDIF/$ENDSWITCH... . | |
| Parameter | %1: | Error value [-] | ||
| Number of open control blocks | ||||
| %2: | Current value [-] | |||
| Initial keyword of incomplete control block statement (e.g. $IF) | ||||
| %3: | Expected value [-] | |||
| Closing keyword of control block statement (e.g. $ ENDIF) | ||||
| Error type | 1, Error message from NC program. | |||
| 
 | ||||