Before you perform CNC milling with the mills or milling machine, you should first prepare the programmed instruction of the workpiece for guiding the operation of machines. If the processing program of the workpiece is long and complex, it is recommended not to program on the machine tool, but to use the programming machine or computer programming, so as to avoid occupying the machine time. Taking the CNC milling machine and machining center of FANUC-0M system as an example, what do you need to know before milling programming?
1. F,S,T functions
(1) F function – feed function.
Instruction format: G94 F_ ;
The feed function is used to specify the feed rate, which is specified by code F. its unit is mm / min, and the range is 115 000 (metric system), 0.01600.00 in / min (British system). For example, “g94f200;” means that the feed rate is 200 mm / min. Using the switch on the operation panel of the machine tool, you can use the multiplier for the rapid moving speed or cutting feed speed. To prevent mechanical vibration, acceleration/deceleration is automatically implemented at the beginning and end of tool movement.
(2) S command format one spindle function.
Instruction format: S_ ;
The s function is used to set the spindle speed in R / min and the range is 020 000 R / min. The four digit spindle speed can be directly specified after s, and two digits can be specified to indicate the thousand and hundreds of spindle speed. We use two digits to specify the spindle speed. For example, S10 indicates that the spindle speed is 1 000 R / rnin.
(3) T function – tool function.
Instruction format: T_ ;
When the machine tool is working, the appropriate tool must be selected. Each tool is assigned a number. When a different number is specified in the program, the corresponding tool is selected. The t function is used to select the tool number, and the range is t00t99. For example, when the tool is placed at position 28 of ATC, the tool can be selected by command T28.
2. M function and B function auxiliary function.
(1) The auxiliary function is used to command the auxiliary operation of the machine tool. One is the auxiliary function (M code), which is used to start and stop the spindle, open and close the coolant, etc. The second is the second auxiliary function (B code), which is used to specify the indexing of the indexing table.
(2) M code can be divided into pre instruction code and post instruction code, in which the former instruction code can be executed simultaneously with the moving instruction. For example, “G01 x20.0 M03;” means that the spindle rotates as the tool moves. Then the instruction code must be executed after the completion of the move instruction. “G01 x20.0 M05;” means that the spindle stops after the tool moves 20 mm.
(3) In general, only one m code can be specified in a program segment. When there are more than two m codes, the last M code is valid.
(4) Code B is used for the rotation indexing of the machine tool. When a value is specified after the address of B code, the code signal and gate signal are output, and the code remains until the next B code is specified. Each program segment can only contain one B code.
3. G function – preparation function
(1) The preparation function is used to command the movement of each coordinate axis of the machine tool. There are two kinds of codes, one is modal code, which once specified will remain valid until it is replaced by another modal code. The other is non modal code, which is only valid in this program section.
(2) * G code is the initial state when the power is on.
(3) If the same group of G codes are programmed into the same block, the last G code is valid.
(4) In a fixed loop, the fixed loop is revoked if it encounters a set of 01 codes.