ID 20193

Percent sign not allowed within main routine part.

Description

Within a main routine a percent character (%) is programmed, although the main routine is already in execution.

A percentage sign can only be used to mark main or local subroutine names, but not within the actual main program itself.

Further information: [PROG//Section Subroutine techniques].

Example:

Wrong:

%MAIN

N10   G00 X0 Y0 Z0

N20   %L SUB1

:

N1000 M30

Correct:

%L SUB1

:

%MAIN

N10   G00 X0 Y0 Z0

:

N1000 M30

 

The execution of a main program is also started, if the first character found in the file outside comments is neither a space nor a "%". In this case, this character is evaluated as the first character of an unnamed program. It also means that no block numbers, variable declarations etc. may be programmed before the first “%”.

Response

Class

2

Abort NC program processing.

Solution

Class

3

Check and modify the NC program sequence. Remove the invalid percent sign or move the definitions of the local sub programs before the beginning of the main program part.

Ensure that no NC block numbers, variable declarations etc. were programmed before the first %-character (e.g. remove block numbers at the beginning of comment lines!).

Error type

1, Error message from NC program.