You are not the only 1, see my earlier post.
I write my own G&M coded programs for early Emco and Denford lathes and an Emco F1 mill all in original configuration that do not have a facility to run programs coded in the usual CAM generating programs.
Emgee
Good to know I'm not the only coder on this forum.
Maybe others would be more comfortable with G-code if they saw an example of just how simple it is, so with that in mind, here's a short program that mills a 1mm wide channel for an O-ring into a flat surface.
Everything inside ( ) are comments and not used by the machine.
#1, #2, #3 are variables that can be assigned most any numeric value.
% Title: O-Ring Channel
% Purpose: Mill round O-ring channel
% Stock: Anything
% End Mill: 1mm diam (0.039") (0.0195" Radius)
% X0, Y0 = center of circle
% Z0 = top surface
%
G20 (set inchs/minute mode)
G94 (set feed rate to inchs/minute mode)
G01 (linear motion mode)
G17 (set X-Y plane)
#1 = 0 (initial Z start)
#2 = 0.005 (increment for Z drop)
#3 = 1.559 (variable for Y & R)
#4 = 5 (set Feed rate for circular cuts)
#5 = [0 - #3] (set negative Y value)
F44 Z[#1 + 0.020] (move Z above top of part)
X0 Y#3 (quickly move to start at 12:00)
Z[0.005 + #1] (quick drop to 0.005" above surface)
F1 Z#1 (slowly drop Z to surface)
M98 P14 Q6 (call sub O14 Q times)
G01 F22 Z.20 (move Z above top of disk)
M30
% <<<<<<<<<<<<<<< milling operation is complete! >>>>>>>>>>>>>>>>
% <<<< Begin Subroutine O12 >>>>
% Purpose: mill one complete circle at #2 increments
O14
#1 = [#1-#2] (set to drop Z 0.010")
F#4
G2 X0 Y#5 Z#1 R#3 (mill CW to 6:00)
G2 X0 Y#3 R#3 (mill CW to 12:00)
M99 (end of subroutine O14)