PDA

View Full Version : Pause in program and prompt for C2..Possible?



mporter88
12-18-2014, 11:32 PM
Hello all.
I am working with some plastic that has slight variances in thickness. Its supposed to be .25"...but there is sometimes a thinner area or side to the sheets.

In general there is no problem created by this variance but I have a design that requires a 90 degree v bit to plunge .25 from the part top (z0) in order to create a seat for a flush nut.
The variance is enough for the flush nut to be perfectly seated in one area of the piece and too deep (by a tiny amount) in another part of the material.
This is purely a cosmetic problem. I want those nuts to all match in appearance and seat.

There is a lot of end milling being done on these pieces.... and only 8 instances of this 90 degree seat being needed at exactly .25" deep from the part surface.

Is it possible to edit the file such that it pauses before plunging and prompts for a C2 (re-Set Zero)?...Then of course I would want to continue the program through the rest of the plunges until the next "pause for C2".

Would this be a sub-routine? (something that I have not yet dealt with)

Thanks much.
Any guidance at all appreciated.
Please feel free to give me correct search term if you think that would help me find what I need in the forums.

Merry Christmas!

MPorter

khaos
12-19-2014, 12:02 AM
As found in http://www.shopbottools.com/files/SBDocs/SBG00314101005ProgHandWin.pdf page 5

Nesting or Embedding Part Files
One Part File can call up and execute another Part File. You simply use the [FP]
Command in the first file in order to start the second file. When the second file
finishes execution, action returns to the next line of the first file. This process of
starting one file with another is referred to as nesting or embedding files.
Typically, you might have a 'master' Part File that calls up various components
that will be cut from the piece of material currently on your table. This master
Part File can position the tool for cutting the components and thus manage the
layout of the project. An example of placing a single part in multiple locations is
described in the sample code here. You use the 'offset' function in the [FP]
Command to cause the file to be cut from the location that the master file moves
the tool to. Thus you can use nesting to place different parts of a project in their
correct location.
'Start of master Part File ALLPARTS.SBP
M2, 10, 4 'move to location to start first part
FP, MYPART.SBP , , , , , 2 'execute with 2D offset
M2, 20, 4 'move to start of second part
FP, MYPART.SBP , , , , , 2 'execute with 2D offset
M2, 30, 4 '... and so on
FP, MYPART.SBP , , , , , 2
M2, 40, 4
FP, MYPART.SBP , , , , , 2
You can repeat nesting of files inside other files multiple times up to 8 levels
deep. This means you can call up a part, and then within each part call up say a ShopBot Programming Handbook Page -6-
SBG00314101005ProgHandWin.doc Copyright 2010 ShopBot Tools, Inc
repeated procedure such as a drilling and countersinking routine. This process of
nesting is an example of what in programming would be called a sub-routine,
sub-program, or procedure. Sub-routines are useful for organization and
efficiency, and more generally provide a way to 'structure' your Part File work.
You can have subroutines that you use with a variety of master Part Files. As an
example from our shop, we have a drilling/countersinking routine that we use for
many different purposes including making the table-tops for ShopBots. We have
saved this counter-sinking routine, which is for just one hole, as a Part File. Then
we call it as a sub-routine within any file in which we need to do drilling or
countersinking.

srwtlc
12-19-2014, 12:07 AM
M, at the point that you want to do it, try...

'Ready to rezero the tool
PAUSE
C2
'Continue?
PAUSE

While you could do it with a GOSUB, you wouldn't need to. I've not used a C2, but have use the FP,zzero.spb method which is basically doing the same thing.

Another option would be to preset each zzero as a variable and then when the program gets to that spot, a VO (variable offset) is issued using the variable for that location. A little more involved to start with, but handy in the long run if it's a repeat job.

srwtlc
12-19-2014, 05:03 PM
Gave it a try myself, and it works as expected. You could also do it as a subroutine by making the above or similar your sub (name it RESETZ: or something) and then call it each time you are at a position in your file that you want to do it.

'Previous code here
GOSUB RESETZ
'Continuing code here

RESETZ:

'Ready to rezero the tool here?
PAUSE
C2
'Ready to continue?
PAUSE
RETURN

mporter88
12-19-2014, 08:29 PM
I ask a question and gets loads of useful stuff back.
It's like a dream of what the internet should be.
Shopbotters Rock!

Thanks again.
MPorter

myxpykalix
12-19-2014, 10:40 PM
Not knowing what your part is or looks like, it would seem to me you could make seperate toolpaths for the different operations unless one leads into or is part of the other?