I have problem with AI contour Control, when I put "G05.1 Q1" in main program, "#5" in macro is not properly defined. In the example below, should be the value of the parameter equal to 10. In my case, it has already been determined prior to that, when set to 10. At the beginning of the macro I tried to cancel the "AI contour compensation" with "G05.1 Q0" and at the end of the macro again to activate the 'G05.1 Q1 ", but we machine reports a Error... What should I do?


O0001 (MAIN PROGRAM)

G54 G0 G80 G90 G17
G05.1 Q1
M6 T1
S1000 M3
X10 Y10
G43 Z10 H1
G66 P9110 R2 Z-25 F300
X10 Y10
X20
G67
G53Z0
M5
M9
M30


O9110;
#1=#4001; . . . . . . . . . . . . . . Stores G00/G01.
#3=#4003; . . . . . . . . . . . . . . Stores G90/G91.
#4=#4109; . . . . . . . . . . . . . . Stores the cutting feedrate.
#5=#5003; . . . . . . . . . . . . . . Stores the Z coordinate at the start of drilling. (In this block have I problem, when I use in main program AI Contour control,)


G00 G90 Z#18; . . . . . . . . Positioning at position R
G01 Z#26 F#9; . . . . . . . . . Cutting feed to position Z
IF[#4010 EQ 98]GOTO 1; Return to position I
G00 Z#18; . . . . . . . . . . . . . Positioning at position R
GOTO 2;
N1 G00 Z#5; . . . . . . . . . . . . . Positioning at position I
N2 G#1 G#3 F#4; . . . . . . . . Restores modal information.
M99;