There's just got to be a better way to share code! This wastes the forum's visual space and discards the information content provided by careful formatting.
[It'd be great if Nancy could remove the code portion of the previous postings.]
Here's an attempt to make the program match Gerald's specs:
'*======================================== ====================================*
'* S H O P B O T S T A N D A R D T E S T F I L E *
'*======================================== ====================================*
'* *
'* Program: DIM_TEST.SBP *
'* *
'* Function: Check accuracy of circles (clockwise and counter-clockwise) *
'* *
'* Authors: [MRD] Morris Dovey, mrdovey@iedu.com *
'* *
'* Remarks: Uses 1/2" bit, 3/4" x 5" x 5" MDF work area [MRD] *
'* Run ZZERO.SBP at top of workpiece and leave bit at a safe *
'* height before starting this program [MRD] *
'* Check suitability of move speeds for your system [MRD] *
'* Remove 'GOTO' for metric operation [MRD] *
'* *
'* History: *
'* *
'* Date V.M Description Who *
'* -------- ----- -------------------------------------------------- --- *
'* 06-01-08 01.00 Initial implementation MRD *
'* 06-01-09 01.01 Modified to conform with Gerald's new specs MRD *
'* *
'*----------------------------------------------------------------------------*
'* Public Domain Software *
'*======================================== ====================================*
SA
' Position spindle at lower left corner of 5" x 5" work area
PAUSE
&X0 = %(1) ' Left edge of work area
&Y0 = %(2) ' Lower edge of work area
&Z0 = %(3) ' Safe Z height
&X1 = 1.25 ' Left column center
&X2 = 3.75 ' Right column center
&Y1 = 1.25 ' Bottom row center
&Y2 = 3.75 ' Upper row center
&A1 = 180 - 22.5 ' Circle 1 starting angle
&A2 = 180 + 22.5 ' Circle 2
&A3 = 0 + 22.5 ' Circle 3
&A4 = 360 - 22.5 ' Circle 4
&D = 2.00 ' Circle diameter
&DD = 1/16 ' Oversize pass diameter difference
&Z = -5/8 ' Plunge depth
&S1 = 1.25 ' Low speed
&S2 = 2.00 ' High speed
GOTO BEGIN ' Remove for metric system
'*-------------------------------------------------------------------------*
'* Convert imperial measurements to metric
'*-------------------------------------------------------------------------*
&X1 = &X1 * 25.4
&X2 = &X2 * 25.4
&Y1 = &Y1 * 25.4
&Y2 = &Y2 * 25.4
&Z = &Z * 25.4
&S1 = &S1 * 25.4
&S2 = &S2 * 25.4
&D = &D * 25.4
&DD = &DD * 25.4
BEGIN:
SC 2
' Start dust collector and spindle
PAUSE
'*-------------------------------------------------------------------------*
'* Circle 1 - Top Left, clockwise (climb-cut), oversize & trim passes
'*-------------------------------------------------------------------------*
MS &S1
CP &D+&DD,&X0+&X1,&Y0+ ;&Y2,O,1,&A1,&A1+360,&Z,1,1,1, 4,1,1
CP &D,&X0+&X1,&Y0+&Y2,O,1 ,&A1,&A1+360,0,1,1,1,0,0,1
JZ &Z0
'*-------------------------------------------------------------------------*
'* Circle 2 - Top Right, clockwise (climb-cut)
'*-------------------------------------------------------------------------*
MS &S2
CP &D,&X0+&X2,&Y0+&Y2,O,1 ,&A2,&A2+360,&Z,1,1,1,4,0,1
JZ &Z0
'*-------------------------------------------------------------------------*
'* Circle 3 - Bottom Left, anti-clockwise (conventional), oversize & trim
'*-------------------------------------------------------------------------*
MS &S1
CP &D+&DD,&X0+&X1,&Y0+ ;&Y1,O,-1,&A3,&A3+360,&Z,1,1,1,4,1,1
CP &D,&X0+&X1,&Y0+&Y2, O,-1,&A3,&A3+360,0,1,1,1,0,0,1
JZ &Z0
'*-------------------------------------------------------------------------*
'* Circle 4 - Bottom Right, anti-clockwise (conventional)
'*-------------------------------------------------------------------------*
MS &S2
CP &D,&X0+&X2,&Y0+&Y1, O,-1,&A4,&A4+360,&Z,1,1,1,4,0,1
JZ &Z0
SC 2
' Stop spindle and DC
PAUSE
SC 2
' End of Job - Remember to restore move speed
END
I'm really hoping that someone's checking this stuff!
...Morris