Let's Talk ShopBot  

Go Back   Let's Talk ShopBot > Applications and Techniques > Techniques for Cutting, Drilling, Machining > Archives > Archives2005

 
 
Thread Tools Display Modes
  #1  
Old 04-17-2005, 04:32 PM
David Buchsbaum beacon14 is offline
Senior Member
 
Join Date: Oct 2000
Location: Beacon Custom Woodwork, Inc., Atlanta GA
Posts: 1,165
Default Programming with SB commands

OK, I'll get the ball rolling.

Here's a little file I wrote to surface the table or a workpiece without using the CR command. I prefer to do my surfacing with simple back-and forth strokes instead of the CR command with pocketing, which sometimes misses small areas in the corners and can leave cross-grain ridges on solid lumber.
Feel free to use this file if you find it useful, in exchange I ask that you post any improvements here for use by all.

' File for surface planing any object you can secure under the gantry, but typically used for
' Planing large, warped, wide, and/or valuable lumber.
' Requires input for length (X dimension) and width (Y dimension) of object, depth of cut, and stepover.
' Copyright 2005 David Buchsbaum. Unauthorized use or sale prohibited.

INPUT "LENGTH OF BOARD (X-axis)" &length
INPUT "WIDTH OF BOARD (Y-axis)" &width
INPUT "DEPTH PER PASS" &depth
INPUT "STEPOVER" &step

INPUT "BEGIN AT LOWER LEFT CORNER. ZERO TO TOP OF BOARD. [K]FOR KEYBOARD MODE or [ENTER] TO BEGIN" &key
&key="&key"
IF &key=K THEN GOSUB KEY
'READY TO ROCK & ROLL?
PAUSE
Z2
MS,1.5
BEGIN:
SO,1,1
PAUSE 1
&yvalue=0
JZ,.02
M3,5,0,-&depth
MX,0
LOOP:
MX,&length
&yvalue=&yvalue+&step
MY,&yvalue
MX,0
&yvalue=&yvalue+&step
IF &yvalue>&width THEN GOTO FINISHED
MY,&yvalue
GOTO LOOP
FINISHED:
JZ,.25
SO,1,0
JZ,1
&depth=0
INPUT "ANOTHER PASS? ENTER NEW DEPTH OR [0] FOR NONE" &depth
IF &depth=0 THEN GOTO END
J2,0,0
GOTO BEGIN
KEY:
SK
RETURN
END:


It can use some improvements, such as recording the current X and Y positions and restoring them after it's done - it now re-zeroes X and Y at the starting point, but it was all I had time for at the time. Let's see what people can make of it. I haven't annotated it, so if anything is not clear just ask, the idea is to put this out for discussion and improvement.
  #2  
Old 04-17-2005, 06:54 PM
Mike Richards richards is offline
Senior Member
 
Join Date: Jan 2004
Location: , South Jordan Utah
Posts: 1,561
Default

David,

I like your code, but I'm wondering if alternating a climb cut with a conventional cut, as the code seems to be doing, would case problems with 'tear-out' when surfacing lumber?

-Mike
  #3  
Old 04-17-2005, 07:32 PM
Mike Richards richards is offline
Senior Member
 
Join Date: Jan 2004
Location: , South Jordan Utah
Posts: 1,561
Default

Here is the same code with two additions:
1. Current xy location saved before the Z2 command.

2. Conventional cut only. (Takes twice as long)

I inserted ' +++++ and ' ----- at the beginning and end of code additions, except where I commented out the MX,0 instruction.


' File for surface planing any object you can secure under the gantry, but typically used for
' Planing large, warped, wide, and/or valuable lumber.
' Requires input for length (X dimension) and width (Y dimension) of object, depth of cut, and stepover.
' Copyright 2005 David Buchsbaum. Unauthorized use or sale prohibited.

INPUT "LENGTH OF BOARD (X-axis)" &length
INPUT "WIDTH OF BOARD (Y-axis)" &width
INPUT "DEPTH PER PASS" &depth
INPUT "STEPOVER" &step

INPUT "BEGIN AT LOWER LEFT CORNER. ZERO TO TOP OF BOARD. [K]FOR KEYBOARD MODE or [ENTER] TO BEGIN" &key
&key="&key"
IF &key=K THEN GOSUB KEY
'READY TO ROCK & ROLL?
PAUSE
' +++++
' save current location
&CURRENT_X = %(1)
&CURRENT_y = %(2)
' -----
Z2
MS,1.5
BEGIN:
SO,1,1
PAUSE 1
&yvalue=0
JZ,.02
M3,5,0,-&depth
MX,0
LOOP:
MX,&length
' +++++
MX,0
' -----
&yvalue=&yvalue+&step
MY,&yvalue

'MX,0

' +++++
MX,&length
MX,0
' -----

&yvalue=&yvalue+&step
IF &yvalue>&width THEN GOTO FINISHED
MY,&yvalue
GOTO LOOP
FINISHED:
JZ,.25
SO,1,0
JZ,1
&depth=0
INPUT "ANOTHER PASS? ENTER NEW DEPTH OR [0] FOR NONE" &depth
IF &depth=0 THEN GOTO END
J2,0,0
GOTO BEGIN
KEY:
SK
RETURN
END:
' +++++
JZ, 0.25
J2, 0,0
VA, &CURRENT_X, &CURRENT_Y
' -----
  #4  
Old 04-17-2005, 08:33 PM
Pascal Riendeau (Paco) paco is offline
Senior Member
 
Join Date: Jul 2004
Location: Valcourt, Québec, Canada
Posts: 1,886
Default

Hey guys!

Mike pointed a relevant aspect about the purpose of this program... but I believe that if less than 50% of the tool diameter is actualy machining the stepover than the result should be even on all the surface (depend on cutting speed too)... With CR pocketing, the routine is usualy set/used as to make a FULL use of the tool diameter... that is why I believe it result in a non-even surface...

Here my modifications...

-----------------------------------

' File for surface planing any object you can secure under the gantry, but typically used for
' Planing large, warped, wide, and/or valuable lumber.
' Requires input for length (X dimension) and width (Y dimension) of object, depth of cut, and stepover...
' ###And more...
' Copyright 2005 David Buchsbaum. Unauthorized use or sale prohibited.
' ###PACO MODIFICATIONS (4/17/2005)### Enjoy! 8-)

INPUT "LENGTH OF BOARD (X-axis)" &length
INPUT "WIDTH OF BOARD (Y-axis)" &width
INPUT "TOOL DIAMETER" &tool_diam '###
&tool_rad = &tool_diam / 2 '###
INPUT "% STEPOVER (SUGGEST 40)" &step '###
&step_dec = &step / 100 '###
&stepover = &tool_diam * &step_dec '###
INPUT "DEPTH PER PASS (Enter a positive value like 0.02 or 0.06)" &stepdown
INPUT "CUTTING SPEED" &cutspeed '###
INPUT "PLUNGE SPEED" &plungespeed '###
INPUT "BEGIN AT LOWER LEFT CORNER. ZERO TO TOP OF BOARD. [K] FOR KEYBOARD MODE or ANY KEY TO BEGIN" &key
IF &key = K THEN GOSUB KEY

'READY TO ROCK & ROLL?
PAUSE
Z2
MS,&cutspeed,&plungespeed '###
&depth = &stepdown

BEGIN:
SO,1,1
PAUSE 1
&yvalue = %(2) '###
JZ,0.02
MZ,-&depth

LOOP:
MX,&length
&yvalue = &yvalue + &stepover '###
IF &yvalue > &width THEN GOTO FINISHED '###
MY,&yvalue
MX,0
&yvalue = &yvalue + &stepover
IF &yvalue > &width THEN GOTO FINISHED
MY,&yvalue
GOTO LOOP

FINISHED:
SO,1,0
JH
INPUT "ANOTHER PASS? ANY KEY to continue or N (or Esc) to end" &cont
IF &cont = N THEN GOTO END
&depth = &depth + &stepdown '###
GOTO BEGIN

KEY:
SK
RETURN

END:
JH '###
END

-----------------------------------

As I post this, I'm wondering if it could be worth to include a choice to cut in conventional or climb... though I think conventional to be the one...
  #5  
Old 04-17-2005, 08:56 PM
Pascal Riendeau (Paco) paco is offline
Senior Member
 
Join Date: Jul 2004
Location: Valcourt, Québec, Canada
Posts: 1,886
Default

Back with another MOD that I think Mike will like (even more with an ALPHA)...

-----------------------------------

' File for surface planing any object you can secure under the gantry, but typically used for
' Planing large, warped, wide, and/or valuable lumber.
' Requires input for length (X dimension) and width (Y dimension) of object, depth of cut, and stepover...
' ###And more...
' Copyright 2005 David Buchsbaum. Unauthorized use or sale prohibited.
' ###PACO MODIFICATIONS v2 (4/17/2005)### Enjoy! 8-)

INPUT "LENGTH OF BOARD (X-axis)" &length
INPUT "WIDTH OF BOARD (Y-axis)" &width
INPUT "TOOL DIAMETER" &tool_diam '###
&tool_rad = &tool_diam / 2 '###
INPUT "% STEPOVER (SUGGEST 40)" &step '###
&step_dec = &step / 100 '###
&stepover = &tool_diam * &step_dec '###
INPUT "DEPTH PER PASS (Enter a positive value like 0.02 or 0.06)" &stepdown
INPUT "CUTTING SPEED" &cutspeed '###
INPUT "PLUNGE SPEED" &plungespeed '###
INPUT "BEGIN AT LOWER LEFT CORNER. ZERO TO TOP OF BOARD. [K] FOR KEYBOARD MODE or ANY KEY TO BEGIN" &key
IF &key = K THEN GOSUB KEY

'READY TO ROCK & ROLL?
PAUSE
Z2
MS,&cutspeed,&plungespeed '###
&depth = &stepdown

BEGIN:
SO,1,1
PAUSE 1
&yvalue = %(2) '###

LOOP:
JZ,0.02
MZ,-&depth
MX,&length
JZ,&SAFE_Z
&yvalue = &yvalue + &stepover '###
IF &yvalue > &width THEN GOTO FINISHED '###
J2,0,&yvalue
GOTO LOOP

FINISHED:
SO,1,0
JH
INPUT "ANOTHER PASS? ANY KEY to continue or N to end" &cont
IF &cont = N THEN GOTO END
&depth = &depth + &stepdown '###
GOTO BEGIN

KEY:
SK
RETURN

END:
JH '###
END

-----------------------------------
  #6  
Old 04-17-2005, 09:23 PM
Mike Richards richards is offline
Senior Member
 
Join Date: Jan 2004
Location: , South Jordan Utah
Posts: 1,561
Default

Paco,

I do like you idea of having router on/off code and a speed parameter as part of the program. I've taken the liberty to change your program just a little. Your program initialized the &yvalue to the starting y-axis location, but then performed a comparision using &yvalue + &width. I believe the result of the comparison assumed that the starting location would be x,y = 0,0, and, therefore might fail if starting from another location.

Also, by lifting/lowering the z-axis on each pass, we might introduce some 'waviness' depending on whether the z-axis returned to the exact height each time it was moved. (I'll concede that that is probably a nit-picky point. I considered doing the same thing, when I first looked at the program.)

Anyway, many eyes and opinions make program modification easier.

-Mike

' File for surface planing any object you can secure under the gantry, but typically used for
' Planing large, warped, wide, and/or valuable lumber.
' Requires input for length (X dimension) and width (Y dimension) of object, depth of cut, and stepover...
' ###And more...
' Copyright 2005 David Buchsbaum. Unauthorized use or sale prohibited.
' ###PACO MODIFICATIONS v2 (4/17/2005)### Enjoy! 8-)

INPUT "LENGTH OF BOARD (X-axis)" &length
INPUT "WIDTH OF BOARD (Y-axis)" &width
INPUT "TOOL DIAMETER" &tool_diam '###
&tool_rad = &tool_diam / 2 '###
INPUT "% STEPOVER (SUGGEST 40)" &step '###
&step_dec = &step / 100 '###
&stepover = &tool_diam * &step_dec '###
INPUT "DEPTH PER PASS (Enter a positive value like 0.02 or 0.06)" &stepdown
INPUT "CUTTING SPEED" &cutspeed '###
INPUT "PLUNGE SPEED" &plungespeed '###
INPUT "BEGIN AT LOWER LEFT CORNER. ZERO TO TOP OF BOARD. [K] FOR KEYBOARD MODE or ANY KEY TO BEGIN" &key
IF &key = K THEN GOSUB KEY

'READY TO ROCK & ROLL?
PAUSE

' +++++
' Z2
&START_X = %(1)
&START_Y = %(2)
' -----

MS,&cutspeed,&plungespeed '###
&depth = &stepdown

BEGIN:
SO,1,1
PAUSE 1
' +++++
'&yvalue = %(2) '###
' -----

LOOP:
JZ,0.02
MZ,-&depth
'+++++
'MX,&length
MX, &START_X + &length
' -----
JZ,&SAFE_Z
&yvalue = &yvalue + &stepover '###
IF &yvalue > &width THEN GOTO FINISHED '###

' +++++
'J2,0,&yvalue
J2, 0, &START_Y + &yvalue
' -----

GOTO LOOP

FINISHED:
SO,1,0
JH
INPUT "ANOTHER PASS? ANY KEY to continue or N to end" &cont
IF &cont = N THEN GOTO END
&depth = &depth + &stepdown '###
GOTO BEGIN

KEY:
SK
RETURN

END:
JH '###
END
  #7  
Old 04-17-2005, 10:44 PM
Mike Richards richards is offline
Senior Member
 
Join Date: Jan 2004
Location: , South Jordan Utah
Posts: 1,561
Default

I just noticed that the ramping cut was eliminated from the program. It's probably a good idea to leave it in, especially with large diameter cutters.

If you go back to David's original listing, you'll find it a few lines after the BEGIN: label. However, I would change it from:
M3,5,0,-&depth
to:
M2, 5 + &START_X, &START_Y
MZ, 0.01
M3, &START_X, &START_Y, -&depth

One other little matter concerning the diameter of the cutter vs the radius of the cutter contributing to the amount of 'waviness'. If my math is correct (and it probably isn't), it seems that if the z-axis were tilted, that using the radius instead of the diameter would still produce a wavy surface, although not as pronounced. To test the point, imagine a 30, 60, 90 degree triangle with the long leg representing the diameter of the cutter and the short leg representing the amount of error. Using 1/2 of the long leg would still produce 1/2 the error. (I know how hard it is to have a perfectly aligned z-axis. It's hard enough that I still mess with my alpha every time I flatten the spoil board.)
  #8  
Old 04-18-2005, 12:54 AM
Pascal Riendeau (Paco) paco is offline
Senior Member
 
Join Date: Jul 2004
Location: Valcourt, Québec, Canada
Posts: 1,886
Default

Mike!

The router control code is from David; I use a wall switche!

Both David and I have assumed (I think!?) that the program would be run from 0,0; but your mods is interesting and correcting the program to another possibility...

I agree about the "lifting/lowering the z-axis on each pass"; I'd prefer my first mod anyway... and I believe it would perform just as with "lifting/lowering the z-axis on each pass"... and it will be even faster (both for PRT and PRT ALPHA machine) machining back and forth, moving the Y each time with the stepover...

Sorry David; I have'nt noticed the use of the ramp in... so I got it back! I added a slight modifications about it; tell me what you guys think?!

-----------------------------------

' File for surface planing any object you can secure under the gantry, but typically used for
' Planing large, warped, wide, and/or valuable lumber.
' Requires input for length (X dimension) and width (Y dimension) of object, depth of cut, and stepover...
' ###And more...
' Copyright 2005 David Buchsbaum. Unauthorized use or sale prohibited.
' ###PACO'S MODIFICATIONS v3 (4/17/2005)### Enjoy! 8-)
' @@@Mike Richard's modifications v2 (4/17/2005)@@@

INPUT "LENGTH OF BOARD (X-axis)" &length
INPUT "WIDTH OF BOARD (Y-axis)" &width
INPUT "TOOL DIAMETER" &tool_diam '###
&tool_rad = &tool_diam / 2 '###
INPUT "% STEPOVER (SUGGEST 40)" &step '###
&step_dec = &step / 100 '###
&stepover = &tool_diam * &step_dec '###
INPUT "DEPTH PER PASS (Enter a positive value like 0.02 or 0.06)" &stepdown
INPUT "CUTTING SPEED" &cutspeed '###
INPUT "PLUNGE SPEED" &plungespeed '###
INPUT "BEGIN AT LOWER LEFT CORNER. ZERO TO TOP OF BOARD. [K] FOR KEYBOARD MODE or ANY KEY TO BEGIN" &key
IF &key = K THEN GOSUB KEY

'READY TO ROCK & ROLL?
PAUSE
&START_X = %(1) '@@@
&START_Y = %(2) '@@@
MS,&cutspeed,&plungespeed '###
&depth = &stepdown '###

BEGIN:
SO,1,1
PAUSE 1
JZ,0.02 - (&depth - &stepdown) '### 8-)
M3,&START_X + 5,&START_Y,-&depth '###@@@Original ramp in from David B. (Sorry...I have'nt noticed the purpose...)
MX,&START_X '###@@@

LOOP:
MX, &START_X + &length '###@@@
&yvalue = %(2) + &stepover '###
IF &yvalue > &width THEN GOTO FINISHED '###
MY,&yvalue
MX,&START_X '###@@@
&yvalue = %(2) + &stepover '###
IF &yvalue > &width THEN GOTO FINISHED
MY,&yvalue
GOTO LOOP

FINISHED:
SO,1,0
JH
INPUT "ANOTHER PASS? ANY KEY to continue or N to end" &cont
IF &cont = N THEN GOTO END
&depth = &depth + &stepdown '###
GOTO BEGIN

KEY:
SK
RETURN

END:
JH '###
END

-----------------------------------

By the way David, you could get your, say spoilboard , without any missed area by setting the "Pocket Overlap" to at least 15 %... I've found that below this setting, it will leave small area unmachined as you wrote in your first post...
  #9  
Old 04-18-2005, 01:13 AM
Gerald_D gerald_d is offline
Senior Member
 
Join Date: Oct 2001
Posts: 2,941
Default

Climb vs Conventional is a bit of a non-issue for a "surfacing" job. Normally we worry a little about the top edge and the vertical face when choosing a cut direction, but for surfacing there is no vertical face or top edge.
  #10  
Old 04-18-2005, 02:30 AM
David Buchsbaum beacon14 is offline
Senior Member
 
Join Date: Oct 2000
Location: Beacon Custom Woodwork, Inc., Atlanta GA
Posts: 1,165
Default

Uh oh, I can see this thread is going to require much more time to monitor than I realized. I'll have to look into the code improvements later but I can tell you that as far as surfacing in only one direction or two it shouldn't make any difference - I'm only using the 'Bot to make the surface flat - it still has to sanded until all the torn/cut fibers have been removed, or the surface is not ready for finishing. If you can see "track marks" after the finish is applied, it indicates a problem with the sanding, not the machining (assuming the Z axis is reasonably square to the table - if not your ridges will be more of an issue than grain/cutter direction).

Cutter sharpness will make much more of a difference than cut direction, so why take twice as long? I've done it with both hard and soft woods and it works fine.
But good job on chiming in with suggestions - this could work well and I hope the newbies will get something out of it as well.
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:57 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright © 1999 - 2010 ShopBot® Tools, Inc.