Examples of programming cnc turning. Parametric programming. "Dictionary" of the G-code programming language

  • 02.07.2018

Detailed acquaintance with the CNC NC-201 in study guide Let's start with turning, as it is the easiest to understand and is usually limited to two fully controlled coordinates.

8.8.1. Programming preparation for processing

Before starting the machining process, it is necessary to prepare the machine for the planned operations: determine the units of measurement, set the cutting conditions, install the tool, apply coolant if necessary, turn on the spindle. The listed operations are performed using auxiliary and preparatory functions, the words T, S, F.

Parameter Parameters are variable machine variables such as feed and speed control, feed rate and reduction, which are adjusted by the controller depending on the material and conditions. Such a controller contains a certain number of hard-coded applications that can be called at any time with little programming effort.

Teach in is a simple on-machine programming method where the outline of a template or raw plate is removed from the master spindle using a laser or water jet and read into the controller. The incremental encoder system uses pulses from a rotating hole or slotted discs. These holes count the photoelectric barrier. The accuracy is in the range of tenths of a millimeter. Absolute encoders are length or angle encoders that output the current spindle position or maintain as a digital numeric value.

Preparatory functions used: G70/G71, G93-G96. All of the listed functions (with the exception of G97) are used without additional parameters, operate within the program until canceled by another similar function (Table 26) and do not require additional explanations.

Let's dwell in more detail on G96 - constant cutting speed. There is an additional variable that works in conjunction with G96 - SSL, it allows you to determine the maximum speed of the spindle. This is necessary when the system performs constant cutting speed control (G96).

An initial movement under zero point control is not required. Here, in fundamental concept number two, we will see the machine from the programmer's point of view. Subsequently, in fundamental concept number seven, we will consider the machine from the operator's point of view.

Because this type of machine can perform multiple operations in a single program, the beginner must also know the basics of how to fully program a piece of a product and the processing sequence to be developed for such a piece. This moment cannot be ignored.

SSL = VALUE. VALUE - can be a constant or a parameter of the same format.

SSL = 200 - sets the maximum spindle speed to 200 rpm;

SSL = 1500 - sets the maximum spindle speed to 1500 rpm.

When machining in constant surface speed mode (G96), you must always program SSL before programming the G96 function for the first time in conjunction with the S function.

This will help you accurately gauge the limits of what can be done with your machine. Typically, to tilt a machining center table, for example, the programmer must know the table and its movements, the linear and angular limits, the operating mode of the spindle and heads as they are mounted on the tower, and their locking devices. Usually this information is published in the mechanical engineering manual, including installation drawings. As you should read the manual, here are a few questions about the machine's capabilities that you should know.

Components of the control program

What is the maximum speed of the car? What are the spindle speed ranges and how long does it take to reach the required speed? What is the power of the spindle motor? What are the limits of each axis? How many tools does the machine log support? What buses are used to move this car. What is the minimum and maximum feed rate?

SSL = 2000 set the maximum spindle speed to 2000 rpm

G96 S120 M3 set a constant cutting speed of 120 m/min, turn on the spindle rotation clockwise

It should be noted that some preparatory functions are active by default, i.e. if we turn to the example considered earlier (despite the fact that G70, G71, G93-95 are not specified in the program), we can definitely say that the units of coordinates are millimeters, the feed value is expressed in millimeters/rev.

In truth, the more you know about the capabilities of your machine and its builds, the easier it will be to program. Direction of movement. The names of the axes will vary from one type of machine to another. They will always be referred to by the email address. The novice programmer should confirm these axis and direction assignments in the machine builder's manual. As discussed in fundamental concept number one, when a programmer wants to command movement in one or more axes, the letter address corresponding to the corresponding axes is specified, as well as the destination of each axis.

The use of auxiliary functions, as well as addresses S and F, does not require additional explanations.

Preparation of the tool for work is carried out using address T, but not commissioning (using this function, the CNC system searches for the required tool in the magazine and moves it to the change position). Direct installation of the tool in the working position is carried out by command M6. Such an algorithm allows to reduce the share of time spent on tool change during processing, the time for searching and transporting the tool is combined with the processing time of the previous tool. In the turning version, when changing a tool with a turret, the T function is ignored, but the tool and offset numbers are remembered, and according to M6, the turret is released, moved to the required position, fixed and the offset is put into action.

To start a rotating shaft, a letter address is also required, along with a move end point. However, the end point of the rotary axis motion is specified in degrees. Reference point for each axis. Some control manufacturers refer to this position as zero. Others call it the zero grid. Still others call it the "home position". Although it is called several different ways, this reference position is required by many controls as an accurate reference point. Once the procedure is completed, the control will be synchronized with the physical position of the machine.

The program must end with the auxiliary function M30 or M02.

An example of a turning program design:

N1G90G71G95G97F0.5S1000T1.1M6M3M8

Or the same, taking into account the defaults and the auxiliary function M13:

N1G97F0.5S1000T1.1M6M13

Or, given that addresses can be written with a space, frame numbers can be omitted:

G97 F0.5 S1000 T1.1 M6 M13

The specific control position of each axle will vary from machine to machine. You need to consult your machine tool builder's manual to see if your machine contains a control position and how much is required. Some of these accessories are manufactured and supported by the machine manufacturer and should be well documented in the manufacturer's manual. Other accessories may be made by third parties and then made available on the market, in which case the device information will not be included in the machine manufacturer's manual, in which case the device must have a separate manual.

8.8.2. Motion programming

All movements are programmed using preparatory functions G0, G1, G2 and G3, where the function number specifies the nature of the movement, and the subsequent address word(s) the coordinates of the end point of the movement.

8.8.2.1. Fast positioning of G0 axes

Function G0 - rapid movement to a given point, determines the linear type of movement, coordinated along all axes programmed in the block.

The lists of potential accessories today are countless. While the spindle is rotating and steering, the cooling oil on/off and the tool change system are manually activated by the operator. Once the cycle is activated, the operator is free for other functions. The Machine Builder's Reference Guide serves to inform you which functions of your machine are programmable. To give you some examples of how to handle some programmable functions, they put some of the more common programmable functions along with their associated programming words.

Command format:

G00 [OTHER G] [AXIS] [COMPENSATION OPERANDS] [FEED RATE] [SUB-FUNCTIONS].

[OTHER G] - all other G functions compatible with G00 (Tables 26, 27);

[AXIS] - represented by an axis symbol followed by a numerical value in explicit or implicit form, eight axes can be present at most, they must not be mutually switchable;

For turning centers there is another feature called constant surface speed which allows you to specify the spindle speed in surface feet per minute. Tool change. The "Four Digit Tee" is used to control tool changes in most rotary centers. Automatic pallet changer. Note. . Other programmable features.

As mentioned, the programmable features will vary greatly from one machine to another. The most needed current programming commands will also differ from builder to builder. For turning centres, for example, the activation and deactivation of the workpiece clamping jaw can be programmed. If a machine has more than one rotation range, it is usually programmed. And if the machine has a bar lock, it will be programmed.

[CORRECTION OPERANDS] - correction coefficients on the plane (u, v, w), we will not consider, more details can be found in ;

[FEED RATE] - cutting feed for coordinated movements, it is remembered but not executed, the feed rate in the block with the G00 function is determined based on the rapid traverse rates;

[AUXILIARY FUNCTIONS] - auxiliary functions M, S and T; Up to four M functions and one S and one T function can be programmed in one block.

PROGRAMMING AND ADJUSTMENT OF MACHINE MACHINES

You can even activate and deactivate the chip pipeline from your device through the program. The aim of the course is to provide students with the necessary knowledge about the basic principles of preparing control programs for CNC machining centers and CNC lathes for the use of various commands, fixed and multi-purpose cycles and subroutines. The acquired knowledge provides the basis for automatic preparation of control programs, processing simulation, testing, editing and optimization of programs using modern computer equipment.

Optional parameters are enclosed in square brackets.

8.8.2.2. Linear interpolation (G01)

Linear interpolation (G01) defines a linear simultaneous movement coordinated on all axes that are programmed in the block at a given processing speed.

G01 [OTHER G] [AXIS] [COMPENSATION OPERAND] [FEED RATE] [SUB-FUNCTIONS].

The emphasis on machine alignment is based on traditional methods as well as modern automated and automatic methods for measuring and introducing tool corrections, measuring parts and preforms, and automatically compensating for errors when they are installed on the machine. important goal The aim of the training is for students to know well both existing and the latest generations of CNC systems and be able to work freely with them. The discipline creates an engineering culture among students and develops their creative thinking in creating control programs and creating machines for modern technological process, characterized by high precision and performance and minimal cost for materials and energy.

[FEED SPEED] - expresses the working speed (F) at which the movement is performed. If not, the previously programmed speed is used. This means that the feed rate must be programmed in the preceding blocks. Otherwise, an error signal is given.

The description of other fields is similar to G0 in the previous paragraph.

Upon graduation, the student Familiar with the basic principles in the preparation of a management program. Understands the rational use of various commands, fixed and multi-pass cycles and subroutines. Can create and optimize control programs for medium-sized parts for the main groups of CNC machines - machining centers and lathes.

Can perform different kinds adjustment of machines and technological equipment using modern measuring instruments. It can freely work with control boards for different generations of CNC systems, incl. and the most modern. COURSE CONTENT. 1 Thematic discipline.

As an example, consider the finishing of a part shown in Fig. 8.1.

Rice. 8.1. Scheme of processing a conical surface

After determining the trajectory of movements, we compile a table of reference points:

Table 28

GCP coordinates

point number

There are three methods for programming machining for CNC machines

Preparation of the control center program. Preparation of a control program for a CNC lathe. We have two reasons for you: confidence in the job and confidence in a decent salary. Positions are in the hundreds today, and companies are looking for futile methods.

The series, each one giving you an interesting informative example, will keep you safe. The series has 100 parts and is available on the pages of the Technical Diary. If you've grown up since your school days, give it a try. For example, Brno offers retraining courses at the Secondary School of Technology and Economics in Brno or at the Secondary School of Engineering and Electrical Engineering in Brno.

Based on the table. 28 we form the UE:

N2 ; install the first tool

N4 ; enter the speed limit

N5 G96 F0.1 S140 M13

N6 ; set constant cutting speed 140 m/min, feed 0.1mm/rev, turn on coolant supply and right spindle rotation

N8 ;fast move to point 1

N10 ;machining at working feed along the path from point 1 to 4

The curriculum of the retraining course is accredited by the Ministry of Education of the Czech Republic and upon completion you will receive a retraining certificate. The advantage is that you can choose according to your level of knowledge as well as time options. However, programming courses are not the cheapest - as the course requires modern technologies, prices for courses are quietly in the tens of thousands of Czech crowns.

Kovoprog is a solution designed for classic turning, milling cabinet components and wire cutting that is relatively easy to operate, cost-effective and powerful enough. At that time, access to foreign products was strictly limited, and the competitive environment in this area was mainly domestic software. Since then, many have changed, but Kovroprog still maintains its position as one of the few domestic programs.

N14 ; return to the starting point with rapid feed

N16 ; end of program, spindle stop, coolant off.

Despite the fact that there is no preparatory function in the fourth block, the movement will be performed with rapid traverse, since G0 is in effect by default (Table 26. In the sixth and seventh frames, it is not necessary to specify G1, since its effect extends until canceled by the G0 function ( zero can be omitted) in the eighth frame.

Machining programming methods for CNC machines

The program is offered in two versions. Includes programs for 2-axis and general 4-axis cutting. The second option - Chip Machining - supports rotation with horizontal and vertical axis, milling and drilling. This means that machining defined by planar curves is supported, which can lie in an arbitrary plane. His philosophy is based on using basic structural geometry and then creating the shape of the path as a continuous curve made up of lines, arcs, or Bezier curves.

8.8.2.3. Circular interpolation (G02-G03)

Circular interpolation (G02-G03) defines clockwise (G02) or counter-clockwise (G03) circular motion.

This movement is coordinated and simultaneous in all axes, programmed in a block with a given processing speed.

(G02 or G03) [OTHER G] [AXIS] (I J or R+) [FEED RATE] [COMPENSATION OPERANDS] [SUB-FUNCTIONS].

[AXIS] are represented by an axis symbol and a numeric value, either explicitly or implicitly (parameter E). If no axis is programmed or the arrival coordinates are equal to the departure coordinate, then the movement performed will be a full circle in the interpolation plane. The axes can be defined implicitly by means of a geometric element - a point.

I and J are address words expressing the coordinates of the center of the circle, the numeric part of which can be expressed in explicit or implicit form. The symbols used are always I and J regardless of the interpolation plane and are always present.

R is an address word expressing the radius of a circular arc, the digital part of which can be expressed explicitly or implicitly (parameter E); the sign "+" or "-" before the address word R selects one of two possible solutions: "+" - for an arc up to 179.9990; "-" - for an arc from 1800 to 359.9990.

The direction of the circular motion (clockwise or counterclockwise) is determined by the direction in the interpolation plane when viewed from the side of the positive semi-axis perpendicular to the plane according to fig. 8.2.

Rice. 8.2. Scheme for determining the type of circular interpolation

The coordinates of the start point programmed in the previous block, the end point and the center of the circle must be calculated in such a way that the difference between the start and end radius does not exceed 0.01 mm. If the difference exceeds this value, "Profile not congruent" is played and the circle is not executed.

As an example, we can imagine the processing of the workpiece of the part shown in Fig. 8.3.

Point number

Rice. 8.3. Surface treatment of a part using circular interpolation

When moving from point 2 to point 3, clockwise circular interpolation G2 operates, and from 3 to 4 - G3.

N3 G96 F0.1 S140 M13

N6 G2 X120 Z-50 I120 J-30

N7 ;Apply clockwise circular interpolation with circle center X=120mm and Z=-30mm.

N8 G3 X140 Z-60 I120 J-60

N9 ;apply counterclockwise circular interpolation with circle center X=120mm and Z=-60mm.

Or if circular interpolation is specified using a radius:

N6 G2 X120 Z-50 R+20

N8 G3 X140 Z-60 R+10

The “+” sign is applied after the address R, since each of the arcs covers an area with an angular extent of less than 180º (a sector equal to 90º).

8.8.3. Absolute, incremental and machine zero programming (G90, G91, G79)

Until now, all movements relative to part zero have been programmed, however, the CNC system will allow programming in other ways by using preparatory functions:

G90 - programming in the absolute system (movements relative to part zero, active by default);

G91 - programming in the system by increments (movements relative to the last location);

G79 - programming relative to machine zero (rarely used and will not be considered by us).

Incremental programming is convenient to use when the dimensions on the drawing are indicated not from one base, but in the form of a dimensional chain. With this programming method, the coordinates of the next point are written relative to the previous one, while if the movement is carried out against the positive direction of the axis, then before numerical value coordinates are marked with a "-". As an example, let's write the UE (Fig. 91) in increments.

N3 G96 F0.1 S140 M13

N6 ;go to incremental programming

N7 G2 X120 Z-50 I120 J-30

N8 ;Apply clockwise circular interpolation with circle center X=120mm and Z=-30mm.

N9 G3 X140 Z-60 I120 J-60

N10 ;apply counterclockwise circular interpolation with circle center X=120mm and Z=-60mm.

8.8.4. Determining the drive dynamics mode during programming

As you know, any moving, rotating mechanical systems are no exception and feed drives have certain inertial properties. From point of view machining this is a certain disadvantage that affects processing performance. The mechanism of such a connection is as follows: changes in the trajectory of the tool movement cannot be performed instantly, a certain amount of time is required to decelerate or accelerate the drive at the reference points of the tool trajectory.

The functions that control the dynamic behavior of the drives are: G27, G28, G29.

G27 - provides continuous movement with automatic speed reduction at corners; this means that the speed of exit from the profile elements is calculated automatically according to the geometric shape of the profile. Deceleration and acceleration along the axes is carried out when approaching the reference point in such a way that at the reference point the tool has a feedrate along the axes corresponding to the next profile element. With this dynamic mode, the required processing accuracy is ensured at a satisfactory time. Function G27 is active by default.

G28 - provides continuous movement without automatic speed reduction at corners. This means that the exit speed from the profile elements is equal to the programmed speed. In this mode, the shortest processing time is provided due to the elimination of intermediate braking at the reference points of the trajectory. However, due to the inertia of the drive, especially at high cutting speeds and small allowances (typical for finishing), it is possible to distort the trajectory at the reference points, which leads to the appearance of "gouges". This mode can be recommended for roughing.

G29 - provides movement in the "point to point" mode, i.e. the exit speed from the profile elements is set to "0". By the time it reaches the reference point, the tool stops completely. This mode provides maximum machining accuracy, but at the same time, processing time increases, which can be significant if machining is carried out with significant feeds, the trajectory has many reference points with a small distance between them (multi-pass roughing).

The type of positioning that is carried out at the machining speed G1, G2, G3 is set by the functions G27, G28, G29, while the rapid positioning G00 is always carried out "from point to point", i.e. with speed reduction to zero and fine positioning, regardless of the state the system is in (G27,G28,G29). During continuous motion (G27-G28), the system remembers the profile to be realized, so the profile elements are executed as one block. For this reason, while traversing a profile with G27-G28, the auxiliary functions M, S and T cannot be used. Continuous operation is temporarily terminated by moving G00, which is part of the profile. If auxiliary functions M, S, T are to be programmed, programming takes place in the block following G00.

In some cases, it is possible to force the braking of the drives at the reference point, regardless of the dynamic mode, using the G09 function:

G09 - sets the feed rate to zero at the end of the block where it was programmed, but does not change the previously set profile dynamics mode if it is in the process of processing; The function is only valid in the block in which it is programmed.

As an example, consider the surface treatment of the part shown in Fig. 89.

N3 G96 F0.1 S140 M13

N5 G28 G1 X82 Z-46

N6 ; enable dynamic mode without braking at reference points

N7 G09 X104 Z-76

N8; since in the next frame the end face is processed, to prevent the appearance of a “gouge”, we introduce braking at the end of the current frame.

When it is required to pause during machining, use the G04 function.

G04 performs a delay at the end of the block. Dwell time programmed in destination block TMR = value; Function G04 is only valid in the block in which it is programmed.

The global variable TMR allows you to assign a delay at the end of the block, and this pause is processed in blocks with G04 functions and/or in canned cycles.

TMR = VALUE. VALUE - can be programmed explicitly and/or implicitly (parameter E of LR format) in a way.

As an example, consider the operation of forming a groove (Fig. 8.4).

N3; set the pause value to 1.5 s.

N4 F0.1 S700 M13

N7 ; pause at point 2 to level the bottom of the groove

point number

Rice. 8.4. Grooving example

8.8.5. Threading

Constant or variable pitch threading defines a cylindrical or tapered threading cycle with constant or variable pitch. This movement is coordinated with the rotation of the spindle. The parameters programmed in the block determine the type of thread to be made. There are two preparatory threading functions G33 and G34 in the CNC in question, differing only in the way the lead is specified.

G33 [AXIS] K [I] [R].

K represents the thread pitch; in the case of a variable step, represents the initial step, which must always be present.

[I] represents pitch change; for threading with increasing pitch, I must be positive, for threading with decreasing pitch, it must be negative.

[R] represents the deviation with respect to the angular position of the spindle zero (in degrees); used for multi-start threads in order not to move the starting point.

The R function instructs the system to place the axes in an angular position that varies depending on the programmed R value. Thus, it is possible to program one starting point for different cuts, unlike other systems where the starting point of each thread must be shifted to make multiple threads. cuts by an amount equal to the step divided by the number of visits.

During threading with decreasing lead, the initial lead, lead changes, and thread cutting length must be such that the lead does not become zero before reaching the final size. The formula is used to check

where TO- initial step; Z K- coordinate of the end point; Z N- coordinate of the starting point.

G34 format:

G34 [AXIS] K+ [I] [R].

K+ - thread pitch.

The sign for the step value is set depending on the amount of movement along the axes:

  • "+" - moving more along the abscissa (Z);
  • "-" - move more along the y-axis (X).

An example of cutting a single-start cylindrical thread is shown in Fig. 8.5.

point number

Rice. 8.5. Parallel Threading Example

N4 G33 Z-17 K2 or N4 G34 Z-17 K2

An example of threading with increasing pitch is shown in Fig. 8.6.

Rice. 8.6. Increasing Pitch Parallel Threading Example

N5 G33 Z-17 K2 I0.2 or N5 G34 Z-17 K2 I0.2

An example of cutting a tapered thread is shown in Fig. 8.7.

point number

Rice. 8.7. Taper thread example

N5 G33 X27.5 Z-13.86 K2 or N5 G34 Z-13.86 K1.73

An example of cutting a frontal thread is shown in Fig. 8.8.

point number

Rice. 8.8. Front thread surface treatment

N4 G33 X15 K2 or N4 G34 X15 K-2

An example of threading with three starts (Fig. 8.5):

N5 ;first run

N9 G33 Z-17 K6 R120

N10 ;second run

N14 G33 Z-17 K6 R240 third run

8.8.6. Technological cycles

Programming multi-pass roughing operations to remove a large amount of material (especially when machining parts from rolled products) using the ISO language can be a rather laborious task. In this regard, almost any CNC system contains auxiliary technological cycles that automate the multi-pass processing of typical surfaces. When using such cycles, the system automatically divides the allowance to be removed into separate passes, calculates and automatically executes the tool trajectory.

Main turning cycles of CNC NC-201:

1) TGL - grooving cycle;

2) FIL - thread cutting cycle;

3) SPA - axis-parallel roughing without finishing;

4) SPF - axis-parallel roughing with pre-finishing;

5) SPP - roughing parallel to the profile;

6) CLP - profile finishing.

8.8.6.1. Grooving cycle

This cycle processes external or internal grooves parallel to the X or Z axes.

To obtain a slot parallel to the Z axis, the following format is used:

(TGL, Z, X, K),

where Z is the final size of the groove; X - inner diameter; K is the width of the tool.

A block with a TGL command must be preceded by a block with a G0/G1 move to the cycle start point. The control device automatically sets the stop at the end of the groove. The duration of the stop is determined by the parameter TMR. At the end of the slot, the tool returns to the cycle start point defined in the previous block.

To program a slot parallel to the X axis, the following format must be used:

(TGL, X, Z, K),

where X is the final size of the groove; Z- inner size groove; K is the width of the tool.

An example of groove surface machining is shown in fig. 8.9.

point number

Rice. 8.9. Grooving example

N2; install a grooving cutter for processing an internal groove 5 mm wide

N4 ; set the pause value to 1.5 s.

N5 F0.1 S700 M13

N8 (TGL, Z-10, X72, 5)

N9 ;Perform multi-pass grooving with technology cycle

N13; set the cutter for grooving at the end

N15 (TGL, X80, Z-4, K5)

N18; set the cutter for external grooving

N20 (TGL, Z-10, X72, 5)

8.8.6.2. Threading cycle

The threading cycle makes it possible to program cylindrical or tapered multi-pass threads in one block. Format:

(FIL, Z, X, K, L, R, T, P, a, b),

where Z is the final size of Z; X - the final size of X.

The order of naming the axes determines the axis along which the thread is performed and the thread pitch is specified: Z, X - along the Z axis; X, Z - along the X axis.

K - thread pitch. The thread pitch value has a "+" or "-" sign.

The sign of the step value determines the axis along which the thread is made: "+" - along the abscissa axis; "-" - along the y-axis.

In the case of a tapered thread, the sign for the pitch is set depending on the amount of movement along the axes that determine the cone: “+” - movement is greater along the abscissa axis; "-" - move more along the y-axis.

L is the number of roughing and finishing passes, i.e. L11.2.

R - distance between the tool and the surface of the part (by default, R=1) when the tool is idling.

T - 4-digit code that determines the type of threading (by default T0000).

The first two digits of the code inform the system about the presence of a threaded groove and set the method for obtaining a thread:

00 - cutting with a finite groove, cutting at an angle (Fig. 8.10), without braking at the end of the thread;

01 - cutting without end groove, plunge at an angle, without braking at the end of the thread;

10 - cutting with a finite groove, radial plunge, without braking at the end of the thread;

11 - cutting without a final groove, radial plunge, without braking at the end of the thread;

12 - cutting with a finite groove, ramping in, stop at the end of the thread by function G09;

14: - cutting with a finite groove, radial plunge, stop at the end of the thread by function G09;

0 - external threading;

1 - internal cutting threads.

0: - metric cutting threads;

1: - inch thread;

2: - non-standard threading with depth and angle determined by the parameters "a" and "b".

Р - number of visits (by default Р=1);

a - thread angle (only for non-standard);

b - thread depth.

Rice. 8.10. Distribution of allowances: a - cutting at an angle; b - radial infeed; 1, 2, 3, 4, 5, - passes

The control device automatically calculates the positions by sliding along the edge of the thread so that part of the resulting chip remains constant. For multi-start threads, it is only necessary to determine the pitch of each thread. The control device performs each pass for each run before making the next pass.

For threads with an end slot, the theoretical end Z must be programmed, since the fixed cycle provides an increase in stroke equal to half the pitch. In threads without end slot, the tool reaches the programmed size and then moves back with the tapered thread along the back diameter. Before processing, the cutter must be placed at the starting point: along the X axis - outside diameter, along the Z axis - must be at least one thread pitch apart.

A thread without an end slot cannot be obtained in block-by-frame mode.

For fig. 8.5 the program will look like:

N4 (FIL, Z-16, K2, L5.1, R3)

N5 ; a three-start thread is cut in five roughing and one finishing passes, the plunge is carried out at an angle, without braking at the end of the thread.

8.8.6.3. Profile definition

To successfully complete the rest of the technological cycles, it is necessary to set the profile of the workpiece in advance using the DFP command. Format:

where n is the profile number, can take values ​​from 1 to 8.

When describing a profile, remember that:

– according to the ISO standard, all profile frames must contain contour codes (G1, G2, G3). The rapid traverse code G0 can only appear in the first block;

– given that F functions can be programmed within a profile, they will only be activated during the profile finishing cycle;

– DFP must always precede the corresponding processing cycle;

- the direction of the profile description must coincide with the direction of the tool strokes (if the tool moves from right to left when removing the allowance, then the profile must be described from right to left, if from the periphery to the axis, then the profile as well);

– the described errors are signaled only during the execution of the processing cycle;

– The block number in the DFP cycle will only be displayed during the execution of the finishing cycle (CLP). In all other cycles (roughing, parallel to the X or Z axis, etc.), the display plays the frame that contains the macro access to the profile defined using DFP;

– to use tool radius compensation, program G40/G41/G42 within the DFP cycle;

– the profile description ends with the EPF command.

As an example, we will describe a profile in the ISO language for the part shown in fig. 8.3. We will assume that the processing is carried out from a bar Ø160 mm, when removing the allowance, the tool moves from right to left:

N2 ; start profile description at number 1

N5 G2 X120 Z-50 R+20

N6 G3 X140 Z-60 R+10

N7 ;Apply counterclockwise circular interpolation with circle center X=120mm and Z=-60mm.

N11 ;profile description completed

8.8.6.4. Multi-pass axisy-parallel roughing

To program roughing parallel to the X axis, the following format is used:

(SPA, X, n, L, X, Z).

To program roughing parallel to the Z axis, use the format:

(SPA, Z, n, L, X, Z),

where X or Z is a sign of the axis (without a value) parallel to which the processing is performed; n is the profile number previously stored with the DFP. It is required and can vary from 1 to 8; X - radial allowance along the X axis for subsequent processing; Z - radial allowance along the Z axis for subsequent processing; L is the number of roughing passes. Can vary from 1 to 255.

X and Z can be skipped. If present, they should always have a positive value.

Based on the starting point and direction of the profile, the control device automatically decides whether the roughing should be internal or external and assigns the corresponding sign to the allowance.

The starting point must be outside the roughing field by at least the amount of the programmable allowance. If the profile is not monotone, i.e. if it includes pockets, the tool will automatically bypass the pockets during roughing. After the end of processing, the tool is located at a point separated from the end point of the profile at a distance of the allowance plus the rebound value (Fig. 8.11).

Rice. 8.11. Scheme of movement of the tool during multi-pass machining on the SPA cycle

As an example, let's continue drawing up a program for roughing the part of Fig. 8.3.

N15 ;Place the tool at the starting point of the cycle

N16 (SPA, Z, 1, L10, X1, Z1)

N17 ;perform multi-pass roughing parallel to the Z axis, limited by profile number 1, processing is performed in 10 passes, the allowance for subsequent processing is 1mm

8.8.6.5. Axially parallel roughing followed by semi-finishing

To program roughing parallel to the X-axis with finishing along the profile, the following format is used:

(SPF, X, n, L, X., Z).

To program parallel Z-axis roughing, use the format:

(SPF, Z, n, L, X, Z).

Loop parameters have the same meanings as in SPA.

The programmed profile must be uniform. Otherwise, an error message will be played. The difference between machining by the SPF cycle and SPA is that the machining ends with the passage of the tool along the contour of the part and after machining the tool moves to the starting point of the cycle.

8.8.6.6. Roughing parallel to the profile

If the workpiece has a shape close to the part (forging, casting, etc.), the use of machining cycles parallel to the axis is inefficient: a significant number of idle movements at the working feed, a large number of cutting tool into metal. In this case, the processing proceeds as follows: the tool in each pass moves along a path that repeats the profile of the part (Fig. 8.12)

Rice. 8.12. Stock removal scheme for roughing parallel to the profile

The above processing algorithm is implemented using the SPP cycle.

(SPP, n, L, X1 X2, Z1 Z2).

n - profile number.

L is the number of passes.

X1 - allowance along the X axis, left for subsequent processing.

X2 - allowance along the X axis on the raw part.

Z1 - allowance along the Z axis, left for subsequent processing.

Z2 - allowance along the Z axis on the raw part.

X1 and Z1 are mandatory even if their value is zero.

The starting point is determined in the same way as in SPA - SPF.

As an example, consider the surface treatment of the part shown in Fig. 8.13. The workpiece has internal surfaces allowances of 10 mm. Then the program will look like:

N12 ;Place the tool at the starting point of the cycle

N13 (SPP, 1, L4, X1 X10, Z1 Z10)

N14 ; we perform multi-pass roughing parallel to profile 1, processing is performed in four passes, the allowance for subsequent processing is 1mm.

Rice. 8.13. Example of part surface treatment using the SPP cycle

8.8.6.7. Profile finishing cycle

The following format is used to program profile finishing:

n is the name of the profile previously defined with DFP.

CLP is the only processing cycle during which the F functions programmed inside the DFP can be activated.

During this cycle, the tool moves along the programmed profile in the direction of its development. This cycle allows you to use a previously programmed profile for multi-pass machining for finishing, facilitating programming and reducing the cost of developing NC. As an example, we will complete the processing of the part shown in Fig. 8.3.

N19 T3.3 F0.25 S1000 M6

N20; set the finishing cutter and set the cutting conditions corresponding to the finishing.

N23 ; Finishing profile 1.

Introduction
Manual programming on
G-codes.

Terms

Computer numerical control
(CNC) - computerized system
control, drive control
technological equipment,
including machine tools.

History of CNC

The inventor of the first machine tool with a numerical (program)
control (Eng. Numerical Control, NC) is John
Parsons (John T. Parsons), who worked as an engineer in the company
his father's Parsons Inc, which produced at the end of World War II
war propellers for helicopters. He first proposed
use a machine to process propellers,
working according to the program entered from punched cards.

History of CNC

In 1949, the US Air Force funded Parsons
Inc machine development for
contour milling of complex parts
aviation technology. However, the company was unable
to carry out the work independently and applied for
help to the laboratory
servomechanics at MIT
Institute (MIT). Parsons Inc collaboration with MIT
continued until 1950. In 1950, MIT acquired
milling machine company HydroTel and refused to cooperate with Parsons Inc,
having signed an independent contract with the US Air Force for
creation milling machine with software
management.
In September 1952, the machine was for the first time
demonstrated to the public - about him was
published an article in Scientific American. Machine
controlled with punched tape.
The first CNC machine was particularly complex and
could not be used under production conditions.
The first serial CNC device was created
by Bendix Corp. in 1954 and since 1955 it has become
installed on machines. Widespread introduction of machine tools
CNC was slow. Entrepreneurs with distrust
dealt with the new technology. Ministry of Defence
The United States was forced to manufacture 120
CNC machines to rent out to private
companies.

History of CNC

The first domestic CNC machines
industrial applications are the 1K62PU screw-cutting lathe and the 1541P lathe. These machines were created in
the first half of the 1960s. The machines worked
together with control systems such as PRS3K and others. Then they developed
CNC vertical milling machines 6H13 with
control system "Kontur-ZP".
In subsequent years for turning
machine tools are most widely used
domestic CNC systems
production 2R22 and Elektronika NTs-31.

CNC equipment can be represented by:

machine park, for example machines (machines,
equipped with numerical software
controlled, are called CNC machines):
– for metal processing
(e.g. milling or turning), wood,
plastics,
- for cutting sheet blanks,
– for pressure treatment, etc.
drives of asynchronous electric motors,
using vector control;
characteristic control system
modern industrial robots.

The CNC abbreviation corresponds to two English-language ones - NC and CNC - reflecting the evolution of the development of equipment control systems.

The CNC abbreviation corresponds to two
English-speaking - NC and CNC, - reflecting the evolution
development of equipment control systems.
Systems such as NC (English Numerical control), which appeared first,
provided for the use of rigidly defined control schemes
processing - e.g. programming with plugs or
switches, storage of programs on external media. Any
random access storage devices, control processors are not
provided.
More modern systems CNC, called CNC (eng. Computer numerical
control) - control systems that allow you to use for modification
existing / writing new programs software tools. base for
CNC constructions serve as a modern (micro)controller or
(microprocessor:



microcontroller,
programmable logic controller,
microprocessor-based control computer.
It is possible to implement a model with a centralized automated
workstation (for example, ABB Robot Studio, Microsoft Robotics Developer
Studio) and then downloading the program via transfer via
industrial network

10.

11.

12.

13.

14.

15.

16.

17.

1 - screw-cutting,
2 - turning and revolving,
3 - lobotocarny,
4 - turning and rotary,
5, 6 - horizontal boring,
7- console
horizontal milling,
8 - console
vertical milling,
9 - longitudinal milling
vertical,
10 - longitudinal milling,
11- longitudinal milling
with movable portal
12- single column
planer

18.

Numerical control (CNC) of the machine - control of the processing of the workpiece on the machine according to
UE, in which the data is given in digital form.
Numerical device program control(CNC) - a device that issues control
impact on the executive bodies of the machine in accordance with the UE and information on the state
managed object.
NC block (block) - component UE, introduced and developed as a single
integer and containing at least one command.
For example, N10 G1 X10.553 Y-12.754 Z-10 F1500;
UE word (word) - an integral part of the UE frame containing data on the parameter of the processing process
blanks and other control execution data.
For example, F3000 - move speed setting;
CNC address (address) - part of the NC word that determines the purpose of the data following it,
contained behind it in the word.
For example, X, Y, Z, etc. - addresses of movement according to the corresponding coordinates;
UE frame format (frame format) - a conditional record of the structure and arrangement of words in the UE frame with
the maximum number of words.
Absolute dimension - a linear or angular dimension specified in the NC and indicating the position
point relative to the accepted reference zero.
Relative size - a linear or angular size specified in the UE and indicating
position of the point relative to the coordinates of the point of the previous position of the working body of the machine.
Part zero point (part zero) - a point on the part, relative to which its dimensions are specified.
Machine zero point (machine zero) - a point that defines the origin of the machine coordinate system.
Interpolation - obtaining (calculation) coordinates of intermediate points of the trajectory of the movement of the center
tool in a plane or space.
Tool center - a fixed point of the tool relative to the holder, along which
trajectory calculation;

19.

20. There are three methods for programming machining for CNC machines:

There are three methods
processing programming
for CNC machines:
manual programming
CNC programming
programming with
CAD/CAM systems.

21. programming methods for CNC machines

Manual programming
is pretty
a tedious task.
However, all programmer technologists must
have a good
idea of ​​technology
manual programming
no matter how the
actually they work.
It's like elementary school
at school, teaching
which gives us the basis for
subsequent
education. In our
the country still exists
many enterprises,
which is used
manual method
programming.
Indeed, if the plant
has several machines
CNC, and manufactured
the details are simple then
competent programmer
quite capable
work successfully without
automation tools
own labor.
Programming Method
CNC console purchased
particular popularity in
last years. It's connected
with technical development
CNC systems, improving them
interface and features.
In this case, programs
created and entered directly
on the CNC stand using
keyboard and display.
Modern CNC systems
really allow
work very efficiently.
For example, a machine operator
can produce
UE verification or choose
required canned cycle
with the help of special
icon and paste it into
UL code. Some systems
CNC offer interactive
programming language,
which is significantly
simplifies the creation process
UE, does "communication" with the CNC
operator friendly
Programming with
CAD/CAM system allows
"raise" the writing process
processing programs for more
high level. Working with
CAD / CAM system, the technologist saves himself from
time-consuming mathematical
calculations and receives
tools, much
increasing speed
writing UP.

22. Manual programming

G-code is a code name for a programming language.
CNC devices (Computer Numerical Control).
Created by the Electronic Industries Alliance at the beginning
1960s The final revision was approved in February 1980
year as RS274D standard. ISO committee approved G-code as
ISO 6983-1:1982 standard, State Committee for Standards of the USSR -
as GOST 20999-83. In Soviet technical literature G-code
denoted as ISO-7 bit code.
Control system manufacturers use G-code in
as a base subset of a programming language,
expanding it as you wish.
A program written using G-code has
rigid structure. All control commands are combined into
frames - groups consisting of one or more commands.
The program ends with an M02 or M30 command.

23. "Dictionary" of the programming language G-code

24.

Machine movements
Basic movements are movements executive bodies machine, thanks to
which directly carries out the process of chip removal by the cutting
tool from the workpiece.
Auxiliary movements in machines are not connected
directly with the cutting process, but provide
preparation for its implementation.
The main movement in the machine is the movement that determines the speed
cutting, i.e., the rate of chip removal from the workpiece. The main movement can be
rotary or straight.
Workpiece clamping
The feed motion made by the workpiece or the tool, or both, is
such a movement in the machine, which ensures the supply of more and more new sections to the tool
blanks for removing chips from them. In this case, there can be several feed movements in the machine and among
they can be, for example, longitudinal, transverse, circular, tangential feed
Fixing the cutting tool
Removing the workpiece or replacing it
Changing the cutting tool
Instrument movements for automatic dimensional control
Division movements are implemented to implement the required angular (or linear) movement
workpiece relative to the tool. The dividing movement can be continuous (in
gear shaping, gear hobbing, gear cutting, backing and other machines) and intermittent
(for example, in dividing machines when cutting strokes on a ruler). intermittent motion
carried out using a ratchet wheel, a Maltese cross or a dividing head
Approach of the tool to the surfaces to be machined and
his recusal
Movements related to setting up and setting up the machine
The rolling movement is the coordinated movement of the cutting tool and the workpiece, reproducing
during shaping, the engagement of a certain kinematic pair. For example, when teething
the cutter and the workpiece reproduce the meshing of two gear wheels. Rolling motion is necessary for
shaping in gear-cutting machines: gear hobbing, gear cutting, gear shaping,
gear grinding (when processing cylindrical and bevel wheels).
A differential motion is added to any movement of the workpiece or tool. For
To this end, summing mechanisms are introduced into the kinematic chain. It should be noted that to summarize
only homogeneous movements are possible: rotational with rotational, translational with translational.
Differential movements are necessary in gear hobbing, gear cutting, gear grinding,
backing and other machines.
Coolant supply and chip removal

25.

CNC Machine Coordinate Systems
Planar coordinate system
The rectangular coordinate system is the most common
coordinate system for CNC machines. It contains two coordinate axes
(two-dimensional system) - to determine the position of points on the plane. For
rectangular coordinate system is characterized by the following features:
coordinate axes are mutually perpendicular;
coordinate axes have a common point of intersection (origin
coordinates);
coordinate axes have the same geometric scale.
Polar coordinate system - two-dimensional coordinate system,
where each point on the plane is defined by two
numbers - polar angle and polar radius. Polar
coordinate system is especially useful in cases where
relationships between points are easier to represent as radii and
corners; in the more common, Cartesian or
rectangular coordinate system, such relationships can be
can only be established by using trigonometric
equations.
Volumetric coordinate system
Cartesian coordinate system in
space (in this paragraph we mean
three-dimensional space, about more multidimensional
spaces - see below) is formed by three
mutually perpendicular axes
coordinates OX, OY and OZ. Coordinate axes
intersect at point O, which is called
origin, on each axis is selected
the positive direction indicated by the arrows,
and the unit of measurement of segments on the axes. Units
measurements are usually (not necessarily) the same for
all axes. OX - abscissa axis, OY - axis
ordinate, OZ - applicate axis.
The position of a point in space is determined
three coordinates X, Y and Z.
Z
Y
P1
X
P2
Cylindrical coordinate system, roughly
speaking, expands the flat polar
system by adding a third linear
coordinates called "height" and
equal to the height of the point above zero
plane, just as Cartesian
the system extends to the case of three
measurements. The third coordinate is usually
denoted as, forming a triple
coordinates.
spherical
system is called coordinates
coordinates to display
geometric properties of a figure in three
measurements by specifying three
coordinates, where is the distance to the start
coordinates, and and - anti-aircraft and
azimuth angle, respectively.

26.

Depending on how many axes can be controlled at the same time
CNC system during workpiece processing, distinguish between

27.

28.

For the convenience of programming the processing process in machines with
The CNC has adopted the coordinate axes to always orientate
parallel to the machine guides. Depending on machine type
the location of the coordinate axes in space can be
different, but there are the following general rules.
1. The Z axis is always aligned with the axis of rotation of the spindle. Her
the positive direction is always the same as the direction
movement from the device for fastening the workpiece to the cutting
instrument.
2. If there is at least one axis in the machine coordinate system,
located horizontally and not coinciding with the axis
spindle rotation, then it will be necessarily the X axis.
3. If the Z axis is horizontal, then positive

if you stand facing the left - relative to the front plane -
end of the machine. (The front plane of the machine is the side from which
the console and the main controls of the machine are located).
4. If the Z axis is vertical, then positive
the direction of the x-axis is the direction of movement to the right,
if you stand facing the front plane of the machine.
5. The positive direction of the Y-axis is determined by one of
the following rules:

Looking along the Z-axis in the positive direction,
mentally rotate the x-axis 90° clockwise around the z-axis.

29.

+Y
+Z
+Y
-Z
-Y
-X
+X
-X
+X
+X
+Z
-Y
+Y
-Z
+Z
rule right hand: if you mentally place your palm
right hand to the origin so that the Z axis
came out of the palm perpendicular to it, and bent under
90 ° angle to the palm of the thumb showed a positive
direction of the x-axis, then the index finger will show
positive direction of the y-axis.

30.

Z
A
X
Y

31.

With the help of the binding system, the coordinates are uniquely set
position on the plane or in the working space of the machine. Data
position coordinates are always tied to a specific point,

The machine has a rigid binding system - machine binding system,
which was set by the machine manufacturer. The user can
set any reference system for the workpiece: the CNC knows
the origin and position of this reference system relative to
machine binding systems. As a result, the CNC can
correctly transfer position data from the NC program to
workpiece.
This section describes the machine binding system.
Tool clamp point N is tough
place specified by the machine tool manufacturer
on the spindle.
Tool installation point E
it is given by the machine tool manufacturer
place of the clamping device.

32.

Before you start writing a program
processing, for harvesting it is necessary
set anchor point, relative to
which the coordinates will be set.
At the end you can define the contour
blanks with contour functions
and coordinates in the processing program.
This binding system is called
workpiece binding system.
With binding system
coordinates are uniquely set
position on the plane or in
workspace of the machine. Data
position coordinates always
tied to a specific point
which is described in terms of coordinates.
The machine has a rigid system
bindings - machine binding system,
which was given
machine tool manufacturer. User
can set any binding system
for the workpiece: the CNC knows
origin and position of this
binding systems regarding
machine binding systems. Thanks to
this, the CNC can correctly
transfer position data from the NC program to workpieces

33.

34.

G90 - absolute positioning mode.
In absolute positioning mode G90 moves
executive bodies are made relative to the zero point
working coordinate system G54-G59 (programmed where
move tool). The G90 code is canceled with the code
relative positioning G91.
G91 - relative positioning mode.
In relative (incremental) positioning mode
G91 the zero position is taken as the zero position each time
executive body, which he held before the start
move to the next reference point (programmable, on
how much should the tool move). The G91 code is canceled when
using the G90 absolute positioning code.

35.

G52 - local coordinate system.
The CNC allows you to install in addition to standard working
coordinate systems (G54-G59) are also local. When the control
machine executes a G52 command, the start of the current
the working coordinate system is shifted by the value specified
using data words X, Y, and Z. The G52 code is automatically
canceled with G52 X0 Y0 Z0.
G68 - coordinate rotation.
G68 code allows you to rotate the coordinate system
to a certain angle. It takes a turn to make a turn.
Specify the plane of rotation, the center of rotation, and the angle of rotation.
The plane of rotation is set using G17 codes,
G18 and G19. The center of rotation is set relative to
zero point of the active work coordinate system (G54 G59). The rotation angle is specified with R. For example:
G17 G68 X0. Y0. R120.

36.

37.

Prerequisites for installation:
geometric dimensions of the cutting part required for processing
cutting tools are measured and taken into account in the control program;
the selected tools are fixed in the automatic
tool change;
tool overhangs relative to the automatic changer
tools are taken into account in the control program (if the machine is not
equipped with tool overhang correction device);
the workpiece is installed and securely fixed on the work table in
the position at which its coordinate axes are parallel to the coordinate axes
machine;
the first tool in the order of use is installed and fixed in
spindle;
spindle rotation is on.

38.

Sequence of operations when setting the workpiece zero point
on the lathe CNC
Prerequisites for installation:
geometric dimensions of the cutting part required for processing cutting
tools are measured and taken into account in the control program;
the selected tools are fixed in the clamping devices of the turret and
exposed in the transverse direction;
tool overhangs relative to the turret are measured and taken into account in
control program;
the workpiece is properly secured in the spindle.
Make sure there is no collision when turning the turret
tools with a fixed workpiece and machine parts.
Enable spindle rotation by selecting the direction of rotation corresponding to
the location of the cutting tools relative to the fixed workpiece.
Using the appropriate command from the control panel, move one of the
cutters fixed in the turret (for example, scoring) into the working
position.
Carefully bring the working tool to the outer end face free from the spindle.
surface of the workpiece, either by manual control or by
corresponding keys on the machine control panel. Touch the tip of the cutting part
tool surface of a rotating workpiece until a visually noticeable
trace and stop moving the tool.
Determine the current value of the position of the machine caliper using the CNC display system
Z axis.
Enter this coordinate value as a zero offset into the CNC and
press the key for resetting the coordinate system. If it is necessary to take into account the allowance
for processing the end surface of the workpiece, it is recommended to take it into account in advance
before entering the coordinates of the current position of the caliper into the CNC system by entering
corresponding correction to the numerical value of this coordinate.

39.

Additional features and symbols
X, Y, Z - axial movement commands.
A, B, C - commands for circular movement around the X, Y, Z axes, respectively.
I, J, K - circular interpolation parameters parallel to the X, Y, Z axes, respectively.
R
In circular interpolation (G02 or G03), R defines a radius that connects
the start and end points of the arc. In canned cycles, R determines the position
retraction plane. When working with the rotation command, R determines the angle of rotation
coordinate system.
R
With constant hole-making cycles, P determines the dwell time at the bottom
holes. Together with the call code of the subroutine M98 - the number of the called
subroutines.
Q
In interrupted drilling cycles, Q determines the relative depth of each
working stroke of the tool. In the boring cycle - the shift distance of the boring
tool away from the wall of the machined hole to ensure accurate output
hole tool.
D - tool radius compensation value.
H is the tool length compensation value.
F is the feed function.
S - function of the main movement.
T - a value that determines the number of the tool that needs to be moved to
change position by turning the tool magazine.
N - numbering of UE frames.
/ - frame skip.
(...) - comments in UE.

40.

41.

42.

43.

44.

45.

46. ​​The program consists of frames - this is a separate line of the program and words - the components of the frame.

The frame begins with the letter N - the frame number.
The letters of the word have different meaning and
meaning:
N - frame number.
G - Preparatory
functions. Choose
machine operating modes.
M - Auxiliary functions.
X, Y, Z - Axis points.
T - Tool number.
S - Spindle speed.
F - Submission.

47. N (number) is the designation of the frame number

N (number) is the designation of the frame number
The program consists of a set of commands written in
line, each line is assigned a number.
Numbering is done for convenience.
programming and further work. V
processing, there is a need for
adjusting the program, adding functions or
coordinates due to technological changes.
To insert additional lines
numbering is written with a gap. Frame number is not
affects the operation of the machine.
N25 G01 Z-2 F30
N30 X4 Y4
N35 X8 Y4
N40 X8 Y9

48. Rapid positioning - G00 Rapid positioning

The G00 code is used for rapid movement. This is the maximum
the speed of movement of the working parts of the machine, necessary for fast
moving the tool to the machining position or withdrawing the tool to the zone
security. Modern CNC machines in this mode can develop
speed of 30 meters per minute or more.
The G00 command is canceled the next time a G01 command is entered.
With an accelerated movement of the tool to the part along three axes, it is first better
perform positioning along the X and Y axes, and only then along the Z axis:
N15 G00 X200.0 Y400.0
N20 Z1.5
If the fixed part has no additional protrusions
fastening, and there are no obstacles on the way to the starting point of approach of the tool,
movement can be performed in three coordinates at the same time:
N15 G00 X200.0 Y400.0 Z1.5
The workpiece, installed on the working surface of the machine, has valid
deviations from the nominal size, therefore, when approaching the part along the Z axis,
a safe distance is left, usually 1.5 to 5 mm.

49. Linear interpolation - G01 Linear interpolation

Linear interpolation is moving along
straight line. Code G01 is used for working
movement, its parameter F sets the speed
travel in mm/min.
The G01 code is canceled with
codes G00, G02 and G03.
Example:
N25 G01 X6.0 Y6.0 F80
N35 Y12.0
N45 X8.0 Y14.0

50. Circular interpolation - G02 / G03 Circular / Helical interpolation

Circular interpolation - G02/G03
Circular/Helical interpolation
Functions G02 and G03 are used to move the tool along
circular path (arc), at the feedrate specified by F.
G02 (clockwise) – CW circular interpolation.
G03 (counterclockwise) - counterclockwise circular interpolation
CCW arrows.
There are two ways to form a circular interpolation frame:
specifying the center of the circle using I,J,K;
by specifying the radius of the circle with R.
Most modern CNC machines support both options.
records.
Example:
N50 G03 X0. Y-17. I0. J17.
Example:
N50 G03 X0. Y-17. R17

51. Trajectory Interpolation

52. F - Feed rate definition

F - Feed rate function
Feed rate definition
The feedrate function uses address F, after which
followed by a number indicating the feed rate at
processing. The set feedrate remains
unchanged, until a new numeric
value together with F or the movement mode is not changed when
help G00.
N45 G01 Z-l F40 - travel to a depth of 1 mm at the feed (40
mm/min)
N50 G01 X12 Y22 - tool travel (40 mm/min)
N55 G01 Y50 - tool travel (40 mm/min)
N60 G01 Y50 F22 - tool travel (22 mm/min)
N65 G01 X30 Y120 - tool travel (22 mm/min)
N70 G00 Z5 - Fast Z
N75 X00 Y00 - rapid movement

53. M - Miscellaneous function

Auxiliary functions (or M-codes) are programmed with
address word M. Auxiliary functions
used to manage the program and
electroautomatics of the machine - turning on / off the spindle,
coolant, tool change, etc.
M00 - programmable stop
M01 - stop with confirmation
M02 - end of program
M03 - spindle rotation clockwise
M04 - spindle counterclockwise rotation
M05 - spindle stop
M06 - tool change
M07 - activation of additional cooling
M08 - turn on cooling
M09 - cooling off
M30 - stop and go to the beginning of the control program

54. Security line

A security string is a frame containing G codes that
transfer the control system to a certain standard mode, cancel unnecessary
functions and provide safe work with a control program or
enter the CNC into some standard mode.
Security string example: G40G90G99
The G40 code cancels automatic tool radius compensation (will
discussed in the next lab). Radius compensation
tool is designed to automatically shift the tool from
programmed trajectory. Correction may be active if you are in
at the end of the previous program, you forgot to cancel (turn it off). result
this can be an incorrect tool path and, as
result, damaged part.
The G90 code activates work with absolute coordinates. Although most
processing programs is created in absolute coordinates, there may be cases where
when it is required to perform tool movements in relative
coordinates (G91).
The G99 code specifies the reverse feed.

55. N2 G71 G95 M8 X23 Z11 F0.2

- Cooling is switched on in this block (M8),
the tool moves to point X23 Z11 by
feed rate 0.2mm/rev (F0.2);
G71 - programming in millimeters (G70 programming in inches),
G95 - feedrate in mm/rev (G94 - feedrate of the axes
in mm/min or inch/min).

56. COORDINATE SYSTEM

57. Sample program

N1 T1 S1 1000 F0.2 G95
Turning on the spindle speed S1 1000 (1-range
1000 revolutions is the number of revolutions per minute). Tool
1(T1).
Feed 0.2mm/rev (F0.2). G95 - selects feed mode
mm/rev, (G94 - mm/min).
N2 X11 Z0 E M8
E - fast move, ignores (but does not cancel) the value of F
(valid for one frame only).
M8 - turn on cooling. Tool is moving
at rapid traverse to point X11 Z0
N3 G10
G10 - function constant speed cutting.
N4 U-11 (cut end)
N5 W1 E
N6 U10 E
N7 W-11
N8 U2
N9 W-4
N10 U3
N11 W-3
N12 U7
N4-N12 Tool movements in increments (W - in
Z axis, U - X axis) from the value
previous tool position.
Incremental programming often
applied in the repeat loop (L11) if the program
made up of several details
(for each detail, an approach point is selected
tool and from it movements are programmed
instrument in increments).
N13 G11
G11 - Cancel the constant cutting speed function.
N14 X40 Z0 E M9
Tool withdrawal (to point X40 Z0). M9 - shutdown
cooling.
N15 M2
M2 - the end of the program, while the tool
moves to its original position.
N1 G97 T1 M4 S1000 Turn on spindle 1000
rpm(S1000). G97 - rpm (G96 - constant
cutting speed).
M4 - counterclockwise spindle revolutions (M3 clockwise). Tool 1 (T1).
N2 G0 G95 D1 X11 Z0 F0.2 M8
G0 - rapid move, ignores (but does not cancel)
F value.
Feed 0.2mm/rev (F0.2).
G95 - selects the feed mode mm / rev, (G94 - mm / min).
D1 - tool offset number.
M8 - turn on cooling. Tool
moves at rapid traverse to point X11 Z0.
N3 G1X0
N4 G0 Z1
N5x10
N6 G1 Z-11
N7X12
N8 Z-15
N9X15
N10Z-18
N11X22
N3-N11 Tool movements in absolute
values. G1 - cancels G0 function
N12 G0 X100 Z100 M9
Tool withdrawal (to point X100 Z100). M9 cooling off.
N13 M2
M2 - end of program

58.

59. Preparation of the control program consists of the following steps:

1. Correction of the drawing of the manufactured part:
·
translation of dimensions in the machining plane:
·
choice of technological base;
·
replacing complex trajectories with straight lines and circular arcs.
2.
Selection of technological operations and processing transitions.
3.
Choice of cutting tool.
4.
Calculation of cutting conditions:
·
determination of cutting speed;
·
determination of the speed of rotation of the power drive;
·
determination of the feed rate of the cutting tool.
5.
Determination of the coordinates of reference points of the part contour.
1.
Construction of the equidistant and finding the coordinates of the reference points of the equidistant. Input
starting point of the cutting tool.
2.
Construction of a setup diagram, in which the mutual
the location of the machine components, the workpiece and the cutting tool in front of
start of processing.
3.
Drawing up a map of the preparation of information, which is reduced to a geometric
(coordinates of reference points and distances between them) and technological (cutting conditions)
information.
4.
Drawing up a control program

60.

Types and nature of work on the design of technological processes
processing parts on CNC machines are significantly different from the work,
carried out using conventional universal and special
equipment. First of all, the complexity
technological tasks and the complexity of designing technological
process. CNC machining requires a detailed
technological process built on transitions. When processing on
universal machines do not need excessive detailing. Worker,
maintenance machine, is highly qualified and independently
decides on the required number of crossings and passages, their
sequences. He chooses the required tool himself, assigns modes
processing, adjusts the processing progress depending on the actual conditions
production.
When using CNC, a fundamentally new element appears
technological process - control program, for development and
debugging which requires additional costs of funds and time.
Essential feature process design for machines with
CNC is the need for precise alignment of the automatic trajectory
movement of the cutting tool with the machine coordinate system, the origin
and workpiece position. It imposes Additional requirements To
fixtures for clamping and orienting the workpiece, to the cutting tool.
Expanded technological capabilities of CNC machines cause
some specifics of solving such traditional problems of technological
preparation, as the design of an operational technological process,
part locating, tool selection, etc.