PDA

View Full Version : Unsure of how to nest files



jay
11-23-2003, 07:33 PM
I have a whole bunch of squares, .5" deep, to cut in a lot of oak boards. Actually what I want to do is to hog out a square but this is the same principle.
Example:
JZ, .5
J2, 10,10
MZ, -.5
M2, 20,10
MC, 20,5
M2, 10, 5
M2, 10,10
JZ, .5

Now what I would like the bot to do is to move from the x10 position 15 inches away (x25) then cut another square. If the first file was called squar10.sbp would the commands be writen like this?

JZ, .5 'the first file
J2, 10,10
MZ, -.5
M2, 20,10
MC, 20,5
M2, 10, 5
M2, 10,10
JZ, .5
M2, 25,10
FP square10.sbp,,,,,2 'run another square cut
M2, 40,10
FP,square10.sbp,,,,,2 'run a third square cut

My question is does the (2)(offset)tell the bot to cut the subsquent squares relative to the first one? For some reason I keep thinking the bot will return to the origional x10, y10 position.

The other question I have is;
if I (x) the box for 2D offset and then at the bottom of the screen type in the (2) in the offset place what happens? I don't understand why that is even there.

bill.young
11-24-2003, 08:45 AM
If you cut something in 2d offset your cutting it relative to where the bit is when the file is called, not to where it was last cut. It's as if you temporarily re-zeroed your X and Y axis' and then called the file without the offset.

So using your example above, we'll pretend that the commands at the top are put in a file named square10.sbp (though they would actually cut a 10x5 rectangle in your example). A file to call them in offset mode might look like...

JZ, .5
J2, 0, 0
FP, square10.sbp,,,,,2 ' run the first square
J2, 15, 0
FP, square10.sbp,,,,,2 ' run the second square
J2, 30, 0
FP, square10.sbp,,,,,2 ' run the third square

and so on.

The reason it's a x(15) move and not an x(25)move between files is that our square10.sbp file first moves to 10,10 to begin cutting the square. so if we moved to J2, 25, 10 and called the file in offset mode, the actual square would start cutting at (25 + 10) or 35".

If you're feeling adventursome you could also do it using some of the programming commands by making a variable for your x move distance and creating a loop that added 15 to it each time.

Hope this helps,
Bill

sheldon@dingwallguitars.com
11-24-2003, 09:31 AM
How would you specify the number of pieces?

srwtlc
11-24-2003, 01:55 PM
Here's one that I use to cut coasters from random length boards. I just make a quick measurement and determine how many can be cut from the blank, enter that number once the file asks me and it cuts that many and quits. This file only works with the Dos version though. The Windows version keeps right on going....and going....and going....

The master file;

'ShopBot file created by Timber Lake Creations on 09/30/03
'Cuts a specified number of round coasters down the length of a 5" board 13/16" thick
'Cut with 0.25" dowcnut spiral bit zeroed on material

SA
VU,,,,,0.05
VC,,,,,,,,0
VS,1.35,0.7,,,3.5
VR,0.65,0.45,,,0.90


&count=0
&howmany=0


JZ,1
J2,2.75,2.5
PRINT "
INPUT "How many coasters in this blank" &howmany


SO,1,1 'Router on
PAUSE 1 'Allow router to come up to speed


REPEAT:
FP,1Coaster.sbp,,,,,2,,,
&count=&count+1
SR
JX,2.5
SA
IF &count < &howmany THEN GOTO REPEAT
SO,1,0 'Router Off
J3,2.75,12,2
END


The 1Coaster file;

'ShopBot file created by Timber Lake Creations on 09/30/03
'Cuts round coasters down the length of a 5" board 13/16" thick with tabs
'File gets called up by CoMaster.sbp in 2d offset
'Cut with 0.25" dowcnut spiral bit zeroed on material


JZ,1
J3,0.000000,0.000000,1.000000
J3,0.000000,0.000000,0.010000
M3,0.000000,0.000000,-0.250000
CG,,0.070652,0.000000,0.035326,0.000000,,1
CG,,-0.070652,0.000000,-0.070652,0.000000,,1
CG,,0.211957,0.000000,0.141304,0.000000,,1
CG,,-0.211957,0.000000,-0.211957,0.000000,,1
CG,,0.353261,0.000000,0.282609,0.000000,,1
CG,,-0.353261,0.000000,-0.353261,0.000000,,1
CG,,0.494565,0.000000,0.423913,0.000000,,1
CG,,-0.494565,0.000000,-0.494565,0.000000,,1
CG,,0.635870,0.000000,0.565217,0.000000,,1
CG,,-0.635870,0.000000,-0.635870,0.000000,,1
CG,,0.777174,0.000000,0.706522,0.000000,,1
CG,,-0.777174,0.000000,-0.777174,0.000000,,1
CG,,0.918478,0.000000,0.847826,0.000000,,1
CG,,-0.918478,0.000000,-0.918478,0.000000,,1
CG,,1.059783,0.000000,0.989130,0.000000,,1
CG,,-1.059783,0.000000,-1.059783,0.000000,,1
CG,,1.201087,0.000000,1.130435,0.000000,,1
CG,,-1.201087,0.000000,-1.201087,0.000000,,1
CG,,1.342391,0.000000,1.271739,0.000000,,1
CG,,-1.342391,0.000000,-1.342391,0.000000,,1
CG,,1.483696,0.000000,1.413043,0.000000,,1
CG,,-1.483696,0.000000,-1.483696,0.000000,,1
CG,,1.625000,0.000000,1.554348,0.000000,,1
CG,,1.625000,0.000000,-1.625000,0.000000,,1
CG,,1.620195,-0.124877,-1.625000,0.000000,,1
CG,,1.370661,-0.110360,-0.124630,0.009606,,1
J3,1.370661,-0.110360,1.000000
J3,2.250000,0.000000,1.000000
J3,2.250000,0.000000,0.010000
M3,2.250000,0.000000,-0.270833
CG,,2.250000,0.000000,-2.250000,0.000000,,-1
M3,2.250000,0.000000,-0.541667
CG,,2.250000,0.000000,-2.250000,0.000000,,-1
M3,2.250000,0.000000,-0.687500
CG,,2.173333,0.582343,-2.250000,0.000000,,-1
M3,2.173333,0.582343,-0.812500
CG,,-2.173333,0.582343,-2.173333,-0.582343,,-1
M3,-2.173333,0.582343,-0.687500
CG,,-2.173333,-0.582343,2.173333,-0.582343,,-1
M3,-2.173333,-0.582343,-0.812500
CG,,2.173333,-0.582343,2.173333,0.582343,,-1
M3,2.173333,-0.582343,-0.687500
CG,,2.250000,0.000000,-2.173333,0.582343,,-1
J3,2.250000,0.000000,1.125000

You could also have it ask for the material length and then have it figure out how many it can get from the board. Look at the S_nest.sbp file in your SBparts folder for more reference.

Scott

bill.young
11-24-2003, 01:56 PM
Hi Sheldon,

You could do it with another variable that acted as a counter. So if you wanted to do, say, 6 pockets, your program might look like this...


' *************<example starts here>************

&counter = 0

redo: ' this is a label..you can tell by the : after the name

&xmove = (15 * &counter) ' this increases &xmove by 15 each time it goes through our loop.

J2, &xmove, 0
FP, square10.sbp,,,,,2

&counter = &counter + 1 ' Now we advance the counter by 1...

IF &counter < 6 THEN GOTO redo ' ... and test to see if we've cut 6 pockets.

' If &counter is less than 6 we GOTO the label named redo: and repeat the last couple of steps.
' When &counter gets to 6, we've cut our 6 pockets and can continue with the rest of the file.


' ****************<and ends here>**************

This is the Readers Digest version...you could get fancier by adding input statements so that the user could type in the number of copies or the distance that it steps over. You could even put this loop inside another loop, so that it could cut more than one row of squares. There's more info on using the ShopBot programming statements in the Programming Manual that's available on the web site if you're interested.

Does this make ANY sense?

Bill

jay
11-24-2003, 04:58 PM
Thank you all.

I now have a little better understanding of how the offset works. I thought I would clamp a number of boards to the table. After the first one was cut automatically move to the second while I replace the first with a new board and re-run the file. Now all I have to do is to type up the file so that I can cut a few hundred of these little widgets. Thanks again.

sheldon@dingwallguitars.com
11-25-2003, 01:21 PM
Thanks for the input. I'll have to wait until my basic-savy employee gets back from holidays to put this into practice.

This looks like it sure beats shift-selecting dozens of tails in Vector.

jay
11-25-2003, 05:16 PM
Cool, It Works!
Thanks guys.