why not just bump the stock out each part
set up one tool station with a pin
program the tip of the pin to be located where the rough stock should be
open the chuck and move stock forward until it comes into contact with the pin
I run a Mori Seiki SL25 with a Fanuc 15T control, I often have to make short parts between .5 and 2" long from long stock, I'll hang as much stock as possible out of the chuck and then make and part-off as many part's as I can without pulling out more material, I've just been using the Input+ key to shift over the #00 Shift offset and make a new part, is there an easy way to automate this process other than using subprograms and G55/G59 offsets?
Similar Threads:
why not just bump the stock out each part
set up one tool station with a pin
program the tip of the pin to be located where the rough stock should be
open the chuck and move stock forward until it comes into contact with the pin
Use a G52 command to crreate a secondary work coordinate. You need to make your program into a subroutine called by what becomes your main program.
Your program starts with the command G52 Z0.0 and then calls the subroutine which does a complete part. Below the first subroutine call you have a G52 Z-z.z, where -z.z is the length of the part plus the parting loss plus a facing allowance, then call the subroutine again.
You do this for however many parts you can get out of a length and after the last subroutine call you have the command G52 Z0.0 to reset back to the original work coordinate.
You can use G10 to shift your coordinate system, i.e.:
G10 L2 P1 Z-10.5; would set the G54 Z offset to -10.5
G10 L2 P1 W-0.5; would shift the G54 Z offset -0.500.
Geof, can you write me an example, you can just add the proper commands to the top and bottom for me, I've never ran sub-routines. my normal program would look something like this...
O0001;
G0T0101 G50S2000;
G54;
G96S300M3;
X5.Z.04M8;
makes part
G0X10.Z6.M9;
M1;
M30;
Okay I am not sure exactly how the subroutine call would be on your machine. On a Haas it is M97 P1000 which says go to line N1000 and carry on from there. The return is M99 which says go back to the line below the one with the call command. On your machine it may be O1000 or something different. I have put in line numbers just to identify things.
From line N4 it goes to N1000, does the first part and returns from the M99 at N100n back to N5. Then having had the G52 move the work zero forwardit goes from N6 back to N1000, returns and move again at N7 then back again at N8, returns to N9 cancels all the G52 shifts, homes and stops.
O0001;
N1 G0T0101 G50S2000;
N2 G54;
N3 G52 Z0.0;
N4 M97 P1000;
N5 G52 Z-z.z;
N6 M97 P1000;
N7 G52 Z-2z.z;
N8 M97 P1000;
N9 G52 Z0.0;
N10 G28M9;
N11 M30;
N1000 G96S300M3;
N1001 X5.Z.04M8;
N1002 makes part;
;
However many lines needed
;
N100n G0X10.Z6.;
N100n M99;
You will notice I left the spindle command in what becomes the subroutine. Mostly I do this because there will be tool changes in the subroutine and maybe speed changes. I find it easier to read the program if all the stuff telling the machine what to do is in one section.
Thanks Geof, I may give that a shot,my machine uses a M98 to call a sub and a M99 for the end.
Have a look at this thread:
http://www.cnczone.com/forums/showthread.php?t=34502
One of the posts mentions something about a Fanuc control only doing sub program calls, not subroutine. This may be applicable to you.
The Okuma LB25 has a nice feature, the control has system variables that correspond to the axis settings.
For example, to shift the Z axis 2.00 in after each cycle,
simply insert this line:
VZOFZ=VZOFZ-2.00
before the M30 line.
You could also use a user variable for the shift, allowing you to shift a different amount each time without editing the program.
VZOFZ=VZOFZ+V20
Don't know if the Fanuc has similar capabilities.
070320-0827 EST USA
In post #3 Geof gave you the basic approach I would use if you have G52 capability in your machine.
Further comments on that method.
G52 is a modifier of all the other G5xs meaning G54, G55 , etc. By modifier I do not mean it changes the value in G5x, but rather the content of G52 is added to G5x and other entities that determine the machine position. Added may included a sign reversal of a value you enter. HAAS had some confusion between some model years on how sign was handled. If when you try this method the direction is wrong just change your sign.
Note G52 is always active if your machine has this function. If G52 contains all zeros then it is effectively inactive.
I am not where I can check at the moment, but I believe that G52 Z-2.2 puts an absolute value of -2.2 into the Z register of G52. So you might have to use something like G52 Z#500 and separately increment #500 for each loop with #500 = #500-2.2. On HAAS the Z component of G52 is stored at #5203. Thus, at your loop point you can simply do #5203 = #5203-2.2 .
I do not differentiate between subroutine and sub-program. Logically these are the same thing. Anything of this type I call a subroutine. But I will differentiate between a subroutine and a loop within your main program or in some subroutine.
A loop is something which is continuously repeated. Most loops will include a conditional test to provide an exit means.
For your part you might have in the main program a loop as follows:
LOOP1:
Your program to do whatever
Exit test -- on end GOTO NEXT
#5203 = #5203-2.2
GOTO LOOP1
NEXT:
Stop and advance stock
You could call a subroutine in this loop if you want.
A real important use of a subroutine is where the program that needs to be repeated is called from different places in a program or other subroutine. Or in the case of a G65 call you can pass parameters to the called subroutine.
For example: I have a hole pattern defined by some X, Y values put in a subroutine. I can use this one subroutine to pilot drill, tap drill, tap, counterbore, and chamfer by calling the subroutine 5 times from the main program. Thus, I only define the locations once in one place, but they get used with 5 different tools. It is true I can do the same things in a complex loop, but you would find reading the code difficult.
.
I was wanting to do the same thing with our machine. It's a Nakamura-Tome SC-300L with a Fanuc 21T control. But after looking in the control screens, there are no registers designated as G52, G54...55,56 and so on. Yet there is a workshift registry I use and I have to cancel it out before the next full length slug... or else. I'm not sure how to write a subroutine without being able to say (go to coordinate G54 Z-x.xxx.. then G55 Z-x.xxx)
Pressfit have you tried a program with G52. I am under the impression that this is a standard G code. Even if your machine does not have a visible display in which a G52 value can be stored maybe it is there somewhere.
A technique I have used to test things is run the program without tools or material in the machine and just look at the position readout to see if it is doing what I expect.
I would probably use a counter program to run the parts program with a G10P0W-.1
G10P0W-.1 goes at the end of the parts program.
This will move your work shift Z-.1 each part.
Your counter program must have G10P0Z0 at the start of it.
So if your L count is 25 your parts program will make 25 parts with a total z move of z-2.500
Put the stock up in your counter prgram and let er rip.
Hope I get a chance to run that some day.
Last edited by adamant; 03-24-2007 at 10:51 AM. Reason: Clearification
Okay,
I was finally able to get back to this problem of needing to make multiple parts from a bar that is too big to get back into the spindle bore. An order for 1000 new parts came in. No existing program for them.
Because of the necessity of using 6 different tools to make each .500 long part, [Rgh Face&Turn profile:- Fin.Face&Turn profile:- Rgh.bore:- Fin.bore:- I.D.Groove bar:- and .125 Partoff] I wasn't exactly cherishing the idea of writing of all the additional 'Z' moves seeing that I had enough material hanging out past the jaws to make 7 parts at a time. I needed a way to just write my tools (ONE) time and let the control do the rest.
The Fanuc 21T control has a fixed local coordinate system that's apparently non-selectable so I couldn't command g53, g54, g55 and so on for each part. Explains why I have no screen for that-EH?
Making it short it winds up being a subprogram commanded by a G10 Z move for each part as adamant suggested. Thing is its quite simple too now that I understand what's going on.
-----------------------------------
(Program on the screen at start)
01111;
;
G10 P0 Z0;(part one)
M98 P9999;
;
G10 P0 Z.635;(part two)(the .500+.125+.01 to face off)
M98 P9999;
;
G10 P0 Z1.270;<----(must be a positive number)
M98 P9999;
;
G10 P0 Z1.905;<----(multiples of .635)
M98 P9999;
(as many parts as you want to make)
;
;
M30;
%
----------------------------------
(Your main program)
09999;
;
N1;
T100;
;
;
M1;
;
N2;
T200;
;
;
M1;
;
;
;
;
M99;
%
-----------------------------
The G10 adds the multiples of each part into the work shift registry. As of yet, I haven't found a way to clear it out automatically using a command in the 01111 program. I have to clear that out manually. Otherwise the program will start off next time where it left off which of course will result in a change of underwear!
Any ideas?
Hi, if your m/c has macro i have used this method for doing similar to what you are doing.....
O0001;
#1=2.0(SHIFT DISTANCE BETWEEN PARTS)
#2=3.0( NUMBER OF PARTS TO M/C)
#3=#1(DO NOT ALTER)
G0T0101 G50S2000;
G54;
G52Z0.0( RESETS G52 TO ZERO )
G96S300M3;
WHILE[#2GT0]DO1
G52Z[#3-#1]
G0X5.Z.04M8;
(makes part)
G0X10.Z6.M9;
#2=[#2-1.0]( COUNTS DOWN NMBER OF PARTS )
#3=[#3-#1] ( CALCS NEXT G52 VALUE )
M1;( OPSTOP BETWEEN PARTS )
END1
M30;
%
Beware though to make sure there is enough bar out for number of components or BANG!!!
Turner
070417-0628 EST USA
In my HAAS machines G10 P0 is used to do an absolute modification of G52 for the specified axes.
It appears that is what is occurring in the code you wrote.
You should be able to do
G10 P0 Z0
to do your reset.
If the operation of G10 P0 was an incremental addition as implied by adamant, then you would need to subtract N * the increment. The code you used does not imply an incremental change but rather absolute.
.