There are 3 cycles for threading in Mode B.
G33
Long Hand
G33 X___ Z___ P___(Start angle) F___
G76
Multiple Threading Cycle
G76 PXXXXXX Q___ R___
G76 X(U)___ Z(W)___ R___ Q___ F___
G78
Threading Cycle (box cycle)
G78 X___ Z___ R____(taper) F____
For this example G76 will be used
G76 P XX XX XX Q___ R___
The first two XX - number of finish passes 01-99
The second two XX – How many revs for a lead out 00-99
The final two XX – Angle of the tool tip (60 for 60 degree V)
Q- depth of cut
R – Finish Allowance
G76 X(u)___ Z(w)___ R___ P___ Q___ F___
X – Minor Diameter
Z – End position
R – Start radius minus end radius (taper)
P – Thread Height (major – minor)
Q – Depth for first pass
F – Thread lead