butch
11-21-2008, 06:27 AM
Steve
I do keyholes on several items. Seems most people like the carvings for display rather than say a cribbage board, or cutting board. I tried to make a file and have the software make the cut file, but learned it is easier to just write the program. Here is one I use, then just change to center and position the start of the cut. Easy to do..just find the start and center point, do a search and change the numbers in the file.
'File created in VCarve Wizard
'
'UNITS:Inches
'
'For ShopBot Control: SB3 Alpha
'
'Keyhole for pocket on top/Z=top, 1/4in Keyhole bit/Set RPM to 12000
PAUSE
'
'Turning spindle ON
SO,1,1
PAUSE,2
'
MS,1.0,0.5
JZ,1.5
J2,0.000000,0.000000
J3,4.75,7.5,1.5
'Position to start point
M3,4.75,7.5,-0.31
'Drill down
M3,4.75,7.85,-0.31
'Move to top of cut
M3,4.75,7.5,-0.31
'Back to start point
J3,4.75,7.5,1.50
'Back out of start hole
JZ,3.0
'Clear to change Z height
SO,1,0
'
'Turning spindle off
J2,6.000,30.000000
'
'Position spindle to bit change station
Butch
srwtlc
11-21-2008, 09:38 AM
Here's one that I have set as a Custom Cut. Some of the values are preset, but you can enter other values and quantities. It has some presets for items that I make often so I just have to give it a quantity.
I'll post it here for reference. If you use it, you'll need to make some adjustments for your needs.
There are a couple of subs that aren't finished as I haven't taken time to add them in yet. It was kind of a work in progress.
I generally cam wedge the plaques, etc. into a corner and when one slot is done, the machine parks some distance away and waits for me to change the blank and push a little "repeat button" to continue.
*********************************************** **
'Keyholer
SA
MS,3,0.8
TR, 16500
MSGBOX(Is the tool zeroed on the blank?,4,Z Zero Check)
If &msganswer = NO Then GOSUB ZEROTOOL
JZ,2
SL 'clear all variables
&blankcount = 0 'set up counting variables
&zclear = 0.25 'Safe Z clearance height between slots
&slotdepth = -0.3125 'Hangslot hole depth
&waitloc = 6.0 'Wait location
MSGBOX(Do you want presets?,260,Presets)
If &msganswer = YES Then GOTO PRESETS
'Input for blank size and quantity.
INPUT "Blank size in X, Y, and quantity?" &sizeX,&sizeY,&numblanks
'Input for type of hangslots.
INPUT "What type of hangslots? Single (X), single (Y), both (XY), vertical along X (VX) or Y (VY), vertical with single along X (VXS) or Y (VYS), all (A)" &type
If &type = Y Then GOTO SINGLEY
If &type = X Then GOTO SINGLEX
If &type = B Then GOTO DOUBLE
If &type = VX Then GOTO VERTICALX
If &type = VXS Then GOTO VERTICALXS
If &type = VY Then GOTO VERTICALY
If &type = VYS Then GOTO VERTICALYS
If &type = A Then GOTO ALL
'************************************************* ************************************************** *
DOUBLE:
&dist=1.0
&length=2.0
MSGBOX(Use default values?,3,Default Values)
If &msganswer = CANCEL Then END
If &msganswer = NO Then INPUT "Distance from edge to center of slot and slot length" &dist,&length
REPEAT DOUBLE:
SO,1,1 'Router on
J2,&dist,&sizeY/2+(&length/2)
JZ,&zclear
MZ,&slotdepth
SR
MY,-&length
MY,&length
SA
JZ,&zclear
J2,&sizeX/2-(&length/2),&sizeY-&dist
MZ,&slotdepth
SR
MX,&length
MX,-&length
SA
JZ,&zclear
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHEREDOUBLE
IF &blankcount = &numblanks THEN GOTO END
WAITHEREDOUBLE:
&TEST=%(51)
IF &TEST=1 THEN GOTO REPEAT DOUBLE
PAUSE 0.3
GOTO WAITHEREDOUBLE
'************************************************* ************************************************** *
SINGLEY:
&dist=1.0
&length=2.0
MSGBOX(Use default values?,3,Default Values)
If &msganswer = CANCEL Then END
If &msganswer = NO Then INPUT "Distance from edge to center of slot and slot length" &dist,&length
REPEAT SINGLEY:
SO,1,1 'Router on
J2,&dist,&sizeY/2+(&length/2)
JZ,&zclear
MZ,&slotdepth
SR
MY,-&length
MY,&length
SA
JZ,&zclear
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHERESINGLEY
IF &blankcount = &numblanks THEN GOTO END
WAITHERESINGLEY:
&TEST=%(51)
IF &TEST=1 THEN GOTO REPEAT SINGLEY
PAUSE 0.3
GOTO WAITHERESINGLEY
'************************************************* ************************************************** *
SINGLEX:
&dist=1.0
&length=2.0
MSGBOX(Use default values?,3,Default Values)
If &msganswer = CANCEL Then END
If &msganswer = NO Then INPUT "Distance from edge to center of slot and slot length" &dist,&length
REPEAT SINGLEX:
SO,1,1 'Router on
J2,&sizeX/2-(&length/2),&sizeY-&dist
MZ,&slotdepth
SR
MX,&length
MX,-&length
SA
JZ,&zclear
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHERESINGLEX
IF &blankcount = &numblanks THEN GOTO END
WAITHERESINGLEX:
&TEST=%(51)
IF &TEST=1 THEN GOTO REPEAT SINGLEX
PAUSE 0.3
GOTO WAITHERESINGLEX
'************************************************* ************************************************** *
VERTICALX:
&distedgeX=1.0
&distedgeY=1.75
&length=0.75
MSGBOX(Use default values?,3,Default Values)
If &msganswer = CANCEL Then END
If &msganswer = NO Then INPUT "Distance from X zero edge to center, distance from Y edge for start point, and slot length" &distedgeX,&distedgeY,&length
SO,1,1 'Router on
J2,&distedgeX,&sizeY-&distedgeY
JZ,&zclear
MZ,&slotdepth
SR
MY,&length
MY,-&length
SA
JZ,&zclear
J2,&sizeX-&distedgeX,&sizeY-&distedgeY
MZ,&slotdepth
SR
MY,&length
MY,-&length
SA
JZ,1.0
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHEREVERTICALX
IF &blankcount = &numblanks THEN GOTO END
WAITHEREVERTICALX:
&TEST=%(51)
IF &TEST=1 THEN GOTO VERTICALX
PAUSE 0.3
GOTO WAITHEREVERTICALX
'************************************************* ************************************************** *
VERTICALY:
&distedgeX=1.75
&distedgeY=1.0
&length=0.75
MSGBOX(Use default values?,3,Default Values)
If &msganswer = CANCEL Then END
If &msganswer = NO Then INPUT "Distance to start point from X zero edge, distance from Y zero edge to center, and slot length" &distedgeX,&distedgeY,&length
SO,1,1 'Router on
J2,&distedgeX,&distedgeY
JZ,&zclear
MZ,&slotdepth
SR
MX,-&length
MX,&length
SA
JZ,&zclear
J2,&distedgeX,&sizeY-&distedgeY
MZ,&slotdepth
SR
MX,-&length
MX,&length
SA
JZ,1.0
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHEREVERTICALY
IF &blankcount = &numblanks THEN GOTO END
WAITHEREVERTICALY:
&TEST=%(51)
IF &TEST=1 THEN GOTO VERTICALY
PAUSE 0.3
GOTO WAITHEREVERTICALY
'************************************************* ************************************************** *
VERTICALXS:
&dist = 1.0
&length = 2.0
&distedgeXV = 1.0
&distedgeYV = 1.75
&lengthV = 0.75
MSGBOX(Use default values?,3,Default Values)
If &msganswer = CANCEL Then END
If &msganswer = NO Then INPUT "Distance from edge to center of horizontal slot and length. Distance from edge for vertical slot X and Y. Length of vertical slot" &dist,&length,&distedgeXV,&distedgeYV,&lengthV
SO,1,1 'Router on
J2,&distedgeXV,&sizeY-&distedgeYV
JZ,&zclear
MZ,&slotdepth
SR
MY,&lengthV
MY,-&lengthV
SA
JZ,&zclear
J2,&sizeX/2-(&length/2),&sizeY-&dist
MZ,&slotdepth
SR
MX,&length
MX,-&length
SA
JZ,&zclear
J2,&sizeX-&distedgeXV,&sizeY-&distedgeYV
MZ,&slotdepth
SR
MY,&lengthV
MY,-&lengthV
SA
JZ,&zclear
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHEREVERTICALXS
IF &blankcount = &numblanks THEN GOTO END
WAITHEREVERTICALXS:
&TEST=%(51)
IF &TEST=1 THEN GOTO VERTICALXS
PAUSE 0.3
GOTO WAITHEREVERTICALXS
'************************************************* ************************************************** *
VERTICALYS:
'************************************************* ************************************************** *
ALL:
'************************************************* ************************************************** *
PRESETS:
'Input for various presets
INPUT "What preset would you like, and how many? Wisconsin (W), US Forestry (F), 10 x 18 Fighter Jet (J)" &preset,&numblanks
If &preset = W Then GOTO WI
If &preset = F Then GOTO FORESTRY
If &preset = J Then GOTO 1018
WI:
&sizeX = 13.25
&sizeY = 14.5
&dist=4.5
&length=2.5
SO,1,1 'Router on
J2,&sizeX/2-(&length/2),&sizeY-&dist
JZ,&zclear
MZ,&slotdepth
SR
MX,&length
MX,-&length
SA
JZ,&zclear
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHEREWI
IF &blankcount = &numblanks THEN GOTO END
WAITHEREWI:
&TEST=%(51)
IF &TEST=1 THEN GOTO WI
PAUSE 0.3
GOTO WAITHEREWI
FORESTRY:
&sizeX = 14.5
&sizeY = 14.5
&dist=1.9375
&length=2.0
SO,1,1 'Router on
J2,&sizeX/2-(&length/2),&sizeY-&dist
JZ,&zclear
MZ,&slotdepth
SR
MX,&length
MX,-&length
SA
JZ,&zclear
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHEREFOR
IF &blankcount = &numblanks THEN GOTO END
WAITHEREFOR:
&TEST=%(51)
IF &TEST=1 THEN GOTO FORESTRY
PAUSE 0.3
GOTO WAITHEREFOR
1018:
&sizeX = 18.0
&sizeY = 10.0
&dist = 1.0
&length = 2.0
&distedgeXV = 1.0
&distedgeYV = 1.75
&lengthV = 0.75
SO,1,1 'Router on
J2,&distedgeXV,&sizeY-&distedgeYV
JZ,&zclear
MZ,&slotdepth
SR
MY,&lengthV
MY,-&lengthV
SA
JZ,&zclear
J2,&sizeX/2-(&length/2),&sizeY-&dist
MZ,&slotdepth
SR
MX,&length
MX,-&length
SA
JZ,&zclear
J2,&sizeX-&distedgeXV,&sizeY-&distedgeYV
MZ,&slotdepth
SR
MY,&lengthV
MY,-&lengthV
SA
JZ,&zclear
J2,0.0,&sizeY+&waitloc
&blankcount=&blankcount+1
IF &blankcount < &numblanks THEN GOTO WAITHERE1018
IF &blankcount = &numblanks THEN GOTO END
WAITHERE1018:
&TEST=%(51)
IF &TEST=1 THEN GOTO 1018
PAUSE 0.3
GOTO WAITHERE1018
'************************************************* ************************************************** *
ZEROTOOL:
'Use the keypad to jog to the desired z-zeroing position, then hit escape when finished.
Pause
SK
'Hit enter to zero the Z axis here.
Pause
FP,C:\SBparts\My Zzero.sbp 'Change this to Zzero.spb or just C2 and it will not return to where it left off.
RETURN
'************************************************* ************************************************** *
END:
SO,1,0 'Router Off
JZ,1
END
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.