Machine Zero Return: Page 2 of 3

Program Commands 
There are four preparatory commands relating to the ma-chine zero reference position: 

Of the four listed commands, G28 is used almost exclusively in two and three axis CNC programming. Its only purpose is to return the current tool to the machine zero position and do it along the one or more axes specified in the G28 program block.

RETURN TO PRIMARY MACHINE ZERO 

Any CNC machine may have more than one machine zero reference point (home position), depending on its de-sign. For example, many machining centers with a pallet changer have a secondary machine reference position, that is often used to align both the left and right pallets during pallet changing. The most common machine tool design is the one that uses Only a single home position. To reach this primary home position, the preparatory command G28 is used in the program and can also be used during the MDI control operation.
The G28 command moves the specified axis or axes to the home position, always at a rapid traverse rate. That means GOO command is assumed and does not have to be programmed. The axis or axes of the desired motion (with a value) must always be programmed. Only the programmed axes will be affected. 
For example, 
N67 G28 
shows G28 programmed by itself in the block - this is an incomplete instruction. At least one axis must be specified with the G28 command, for example, 
N67 G28 Y.. 
which will only send the Y axis to the machine zero reference position, or ... 
N67 G28 Z.. 
will only send the Z axis to the machine zero reference position, and ... 
N67 G28 X.. Y.. Z.. 
will send all three specified axes to the machine zero reference position. Any multiaxis motion requires caution -watch for the infamous 'hockey stick' motion. 

Intermediate Point 
One of the elementary requirements of programming is the alpha numerical composition of a word. In the program, every letter must be followed by one or more digits. The question is what values will the axes in G28 have? They will be the intermediate point for machine zero return mo-tion. The concept of the intermediate motion in G28 or G30 is one of the most misunderstood programming features. 
Commands G28 and G30 must always contain the inter-mediate point (tool position). By Fanuc design and definition, the G28/G30 commands have a built-in motion to an intermediate point, on the way to machine zero. An anal-ogy can be made to an airplane flight from Los Angeles, USA to Paris, France, that temporarily stops over in New York City. It may not be the most direct route, but it serves a certain specific purpose, for example, to refuel the aircraft. 

The purpose of the intermediate point, or position, is to shorten the program, normally by one block. This reduction is so marginal that the philosophy behind the design may be debated. Here is how the concept of the intermediate point (position) works. 
When the G28 or G30 command is used in the program, at least one axis must be specified in the block. The value of that axis is the intermediate point, as interpreted by the con-trol system. Absolute and incremental modes 090 and G91 make a great difference in interpretation of the G28 or G30 behavior, and will be described shortly.

The tool motion in Figure above is from the central hole of the part. During such a motion, the tool can collide with the upper right clamp on its way to machine zero, if the motion to the home position were programmed directly. Only the X and Y axes are considered in the illustration. An intermediate point can be programmed in a safe location, without making the program any longer. The program without an intermediate point can be constructed as: 
G90 
• • •
GOO X5.0 Y4.0              (MACHINED HOLE) 
G28 X5.0 Y4.0               (MACHINE ZERO MOTION) 
The same program with an intermediate point at a safe lo-cation will change slightly: 

G90 
G00 X5.0 Y4.0               (MACHINED HOLE) 
G28 X12.0 Y4.0             (MACHINE ZERO MOTION) 

Earlier examples have shown the reason behind this dou-ble motion. It is very simple - only to save a single program block - that is all. Its intended purpose is to use one block of program to achieve two motions, that would otherwise re-quire two blocks. A safe program could also be: 

G90 
• • • 
GOO X5.0 Y4.0            (MACHINED HOLE)

X12.0                          (SAFE LOCATION)

G28 X12.0 Y4.0           (MACHINE ZERO RETURN) 
  
to produce the same final result, but with an extra block. 
For example, using the intermediate position, the tool can be programmed to avoid an obstacle on the way to the ma-chine zero. If programmed with care, the intermediate posi-tion may be quite useful. Normally, it is more practical to make the intermediate motion equal to zero and move the cutting tool to the machine zero directly. This is done by specifying the intermediate point as identical to the current tool position in the absolute mode - or - by specifying a zero tool motion in the incremental mode. 

Absolute and Incremental Mode 
There is a major difference in programming the machine zero return command G28 or G30 in the absolute and incremental modes. Remember the basic difference between two similar statements: 

G90 GOO XO YO ZO and G91 GOO XO Y0 ZO 
Each coordinate statement XOYOZO is interpreted by the control system differently. To review, an address followed by a zero, for example XO, means position at the program reference point, if the mode is absolute, using the G90 command. If the mode is incremental, using the G91 command, the XO word means no motion for the specified axis. 
Most CNC lathes use the U and W axes for incremental motion (based on absolute X and Z axes respectively), with the same logical applications. Absolute axes coordinates will be interpreted as the programmed tool position, incre-mental coordinates indicate the programmed tool motion. Compare the two program examples below - they are the same - they are identical in terms of the actual tool motion: 
(---> G28 USED IN THE ABSOLUTE MODE) 
G90
.....
N12 GO1 Z-0.75 F4.0 M08 
• • • 
N25 GO1 2C9.5 Y4.874 
N26 G28 Z-0.75 M09         (G28 IN ABSOLUTE MODE)
...... 
( - - - > G28 USED IN THE INCREMENTAL MODE) 
G90
......
N12 001 Z-0.75 F4.0 M08 
• • • 
N25 001 X9.5 Y4.874 
N26 G91 G28 ZO M09     (G28 IN INCREMENTAL MODE) 
• • • 
Which method is better? Since both methods produce identical results, the choice is based on a given situation or personal preference. To switch to the incremental mode has its benefit, because the current tool location may not always be known. The disadvantage of this method is that G91 is most likely a temporary setting only and must be reset back to G90 mode, used by the majority of the program.

Absolute mode of programming specifies the current tool position from program zero - always and at all tunes. Many examples presented here use the absolute programming mode - after all, this is - or it should be - the standard programming mode, for the majority of programs. 
There is one time, where the incremental mode of ma-chine zero return has some very practical advantages. It happens in those cases when the current tool position is not known to the programmer. Such a situation typically hap-pens when using subprograms, where incremental mode is used repeatedly to move the tool incrementally to different XY locations. For instance - where exactly is the cutting tool located when the drilling cycle is completed in the N35 block of the following example? 
G90 
• • • 
N32 G99 G81 X1.5 Y2.25 R0.1 Z-0.163 F12.0 
N33 G91 X0.3874 YO . 6482 L7           (REPEAT 7 TIMES) 
N34 G90 080 Z1.0 M09                       (CANCEL CYCLE)
N35 028 (X? ? ?? Y??? ? ) Z1.0 (UNKNOWN POSITION) 
• • • 
Is it worth the extra effort to find the absolute location at all costs? Probably not. Let's look at some other examples. While in the absolute mode G90, the axis coordinate values define the intermediate point location. When incremental mode G91 is programmed, the coordinate values define the actual distance and direction of the intermediate motion. In both cases, the intermediate tool motion will be performed first. Then - and only then - the final return to the machine zero reference position will take place. 
Take the current tool position as X5.0 and Y 1.0 (absolute position). In the program, the XY values of the G28 com-mand that follows the position block are very important: 
G90 
• • • 
N12 GOO X5.0 Y1 .0 
N13 G28 XO YO 
.....
In this example, the G28 command specifies that the cut-ting tool should reach the machine zero position - identified as X0Y0 in the block N13. Since the G28 command relates to the machine zero only, it would be reasonable to assume that the XOYO relates to the machine zero, rather than the part zero. That is not correct. The X0Y0 refers to the point through which the tool will reach the machine zero position. That is the defined point already known to be the intermediate position for the ma-chine zero return command. This intermediate point is as-signed the coordinates relating to the part (in absolute mode). In the example, the cutting tool will move to the program zero before continuing to the machine zero, resulting in a single block definition of two tool motions. This, of course, is not likely to be the intended motion. 
The above example can be changed, so the intermediate motion is eliminated - or - defined as the current tool posi-tion. The intermediate motion can never be eliminated, but it can be programmed as a physical zero distance. 
G90 
• • • 
N12 GOO X5.0 Y1 .0 
N13 G28 X5.0 Y1 . 0 
......
By this modification, the intermediate point becomes the current tool position, which results in direct motion to the machine zero. The reason is that the intermediate tool position coincides with the current tool position. This programming format has nothing to do with modal values of axes. In the part program, X5.0 Y1.0 in the block N13 must be repeated, while the absolute mode G90 is still in effect. 
In cases when the current tool position is not known, the machine zero return has to be done in incremental mode. In this case, change temporarily to incremental mode and pro-gram a zero length motion for each specified axis: 
G90 
• • • 
N12 GOO X5.0 Y1.0 
N13 G91 G28 XO YO 
N14 G90
• • • 
Again, an important remainder is in place here - always remember to switch back to the absolute mode as soon as possible, in order to avoid misinterpreting the consecutive program data. 
In a brief overview, the intermediate point cannot be eli-minated from the G28/G30 block. If situation demands a return to machine zero without going through a separate in-termediate point, use a zero tool motion towards the inter-mediate point. The method depends on the active G90 or G91 mode at the time: 
->In G90 absolute mode motion to machine zero, the current tool coordinate location must be repeated for each axis specified with G28 command.
->In G91 incremental motion to machine zero, the current tool motion must be equal to zero for each axis specified with the G28 command.

Category: 

Share

Who's new

  • ravirajpatil871...
  • shubhambajoria
  • yassir
  • demiholyman890954
  • scottgillum51169040

Get Notified

 

Share

We are Social

Syndicate

Subscribe to Syndicate