CNC Control Setup for Milling and Turning:. Peter Smid

Чтение книги онлайн.

Читать онлайн книгу CNC Control Setup for Milling and Turning: - Peter Smid страница 17

Автор:
Жанр:
Серия:
Издательство:
CNC Control Setup for Milling and Turning: - Peter Smid

Скачать книгу

needed in the program, providing the units are set at the control. However, including the units selection in the program will guarantee that that only those units will be in effect - now or in the future. There is no practical difference between units set through the program and units set at the control.

      This observation slightly changes the earlier example:

      N1 G21

      N2 G17 G40 G80 G90 G54 G00 G49

      N3 T01 M06

      N4 . . .

      By isolating the G20 or G21 command, the program is one step closer to being portable between machines with similar control systems.

       G17 is Good for ...?

      Preparatory command G17 is often part of the program initial blocks, and surprisingly many CNC programmers (and operators) have no idea why it is there in the first place or what it is for.

      By definition, G17 is the first of three similar preparatory commands - each define a unique working plane:

       ▪G17 - XY plane

       ▪G18 - ZX plane

       ▪G19 - YZ plane

      Plane selection is important only in two major areas:

Circular interpolation... G02 and G03
Cutter radius offset... G41 and G42

       In circular interpolation, it supplies the MISSING AXIS:

      Consider this simple example ...

image

      ... and a section of the part program:

N1 G21
N2 G17 G40 G80 G90 G54 G00 G49
...
N21 G01 X0 Y25.0 F200.0(P1)
N22 G02 X20.0 I20.0 J0(P2)
N23 G03 X36.0 I8.0 J0(P3)
N24 G01 ...

      Note that in block N21, the linear motion ends and arc motion begins (P1). Both X and Y axes are programmed in this block. The following two blocks are both circular motions. As per drawing, the Y-axis is identical for both start points P1 and P2. Since axis commands are modal, they do not have to be repeated in every block. That accounts for only X being programmed for both arcs.

      Considering that arcs always require two axes, and also considering that they can be machined in ZX and YZ planes, the control system has to replace the axis that is not included. This is where the plane selection command comes in. In the example, G17 in block N2 provides the missing axis as the Y-axis. Control system will interpret the program as:

      N1 G21

      N2 G17 G40 G80 G90 G54 G00 G49

      ...

      N21 G01 X0 Y25.0 F200.0 (P1)

      N22 G02 X20.0 Y25.0 I20.0 J0 (P2)

      N23 G03 X36.0 Y25.0 I8.0 J0 (P3)

      N24 G01 ...

       In cutter radius offset mode, it supplies the DIRECTION:

      Cutter radius offset is programmed by two preparatory commands:

▪G41 ... cutter radius offset to the LEFT
▪G42 ... cutter radius offset to the RIGHT

      The left and right descriptions indicate position of the cutter when viewed into the cutting direction. As this direction is always relative to the three available planes, the correct plane selection command has to be included in the program.

       Initial Settings

      In addition to the plane selection command, such as G17, the initial block N2 contains several other G-codes:

       N2 G17 G40 G80 G90 G54 G00 G49

      Note that all are included before tool change, which is an important consideration.

      Many CNC programmers include these G-codes at the program beginning, mainly for two reasons:

       ▪Cancellation of commands that may be in effect

       ▪Initialization of the program mode

      The block that contains these codes is often called the safety block. Although well meant, it also presents a sense of false security. There is no guarantee that the program will run smoothly, regardless of this block.

      There are three common cancellations in block N2:

▪G40 ... Cancel cutter radius offset
▪G80 ... Cancel fixed cycle
▪G49 ... Cancel tool length offset

      Are these cancellations necessary? In one word - no. They are mainly a leftover from early days of NC and even CNC and have gained a permanency of their own. What do they represent at the program beginning?

      The answer uses three words ‘just in case’. Just in case the cutter radius is active when cutting was interrupted; just in case the fixed cycle has not been canceled; just in case the tool length offset is still active. Are these situations possible? They may be in some very extreme cases, but practically, they are not likely. The main reason is that when you press the RESET key on the control panel, these cancellations are automatically performed. On the other hand, it does no harm to include G40 and G80 in the program, ‘just in case’.

      G49 cancellation is different. This command cancels the tool length compensation. There is no reason to program it at all - in fact, by using G49 in the program, you may create a situation that could create more problems than it supposed to solve.

      That leaves three other G-codes that need to be addressed. They are the initiations commands:

Скачать книгу

G90 ... Absolute mode of programming
G54