Created and Maintained by the Real World Software Developers and Machinists at ... click here to check it out !!

Wednesday, July 30, 2014

Homemade Bar Puller for Your CNC Lathe - Resurrected

We first published this tip a few years ago ... and it has become so popular and copied on many other sites and in many trade journals ... and is asked about by so many of our clients ... that we had to bring it back for a repeat post ... once again !!

Enjoy ... and profit from this simple yet super efficient plan.


One of the best ways to add efficiency to your CNC lathe is to make it run unattended. Using a bar feeder or a simple bar-puller, you can make your lathe run in a more complete AUTO cycle, stopping only for the refilling of the stock and minor offset adjustments. In this article, we'll share a simple but efficient design for a bar-puller and show you a programming example of how to put it to use.

Granted, a little work is required but when put to the right use, unattended operation can really help your bottom line. For example, how about being able to leave the shop at 5:00 and still have your lathe running producing another 50-60 parts while you're home eating dinner. Or for the one man shop, how about having production being run while your on the phone getting that next deal. With the right combination of cutting conditions and unattended operation, there's no telling where you can go.

The idea behind this bar-puller is to fill the spindle with a bar length of material, then using an auto cycle perform the following sequence :
  • Grab the stock with the puller
  • Open the chuck
  • Pull the stock to the desired length
  • Close the chuck
  • Retract the puller
  • Machine the part
  • Cut-Off the part
Then simply repeat the cycle again, the number of times for repeat depends on the number of parts that can be made using the length of bar stock in the spindle.

To create your bar-puller feature, you'll need a couple of other items other than the bar puller to be outlined here.

First, you'll need to cut the bar stock the length of your spindle so the stock can be slid inside your spindle and pulled by the bar puller through the chuck or collett nose in the front. NEVER, NEVER, NEVER hang any size stock outside the end of the spindle - all stock must fit inside the spindle housing and be supported with spindle liners or a support ring as outlined below.

Since the difference between the stock OD and the spindle ID is usually pretty big, you can't just put the stock in the spindle. It must be supported in the spindle to prevent the stock from rattling around. This can be done with commercially purchased spindle liners or you can make a simple spindle liner ring using the design and concept outlined here. Please note that these liners take up the "slop" between the stock size and the ID of the spindle and must be used to prevent possible whip or damage to the spindle bearings or other possible injury.

One method is to make a ring out of plastic or similar material that attaches to the end of the stock with a set screw. The OD of the ring fits snuggly into the spindle ID and the ID of the ring attaches to the OD of the stock. This ring will move along the inside of the spindle along with the stock as it gets pulled toward the chuck. Calculate the number of cycles so this ring will reach the end of it's possible stroke as the max count is reached.

Now the homemade bar puller needs to be made. The concept behind this puller is that you can make the size required as needed for the size material you are currently working with. You can make a few at a time, leaving some finishing operations until the ID size is determined. This way you'll have maybe 70% of the puller made then you can simply finish the rest when the time approaches and the final sizes are determined.

The bar puller uses a "split" piece of aluminum or other material softer than the material you will be machining. It uses simply a piece of bar or tube that is machined with the OD to fit into an ID tool holder station in the turret, and the ID slightly smaller than the OD of the stock. You may need to turn down the front end as per the sketch below to maintain a wall thickness that is thin enough to slide over the stock when split yet strong enough to pull the bar, depending on the weight of the bar stock determined by the diameter of the stock. The puller is then split in two or three or more places using a hack saw or slitting saw and an O-Ring placed on the OD of the puller to keep the tension. This allows for the puller to split and feed over the bar stock with the O-Ring providing tension to pull the stock and for the puller to return to it's original shape when done.

In the program, the puller is mounted in the turret, in our example Tool #3. Then in the CNC programs AUTO cycle, it is fed over the bar stock, the chuck opened, the turret moved to position taking the stock with it, the chuck closed, and the machining begun.</P><P>In the example below, we are simulating a Fanuc series 10T or higher CNC control. Your M functions may be different, please consult your programming manual for your specific commands. Use this program as a guide, not a bible. The X0 is the center line and Z0 for this tool is set at the face of the stock as it sticks out of the chuck after cut off.

N0001 --------------- sequence number for this operation
M05 ----------------- make sure the spindle is stopped
G00 T0303 ---------- index to the bar puller station
G00 X0 Z.200 ------- rapid to a clearance point
G98 ----------------- change feed to IPM
G01 Z-.750 F20.0 --- feed onto the stock
M11 ----------------- open the chuck
G01 Z2.000 ----------feed to needed length plane
M10 ----------------- close the chuck
G01 Z3.500 ---------- feed off the stock
G00 X8.00 Z8.00 ---- rapid to index position
T0300 --------------- cancel the tool offset
G99 ------------------ return feed to IPR
M01 ----------------- optional stop

This sequence should be placed at either the top or bottom of the machining program. The best way to put the AUTO cycle into use is with the use of sub-programming. The MAIN program would be the call for the machining program including the number of times to call the program depending on the number of pieces you can make from the length of bar stock in the spindle. The SUB program would actually do the pulling and the machining. For example, in the example below, program O0001 is the MAIN program, calling the SUB program O1111 - 12 times, which actually does the pulling and the machining.

O0001 ------------ Main Program
M98 P1111 L12 -- sub program call
M30 --------------- program end
O1111 ------------- Sub Program
N0001 ------------- Bar pull sequence
N0002 ------------- machine the part
N0003 ------------- cut off
M99 --------------- sub program end

In the above example, the operator only presses the Cycle Start on the MAIN program. This starts a 12 piece cycle that will include the pulling out of the stock, the machining of the part, and the cut off of the part. Recalling and executing the cycle 12 times.

Happy Chip Making !!

Please visit our website for the best in Real World Machine Shop Software ... 
just CLICK the pic below !!

Tuesday, July 15, 2014

Deciphering M Functions for Your CNC Machine

Recently we have been working with some Kipware® conversational clients assisting them in setting up their Kipware® post processor blocks for their G code output. With the addition of our EIA MENU option ... users now have greater flexibility in using machine functions ( M ) functions in their G code to accomplish specific tasks. One example might be ... parts catcher UP or DOWN to catch a part being parted-off ... or chuck OPEN and CLOSE during a bar feed operation ... or 4th axis CLAMP and UNCLAMP for CNC mill.

During these sessions we are coming across the situation where the end user doesn't know the specific M for their machine to accomplish some of these tasks. And for whatever reason ... manuals lost or misplaced ... machine was purchased used and no manuals were included ... or whatever ... the end user does not have any Operator or Programmer manuals for their machine which would normally outline the M codes and their function. Without the manuals ... they have no way of finding out what M functions control what. OR DO THEY ??

Let's start this journey with a brief explanation of the HOW's and WHY's of CNC M functions. 
  1. First ... there is no "industry" standard for M functions. Although you might find that M08 and M09 or M03 and M04 work for most CNC machines ... there is not an industry standard that says they must meet a certain criteria.
  2. M functions are designed by the machine tool builder ... not the control manufacturer. So you may have (5) Fanuc controlled machines in your shop ... some Mori Seiki's some Hitachi some Leadwell ... all with different M functions. Because the M function circuits are designed by the machine tool builder and not Fanuc.
With those basic facts ... when you ask your buddy "What's the M function to open the chuck?" ... and he says "M11" ... and it doesn't work on your machine ... now you know why.

So how can you find out the M functions for your machine WITHOUT 
an Operators or Programming manual?

One of the best ways is to use either the electrical or ladder diagram for the machine. Although most Operator or Programming manuals get lost along the way ... mostly because they are not kept with the machine but rather float around the office or shop ... electrical diagrams ( which outline the electrical circuitry of the machine ) and ladder diagrams ( which outline the logic of the machine ) are most often kept inside the machines electrical cabinet. Open up the doors and you will usually find one or the other or both.

Even if you're not electrical savvy ... the circuits are pretty clearly labelled and you can find say the CHUCK OPEN circuit and trace things back to find the appropriate M function. Again ... because they are built and designed by the machine tool builder and their electrical outline is outside the realm of the control ... these circuits are contained in the machines electrical documentation ... not the docs for the control.

Above is a pic of an electrical diagram for a Shizuoka CNC vertical mill ... with an exploded view on the bottom. You can see fairly easily even without any electrical savvy that the M10 command will control the 4th axis clamping function. 

With today's more sophisticated controls ... oftentimes the ladder diagram is available directly on the machine controls CRT. You can pull up the ladder and even search for the appropriate function command ... but in other cases the "old fashioned" printed ladder can also usually be found in the machines electrical cabinet.

Taking a look at either the electrical diagram or ladder will usually result in some additional road or path to travel to find the appropriate M function on your machine. A simple execution of an MDI command is a good test to see what happens. The old Trial and Error method will open up additional doors or produce the desired results.

M functions are powerful options on your CNC machine that can help automate many tasks and make your manufacturing more efficient. Know that you know the trick to discovering the M functions on your CNC machine ... why not peruse your electrical or ladder diagram and see if there are any you might be missing in your programming?

Until next time ... Happy M Code Hunting ... and Happy Chip Making !!

Please visit our website for the best in Real World Machine Shop Software ... 
just CLICK the pic below !!

Wednesday, July 2, 2014

When is a CNC Program more than a G code program ?

... when it's a set-up sheet as well.

Most people are familiar with the ability of most CNC controls to include COMMENTS in the CNC G code program itself. Comments are designated in a variety of ways from :
  1. ( THIS IS A FANUC AND OKUMA COMMENT ) ... any text inside (  ) is considered a comment.
  2. ! THIS IS AN ACRAMATIC COMMENT ... any text following the ! is considered a comment.
  3. ; THIS IS A FAGOR COMMENT ... any text following the ; is considered a comment.
  4. and on and on we could go.
Comments can be a real help when they include operator messages ... such as :


... but comments can go well beyond operator messages and can turn your G code program into a complete set-up doc as well that includes tool information, part zero locations and even stock descriptions.

Most people will create either a paper or digital tool sheet / list and / or set-up sheet / list that is stored and re-called when the corresponding G code program is going to be run again. The set-up personnel refer to these docs to set the machine up ... loading required tools and setting height offsets and work offsets. Works great ... no problems. But is there a better alternative? The answer is a "could be" yes. By storing this information directly in the G code program using the COMMENT capability of your CNC control. For example ... something like this :

( PART #1234 )
( PROVEN PROGRAM : 7/2/2014 )


( T1 / H1 = #3 CENTER DRILL )
( T2 / H22  = 1/2 DRILL )
( T3 / H3 = .500 CARBIDE END MILL )

So what is the advantage of keeping this info directly in the G code program using the COMMENTS capability of the CNC control?

  1. Harder to misplace ... if you're going to run the program, you need the program ... and all the set-up info is right there stored right inside the G code program.
  2. Complete info is there for all to see at any time ... no rummaging for loose paperwork or docs.
  3. Any edits or changes can be made directly in the program ... when the running program is saved after execution ... all the current set-up info is changed and saved as well including all updated data.
We often get asked ... "Won't this slow down my program execution speed?" The truth is that it will ... but it will also be so minimal that usually the cost savings of having comments and all the convenience that comes with it far outweigh any reduction in program execution time. Rummaging around for lost documentation or re-creating lost documentation would be the real money waster.

Just a little something to think about if you haven't considered COMMENTS already in your CNC programming. We touched on only a few points here ... but we're sure you can find many more benefits depending on the capabilities or lack thereof pertaining to your particular CNC programming operation. The fact is that expanding the use of COMMENTS in your CNC programming could be a real time and money saving alternative to digital or paper documentation.

Until next time ... Happy Chip Making !!

Please visit our website for the best in Real World Machine Shop Software ... 
just CLICK the pic below !!