I haven't done a lot of tapping, but when I do I write out a subroutine so there isn't any chance of making a mistake like that. Below is my subroutine template file that I use to tap M3 holes.
If you use this template the first thing you'll want to do is change the rotational speed. I tap at 550 RPM*.
You'll note the four lines that look like this: "(/////////////////////)". Between the first two there needs to be a list of all the coordinates for all the holes you need to tap. Each coordinate needs to be followed by "M98 P1000". Between the third and fourth markers needs to be your tapping code. Basically your "tapping code" will probably involve...
1. rapiding down to a minimum clearance level
2. feeding down to your desired tap depth
3. stopping and reversing the spindle
4. feeding back up to the minimum clearance level
5. rapiding up to a safe traverse level
6. stopping and reversing the spindle again
After the fourth marker you'll notice the "M99" command. That tells the machine to resume the original code.
This section of code, the subroutine, will be run each time the "M98 P1000" command is executed. Since this command has been entered after each set of coordinates the machine will execute your tapping subroutine at each hole location.
If you have multiple hole depths you can create multiple subroutines. In my example the subroutine is called "O1000", if you need another just call it "O1001" or something like that. I'm not sure if there are any restrictions on the number of subroutines you may have or what they may be called. I doubt it, but to be safe I've just been conforming to the "O100_" convention and it's worked fine. Obviously, you need to add "M98 P1001" at every location that you want to run the "O1001" subroutine.
I hope this helps!
Code:
%
G90 G17 G40 G80 G00 G50 G94 G64 G21
G0 M06 T00 (M3x0.5 Procunier)G43 H00
S600 M03
G00 Z10
(/////////////////////)
X133.
M98 P1000
(/////////////////////)
G00 Z10.
M05
M30
%
(f / p = s)
(f = s * p)
O1000
(/////////////////////)
G00 Z2
G1 Z-8.5 F275
G1 Z2 F550
G00 Z10
(/////////////////////)
M99
%
In case it's not clear, if you wanted to tap three holes at (X, Y) "10, 25"; "10, 50"; "30, 50"; and "40, 80" you'd need the section of code between the first two markers to look something like this...
Code:
(/////////////////////)
X10 Y25
M98 P1000
Y50
M98 P1000
X30
M98 P1000
X40 Y80
M98 P1000
(/////////////////////)
* (550 *actual* revolutions per minute are achieved when I tell my machine to run at 600 RPM).
Some additional info is in the description of this video...
https://www.youtube.com/watch?v=VGhm96ntPAY