Specific embodiment
Referring to accompanying drawing 1, platen 1 with respect to numerical control machine tool, lathe coordinate system 4 is invariable, workpiece coordinate system 3 then changes with the variation of workpiece to be processed 2, check block 6 is removable taper calibrated bolcks that are fixed on the platen 1, and the coordinate figure of this check block in lathe coordinate system 4 is a constant fixed value, the position of check block 6 under workpiece coordinate system 3, can call by systematic parameter, from the lathe coordinate system to the workpiece coordinate system, change and realize.
Digital-control processing system sets up after the workpiece coordinate system before carrying out part program, calls the error protection checking routine earlier, makes the conical surface feed inspection of process tool 5 along error protection check block 6, determines whether the setting of use specification, coordinate system of cutter is correct.If it is wrong that cutter mistake or coordinate system are provided with, then send warning message or mill and hinder check block, remind the operator that the setting of cutter and workpiece coordinate system is checked.
Referring to accompanying drawing 2, error protection check block material is an aluminium alloy, error protection check block 6 is made up of check block base 8 and check block boss 7, check block base 8 usefulness bolts 9 are fixed on the platen face, check block boss 7 is taper calibrated bolcks, be connected on the base with bolt, can milling the replacing fast of wound back.In case after 6 installations of error protection check block, its position on lathe is changeless, and generally be installed in a jiao of lathe, avoid influencing the part normal process.
Different with traditional nc program, the nc program that comprises the error protection checking procedure comprises master routine and the error protection calibration subroutine that has carried out specific development (or claiming macroprogram).
Before formal processing parts, master routine calls the error protection calibration subroutine earlier after setting up workpiece coordinate system, simultaneously corresponding tool-information is passed to calibration subroutine with parametric form, after subroutine is finished the error protection checking procedure, carry out part program again.Carry out mirror image processing if desired, then the mirror image instruction is set and carries out automatically, do not need operating personnel that mirror image manually is set, as shown in Figure 4 by master routine.
The error protection calibration subroutine as shown in Figure 5, the functional check program comprises following flow process: accept correlation parameter, judge parameter information, calculate difference between machine coordinates and the current workpiece coordinate, the machine coordinates of conversion check block is workpiece coordinate, calculation check track, start cutter implements the verification track, finishes verification and return master routine.
The radial compensation parameter of cutter, parameters such as length parameter are imported lathe by operating personnel, tool diameter D, cutter base angle R, radially cutter number picked up A and cutter are mended parameter such as scope C and are defined in master routine by the journey personnel that compile, after subroutine is accepted correlation parameter, at first judge tool diameter, the base angle, whether enough whether cutter mended address information and cutter benefit value and gone beyond the scope, and judge whether manually to be provided with mirror image operation, each parameter is carried out assignment to be judged, if the parameter of input is not enough or with program in the parameter that requires inconsistent, then system sends alerting signal, reminds operating personnel to carry out checking of correlation parameter.After the parameter judgement is finished, calculate lathe coordinate system and current workpiece coordinate system coordinate XYZ difference, machine coordinates with check block is converted to workpiece coordinate then, calculate the arc radius of cutter when the check block conical surface is walked arc track, under workpiece coordinate system, cutter is along the verification orbiting motion of setting, as shown in Figure 3, cutter is gone to check block top P point from the cutter point, runs to the L point by the P point, move to the K point of pressing close to the check block conical surface again, cutter is walked arc track after one week along the check block conical surface, runs to H point cutter lifting, has returned the cutter point again, master routine is returned in end of subroutine.
Three kinds of situations can appear after the error protection calibration subroutine was complete.First kind is without any false alarm information, and cutter is normal along the feed of the check block conical surface, does not mill and hinders check block, can continue the normal process part; Second kind is that program has been sent false alarm information, and then terminator is carried out, and checks error reason; The third is without any false alarm information, but cutter is undesired along the feed of the check block conical surface, mills and hinders check block or obvious bias check piece, and then terminator is carried out, and checks error reason.
Following several mistake can be effectively avoided in enforcement of the present invention:
A) workpiece coordinate system is provided with mistake;
B) mistake is provided with mirror image operation;
C) cutter length is provided with mistake;
D) tool specification is used wrong (tool diameter, base angle);
E) the cutter radial compensation is provided with and goes beyond the scope;
F) when tool diameter and base angle value are not imported, also can send false alarm.
The exploitation of error protection calibration subroutine mainly based on application system parameter, system variable and count, logical operation, broken away from concrete processing parts, therefore all parts on the specific lathe are had versatility.The error protection calibration subroutine resides in the numerically-controlled machine tool system always, and the processing of any part is as long as simply call.
Realization example
1, error protection checking routine realization example in the FANUC system
1) FANUC macro programming
In the FANUC system, the error protection scheme of using the macro programming method to realize.
Macroprogram: one group of instruction of certain specific function of realization that realizes definition is pre-deposited in the storer as subroutine, represent the function of this storage, be implemented in quoting this function in other program with an instruction.This group instruction is called macroprogram.In macroprogram, can use variable, arithmetic, logical operation etc., can carry out the parameter transmission.
2) programming prerequisite:
The workpiece coordinate system direction is consistent with the lathe coordinate system direction, and the processing of symmetrical component uses the mirror image instruction to realize, avoids operating personnel manually to intervene.
3) program example:
No mirror image adds the master routine in man-hour:
G00G90G54X0Y0Z100 (master routine begins)
M03S8000
G65P9999D30R5A1C0.1 (band parameter macroprogram is called)
(D is a tool diameter, and R is the cutter base angle)
(A is cutter number picked up radially, and C is that cutter is mended scope)
………
(concrete part program omits)
M30 (master routine end)
Mirror image adds the master routine in man-hour:
G00G90G54X0Y0Z100 (master routine begins)
M03S8000
G65P8888D30R5A1C0.1 (band parameter macroprogram is called)
G51.1Y0.000I1.000J-1.000A0.000 (mirror image instruction unpack)
………
(concrete part program omits)
G50.1Y0.000I1.000J-1.000A0.000 (the mirror image instruction is closed)
M30 (master routine end)
Subroutine:
%O8888
IF[#7 EQ #2] GOTO 10 (judge whether assignment of D, then report to the police)
IF[#18 EQ #2] GOTO 10 (judge whether assignment of R, then report to the police)
IF[#3007 NE 0] GOTO 20 (judge whether to be provided with mirror image, have then and report to the police)
#115=#[2000+#1] (calculate how much biasings of cutter radial and wearing and tearing biasing and)
IF[#115?LT?#3]GOTO?25
IF[#115 GT-#3] GOTO 25 (judge that cutter whether mend in scope)
#108=#4014 (preserving the 14th group of G code)
#101=0-#5021 (calculating workpiece coordinate system and lathe coordinate system X difference)
#102=0-#5022 (calculating workpiece coordinate system and lathe coordinate system Y difference)
#103=#5043-#5023 (calculating workpiece coordinate system and lathe coordinate system Z difference)
#104=X+#101 (conversion P point X machine coordinates is a workpiece coordinate)
#105=Y+#102 (conversion P point Y machine coordinates is a workpiece coordinate)
#106=Z+#103 (conversion P point Z machine coordinates is a workpiece coordinate)
#107=30+#7/2-0.58579*#18+0.2 (calculate the cutter amount of deflecting away from, see program description)
G01G91G#108Z-#5023F500 (returning lathe Z0 face)
G01G90X#104Y#105F500 (going to P point top)
Z#106F500 (going to the P point)
G01G91X#107Y#107F500 (go to the L point, see Fig. 3)
Z-115.000F500 (following cutter)
Y-#107F500 (go to the K point, see Fig. 3)
G02G90G17I#107F2000 (cutter is walked circular arc along the check block conical surface)
G01G91Y-#107F500 (go to the H point, see Fig. 3)
Z115.000F500 (cutter lifting)
Z-#5023F500 (returning lathe Z0 face)
G01G90X0Y0F500 (returning workpiece coordinate system X0Y0 point)
Z#5043F500 (having returned the cutter point)
GOTO 30 (jumping to N30)
N10 #3000-20 (NO D OR R) (20 warning message)
N20 #3007=30 (#3007 ERROR) (30 warning message)
N25 #3000=40 (COMPENSATION ERROR) (40 warning message)
N30 M99 (end)
The #3007 address is one 16 a reservoir, is used for judging whether X, Y-axis beat oppositely.Concerning the five coordinate lathes system of XYZAB coordinate system, if the workpiece coordinate system direction is consistent with the lathe coordinate system direction, the value of #3007 should be 0 so.
#3000 is FANUC warning address, and 30 is report to the police number (number value of reporting to the police can be the value in 0~4095, can oneself define), when #3000=40 (COMPENSATION ERROR) is effective, and system's display alarm information.
2, error protection checking routine realization example in the SIEMENS system
No mirror image adds the master routine in man-hour:
G00G90G17G642G54X0.Y0.Z100.A0.C0. (master routine begins)
M03S8000M08
R1=30 (main program parameter R1 is a tool diameter)
R2=5 (main program parameter R2 is the cutter base angle)
L8888 (subroutine call)
(main program parameter can directly be quoted in subroutine)
............
... ... (concrete part program omits)
M30 (master routine end)
Mirror image adds the master routine in man-hour:
G00G90G17G642G54X0.Y0.Z100.A0.C0. (master routine begins)
M03S8000M08
R1=30 (R1 is a tool diameter)
R2=5 (R2 is the cutter base angle)
L8888 (subroutine call)
$P_PFRAME[Y, MI]==1 (mirror image instruction unpack)
$P_PFRAME[A,MI]==1
$P_PFRAME[C,MI]==1
............
... ... (concrete part program omits)
SUPA (cancel all mirror images, recover virgin state)
M30 (master routine end)
Subroutine:
L8888
IF R1==0 GOTOF BA0JING1 (judge whether assignment of D, then report to the police)
IF R2==0 GOTOF BA0JING1 (judge whether assignment of R, then report to the police)
IF $P_IFRAME[X, MI]==1 G0T0F BA0JING2 (if the manual mirror image of X-axis is reported to the police)
IF $P_IFRAME[Y, MI]==1 G0T0F BA0JING2 (if the manual mirror image of Y-axis is reported to the police)
IF $P_IFRAME[Z, MI]==1 G0T0F BA0JING2 (if the manual mirror image of Z axle is reported to the police)
IF $P_IFRAME[A, MI]==1 G0T0F BA0JING2 (if the manual mirror image of A axle is reported to the police)
IF $P_IFRAME[C, MI]==1 G0T0F BA0JING2 (if the manual mirror image of C axle is reported to the police)
R3=$AA_IM[X] (preserving X value under the current location lathe coordinate system)
R4=$AA_IM[Y] (preserving Y value under the current location lathe coordinate system)
R5=$AA_IM[Z] (preserving Z value under the current location lathe coordinate system)
R6=$AA_IW[X] (preserving X value under the current location workpiece coordinate system)
R7=$AA_IW[Y] (preserving Y value under the current location workpiece coordinate system)
R8=$AA_IW[Z] (preserving Z value under the current location workpiece coordinate system)
R9=R6-R3 (calculating workpiece coordinate system and lathe coordinate system X difference)
R10=R7-R4 (calculating workpiece coordinate system and lathe coordinate system Y difference)
R11=R8-R5 (calculating workpiece coordinate system and lathe coordinate system Z difference)
R12=X+R9 (conversion P point X machine coordinates is a workpiece coordinate)
R13=Y+R10 (conversion P point Y machine coordinates is a workpiece coordinate)
R14=Z+R11 (conversion P point Z machine coordinates is a workpiece coordinate)
R15=30+R1/2-0.58579*R2+0.2 (calculate the cutter amount of deflecting away from, see program description)
(600G91Z200.000 the Z value lifts 200)
G90X=R12Y=R13 (going to P point top)
Z=R14 (going to the P point)
G01G91X=R15Y=R15F3000 (go to the L point, see Fig. 3)
Z-115.000F500 (cutter is walked circular arc along the check block conical surface)
Y=-R15F500 (go to the K point, see Fig. 3)
G02G90G17I=-R15F500 (milling test block)
G01G91Y=-R15F500 (go to the H point, see Fig. 3)
Z115.000F3000 (cutter lifting returns P point height)
G00Z300.000 (the Z value lifts 300)
G90X0.000Y0.000 (returning workpiece coordinate system X0Y0 point)
A0.000C0.000 (AC puts back 0)
GOTOF N100 (jumping to N100 forward)
BAOJING1:SETAL (65000, NO D OR R) (report to the police, do not have D or R value)
BAOJING2:SETAL (65002, MIRR0R BY MDI IS ERR0R) (reporting to the police, manually the mirror image mistake)
M30
N100 M17 (end)
The SIEMENS variable is divided into 3 types, User Defined variable, calculating parameter, system variable.The User Defined variable is exactly the variable of user oneself definition, and title and types of variables (as REAL) can define.Calculating parameter has 100 (generally speaking), is R0~R99, can directly use.System variable is the variable that uses for control system, and they can handle (write, read) in program.System variable can access null drift, cutter compensation, real-valued, the measured value of axle, the state of control system etc.
X in the SIEMENS system program, Y, Z, F, when S etc. related to variable, form was X=R1, there is the number of equaling the centre.
The SIEMENS warning system realizes by key word SETAL, will fill in the bracket of back and report to the police number, warnings scope is from 60000 ~ 69999, and wherein 60000 ~ 64999 are used for Siemens and circulate, 65000 ~ 69999 for user's use, can also write warning message in the bracket.
At the several links that causes misoperation in the numerical control processing and operating easily, the present invention has designed and can effectively prevent the method for misoperation, thereby avoids this type of mistake to cause product quality loss or lathe accident.Prove that through practical application this method is feasible.