What's new
What's new

Methods of running part at multiple offsets (lathe)

bukwerm

Cast Iron
Joined
Nov 6, 2013
Location
Minneapolis MN
How do you offset a program to run multiple parts out of one blank? I have a part about 1" thick x 3" dia My spindle bore is only 2" thru so I can't barfeed. Therefore, to minimize drop and change out time I like to run multiple parts per blank.

Machine is a Doosan Lynx 220LM. Control is a Fanuc 0i-tc. I've done it two ways, and both have issues.

My first solution is with a while loop that shifts me from G54 to G55 to G56. I determine which offset it starts at by changing a variable in the beginning. (see example 1) The problem is that if for some reason I ran it with a short blank, say I had a leftover piece of material from another job, and then load a full blank without changing the program, it will crash.

The second is with a master and subprogram. (example 2) The master sets the work offset and the sub contains the geometry. The problem here is with restarting on a specific tool. If some reason I have to hit reset mid cycle then to finish out the part I have to:
1. Go into the sub
2. Change my M99 to M30
3. Run the sub from the first incomplete tool
4. Change the M30 to M99
5. Return to master program
6. Run master from next offset

I'd like to find a solution that would allow me to easily select which tool and which part to start on and automatically rewind to the first tool and first part at M30.

Would G52 be applicable here? (I've never used it)

Clear as mud?

btw I didn't put the examples right in this post so it wouldn't be a mile long(er). :o I can if the attachment isn't working for someone.
 

Attachments

  • EXAMPLES.zip
    24.3 KB · Views: 125
Stop using the word "billet", most of us hate it. If I am going to make multiple parts out of one chunk I do one of two things, either alter machine position at the beginning of, part, 2,3,4,etc and then add it back after the last part with G50W adjustments in the program or if I don't mind standing there just manually change the work shift.
If I am starting with uneven length blank I slice the front with a cut-off blade before part #1 in the program.

P.S. Your way seems unnecessarily overly complicated. I like my programs to be easily understood.
 
The second is with a master and subprogram. (example 2) The master sets the work offset and the sub contains the geometry. The problem here is with restarting on a specific tool. If some reason I have to hit reset mid cycle then to finish out the part I have to:
1. Go into the sub
2. Change my M99 to M30
3. Run the sub from the first incomplete tool
4. Change the M30 to M99
5. Return to master program
6. Run master from next offset

Try ending your programs like this:
/M99 (RETURN TO MASTER)
M30
%

Turn on block skip when you want to run a program on its own.
 
...alter machine position at the beginning of, part, 2,3,4,etc and then add it back after the last part with G50W adjustments in the program...

Are you altering the machine position manually? You have an example?

Try ending your programs like this:
/M99 (RETURN TO MASTER)
M30
%

Turn on block skip when you want to run a program on its own.

Ah...forgot about this trick. But unless I'm missing something I still have the issue of having to jump to the sub, finish running the part, then load the master again to finish out my parts.
 
Are you altering the machine position manually? You have an example?



Ah...forgot about this trick. But unless I'm missing something I still have the issue of having to jump to the sub, finish running the part, then load the master again to finish out my parts.

Yes, you'll still have that problem. Are you programming manually or using a CAM system?
 
Stop using the word "billet", most of us hate it.


Couldn't help but laugh as I feel your pain. Reminds me of those kids running around with a fart can exhaust and poorly modified suspension. They come into the shop asking "Hey bro, You got any billet?"
 
Here goes, let us say your machine is sitting at Z15.000 (My machine's home position). Turret sits to the right of the chuck and moving closer to the chuck or turning is the minus direction. Let us say your part consumes .500 of stock including face off and you can make 4 parts as a little over 2" hangs out the jaws. The first part runs as you always would, before part 2, put G50W.500 in the program at home position, readout now shows Z15.500 even though it is at Z15.000, machine will now move over an extra .500, to compensate for the shorter blank.
Repeat process at the beginning of part 3 and 4, before part 4 home position will show Z16.500 (even though it really is at Z15.000. After completing part 4, program G50W-1.500 before sending the turret home and you will be back ready to run the next slug.
I have been doing this since I ran machines that had tape readers, it is the easiest way and easy to explain and understand (in person).
 
Couldn't help but laugh as I feel your pain. Reminds me of those kids running around with a fart can exhaust and poorly modified suspension. They come into the shop asking "Hey bro, You got any billet?"


Annoying to say the least, don't know how much time you spend in So Cal, but the kids there are the worst. I moved from there a few years back and had a customer who did electrical work on cars. Mostly charging system upgrades so the kids could turn their fart can cars into mobile window rattling devices with their car stereos. I talked to some of these kids when I came by dropping off parts. All of them claimed to have done all the work on their cars except for the current charging system upgrade, all were lying and using mommy's credit card. Thankfully in Virginia the window rattling stereos are pretty rare in So Cal they are all over the place.
 
I have a repeat job that makes a 22.875 od X 21 id X 3/4 part out of tubing.

(Fagor 8055T) End of program:

N510 X0 Z4.156 D0
G92 Z5.0
N520 M30

Been using this on 3 different machines (and 3 different controls) for more than 10 years.
 
Thanks for the replies guys.

Dualkit
When you say "put G50W.500 in the program at home position" I take that to mean you're somehow looping back through and hitting the G50 before each part... correct or no?

I suppose I did a poor job labeling this thread but I couldn't figure out how to shorten "how write a multiple offset program that can be easily restarted on a specific tool and a specific offset and then always rewind to the first tool and first offset at M30." :nutter:

maybe I'm chasing a unicorn on this one....?
 
After the first part you start using G50W+(shift distance) to compensate for the change in z starting position. After all the parts are ran off the slug you use G50W- to put it back where it should be. Go in MDI and type in G50W.500 and watch the position readout change. Machine won't move.
 
Gotcha. But then I'm still stuck with issue of having to input code between each part. The 1 piece cycle time on these parts is short enough that I can't do other things, but long enough that I feel useless watching the machine. If I can let it run 3 or more that makes me more productive elsewhere.

Both of my original examples work well when everything is running. I was just trying to figure out the restart mid cycle issue. Not a big problem, but I'm always looking for ways to avoid fat fingering or forgetting input.

Thanks for your help. Shifting a program with G50 will come in handy.

To reset, is there a way to send it home and then reset G53? Or is there some reason you have to use G50 W-1.500. I know it wouldn't be ideal on a long bed machine.... To use your example, the first part would run normally, 2nd would require G50 W0.50, 3rd G50 W1.00 etc. If the home and reset G53 was at the end of the program I'd not have to worry about the 4th part getting accidentally ran on a fresh slug.
 
I use G50W when doing multiple parts from a bar. I have one offset set for my chuck jaw face to bore them. Also if the part can fit in the chuck for the other side I'll run the whole part using 2 offsets and M0 to flip it. That way it's ready for the mill or the pallet that I'm going to ship it with.
 
You don't have to manually input the code, I just suggested you try it manually first until you get comfortable with it, you can put the G50W +/- right in the program.
 
I use multiple work offsets, G54,55,56 etc with a M97 (local sub routine call) and program like this.

g54 (1st part)
m97 p100
m97 p200
m97 p300
g55 (second part)
m97 p100
m97 p200
m97 p300
g56 (3rd part)
...
repeat until all parts are machined
....
n100
t0101
do some stuff
m98

n200
t0202
do some more stuff
m98

n300
t0606
do more stuff
m98
g00 g53 x0z0
m05
m30

Doing it this way will allow you to re-run any tool from any of the work offsets, if needed.
You still have to be mindful of blank size, but you could always run a g72 facing cycle starting from z.2 out, or just part at g54 z0.

Doug.
 
Doug
M97 looks like a pretty versatile option... but from what I find it also looks like its only a Haas option. Please tell me I'm wrong... :(

The last place I worked at used a format kind of like that with fanuc controls. I wonder if someone was trying to get similar functionality. Each tool was its own subprogram and there was a main macro program that called all of the subs. The operator had a few variables they could change at the beginning of the program in order to determine how the program ran. One of which was the tool to start on, and some other things that I forgot. The downside was that all subprograms were labeled O0100, O0200, O0300, etc so it could be difficult to make sure the right programs were loaded.

I can't put my finger on why, but that layout reminds me of a milltronics conversational program with subroutines.
 
Thanks for your help. Shifting a program with G50 will come in handy.

To reset, is there a way to send it home and then reset G53? Or is there some reason you have to use G50 W-1.500. I know it wouldn't be ideal on a long bed machine.... To use your example, the first part would run normally, 2nd would require G50 W0.50, 3rd G50 W1.00 etc. If the home and reset G53 was at the end of the program I'd not have to worry about the 4th part getting accidentally ran on a fresh slug.

Using G50W_ is no panacea for your problem. It has the same issues as you have already indicated in your first Post. If the program is aborted before the Program End, or wherever the effect of the previously G50W_ command is reversed, then the coordinate system will have the current G50W_ shift active. If your were to forget to Reset the effect of the G50W_ and repeat part of the program where G50W_ is made to shift the Coordinate, then there will be an accumulation of the G50W_ command, putting you in probably a worse situation. The same can be achieved using G53 and defining the Z shift in the G53 registry. In your program, you could set the G53 Offset Registry using G10, or by using the System Variable #5203 to set it.

There is no fool proof method to achieve what you want. If you try hard enough, and mostly not so hard, you can set a scenario to prang the machine.

About the closest you will get is as follows:

1. Set parameter 6005 to "1". This will enable Subprogram Calling via Sequence Number; the Syntax for this is as follows:

M98 Q10
and
M98 P_ _ _ _ Q10

In the first example, the Subprogram can be listed at the end of the current program, after M30 if the current program is a Main Program, or after M99 if the current program is a Subprogram.

In the following example, program control will branch to N10 after M30 and then return to the block following the M98 Q10 block when M99 in the Local Subprogram is executed.

--------
--------
M98 Q10
--------
--------
--------
M30
N10
--------
--------
--------
M99

In the second example, M98 P_ _ _ _ Q10, program control will branch to the external Subprogram specified by P_ _ _ _ , and start at Sequence number N10 within the the Subprogram.

2. Edit your Master Program as shown following in Blue.

3. Have each tool operation in the Subprogram preceded by a unique Sequence Number, ie. N1 - 1st Tool Operation, N2 - 2nd Tool Operation, etc.

4. Include #520 = 1 at the End of your Subprogram. This will ensure that #520 is reset to "1" in the event that a Start from a specific tool has been made as explained further down.

5. To repeat a particular tool for a particular component number, proceed as follows:
i. In MDI, execute #520 = 2 (or whatever the Start Sequence Number in the Subprogram will be), or set #520 directly in the Macro Variable Page.
ii. Position the cursor at the appropriate position in the Main Program for the Nth number of part to repeat; for example, at G56G40 to start at the 3rd part.

6. When the Cycle Start is pressed in Auto Mode, the control will set the coordinate system to that specified by G56 in the above example, branch to the Subprogram and commence operation at the Sequence Number specified by #520 (N2 in the above example)

7. At the completion of the Subprogram, #520 will be reset to "1" by #520 = 1 included at the end of the Subprogram.

%
O1064(EXAMPLE2 MASTER)
(3.5 LONG BLANKS)
(G54Z 6.3345)
(G55Z 5.4925)
(G56Z 4.6505)
#520 = 1 (Use whatever Nonvolatile Common Variable that is available and not used by any other Macro Program)
G54G40
M98 P1063 Q#520
G55G40
M98 P1063 Q#520
G56G40
M98 P1063 Q#520
G0G28U0W0
M30
%

Regards,

Bill
 
Doug
M97 looks like a pretty versatile option... but from what I find it also looks like its only a Haas option. Please tell me I'm wrong... :(

The last place I worked at used a format kind of like that with fanuc controls. I wonder if someone was trying to get similar functionality. Each tool was its own subprogram and there was a main macro program that called all of the subs. The operator had a few variables they could change at the beginning of the program in order to determine how the program ran. One of which was the tool to start on, and some other things that I forgot. The downside was that all subprograms were labeled O0100, O0200, O0300, etc so it could be difficult to make sure the right programs were loaded.

I can't put my finger on why, but that layout reminds me of a milltronics conversational program with subroutines.


Yes, M97 is not a Funuc method, but the same can be achieved by setting parameter 6005 to "1" to enable Subprograms included at the end of the current program to be called by Sequence Number, as explained in my previous post.

In Doug's example, the Local Subprograms would go after the M30, otherwise the first Local Subprogram after the last M97 call would be run again using the last Workshift Coordinate System set (G54 to G59). Local Subprograms, whether they be HAAS or Fanuc variations, are terminated as per normal external Subprograms with M99.

Regards,

Bill
 
Thanks Bill, that's a lot of info to digest. I'm going to have to play around with the Subprogram Calling via Sequence Number.

As far as using G50W_ goes I totally spaced the instance of aborting a second time.

Makes me think of the old saying, "want to make something hard?... try making it easy."


Oh wait... I guess I just made that up.

Edit: on second thought maybe I have heard someone say that. :what:
 








 
Back
Top