2.5 Programming Functions: (Mm/min or Inch/min) (Mm/rev or Inch/rev)
2.5 Programming Functions: (Mm/min or Inch/min) (Mm/rev or Inch/rev)
2.5 Programming Functions: (Mm/min or Inch/min) (Mm/rev or Inch/rev)
5 Programming Functions
2.5.1 Feed Function
The function of deciding the feed rate is called the feed function. Feedrates can be specified by the amount of feed of the tool
per minute (mm/min
N=1000v/D
When a workpiece should be machined with a tool 100 mm in diameter at a cutting speed of 80 m/min, the spindle speed is approximately 250 rpm Hence the following command is required: S250;
2.5.3 Tool Function tools can be selected on the machine : a numerical value following address T
T; M06 T;
T M06;
2.5.4 Dimension Function specify the movement of the programming axes Dimension words: X,Y, Z ... Codes
The programmer must check in the programming manual () for the specific machine to find the list of G codes and how each one is handled
G-word
G00 G01 G02 G03 G04 G17 G18
Mode
Modal Modal Modal Modal Nonmodal Modal Modal
Group type a a a a
b b
Function
Rapid positioning motion Linear interpolation motion CW circular interpolation motion CCW circular interpolation motion Dwell for a specified time X-Y plane selection X-Z plane selection
b c c
Y-Z plane selection Inch mode for all units Metric (mm) mode for all units Returns tool to reference point
Modal G code: remain in effect for all subsequent blocks unless replaced by another modal G code Nonmodal G code : only affect the block in which it appears. G codes are divided into several groups according to their functions, such as a, b, c, d ... group, etc. Any two G codes of a same group can't be in a block.
This is a drawing that requires a tool to go from point A to point B. If in the absolute mode (G90), the block is: N20 G90 G01 X20. Y60. F100. ; If in the incremental mode (G91), The block is: N20 G91 G01 X-30. Y40. F100. ;
(a) is the example of turning. The block is: N20 G92 X400. Z100. ;
(b) is the example of machining center. The block is: N20 G92 X180. Y70. ;
A programmer can choose any one of work coordinate systems. The six work coordinate systems are assigned through setting the offsets from machine coordinate system origin.
Instruction Format
G00 X_ Y_ Z_
any number of axis departures can be included in G00 command ; Axes not included will not move in G00
interpolation
(all that is required is the start point and the end point : the control fills automatically and instantaneously in the missing points
between the start point and the end point )
how?
What really happens is that the control makes a series of small oneaxis movements from the start point to the very end point.
The drawing intentionally exaggerates the situation: when two or more axes are programmed, the control forms a series of small oneaxis movements.
The size of each step determines the resolution of the axis: The smaller the step, the better the resolution is.
Note : motion rate at which the axes will move. This motion rate is programmed differently
Instruction FormatG01 X_ Y _ Z_ F_
X,Y and Z are coordinate value of end point; F is feed rate
e.g.
To determine clockwise or counterclockwise, look at the motion from the plus side of the uninvolved axis.
G92 X0 Y0 Z0 G90 G00 X200. Y40. G03 X140. Y100. I-60. F300. G02 X120. Y60. I-50.
G92 X0 Y0 Z0 G91 G00 X200. Y40. G03 X-60. Y60. I-60. F300. G02 X-20. Y-40. I-50.
G90 G02 X89.83 Y63.66 R40. F100. ; G90 G02 X89.83 Y63.66 R-40. F100. ; G90 G02 X89.83 Y63. 66 I39.83 J3.66 F100. ; G90 G02 X89.83 Y63.66 I-5.17 J39.66 F100.;
By specifying a dwell, the execution of the next block is delayed by the specified time.
Note: a programming word is used to specify the offset number, usually a D word is used
G40: to cancel cutter radius compensation ( If forget to cancel cutter radius compensation, the
compensation will remain in effect throughout all blocks of the program, even for subsequent tools )
understand basic machining practice to determine G41 or G42: If the operation is to be a climb milling, G41 is used; If conventional milling is to be done, G42 is used.
The other is to actually program the centerline coordinates for a desired tool diameter, the offset is equal to the radius deviation from the intended cutter size: the cutter being used is larger (or smaller ) than the intended cutter, the offset value will be plus (or minus) ; (popular with CAM system)
Instruction Format G01 G41 D__ X__ Y__ G01 G42 D__ X__ Y__ G01 G40 X__ Y__
Supplementary material
N010 G92 X0 Y0 Z10 N020 S600 M03 N030 G90 G17 N040 G41 G00 X20 Y10 D01 N050 Z-10 M08 N060 G01 Y50 F100 N070 X50 N080 Y20 N090 X10 N100 G00 Z10 M09 N110 G40 X0 Y0 M05 N120 M30
H01
Instruction Format: G43 G00/G01 Z_ H_ G44 G00/G01 Z_ H_ G49 (tool length compensation remains in effect until canceled by a G49 word) H: tells the control which offset number is used as the tool length compensation Z: is the location along Z axis at which you want the tip of the tool to stop. It is programmed relative to program zero.
3 mm
(81 621H012 H02)
O0001 N01 G90 G54 T01 S1000 M03 N02 G00 X20.0 Y20.0 N03 G43 Z2.0 H01 N04 G01 Z-3.0 F120 N05 X80.0 N06 Z2. N07 G00 G49 Z100.0 M05 N07 G00 X20.0 Y40.0 N08 M00
N09 T02 S1000 M03 N10 G00 G43 Z2.0 H02 N11 G01 Z-3.0 F120 N12 X80.0 N13 Z2. N14 G00 X20.0 Y60.0 N15 G01 Z-3.0 N16 X80.0 N17 Z2. N18 G00 G49 Z100. M05 N19 X0. Y0. N20 M02
M codes are used to specify miscellaneous or auxiliary functions (functions not related to dimensional or axes movements, they do not prepare the controller to act in a particular mode, they direct the controller to immediately execute the machine function )
M codes are usually classified into two main groups: A: executed with the start of axis movements B: executed after the completion of axis movements
(1) M00: causes a program stop, turn off spindle, coolant, etc, rewind the memory to the next block
(If the cycle start button on the panel is pressed, the next block will be executed)
(2) M01: an optional stop. It works in conjunction with an on/off switch on the panel.
(switch is on: the machine will stop executing the program. The cycle is activated again by pressing the cycle start button the control will continue executing the program from the point of the M01. switch is off: the control will ignore the M01 command entirely) The purpose : to give the operator a way to stop the machine , to confirm that the tool has machined correctly during a program's verification
(3) M02: a program end. (4) M30: a program end, rewind the memory back to the beginning of the same program, the control stops.
(5) M03: to turn the spindle on in forward or clockwise direction( used with right-hand tooling) (6) M04: to turn the spindle on in counterclockwise direction (7) M05: to turn the spindle off (used prior to a tool change, spindle speed change, spindle reverse rotation)
Format 1: Format 2:
e.g.
Without manipulator :
G91 G28 Z0 M06 T03; . . G91 G28 Z0 M06 T04;
With manipulator :
T01; G91 G28 Z0; M06 T03; . . G91 G28 Z0; M06 T04;
M09: to turn off the coolant ( before the motion to the machine's automatic tool change position to keep from drenching the work area and operator)
A word: to specify the fourth-axis how to rotate B word: to specify the fifth-axis how to rotate
D word: to select the offset number of tool radius compensation F word: to control the desired feed rate
O word: to assign program's number
to rotate the tool magazine to the desired position to use the offset to tell the program number of the subprogram to be executed to specify how many times the subprogram is to be executed
Supplementary material
In machining centers,G80-G89 are the commands usually used for canned cycles. In turning centers,G33-G35 and G70-G79 are the commands usually used for canned cycles.