Privacy statement: Your privacy is very important to Us. Our company promises not to disclose your personal information to any external company with out your explicit permission.
As we all know, the purpose of using CNC machine tools is to efficiently process qualified parts. The qualified parts must be products that meet the requirements of the drawings. How can the machine know the requirements of the drawings? This must be told by people. In what way, by what rules and conventions are people telling the machine tool? This requires the development of rules for the programming of numerically controlled machine tools. In other words, we must express the parts' drawing size, process route, cutting parameters, etc., with numerical and machine-readable codes that can be accepted by the CNC machine tool, and then make input media (such as perforated tapes, tapes, cards, etc.) according to the prescribed form of the code. ) Then input the information recorded on the input medium into the numerical control device so that the machine tool can be automatically controlled for processing.
This process from the part drawing to the input media is called CNC machine programming. The programming of CNC machine tools is divided into manual programming and automatic programming. The general steps of manual programming include process processing, coordinate calculation of the motion trajectory, filling in a procedure sheet, preparation of the input media, and program check. The automatic programming process is also carried out according to the above steps, but most of the work is done by a computer or an automatic programmer. According to different input methods, automatic programming is divided into three modes: language input, graphic input and voice input. Common programming languages include APT, SKC-1, and ZCX-1. In order for the machine tool to receive the programmed program, there must be corresponding regulations. These concepts are described separately below.
1, punch tape and code
There are two ways to read information from CNC machine tools: one is manual input mode; the other is automatic input mode. Therefore, there are two types of control media as the carrier of CNC machine tools: one is the punched tape, punched card, tape, disk, etc. when the input is automatic; the other is the keyboard, band switch, manual data input when the console is manually input ( MDI) and so on. Perforated belts are mechanically fixed code holes, are not easily affected by the environment (such as magnetic fields), easy to long-term preservation and reuse, and the program's storage capacity is large, so it is still the main commonly used information input method of many CNC machine tools.
2, block format
When programming a CNC machine tool, first determine the coordinate value based on the pulse equivalent of the machine tool, and then program the NC program according to its program segment format. The so-called program segment refers to the combination of the function "word" required to complete an action. "Word" is a set of code symbols representing a certain function. For example, X2500 is a word indicating that the X dimension is 2500; F20 is a word indicating that the feed rate is 20. The block format refers to the order and expression of each word in a block. There are three commonly used block formats, the fixed sequence block format, the fixed sequence block format with separators, and the word address block format. Since the program segment consists of the function "word", the following describes the common function words first, and then introduces the program segment format.
1) Common function words
In a program segment, in addition to the three-digit number (N×××) consisting of the address character N, the commonly used function words are: ready function word G; coordinate function word X, Y, Z; auxiliary function word M; feed function word F; spindle speed function word S and tool function word T, etc.
(1) Prepare the function word. The preparation function word is preceded by the address character G, followed by two digits (G00-G99). The provisions of the ISO 1056 standard for preparing function G are shown in Table 1. The standard in our country is JB3208-83, which stipulates that ISO1056-1975(E) is equivalent. These preparation functions include: specification of coordinate movement or positioning method; designation of interpolation method; selection of plane; designation of machining such as thread, tapping, fixed cycle, etc.; description of spindle or feedrate; tool offset or tool offset Designation etc. When designing a numerical control system for a machine tool, it is necessary to select a part of preparation functions that are compatible with the system in the G functions specified in the standard, as a basis for hardware design and programming. The "not specified" preparation function in the standard can be used as a special preparation function for the system if necessary.
Table 1 Provisions for preparation function G of the ISO standard
Code
Features
Instructions
Code
Features
Instructions
G00
Point positioning
G57
XY plane linear displacement
G01
Linear interpolation
G58
XZ plane linear displacement
G02
Clockwise arc interpolation
G59
YZ plane linear displacement
G03
Counterclockwise arc interpolation
G60
Accurate positioning (fine)
Positioning according to specified tolerances
G04
time out
Suspend for a period of time before executing this paragraph of procedure
G61
Accurate positioning (in)
Positioning according to specified tolerances
G05
Not specify
G62
Accurate positioning (rough)
According to the provisions of the larger tolerance positioning
G06
Parabolic interpolation
G63
Tapping
G07
Not specify
G64-G67
Not specify
G08
Automatic acceleration
G68
Internal corner tool offset
G09
Automatic deceleration
G69
Outer Corner Tool Offset
G10-G16
Not specify
G70-G79
Not specify
G17
Select XY plane
G80
Cancel canned cycle
Cancel the canned cycle of G81-G89
G18
Select ZX plane
G81
Drilling cycle
G19
Select YZ plane
G82
Drilling or reaming cycles
G20-G32
Not specify
G83
Drilling deep hole circulation
G33
Cutting pitch spiral pattern
G84
Tapping cycle
G34
Cutting increase pitch spiral pattern
G85
Boring cycle 1
G35
Cut Pitch Swirl
G86
Boring cycle 2
G36-G39
Not specify
G87
Boring cycle 3
G40
Cancel tool compensation
G88
Boring cycle 4
G41
Tool Compensation - Left
According to the direction of movement,
The tool is on the left side of the workpiece
G89
Boring cycle 5
G42
Tool Compensation - Right Side
According to the direction of movement,
The tool is on the right side of the workpiece
G90
Absolute value input method
G43
Positive compensation
The tool compensation value is added to the given coordinate value
G91
Incremental value input method
G44
Negative compensation
Tool offset value is subtracted from the given coordinate value
G92
Prefabricated
Modify size words
No movement
G45
Used for tool compensation
G93
Feed rate given by the countdown time
G46-G52
Used for tool compensation
G94
Feed rate (mm/min)
G53
Linear displacement function canceled
G95
Feed rate
(mm/r (spindle))
G54
X axis linear displacement
G96
Spindle constant speed
(m/min)
G55
Y-axis linear displacement
G97
Spindle speed
(r/min)
Cancel the designation of G96
G56
Z axis linear displacement
G98-G99
Not specify
(2) coordinate function word. The coordinate function word (also referred to as the dimension word) is used to set the displacement of each machine coordinate. It generally uses X, Y, Z, U, V, W, P, Q, R, A, B, C, D, E, etc., followed by the address character followed by "+" (positive) or " — (negative) and a series of digits. This number is generally expressed in units of system pulse equivalents and does not use a decimal point. When there are multiple size words in a block, they are generally arranged in the order of the above address characters.
(3) Feed function word. The feed function word is used to specify the speed of the tool relative to the workpiece motion. Its unit is generally mm/min. When the feed speed is related to the spindle speed, such as thread, tapping, etc., the unit used is mm/r. The feed function word is preceded by the address character "F" followed by a series of numeric codes. Specifically specify the following methods:
1 Three-digit code method: F followed by three digits, the first one is the integer bit of feedrate plus “3”, and the last two digits are the first two significant digits of the feedrate. For example, the feed rate of 1728mm/min is specified by F717; the feed rate of 15.25mm/min is specified by F515; the feed rate of 0.1537mm/min is specified by F315.
2 two-digit code method: For the two-digit code followed by F, specifies the speed table corresponding to 00-99, except for 00 and 99, when the number code increases from 01 to 98, the speed is increased in an equal relationship of. The 20th root of the scale factor is 10 ( ≈ 1.12), that is, the adjacent speed increases by about 12% from the previous speed. For example, F20 is 10 mm/min, F21 is 11.2 mm/min, F54 is 50 mm/min, and F55 is 560 mm/min. The comparison of the feed rate of F00-F99 is shown in Table 2.
Table 2 Two-digit digital feed rate comparison table mm/min
Code
speed
Code
speed
Code
speed
Code
speed
Code
speed
00
stop
20
10.0
40
100
60
1,000
80
10000
01
1.12
twenty one
11.2
41
112
61
1120
81
11200
02
1.25
twenty two
12.5
42
125
62
1250
82
12500
03
1.40
twenty three
14.0
43
140
63
1400
83
14000
04
1.60
twenty four
16.0
44
160
64
1600
84
16000
05
1.80
25
18.0
45
180
65
1800
85
18000
06
2.00
26
20.0
46
200
66
2000
86
20000
07
2.24
27
22.4
47
224
67
2240
87
22400
08
2.50
28
25.0
48
250
68
2500
88
25000
09
2.80
29
28.0
49
280
69
2800
89
28000
10
3.15
30
31.5
50
315
70
3150
90
31500
11
3.55
31
35.5
51
355
71
3550
91
35500
12
4.00
32
40.0
52
400
72
4000
92
40000
13
4.50
33
45.0
53
450
73
4500
93
45000
14
5.00
34
50.0
54
500
74
4500
94
50000
15
5.60
35
56.0
55
560
75
5600
95
56000
16
6.30
36
63.0
56
630
76
6300
96
63000
17
7.10
37
71.0
57
710
77
7100
97
71000
18
8.00
38
80.0
58
800
78
8000
98
80000
19
9.00
39
90.0
59
900
79
9000
99
high speed
3 One-digit code method: For numerically controlled machine tools with less speed limit, F can be followed by a digit, ie 0-9 to correspond to 10 preset speeds.
4 Direct designation method: Just like the coordinate displacement amount in the dimension word, the required feedrate is written directly after F in the predetermined unit.
(4) Spindle speed function word. The spindle speed function word is used to specify the spindle speed in r/min. It is prefixed by the address character S, followed by a string of digits. It can use the three-digit, two-digit, one-digit code method or direct designation method as the feed function word headed by F. The meaning of the numbers, the method of splitting the block, and the comparison table and feed function are common. Just change the unit to r/min.
(5) Tool function word. When the system has a tool change function, the tool function word is used to select the replaced tool. The tool function word is preceded by the address symbol T, followed by two digits, which represents the tool number.
(6) Auxiliary function word. The auxiliary function word is preceded by the address symbol M, followed by two digits (M00-M99). The provisions of the ISO 1056 standard for the auxiliary function M are shown in Table 3. This table is equivalent to the provisions of the Chinese standard JB3208-83 M function. These auxiliary functions include: specifying the spindle's steering and start and stop; specifying the system's coolant on and off; specifying the clamping and release of the machine; specifying the fixed line and angular displacement of the table, etc.; indicating that the program is stopped or the tape ends. . Some unspecified auxiliary functions in the standard can be selected for special purposes. When designing a machine tool numerical control system, it is necessary to select some of the auxiliary function codes required by the system in the M code specified in the standard as the basis for the relevant circuit design and future programming.
Table 3 Provisions of the ISO standard for auxiliary functions M
Code
Features
Instructions
Code
Features
Instructions
M00
Program stop
Spindle, coolant stop
M32-M35
Not specify
M01
Planned stop
Need button operation to confirm line feed
M36
Feed speed range 1
Do not stop gear shift range
M02
End of program
Spindle, coolant stop, machine reset
M37
Feed speed range 2
M03
Spindle rotates clockwise
Right-hand thread into the workpiece
M38
Spindle speed range 1
Do not stop gear variable speed range
M04
Spindle counterclockwise
Right-hand thread exits the workpiece
M39
Spindle speed range 2
M05
Spindle stop
Cooling fluid off
M40-M45
Not specify
Can be used for gear shifting
M06
Change knife
Manual or automatic tool change, excluding tool selection
M46-M47
Not specify
M07
Coolant No. 2 opens
M48
Cancel M49
M08
Coolant No. 1 open
M49
Manual speed correction fails
Return to programmed speed or feedrate
M09
Coolant stops
M50
Coolant No. 3 opens
M10
Clamping
Workbench, workpiece, fixture, spindle, etc.
M51
Coolant #4 on
M11
release
M52-M54
Not specify
M12
Not specify
M55
The tool is linearly displaced to a predetermined position 1
M13
Spindle rotates clockwise, coolant opens
M56
The tool is linearly displaced to the predetermined position 2
M14
The spindle rotates counterclockwise and the coolant opens
M57-M59
Not specify
M15
Positively moving fast
M60
Change workpiece
M16
Reverse fast
M61
Workpiece linear only to the predetermined position 1
M17-M18
Not specify
M62
The tool is linearly displaced to the predetermined position 2
M19
Spindle exact stop
Spindle slows down to a predetermined angle to stop
M63-70
Not specify
M20-M29
Not specify
M71
The workpiece rotates to a predetermined angle 1
M30
Tape end
Spindle coolant stop, machine reset, tape rewind, etc.
M72
The workpiece rotates to a predetermined angle 2
M31
Temporary failure of the interlock mechanism
M73-M99
Not specify
2) Block format
Different CNC machine tools stipulate different program segment formats depending on the number of functions, the complexity of the numerical control device, and whether the programming is simple and intuitive. If the format of the input program does not comply with the regulations, the CNC will report an error. Common segment formats include fixed sequence, fixed sequence with separator TAB, and word address format.
In the early days, due to the simplicity of numerical control devices, a block format called fixed sequence was specified, for example:
Programs compiled in this format have no address code for each word. The order of the words is the order of the addresses. The order of each word and the number of character lines are fixed (regardless of whether a certain word is needed or not), even if it matches the previous paragraph. Compared to certain words, they have to be rewritten and cannot be omitted. When the effective number of digits of a word is small, the required number of digits must be supplemented with "0" in the front. Therefore, the length of the perforated belt occupied by each program segment is constant. The control system of this format is simple, but the programming is not intuitive, the perforated belt is longer and the application is less.
Later, a fixed sequential segment format with the separator symbol TAB was produced. The basic form is the same as the above format except that the words are separated by a separator to indicate the order of the addresses. The above example can be written as:
Due to delimiters, unwanted words or words that are identical to the upper block can be omitted, but the corresponding delimiter must be retained (ie the number of delimiters in each block is equal). This format is better than the former one and is often used for numerically-functional devices such as wire-cutting machines and certain CNC milling machines. The "3B" or "4B" format commands used in CNC wire-cutting machine tools in China are typical fixed sequential formats with separate symbols. The general representation of its 3B format is:
BXBYBJGZ
Its specific meaning is as follows:
X
B
B
Y
J
G
Z
x coordinate value
Delimiter
y coordinate value
Delimiter
Count length
Counting direction
Processing instructions
The most commonly used at present is the word address block format (also called variable block format using address characters). Blocks expressed in this format, each word is preceded by an address code to identify the address, that is, as previously described by the letter and data of the various functional words, so for the unwanted words or with the previous section The same word can be omitted. Each word in a program segment can also be arranged out of order (but for programming convenience, often in a certain order). Although using this format to increase the address into the circuit, but the programming is intuitive and flexible, easy to check, can shorten the punch tape, widely used in car, milling and other CNC machine tools.
Program segments for word address formats can often be represented in general form. Such as:
N134 G01X — 32000Y + 47000F1020S1250 T16 M06 (1—1)If formula (1-1) is written in the general form, it is:
N3G2X ± 23Y ± 23F4S4T2M2 (1 - 2)
In the formula
November 11, 2024
Письмо этому поставщику
Privacy statement: Your privacy is very important to Us. Our company promises not to disclose your personal information to any external company with out your explicit permission.
Fill in more information so that we can get in touch with you faster
Privacy statement: Your privacy is very important to Us. Our company promises not to disclose your personal information to any external company with out your explicit permission.