Tag Archives: G code programming

G01 — Use ME for RAPID Movement Too !!

To experienced G code programmers … we might be stating the obvious here … but for the novice, this blog post may reveal a valuable programming trick that may come in handy during your CNC programming life.

When learning G code programming … one of the first codes taught are G00 and G01. G00 is used for rapid movement … making the axis move at their top speeds … while G01 is used for moving at a feedrate in a straight line. If we take a look at some of the details of these codes … we will also reveal a few hints into how they can be manipulated beyond their basic design.

A couple of notes on G00 :

  • As stated G00 executes axis movement at their top speed … so we can get to the destination as quickly as possible.
  • Oftentimes … the two axis are not created with the same rapid traverse speed … for example the X axis may be able to travel 1200 IPM while the Y axis is only capable of 850 IPM. This is often due to the design of the machine … size of the ball screw, etc..
  • When two axis are involved in the G00 move … the distance each axis has to travel is the determining factor as to which axis reaches it’s destination first … resulting in a move that is not a straight line.
  • Oftentimes … the machine is equipped with a RAPID OVERRIDE switch / dial that allows the user to slow down the rapid movement by some percentage … 25% – 50% – 100%. BUT … there is usually no a variable setting … so the rapid movements are hard to control when working in tight corners during program prove out.

A couple of notes on G01 :

  • G01 executes axis movement at a programmed feedrate … the axis moves at a rate that we determine via the F command.
  • When two axis are involved in the G01 move … the machine’s CNC controller calcuates the speed at which each axis will move so that each axis arrives at the end point at the same time … always resulting in a move that is a straight line.
  • Oftentimes … the machine is equipped with a FEEDRATE OVERRIDE switch / dial that allows the user to slow down the feed movement by percentages … there is usually a variable setting … and allows for extensive flexibility during program prove out … even to pause the movement completely.

SOooo What??

The points outlined above lend themselves to some “bending and twisting” and result in some nice features that can be employed in our CNC programming … such as :
  • We often think of G01 movement as cutting feed or cutting movement … but using a faster feed of 200-300 IPM or higher … when not cutting can turn a G01 move into a “rapid” move.

The two main advantages of programming G01 for rapid include :

  • Programming a fast feed into a G01 block will always result in a straight line move … comes in handy sometimes when moving around the part and avoiding possible collisions that a non-linear move like G00 may cause.
  • The FEEDRATE OVERRIDE switch allows us greater flexibility during programming prove out than the RAPID OVERRIDE … but yet when running at 100% the fast feedrate doesn’t have to effect our cycletime.

Thinking Outside the Box … always produces interesting results. In this case … we can bend the intended use of G01 to assist us creating an un-intended yet beneficial cutter movement.

 Got Ya Think’in ??
Any Other Ideas ??

When is a CNC Program More Than JUST G Code?

… 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 :

M00 ( TURN PART AROUND )
or
M00 ! CHECK DIMENSION A

… 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 :

O1234
( PART #1234 )
( PROVEN PROGRAM : 7/2/2014 )
( PROGRAMMER : JM )
( PART LOCATED IN VISE USING JAWS JW-1234 )
( STOP SET-UP IS RIGHT SIDE – WORKPIECE STOP AGAINST FLANGE )
( X/Y PART ZERO IS LOWER LEFT CORNER )
( Z0 = TOP FINISH SURFACE )
( 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 !!
Kenney Skonieczny – President
Kentech Inc.

Product Spotlight : ID Clamps from Carr Lane Manufacturing

Every once in a while we like to bring attention for our readers to new and innovative machining and workholding products and process that we feel are beneficial to our readers. Such is the case in the Making Chips post as we focus and bring attention to a new workholding clamp from Carr Lane Manufacturing – a leading supplier of workholding and fixture components.

Additional information and specs on the Carr Lane ID Clamps are available on their website through this link : CARR LANE MANUFACTURING

Carr Lane ID Clamps – A Brief Outline

id_clamps

Many of you will undoubtedly be familiar with expanding mandrels … most commonly used to grip on the ID when turning on the OD. The new Carr Lane ID CLAMPS bring that concept to locating and workholding for milling fixtures. As the image illustrates … the ID CLAMP is similar to the expanding mandrel technique where the id CLAMP expands and clamps on the ID of a workpiece, leaving the outside free for machining.  Tightening the tapered center screw with a hex wrench pushes the clamping segments outward, and slightly downward, to exert force on the workpiece’s internal bore. These clamps are designed to have their outside diameter finish machined by the customer to suit the bore size, because maximum diameter expansion is limited.

The flange diameter on the ID CLAMP is a machined to a close tolerance … which allows for maximum locational accuracy. A recess can be machined in the fixture base to fit exactly with the clamp’s close-tolerance flange diameter and the ID CLAMP can be mounted using flat-head mounting screws.
id_clamps2

In the image above … you can see how the larger ID is used for locating as well as clamping … and a smaller ID CLAMP is used in the slot to provide additional locating and holding force. With this type of set-up, the entire outside contour is available for machining.

This set-up also illustrates the fact that these ID clamps need not be confined to round holes … they can be utilized in almost an unlimited number of ID clamping roles … use that machinist mind and explore !!

Estimating

We are always on the look-out for new and innovative machining processes … techniques …. and workholding tips. If you see one which you think would be of interest to our followers of professional machinists and engineers … please drop us a line at Sales at KentechInc.com.

Until next time … Happy Chip Making !!

www.KentechInc.com

At Kentech Inc. we are MACHINISTS who create Real World Machine Shop Software.

Who creates the machine shop software guiding your shop’s future ??

Multi-Part Machining Series — Part #2

Programming for Multiple Fixtures

So the decision has been made … “We need production … which means we need to mount as many vises or fixtures on the table as we can fit … to make as many parts as possible.”

First scenario …

  1. We are going to make all the same part.
  2. For our example here … let’s say that we can fit 4 fixtures on the table … we are going to machine 4 parts in one cycle.

Some thoughts :

  1. When the tool is in the spindle … we want to do as much work with it as possible. That means hitting each part on each fixture while it’s in the spindle.
  2. As mentioned in Part #1 … each fixture is independent with it’s own work coordinate system.
  3. As a set-up … we want to make one part first … confirm that it is correct dimensionally and that the cutting conditions are optimal … and then expand those toolpaths to machine the other vises.
  4. For this article … we are not going to be concerned with the actual G code program … more with the flow of the program. How we can structure the program to machine all the parts.

So we mount the fixtures on the table … set up and record our Work Coordinate Offsets … G54 – G57.

How can we write the program to machine one part … then expand it to 3 more parts … with the least amount of effort. Our suggestion : Sub Programming ( for a more in-depth MAKING CHIPS blog post on sub-programming … go here http://kentechinc.biz/the-hows-and-whys-of-cnc-sub-programming/

Here is the structure of our initial set-up program :

O0001 ( Main Program )
N0001
G00G91G28Z0
T01M06
G90S3500M03
G43Z1.500H01M08 ——– Put the tool in the spindle, start the spindle, position Z to clearance
G00G54X0Y0 ————— Move to the first fixture, call the sub to do the work with this tool
M98 P1000
G00G91G28Z0 ————— End this tools sequence
M01
N0002
G00G91G28Z0
T02M06
G90S1200M03
G43Z1.500H02M08 ——– Put the next tool in the spindle, start the spindle, position Z to clearance
G00G54X0Y0 ————— Move to the first fixture, call the sub to do the work with this tool
M98 P1001
G00G91G28Z0 ————— End this tools sequence
M01
ETC
ETC ————————– Create similar cycles for all the remaining tools.
ETC
M30

Once all of the above is confirmed … w’re ready to rock and roll on all the fixtures.
Just make these simple edits :

O0001 ( Main Program )
N0001
G00G91G28Z0
T01M06
G90S3500M03
G43Z1.500H01M08
G00G54X0Y0
M98 P1000
G00G55X0Y0
M98 P1000
G00G56X0Y0
M98 P1000
G00G57X0Y0
M98 P1000
G00G91G28Z0
M01
N0002
G00G91G28Z0
T02M06
G90S1200M03
G43Z1.500H02M08
G00G54X0Y0
M98 P1001
G00G55X0Y0
M98 P1001
G00G56X0Y0
M98 P1001
G00G57X0Y0
M98 P1001
G00G91G28Z0
M01
ETC
ETC ————————– Create similar cycles for all the remaining tools.
ETC
M30

The above will work fine … one blaring item is that we are positioning back to the first fixture … from the last fixture each time … some wasted movement. Easy to fix because of our structure and the use of sub-programs … just start each tool at the last vise where the last tool was working … like this :

First Tool :
G00G54X0Y0
M98 P1000
G00G55X0Y0
M98 P1000
G00G56X0Y0
M98 P1000
G00G57X0Y0
M98 P1000
Next Tool ( work the offsets backwards ):
G00G57X0Y0
M98 P1001
G00G56X0Y0
M98 P1001
G00G55X0Y0
M98 P1001
G00G54X0Y0
M98 P1001
Next Tool :
G00G54X0Y0
M98 P1002
G00G55X0Y0
M98 P1002
G00G56X0Y0
M98 P1002
G00G57X0Y0
M98 P1002
ETC … ETC … ETC.

So there you have it … combining our knowledge of SUB-PROGRAMMING with WORK COORDINATE OFFSETS … we machined (4) parts on (4) fixtures … efficiently.

If you followed the other posts on SUB-PROGRAMMING and WORK COORDINATE OFFSETS… you will have an even better understanding of why these features will prove so useful when :

  1. Johnny “bumps” the middle fixture with his hammer
  2. Paul adds a revision …. an additional hole to the part
  3. “The Boss” decides he wants to take off one of the fixtures … who knows why !!!

Anyway … if you aren’t sure why the above are simple fixes … just go back and review the other posts !!
In the next post in the series … we’ll take a closer look at some other scenarios and options … Stay Tuned !!

Until Next Time … Happy Chip Making !!

Conversational

For more Tips … Tricks … and other CNC & machine shop info …
Follow us on Google+  by clicking the image below :

Twitter_logo