Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Конспект лекций по дисциплине CNC Machining.docx
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
2.53 Mб
Скачать

Formatting g-code Blocks

A permissible block of input code consists of the following programming elements, in order, with the restriction that there is a maximum (currently 256) to the number of characters allowed on a line:

• Optional block delete character (/)

• Optional line number

• Any number of words, parameter settings, and comments

• End of line marker (carriage return or line break)

Programs are limited to 999,999 lines of code.

Line Number

A line number is indicated by the letter N followed by an integer (with no sign) between 0 and 99,999,999 and written without commas.

Word

A word is a letter other than N or O followed by a real value. Words may begin with any of the letters shown in the table below. The table includes N and O for completeness, even though, as defined above, line numbers are not words. Several letters (I, J, K, L, P and R) may have different meanings in different contexts.

Word Initial Letters

The supported G-codes are shown and described in more detail in this section. The descriptions contain command examples set in Courier type font.

References: Gen [1-3].

Assessing questions:

1. What is G-Code?

2. What the meaning of the Word Initial Letters?

3. Formatting G-code blocks.

4. What is designation for the supported G-codes?

5. What is a real value?

Lecture 12. Automation systems for programming CNC machine tools, features and brief characteristics of automated programming of CNC machine tools and flexible manufacturing systems.

Chip thinning. Not achieving the chip load due to shallow radial engagement

Cutter geometry immersion. Amount of the tooth shape that engages the cut.

Radial Engagement (RE). The percentage of the cutters full radius that makes the mill cut.

Set Tool Table – G10 L10

To change the tool table entry for tool P so that if the tool offset is reloaded, with the mill in its current position and with the current G5x and G92 offsets active, program:

G10 L10 P- Z~ R~ I~ J~ Q~

The current coordinates for the given axes become the given values. The axes that are not specified in the G10 L10 command are not changed. This could be useful with a probe move as described in the G38 section.

It is an error if:

• Cutter Compensation is on

• The P number is unspecified

• The P number is not a valid tool number from the tool table

• The P number is 0

Set Tool Table – G10 L11

G10 L11 is just like G10 L10 except that instead of setting the entry according to the current offsets, it is set so that the current coordinates would become the given value if the new tool offset is reloaded and the mill is placed in the G59.3 coordinate system without any G92 offset active. This allows the operator to set the G59.3 coordinate system according to a fixed point on the mill, and then use that fixture to measure tools without regard to other currently active offsets.

Program: G10 L11 P~ X~ Z~ R~ I~ J~ Q~

It is an error if:

• Cutter Compensation is on

• The P number is unspecified

• The P number is not a valid tool number from the tool table

• The P number is 0

M-codes interpreted directly by the operating system are detailed in the table below:

Tool Change – M06

To execute a tool change sequence, program: M06

M06 behaves differently depending on whether or not a mill is equipped with an ATC (automatic tool changer).

References: Gen [1-3].

Assessing questions:

1. What is the cutter geometry immersion?

2. Why we need the radial engagement?

3. How can be done tool table setting?

4. Designation of M-codes?

5. How can be fulfilled the tool change?

Lecture 13. Program planning. Selecting the origin, quadrant and axes. Fixturing. Selecting the holding methods and cut sequences

Coordinate shift. A programming technique used on both mills and lathes to temporarily shift the PRZ for safety or convenience.

Tooling reference – set point. An alternate method of establishing PRZ using a block attached to the fixture.

Touch method (touch off). A physical method of setting a Z axis PRZ at the machine by touching the cutter lightly to the work surface.

Work stop/spindle stop. An adjustable stop to locate raw material in the same place with each part.

Choosing the PRZ Location—Lathe or Mill

Primarily, PRZ must reflect the datum/dimensioning basis of the design. Second, choose some physical location that’s easy to locate during the setup—a large surface, a well machined hole, etc.

PRZ Location for Turning Work

X Axis on Centerline. To control diameters, the program reference zero always lies on the work center for the X axis. Diameters are always referenced from the lathe’s centerline for turning work.

Z Axis PRZ. While the Z axis location is often at the far right tip, as shown in Fig. 13.1, away from the headstock, occasionally function will dictate Z location other than the tip, as shown in Fig. 13.2, where it’s obvious where the PRZ should be.

In the case shown in Fig. 13.2, during setup the machinist will touch the facing tool to the right outer tip of the work, then set the controller position registers at Z2.050 – a plus Z distance from PRZ. That means the Z-PRZ is 2.050 in. farther into the part. If that setup detail is missed, the program run would be a total disaster.

Often, work must be machined on both ends, as shown in Fig. 13.3. Bar feeding can make the external details and the internal features on only one end. For example, it’s going to require a second setup to machine the threads. There are two ways to solve this.

Figure 13.1 - A typical PRZ location for turning work.

Figure 13.2 – Function occasionally places the PRZ in some location other than the work tip.

1. Machined Temporary Datum

Machine features in from one end, to a selected Z axis position. Then remove, reverse chuck the part nested against your temporary reference, and complete the final features.

2. Spindle Work Stop

If the work is being machined from cut stock with no chucking excess, one solution to controlling a reverse Z axis position is to use a spindle stop or work stop, as shown in Fig. 13.4. After machining the features onto every part in the batch, each is reversed and rechucked. The adjustable stop sets the Z position of the work based on the far end.

Figure 13.3 – This job requires machining on both ends.

Figure 13.4 – A spindle work stop provides a Z axis locator.

Top Surface – Lower-Left Corner. The most common selection for mill PRZ is the top surface, lower-left corner shown in Fig. 13.5.

Figure 13.5 – Top left corner is a common PRZ location.

But that’s not the only choice, as shown in Fig. 13.6. In each orientation, the datum basis of the design is preserved on the work. The only difference is the axis orientation and positive or negative values resulting when absolute coordinates are used.

Touch Method for Setting Tool Reference. Selecting the top surface of the work for the Z axis reference is a common method. It simplifies the task of coordinating the Z axis position of tools and for determining length offsets. It’s done by just touching the top of the work with the tool tip—lightly with no hard contact. Better yet, the Z reference can be set by staying a given distance off the work, then setting the Z axis position register to represent that height off. This is known as the touch-off method. It’s used on machines without tool probes or camera vision.