The Optional Stop newsletter
Home | More Issues | Contact Us
From our website:
Home
Products
Services
Resources
On-Line Classes
CD-Rom Courses
CNC Books
Software
CNC Jobs
CNC Schools
CNC Tips
Educator's Page
Tech Talk Forum

September 28, 2010

Dear Subscribers,

Welcome to Issue 84! 

We've got what I hope you agree is some interesting content in this issue.  Our new CD-rom course for Machining Center Setup and Operation is set to be released some time in November. 

The Instructor Note for this issue will address how you can extend student knowledge during reviews.  We give an important productivity tip to in the Manager's Insight.  We show a structured way to develop loops in Macro Maven.  And there's much more!

As always, enjoy!

 

Mike Lynch

IN THIS ISSUE
Product Corner: Machining Center Setup and Operation CD-rom course
Instructor Note: Extending knowledge through review
Manager's Insight: Monitoring two important operation panel settings
G Code Primer: What are directional vectors?
Macro Maven: Six steps for creating a loop
Parameter Preference: Attaining brackets and parentheses on 18 series controls
Safety First: Does your machining center have an air-blow system for the spindle?

Product Corner: New CD-Rom Course! Machining Center Setup and Operation

  • 360 page manual including practice exercises, programming activities, and answers

  • Four key concepts divided into twelve lessons

  • Includes introduction to basic machining practices

  • Introductory price: $149.00

  • Available November, 2010

By sheer numbers alone, CNC-using companies most need CNC operators and setup people. A company that has ten CNC machines may have but one programmer, two or three setup people, and at least eight to ten operators. Setup people and operators commonly out-number programmers by a margin of ten to one.

This course is intended to help you keep qualified people in the positions that you have the most trouble keeping staffed. It allows you to bring entry-level people – indeed people with no previous shop experience – to a level that they understand what it takes to setup and (especially) run a CNC machining center. And for the introductory price, it should be easy to justify purchasing at least one copy for your company library. .

 

M01

Top of page

Instructor Note: Extending knowledge through review

Review is an important part of any curriculum. I feel that ten percent the bare minimum percentage of time an instructor should spend reviewing previously presented information. The longer the class runs, the more potential there will be that students will forget key information – and the more important it is that you review. I like to begin every session reviewing key points from previous sessions.

So the obvious primary advantage for reviewing is to keep students from forgetting key points and to prime them for what’s coming up in your current session. However, there is a secondary benefit – one that all instructors should try to take advantage of. You can easily extend what students have learned during a review.

Complex topics may be difficult to fully explain – and understand – the very first time they are presented. Knowing that you’re going to be reviewing – and that you can extend your presentation during review – lets you minimize how much new information you present the very first time through the material.

For example, consider all of the implications of using constant surface speed on turning centers. This feature, of course, allows the programmer to specify speed in surface feet per minute (SFM) or meters per minute. The machine will automatically determine the correct spindle speed in RPM based upon this specification and the cutting tool’s current diameter. The first time you introduce this feature, you may want to minimize your presentation to simply include the related G code (G96) and the programming format for using it.

During a review, and once students have a basic understanding, you can extend your presentation to include the cycle time implications of constant surface speed if it’s not properly programmed.

Admittedly, it can be difficult to determine when you should stop your initial presentation. My rule-of-thumb is to let student understanding dictate how far you go. As long as (all) students are catching on, by all means, keep going. But as soon as you feel that they’re getting confused – possibly asking more questions – it should be taken as a signal that they’ve reached their saturation point – and you should save the more advanced presentations for an upcoming review.

M01

Top of page

Manager's Insight: Monitoring two important operation panel settings

The operation panels of a typical CNC machine have lots of buttons and switches. Setup people and operators must, of course, know the function of each button and switch and be able to set it properly. While a manager need not be as intimately familiar with buttons and switches as a setup person or operator, there are some machine functions a manager should know enough about to be able to judge whether they are appropriately set.

The first switch I mention is the Rapid Override switch. Rapid Override is often a multi-position switch having settings of 10%, 25%, 50%, and 100%. This switch is used during setup to allow the setup person to slow rapid motion rate during each tool’s initial approach to the workpiece. This takes some of the scare-factor out of running the first part or two.

Once a program is verified and the machine begins a production run, however, Rapid Override should be set to – and remain at – 100%. This ensures that the machine moves as quickly as possible to and from its approach positions.
If you’re wondering about the efficiency-impact of having this switch set improperly, consider this simple scenario – a ten tool program running on a machining center having a 1,000 inches per minute rapid rate. We’ll say that each tool travels 14 inches (total) during each tool change while it retracts from and approaches to the workpiece.

This totals 140 inches of rapid motion distance during the program’s execution just for tool changing purposes. Note that we’re not including any rapid motion that each tool includes during cutting motions (as would be required when drilling several holes) – we’re just showing the impact during tool changes.

If the program is run with the Rapid Override switch set to 100% – as it should be – rapid motions required for tool changing will take 0.14 minutes (about 8.5 seconds). But if – for whatever reason – the operator has the Rapid Override switch set to 50%, tool changing time will increase to 0.28 minutes (about 17 seconds). This, of course, doubles the time required for rapid motions needed for tool changing. And in a 1,000 part production run, will add over 2 hours and 20 minutes (actually 141.6 minutes) to the time required to complete the production run. Worse, it this switch is set to 25%, production run time will be increased for the 1,000 part production run by seven hours!

The second two switches that a manager must understand and be able to question are the Feedrate Override and Spindle Override switches (though not all machines have a Spindle Override switch). The Feedrate Override switch is a multi-position switch that commonly ranges from 0% to 200%. So it allows the setup person to slow (actually stop) cutting motions on one end of the spectrum, and double the programmed feedrate on the other.

These two switches are also helpful during the program’s verification – and during the running of the first few workpieces. They help the setup person or programmer confirm that the programmed speed and feedrate for each tool is appropriate. And I recommend that the person verifying the program sticks to it until they determine speeds and feeds that allow machine to run at 100% speed and feedrate at all times.

Like the Rapid Override switch, these switches can have an impact on program execution time if they are not properly set. If set to 50%, of course, the program will execute much slower. A 10 inch motion programmed at 10 inches per minute (that should take one minute to complete) will actually take two minutes. On the other hand, if the Feedrate Override switch is set to 200%, this motion will take only thirty seconds, but tool life will probably suffer dramatically.

In my experience, operators will have the tendency to turn down the Feedrate Override switch when they’re trying to make tools last longer between dull tool replacements. They’ll turn up the Feedrate Override switch if they’re trying to achieve some kind of rate (as when doing piece-work).

I’ve even seen such operators turn up the Feedrate Override switch to 200%, remove the switch top, and replace it at the 100% setting. This makes it look like the machine is running at 100% when it is actually running at 200%! Note that the opposite can also be done as well – an operator can make the machine appear to be running at 100% when it is actually running at a lower rate.

M01

Top of page

G Code Primer: What are directional vectors?

Current model CNC controls make it easy to create circular commands. You simply specify the direction (G02: clockwise or G03: counter clockwise), the end point (usually X and Y), and the radius (with R). The machine figures out the rest. Here’s an example program that mills a rectangular shape with corner radii:

  • O0001

  • N005 T01 M06

  • N010 G54 G90 S400 M03

  • N015 G00 X-0.475 Y-0.250

  • N020 G43 H05 Z0.1 M08

  • N025 G01 Z-0.250 F50

  • N030 X4.50 F4.5

  • N035 G03 X5.250 Y0.50 R0.750

  • N040 G01 Y3.50

  • N045 G03 X4.50 Y4.250 R0.750

  • N050 G01 X0.50

  • N055 G03 X-0.250 Y3.50 R0.750

  • N060 G01 Y0.500

  • N065 G03 X0.50 Y-0.250 R0.750

  • N070 G00 Z0.10 M09

  • N075 G91 G28 Z0 M19

  • N080 M30

Again, notice that every circular motion is counter clockwise (G03), includes an end point in XY, and a radius word.

Frankly speaking, this is the way I recommend commanding circular motion. But I do get a lot of questions about directional vectors (I, J, and K) from people wondering what they are and how they’re used. It seems many computer aided manufacturing (CAM) systems are still set to output circular commands using directional vectors – and people are wondering how they work.

First and foremost, remember that directional vectors were used with circular motion commands in the early days of NC. That is, they were the only way to specify the arc size back then. While there is one advantage to using directional vectors, for the most part, CNC control manufacturers have continued to make it possible to use them in simply to maintain compatibility with older controls. Old programs can be run in new machines. So there’s really no need to learn about them because the R word provides a much easier way to specify the arc size.
Note that almost all CAM systems can be configured to output circular motion commands using the R word, so if yours is outputting directional vectors, you may want to reconfigure.

The one “advantage” of using directional vectors is that they are less forgiving than the R word – meaning even a tiny mistake in the end point or arc size will cause the machine to generate an alarm. The R word may be a bit too forgiving. The machine will cause some kind of motion (though not the intended motion) even if there is a position or arc size mistake. As long as coordinates match up, there is no advantage to using directional vectors.

To use directional vectors, you must understand that there is a polarity involved. Directional vectors must point from the start point of the arc to the center of the arc. Letter address I is used to point in the X direction. J points in the Y direction. And K points in Z. Here is the program shown before modified to use directional vectors.

  • O0001

  • N005 T01 M06

  • N010 G54 G90 S400 M03

  • N015 G00 X-0.475 Y-0.250

  • N020 G43 H05 Z0.1 M08

  • N025 G01 Z-0.250 F50

  • N030 X4.50 F4.5

  • N035 G03 X5.250 Y0.50 J0.750

  • N040 G01 Y3.50

  • N045 G03 X4.50 Y4.250 I-0.750

  • N050 G01 X0.50

  • N055 G03 X-0.250 Y3.50 J-0.750

  • N060 G01 Y0.500

  • N065 G03 X0.50 Y-0.250 I0.750

  • N070 G00 Z0.10 M09

  • N075 G91 G28 Z0 M19

  • N080 M30

In line N035, for example, J0.750 is telling the machine that the distance from the arc’s start point to its center is a positive 0.750 inches along the Y axis. Notice that the start point and end point are in the same location along the X axis. You could include I0 in this command, or simply leave it out as I have.

M01

Top of page

Macro Maven: Six steps for creating a loop

One of the most powerful features of custom macro B is looping. With just a few commands, a loop can generate hundreds, even thousands of motion commands. This can dramatically shorten programs while still providing the flexibility of parametric (variable) programming.

Loops can be generated in many ways. Indeed, if you start “hacking away” at your program, you can probably make just about any series of looping commands work. But because loops can get pretty complex, I recommend following a more structured approach to creating them.

Though Fanuc has provides special commands for looping (the WHILE an DO statements), I prefer generating loops with the conditional branching (IF) statement. I find it just as easy to use the IF statement as the WHILE statement.

Here are the six steps I recommend followed by a simple example.

Step one: Initialize a counter and number of executions – as well as anything that changes each time through the loop

Make the counter an integer (whole number) and count up to a “number of executions” in the loop. This sometimes means you must calculate the number of repetitions and that you must modify the step amount/s each time through the loop. For a deep-hole pecking cycle, for example, you may have input variables for depth per peck and total depth. The total depth may not be evenly divisible by the peck depth, so you must modify the depth per peck to come up with an whole number of evenly-spaced pecks, like this:

  • #101 = 1 (Counter)

  • #102 = ROUND[#26/#17] (Number of pecks - #26 is total depth, #17 is specified depth per peck)

  • #103 = #26 / #102 (Recalculated depth per peck)

This will allow you to count from one (#101) to #102 and peck an even amount #103 per peck to the total hole depth (#26).

You must also initialize anything that changes each time through the loop. For peck drilling, for example, the current approach position and the current peck bottom position must be initialized, like this:

  • #104 = 0.1 (Current approach position)

  • #105 = #103 (Current peck bottom position)

Again, these values will be changing each time through the loop, so they must be initialized.

Step two: Test if finished

This is the IF (or WHILE) statement. Using my recommendation for counting up to a “number of executions”, you’ll always be using the greater-than (GT) logical operator in the if statement, like this:

  • N1 IF [#101 GT #102] GOTO 99

A sequence number (N1 in our case) is included because you must come back to this command in the last command of the loop.

The first time through the loop, of course, the counter (1) will not be greater than the number of executions, so the loop will be entered. Eventually, the counter will be greater than the number of executions and the loop will be finished. N99 (in our example) will send execution to the command after the last command of the loop.

If you elect to use the WHILE statement, you’ll always be using the less-than-or-equal-to logical operator (LE), like this:

  • WHILE [#101 LE #102] DO 1

Step three: If necessary, perform calculations needed for this time through the loop.

Some loops require calculations within each execution. Consider, for example, a loop to machine a bolt hole pattern of holes. The X and Y coordinates for each hole will change based upon a (changing) angle and the radius of the bolt hole pattern.

Step four: Write the commands for one execution of the loop.

If your loop is machining something, this means writing the motion commands for one execution of the loop. If your loop is setting offsets, this means writing the G10 command for the current offset. Again, what ever your loop is doing, write the commands for it in this step. With the peck drilling example, this means making one peck, like this:

  • G00 Z#104 (Rapid to current approach position)

  • G01 Z-#105 F4.0 (Machine to current peck bottom)

  • G00 Z0.1 (Retract from hole

Step five: Step the counter and anything that changes each time through the loop.

For the next execution of the loop, of course, you’ll want the loop to do something differently, meaning something must be changed before the loop can be executed again. For the peck drilling example, the counter must be stepped (by one). The current approach position and the current peck bottom position must be stepped by the recalculated peck depth amount, like this:

  • #101 = #101 +1 (Step counter)

  • #104 = #104 + #103 (Step current approach position)

  • #105 = #105 + #103 (Step current peck bottom position)

Step six: Go back to the test.

For an IF statement loop, this means including a GOTO statement that sends execution back to the IF statement, like this:

  • GOTO 1

If you elect to use a WHILE statement loop, the command will be:

  • END 1

The number (1 in our case) must match the DO value in the WHILE statement (and must be between one and three).

A complete example

Here is the full peck drilling example loop. Example calling program:

  • O0001

  • N005 T01 M06

  • N010 G90 G54 S500 M03 T02

  • N015 G00 X0 Y0

  • N020 G43 H01 Z2.0 M08

  • N025 G65 P2000 X1.0 Y1.0 R0.1 Z-3.54 Q0.6 F5.0

  • N030 G91 G28 Z0

  • N035 M30

In line N025, X and Y (#24 and #25) specify the hole’s position. R (#18) specifies the rapid plane. Z (#26) specifies the hole bottom. Q (#17) specifies the (approximate) peck depth. F (#9) specifies the feedrate.

  • O2000 (Peck drilling custom macro)

  • G00 X#24 Y#25 (Move to hole location)

  • (Step 1)

  • #100 = ABS[#18 - #26] (Calculate total travel distance)

  • #101 = 1 (Counter)

  • #102 = ROUND[#100/#17] (Number of pecks)

  • #103 = #100 / #102 (Recalculated depth per peck)

  • #104 = #18 (Current approach position)

  • #105 = #18 - #103 (Current peck bottom position)

  • (Step 2)

  • N1 IF [#101 GT #102] GOTO 99

  • (Step 3 No calculations required in this loop)

  • (Step 4)

  • G00 Z#104 (Rapid to current approach position)

  • G01 Z#105 F4.0 (Machine to current peck bottom)

  • G00 Z#18 (Retract from hole

  • (Step 5)

  • #101 = #101 +1 (Step counter)

  • #104 = #104 - #103 (Step current approach position)

  • #105 = #105 - #103 (Step current peck bottom position)

  • (Step 6)

  • GOTO 1

  • N99 M99 (End of custom macro)

M01

 

Top of page

Parameter Preference: Attaining brackets and parentheses on 18 series controls

Suggested by Patick Mulvoy

As you know, parentheses ( ( ) ) are used to include messages within CNC programs. Brackets ( [ ] ) are used with custom macro B commands. And of course, you need access to both from the CNC machine’s keyboard if you are going to edit custom macro B programs and programs with messages.

Almost all Fanuc controls provide access to parentheses and brackets from the keyboard. Most use a shift key to give access to one or the other. But as Patrick Mulvoy discovered, some (older) 18 series controls provided access to only the parentheses keys using the machine’s keyboard. Upon contacting his machine tool distributor, he found that a parameter controls whether the keys provide parentheses or brackets. He found that another parameter gives access to parentheses when editing using soft keys. When both parameters are set properly, he was able to gain access to both – brackets using the hard keys and parentheses using soft keys.

The parameter in question (for an 18 series control) is parameter number 3204. Bit zero (the right-most bit) determines whether the hard keys provide parentheses or brackets. When this bit is set to zero, the hard keys provide parentheses. When it is set to one, the hard keys provide brackets.

Bit 2 of parameter 3204 (third bit from right) controls whether parentheses can be accessed with soft keys. If set to a value of 0, they cannot. If set to a value of 1, they can. So if bits zero and two of parameter 3204 are each set to one, you can access brackets with hard keys and parentheses with soft keys.

M01Top of page

Safety First: Does your machining center have an air-blow system for the spindle?

Most machining centers have an air blowing system within the spindle. During an automatic tool change, air will be blown from inside the spindle during the tool change. This keeps debris from getting into the spindle, but it could be a safety hazard as well. Here’s why:

Most machining centers allow the operator to manually remove tools directly from the spindle. The operator grabs on to the spindle tool with one hand and presses the un-clamp button with the other. With most machines, the air blowing system is not activated when the tool is manually unclamped so the tool will simply drop into their hand. Lastly, they press the clamp button.

There are, however, machines that will cause air to blow even when manually removing tools from the spindle. That is, as soon as the unclamp button is pressed, the air will blow. This added pressure has the tendency to blast the tool out of the spindle. So instead of gently falling into the operator’s hand, it comes out with much more force. An unknowing operator could be injured – either by straining their arm and hand trying to catch the tool, or by the weight of the tool if they drop it. I know of more than one operator who has been surprised by this function.

Note that some machining centers have an on/off switch labeled Air-Blow that is in close proximity to the clamp and unclamp buttons. When off, the air will not blow when the unclamp button is pressed. When this switch is on, the air will blow. Be sure operators know to keep this switch off when manually removing tools from the spindle.

M01

Top of page

 
 
Sofware ad
 
Machining center training materials
 
Parametric programming ad

The Optional Stop newsletter is published quarterly by CNC Concepts, Inc. and is distributed free of charge to people subscribing to our (email) distribution list and to those downloading it from our website (www.cncci.com). Information is aimed at CNC users and instructors teaching live CNC classes. All techniques given in this newsletter are intended to help CNC people. However, CNC Concepts, Inc. can accept no responsibility for the use or misuse of the techniques given.

To subscribe: Simply email us (newsletter@cncci.com) and let us know you'd like to be added to our distribution list.

To unsubscribe: Respond to this email, typing REMOVE in the subject. Please accept our apologies if we have disturbed you.