How can I make this works?

Im driving a Makino a92 with PRO5 and fanuc system.
What I want to do is to use the same subprogram (positions of the holes) for the drill and tap.

Example:

T1=Drill
T2=Tap

Each Tool has it own program, bit then I call for the same subp.

G81G99Z-22....drill cycle
M98P10

Next Tool
S795
M135
G84G99Z-12.R5L0... Tapcycle
M98P10

The drill has the same depth on all the holes. The tap has different depths. Like first Hole -10 second -5 and so on.


My subprogram looks like this.

O0010(L1-L20)
IF[600EQ0]GOTO1
GOTO#600
N1
#600=1
X-100.Y25.(L1) this Hole should be z-10 mindepth
N2
#600=2
X-110.Y25.(L2) and this z-5
and so on.

Best regards!