I wonder if anyone could help with the Dyna additional G-codes?
I have a DM1007 milling machine and there seems to be some very practical G-codes available which I can't fully figure out. These are
G22 Countour
G23 Pocket
G26 and G27 die cutting cycles
and other similar codes.

The thing I can't figure out is that the command requires the starting line of the contour outlining the contour/pocket and does milling along/inside that contour. For example:

G23 N_R_Z_Q_D_

should mill a pocket inside a contour starting at line N_ and
R being the clerance plane
Z depth of the pocket
Q increment in XY direction
D increment in Z-direction

the manual gives an example G23 N100 R10 Z-10 Q4 D3 which appears understandable.

What I can't figure out is:
1) Should this command be before or after the line N100? This seems to be a macro or a sub-program, but after it's done, were does it return?

2) How does the machine know at which line the contour ends? Should there be a G80 at the contour end like in drilling?

Best Regards

Hannu