GB/T 8870-1988 Data format for digital control point, linear motion and contour control systems for machine tools
Some standard content:
National Standard of the People's Republic of China
Numerical control of machines-Data formatfor positioning, line motion and contouringcontrol systems
UDC621.9-503
GB 8870--88
This standard is equivalent to the international standard ISO6983/1-1982 "Numerical control of machines-Program format and address word definition-Part 1: Data format for positioning, line motion and contouring control systems". 1 Subject content and scope of application
This standard describes the word address program format of machine tool processing programs obtained on punched tape, magnetic media or from remote data sources. This standard only deals with variable program segment formats and does not specify the type of machine tool. This standard does not guarantee the interchangeability of processing programs between different machine tools. Appendix D (reference) lists some additional conditions necessary to ensure this interchangeability.
This standard sets out requirements for the data format of point, linear motion and contour control systems used in the digital control of machine tools, which helps to coordinate system design, minimize the number of program types required for part processing drawings, promote the unification of programming technology, and make the input programs interchangeable between CNC machine tools of the same type, processing technology, function, size and accuracy. This standard does not apply to the digital control of flame cutting machines and plotters used in the shipbuilding industry. 2 Reference standards
GB1988 Seven-bit coded character set for information processing exchange GB1990 Size and position of holes in punched paper tape for information processing exchange GB1991 Method for representing seven-bit coded character set on punched paper tape for information processing exchange GB3147 Unpunched paper tape for information processing
JB3051 Nomenclature of coordinates and movement directions of numerically controlled machine tools JB3208 Codes for preparatory function G and auxiliary function M in the program segment format of punched tape for numerically controlled machine tools 3 Program format
3.1 The machining program is composed of program segments, which are composed of several words, and each word is a specific instruction of the control system. 3.2 The "end of program segment" character should be placed at the end of each program segment and before the first program segment. 3.3 The "start of program" character should be placed before all control data including the "end of program segment" character, and it is recommended to be used as the "absolute rewind stop" character.
3.4 All letters, numbers and special characters should comply with Appendix A (supplement). These characters can be printed when printing the processing program. The "non-printing" characters in Appendix A (supplement) are ignored by the control device, except for the LF/NL (end of program segment) characters. 3.5 If any group of characters does not need to be processed by the control device, the group of characters should be in brackets, but it cannot contain ", " or "%" characters.
Approved by Guohao Machinery Industry Committee on September 25, 1987 and implemented on July 1, 1988
GB 8870-88
This group of characters can be used for display, such as instructions to operators. 3.6 When it is necessary to identify the processing program, the identification mark should be after the "program start" character and before the first "program segment end" character. If there are letters in the identification mark, all identification marks should be in brackets. If the program number is larger than the storage and display capacity of the system, the least significant digit is displayed.
3.7 The alignment code must be used at the place where the processing is allowed to start in the program. When used, the code should comply with the provisions of Article 5.3.1. The alignment function character "," can be used as an intermediate rewind stop character. 3.8 The "" (delete) character is the "skip optional program segment" function selected and confirmed by the operator. When used, this character should be in front of the "sequence number" character.
3.9 The general classification of formats is used to list the performance of systems and machine tools. This classification is called the "general format classification" and its description is in Appendix B (Supplement).
3.10 The data classification in the program segment is used to specify the programming details of the system and machine tool structure. This classification is called the "detailed format classification" and its description is in Appendix C (Supplement). 3.11 Both metric and imperial length units can be used. 3.11.1 When the system can use two measurement units to prepare the machining program, the preparation function code should indicate whether its code data is metric or imperial value.
3.11.2 The control mode is selected by one of the following G codes: G70——Inc. data input.
G71 Metric data input.
4 Composition of the format
4.1 The composition of the program segment is as follows:
sequence number word;
b. data word.
4.1.1 When printing the processing program text, the optional separator symbol should be inserted between two words, but it is ignored by the control system. 4.2 Data words should be in the following order and cannot be repeated in a program segment. Although existing control systems allow non-dimension word repetition, this repetition should not be used to maximize the interchangeability of processing programs. a: push function word;
b. dimension word. The dimension words are arranged in the following order: X, Y, Z, U, V, W, P, Q, R, A, BC; "interpolation or thread cutting lead" words I, J, K. When these words are used only to specify a group of coordinate axes, they should be placed after the group of words. These words should comply with the provisions of Chapter 6 or Chapter 10; d. "feed function" word. The feed function word used for one or several coordinate axes should be placed after the last dimension word or interpolation parameter word that uses it. These words shall comply with the provisions of Article 5.3.3; e. "Spindle speed function\word;
f, "Tool function" word;
g. "Auxiliary function" word.
4.3 In a specific program segment, some words can be omitted, and the status of the machine tool related functions represented by the omitted words has not changed. Therefore, the "end of program segment" character can be used after any complete word. For instructions that only work in one program segment, 5 words must be repeated when necessary
5.1 General description
5.1.1 The address character is the first symbol of the word. When an algebraic symbol is required, it is followed by an algebraic symbol and then digital data. 5.1.2 The address character shall comply with the provisions of Appendix A (Supplement). 5.1.3 The position of the hidden decimal point is specified in the detailed format classification, see Appendix C (Supplement). All control systems should allow hidden decimal 4
point programming.
5.1.4 The system can use explicit decimal point programming. GB 8870-88
In any processing program, the implicit decimal point format and the explicit decimal point format cannot be mixed. In the explicit decimal point format, the word without a decimal point should be understood as an integer. The identification method of the explicit decimal point format is specified in the detailed format classification, see Appendix C (Supplement). 5.1.5 In order to reduce the amount of data in the implicit decimal point format, the leading zero can be omitted, and it should be specified in the detailed format classification (see Appendix C (Supplement).
In the explicit decimal point format, the leading zero and the decimal point before the decimal point Trailing zeros after a decimal point can be omitted. In both decimal point formats, numbers consisting of only zeros should be represented by at least one zero. :5.2 Dimension words
5.2.1 Dimension words can be absolute and incremental (relative). The control mode should be selected according to one of the following G codes: G90-absolute dimension
G91-incremental dimension.
5.2.2 All linear dimensions are expressed in millimeters (or inches) and their decimals. 5.2.3 Angular dimensions are expressed in degrees or revolutions and their decimals. 5. 2.4 The algebraic sign (ten or one) is part of the dimension word and is placed after the address character and before the numeric character. If the algebraic sign is omitted, it is considered to be a positive sign (ten). For negative absolute dimensions and for negative movement of incremental dimensions, a negative sign (one) must be used. 5.2.5 The resolution of linear and angular dimensions used in the program is specified by the detailed format classification (see Appendix C (Supplement)). 5.3 Non-dimension words
5.3.1 Sequence number
The number of digits of the sequence number is specified by the detailed format classification [see Appendix C (Supplement)]. If the number of digits of the sequence number word in the machining program is greater than the number of digits specified by the control device, the least significant digit is displayed. At the place in the program where machining is allowed to start, the address character of the sequence number must be replaced by an alignment function code. 5.3.2 Preparation function
The preparation function is represented by a code number, and its provisions are shown in JB3208. 5.3.3 Feed function
The number of digits of the feed function is specified by the detailed format classification (see Appendix C (Supplement)). Select 5.3.3.1 to 5.3.3 from the following preparation function G codes.4 feed function types. See JB3208. G93 time countdown;
G94—feed per minute;
G95—feed per revolution.
5.3.3.1 When the feed is independent of the spindle speed, the sagittal motion should be directly expressed in numbers in units of millimeters per minute (or inches per minute).
5.3.3.2 When the feed is related to the spindle speed, the sagittal motion should be directly expressed in numbers in units of millimeters per revolution or inches per revolution. 5.3.3.3 When the feed is only used for rotary motion, the sagittal motion should be directly expressed in numbers in units of degrees per minute. 5.3.3.4 When the linear and rotary coordinates can be interpolated in a linked manner and are independent of the spindle speed, the speed of the sagittal motion can be expressed by the feed instruction. The feed instruction is the inverse of the time to execute this program segment and is equal to the vector speed [expressed in millimeters (or inches) per minute] divided by the vector distance of the true trajectory [expressed in meters (or inches)]. If the above situation requires a change in the detailed format classification, the format change of F-ology should be explained. "Present record (supplement). 5.3.3.5 Prepare function G00 code for rapid positioning (see JB3208). If the F word is used in the case of curved motion, the code should be specified in the detailed format classification and can be defined as modal or non-modal. 5.3.3.6 When any combination of coordinate axes are linked or sequentially moved with the main coordinate axis, the F character is used as the address character of the feed word. When the coordinate axis unrelated to the main coordinate axis moves, the E character is used as the address character of the feed word. 5
GB 8870--88
5.3.3.7 The feed function can be represented by a two-digit code number that increases as the feed speed value increases. 5.3.4 Spindle function
The number of digits for the spindle function is specified in the detailed format classification (see Appendix C (Supplement)). Use the following preparatory function G code to select the type of spindle speed function, see JB3208. G96—
Constant linear speed;
G97——RPM.
5.3.4.1 When RPM is represented by a number, the number directly represents the number of spindle revolutions per minute. 5.3.4.2 When When a constant linear speed is represented by a number (see 11.1), the word represents the number of millimeters (or inches) per minute. 5.3.4.3 The spindle speed function can be represented by a two-digit code number that increases as the spindle speed value increases. 5.3.5 Tool function
The T word can be used to select the tool, and the T word can also be used to select tool compensation-offset. When other words are used to select tool compensation-offset,
can use the D word. If the T word and D word are used, they should be specified in the detailed format classification (see Appendix C (Supplement). 5.3.6 ' Auxiliary function
The auxiliary function is represented by a code number, and its See JB3208 for regulations.6 Programming method of interpolation
6.1 Rules
Interpolation is performed on a predetermined part of a given curve. The interpolation part is called an "interpolation segment" and can be given by one or several program segments. The data required to determine an interpolation segment should satisfy one or more of the following rules: 6.1.1 Use an appropriate G code to determine the function type of the curve, i.e., a straight line, circle or parabola. 6.1.2 The starting point of each interpolation segment coincides with the end point of the previous interpolation segment, so the point does not need to be repeated in the new program segment. The coordinates of subsequent points on the interpolation segment must be given by a separate program segment. , and use dimension addresses such as X, Y or Z. 6.1.3 Interpolation parameters should be addressed with I, J and K, and they are used to determine the geometric properties of the curves defined by various interpolation types. 6.1.4 When the interpolation parameter word requires an algebraic sign, the algebraic sign should be after the address character and before the numeric character. If the algebraic sign is omitted, it is assumed to be a positive sign.
6.2 Linear interpolation
A linear interpolation segment should be defined by a program segment that includes: G function word (if not currently enabled); a.
G01---Linear interpolation.
b. The end point coordinates are expressed in dimension words (see 5.2). The example in Figure D1 shows the geometric properties of the interpolation segment and gives an example of the programmed coordinate values. 6.3 Circular interpolation
6.3.1 Circular interpolation defines a circular interpolation segment on a plane parallel to one of the three main coordinate planes. The example in Figure D2 shows the geometric properties of a typical circular interpolation segment and gives an example of programmed coordinate values. 6.3.2 Circular interpolation along a given interpolation segment (up to the entire circle) should be programmed in one block. As an acceptable method, in the programming of circular interpolation, an interpolation segment is limited to one quadrant for each block. 6.3.3
The block should include:
G function word (if not currently enabled); a.
G02 - clockwise circular interpolation,
G03 - counterclockwise circular interpolation.
The end point coordinates can be expressed in absolute or incremental (relative) dimensions and addressed with dimension addresses, such as X, Y or 2; b.
Interpolation parameters are addressed with I, J and K.
6.3.5 Regardless of whether the dimension word is incremental or absolute, I, J and K are the incremental (relative) dimensions of the center point relative to the start point of the arc. 6
I—dimension parallel to the X axis;
J—dimension parallel to the Y axis,
K—dimension parallel to the Z axis.
GB 887088
Circular interpolation does not require algebraic symbols. Any algebraic symbol characters are ignored in the interpolation word. As an acceptable method, I, J and K can be programmed in the same way as dimension words. 6.3.6 When circular interpolation and linear interpolation are combined, the circular interpolation plane should be selected by the preparation function (see JB3208). The interpolation program segment is as specified in 6.3.1 to 6.3.5, plus a dimension word. The dimension word is the end point of the linear motion, and its interpolation parameters are addressed with the dimension address parallel to the linear motion (I, and K). The given value is the linear motion corresponding to each arc of the circular arc. 6.3.7 If one of the three main reference planes is selected by the preparation function G, the code should be selected from JB3208. 6.4 Parabolic interpolation
6.4.1 Parabolic interpolation A parabolic interpolation segment can be defined in any plane. The method of defining an interpolation interval using three points is used for programming. The intermediate point and the end point should be programmed in two blocks. The example in Figure D3 shows the geometric properties of an interpolation segment and gives an example of the meaning of the programmed coordinate values. The first block should include:. G function word (if not currently enabled); G06 - parabolic interpolation.
b. Intermediate point coordinates.
The following block is the end point coordinates.
The coordinates of all points can be expressed in absolute or incremental dimensions and can be addressed with any dimension address (such as X, Y or Z). 6.4.2 Interpolation segments can also be defined in one block using interpolation parameters. This block includes: a. Preparation function G (if not currently enabled), G06 - parabolic interpolation.
The end point coordinates are expressed in absolute or incremental dimensions and can be addressed with any dimension address, such as X, Y or Z; b.
C. Interpolation parameters are addressed with I, J, K.
I, J, K are the coordinates of the intersection of the tangents.
7 Tool Length Offset and Tool Offset
7.1 When there is a tool length offset, it can cause the tool to move a distance on the Z axis, which is equal to the offset value entered into the control device. The offset value and its sign can be written using the manual data input switch or other methods. 7.2 When there is a tool offset (usually used for lathes), it can cause the tool to move a distance along the specified coordinates (usually X and Z), and its value is written in the manner specified in 7.1.
7.3 Offset movement can be achieved without preparing a function code. Offset movement can be achieved by selecting the number of tool offset in the tool function word, and the tool offset can be erased when its value is zero.
8 Tool radius or diameter offset
8.1 When there is a tool radius or diameter offset, the tool can move the same distance along the X-axis and Y-axis. Its value should be pre-entered into the control device (half for diameter offset). The offset distance and its sign can be written using a manual data input switch or other methods. 8.2 In the program segment with tool offset, a preparation function code should be formed. According to the provisions of JB3208, use G43 (positive tool offset) and G44 (negative tool offset) to prepare the function code, and add its offset value to the coordinate dimension command or subtract it from the coordinate dimension command, and use G40 to cancel the tool offset.
9 Tool compensation
9.1 When the control system has tool compensation function, the tool path can be modified according to the actual tool size. Tool compensation is used for wheel wrist control, linear interpolation and circular interpolation. The compensation parameters can be written into the control system memory by manual data input or other methods. When the ID address is already in use, the T word can be used to identify the location of the memory. The compensation range is specified in the control system specification. Tool compensation can be used in a series of circular interpolation program segments. However, there is no compensation in the program segments cancelled and introduced by the circular interpolation program segments.
9.2 The control system should have the preparation function G40. The program segments of G41 and G42 and the subsequent program segments are formed until G40 is read out. Before programming another T word or D word, the original offset can be erased by using G40. 10 Thread cutting
10.1 When the control system has thread cutting performance, the required data are coordinate motion, lead and preparation function code. 10.2 The state at the completion of program recovery is the preparatory function for constant lead thread cutting. 10.3 The X, Y and Z dimension characters shall be used as specified in 5.2. 10.4 The address character used for the X axis lead is 1, the Y axis is J, and the Z axis is K. The lead size is expressed in millimeters (or inches) per spindle revolution and its decimals.
The number of digits of the lead is specified by the detailed format classification (see Appendix C (Supplement)), and algebraic symbols are not required. 10.5 The feed function is not required for constant lead thread cutting, so it is not programmed. 10.6 For variable lead threads, I, J and K shall be the initial pitch size. The rate of increase or decrease per thread revolution is expressed in square millimeters per revolution (or square inches per revolution) and is addressed with the academic symbol F. If F is used as above, it should be specified in the detailed format classification. 11 Constant Linear Speed
11.1 When the control system has constant line speed performance, this performance is represented by a preparatory function code, and its constant line speed value is given by the S word (see 5.3.4).
11.2 Preparatory function G96 is used to start constant line speed operation, and G97 restores the S word to the "revolutions per minute\" state. 11.3 If it is necessary to limit the spindle speed, use G92 and S word programming. The number of the S word is in revolutions per minute. The maximum allowable spindle speed is determined by the preparatory function G92 and S word. The program should be programmed in the program segment before the program segment containing the call to constant line speed G96. 12 Pause
12.1 The delay between movements should be programmed in a separate program segment containing G04, and the duration is specified by the F word. If G94 is valid, the delay time is seconds; if G75 is valid, the delay time is spindle revolutions. number. The resolution of the F word is 0.15 or 0.1 revolution, or as specified by the detailed format classification. 12.2 The delay can be determined by other methods.
In a program segment without dimensional data and feed data, the G04 word is used to start a pause, the duration of which is controlled by a fixed device or an adjustable device adjusted by the operator. 13 Recovery state
13.1 After M02 (end of program) or M30 (end of data) is read, the system should be in the operating state after power is turned on. Exceptions should be specified in the detailed format classification.
13.2 Point and linear motion control
The initial state of the control system after power is turned on is: GOO Point
G40 Tool compensation/tool radius offset cancel G71
Metric data
Return cycle cancel
G90 Absolute dimension data
G94 Feed per minute
13.3 Contour control other than turning
The initial state of the control system after power-on is: Go1
Linear interpolation
XY plane
Tool compensation/tool radius offset cancel
Metric data According to
Fixed cycle cancellation
Absolute dimension data
Feed per minute
Contour control for turning
The initial state of the control system after power-on is: G01
Linear interpolation
Tool compensation/tool radius offset cancellation
Metric data
Absolute dimension data
Feed per minute
Revolutions per minute
GB8870-88
GB 8870--88
Appendix A
Character code table
(Supplement)
A1 The character code table in this appendix is based on GB1988. The character code includes a parity bit on the eighth information channel (for even parity). The characters in this appendix are only those used in machine tool numerical control. Table A1 Address characters
GB 1988
Angular dimension about X axis
Angular dimension about Y axis
Angular dimension about Z axis
Second tool function\
Second feed function\》
First feed function\
Preparation function\
Not specified
Interpolation parameters or thread lead parallel to X axisInterpolation parameters or thread lead parallel to Y axisInterpolation parameters or thread lead parallel to B axisNot specified
Auxiliary function
Sequence number
Parallel to X axis Third dimension 3
Third dimension parallel to axis 3
Third dimension parallel to Z axis 3
Spindle speed function
First tool function
Second dimension parallel to X axis 1
Second dimension parallel to Y axis 1)
Second dimension parallel to Z axis 1)
Basic X dimension
Basic Y dimension
Basic Z dimension
Note: 1) When these characters are not used as specified above, they will become unspecified characters and can be used for special purposes when needed. 2) Address character F can be used in dwell and in the lead addition or subtraction ratio of variable lead thread. 3) These characters can be used as parameters for special calculations, such as radius R used in constant linear speed. 10
GB1988wwW.bzxz.Net
GB1988
GB 8870—88
Digital characters
Digit 0
Digit 1
Digit 2
Digit 3
Digit 4
Digit 5
Digit 6
Digit 7
Digit 8
Digit 9
Other characters
A print character
Start of program
Control pause
Control recovery
Decimal point
Skip optional program segment
Alignment function
Table A4 Other characters - non-printing characters
GB1988
Separator
End of program segment
General format classification includes the following two groups of characters: Two letters
B1 The first group includes two alphabetic characters:
B1. 1 P——Point
L——Point and linear motion
D-——Point and linear motion and contour
C—Contour
B1.2M-Metric measurement unit
I——English measurement unit
GB8870--88
Appendix B
General format classification
(Supplement)
Three digits
Indicates the number of linked movements
Indicates the number of movements controlled by dimension words
Indicates the number of movements controlled by numbers and symbols N—The control device can accept both metric and imperial measurement units B2 The second group includes three digits, indicating the geometric characteristics of the machine tool and control system B2.1 The first digit indicates the number of movements controlled by numbers and symbols (i.e., by limit switches). B2.2 The second digit indicates the number of movements controlled by dimension words. B2.3 The third digit indicates the number of linked movements. Example: General format classification: The control system represented by FM322 is: P point position
M—Metric measurement unit
3——A control system controls three movements
2———Two digitally controlled movements
One or two linked positioning movements
Appendix C
Detailed format classification
(Supplement)
Detailed format classification specifies the words and their lengths required by the system, and specifies the characters used when programming in detail, and the order is as follows. 12
C1 The program start character is represented by "%"
The alignment function character is represented by ":"
The optional program segment character is represented by "/" The decimal point is represented by "DS"
GB8870-88
C2 In the system, any letter can be used as the address of the word and recorded in the order specified in Chapter 4. C2.1 Each dimension word is followed by three digits after the address character; the first zero indicates that the leading zeros may be omitted, the second digit indicates the number of decimal places before the decimal point, and the last digit indicates the number of decimal places after the decimal point. If algebraic symbols are required, a positive sign (ten) should be added between the address character and the first digit.
C2.2 Non-dimension words given in decimal, such as interpolation parameters, feed and spindle speed functions, may be coded in the same manner as dimension words. C2.3 Other non-dimension words may have two digits after the address character. If the leading zeros may be omitted, the first digit is zero and the last digit indicates the maximum number of digits in the word.
C3 If a change in a condition changes the detailed format classification of a word, the change should be explained according to the condition. C4 The end of a block is indicated by an asterisk "*". Example: The program format does not specify a space character. The spaces between the elements in this example are only for clarity of the text. %:/DS N03 G02 X+053Y+053 Z+053 F031 S04 T04 M02* (the F word of the pause condition becomes F022)
The detailed format classification is the decimal point, program start, alignment function and skip optional block properties, the meaning of the numbers after the leading zero in the data word.
Three-digit sequence number
Two-digit preparation function
X dimension with algebraic sign, five digits to the left of the decimal point and three digits to the rightY and Z dimensions are the same as the X dimension description
Four-digit feed rate, three digits to the left of the decimal point and one digit to the right, in the pause In the stop program segment, the number is changed to two digits on the left and two digits on the right of the decimal point. Four-digit spindle function
Four-digit tool function
Two-digit auxiliary function
Appendix D
Instructions on the interchangeability of paper tapes
(reference)
D1 The following is a user's guide to making paper tapes interchangeable between different machine tools and control systems. It must be specified that the machine tools have the same or similar structure, such as the scope of work, and the control system should have the same program format classification. D2 In the case of different complexity The possibility of tape interchangeability between different machine tools is very small. For example, a multi-spindle machine tool or a lathe with variable lead thread cutting mode.
The degree of interchangeability depends on the similarity of the machine tool functions, processing range, speed range, power, coordinate axis geometry, preparation functions, auxiliary functions, tool functions and other factors. The dynamic characteristics of the machine tool coordinate axes should be considered, such as maximum speed step capability and corner capability. D3 The machine tool function codes (such as M, S, T codes) should be analyzed to ensure that the required machine tool functions can be achieved, including the initial sequence of auxiliary codes such as tool change, clamping, pallet reciprocation, spindle, etc. When the "optional stop" code (M01) is included in the data program segment, the program segment should have spindle speed change or tool indexing to be manually implemented on the machine tool. When the function must be operated manually, the "optional stop" condition should be selected. D3.1 The programmer must recheck the feed rate and spindle speed codes to determine whether they can be correctly operated between interchangeable systems. 13
GB 8870—88
D3.2 Certain non-programmed functions controlled by the operator, such as mirroring, axis interchange, tool compensation, floating zero or zero offset, etc., should be controlled.
D4 The G and M codes used, especially those that are not clearly defined, must be checked for interchangeability. D5 Some control systems allow multiple preparatory function words in one program. For maximum interchangeability, only one preparatory function word is programmed per program segment.
P,(xo, o, z.)
DP(,,t)
Figure D1 Linear interpolation example
Table D1)
Use end point (GO1XYZF)
Absolute dimension
Incremental dimension
Z= z1 zo
Tip: This standard content only shows part of the intercepted content of the complete standard. If you need the complete standard, please go to the top to download the complete standard document for free.