Work simple automatic centering macro (selection specification)

Functional overview

This automatic centering macro allows you to easily center by manually moving the probe to an arbitrary position and then pressing the start button.
Vertical Vertical spindle such as dummy frets (DMP) and horizontal spindle of Right angle head (RH) can also be centered.
The following centering is possible.
(1) Inner diameter / concave groove width Centering
(2) Outer diameter / convex thickness Centering
(3) Centering the reference surface (X, Y, Z axis direction)
The measurement speed (mm / min) is as follows.
・ Inner diameter / outer diameter measurement 1st time: F500, 2nd time: F50 (Note) 2nd measurement
・ Reference plane measurement F50 (Note) One-time measurement
Other measurement conditions (probe eccentricity, approach amount during measurement, overshoot amount, etc.) and each calibration are set in the subprogram of measurement condition setting 09452, so set them before the first use. Please. There is one for the dummy plate (DMP) and one for the Right angle head (RH), but if you use the same probe, you usually do not need to change the value.
Also, even if the probe is replaced, measure the calibration again and set it.
09452: An example of measurement condition setting is shown below.

 09452{PROBE.INFORMATION)
 #8570=1
 G65P9451 S1.X0.000Y0.000Z150.000D6.F50.R1000.A5.B5.I0Q4.  プローブ情報の設定
 IF[#10603EQ2]GOTO10(x3) DMP用キャリブレーションの設定
 G65P9460X0Y0Z0I0J0(T1000.DMP.CALIBRATION.) 
 GOTO99
 N10IF[#10615EQ90]GOTO10
 IF[#10615EQ180]GOTO20
 IF[#10615EQ270]GOTO30
 G65P9468X0Y0Z0I0J0(T1100.RH.CALIBRATION.0) 以下RH用キャリブレーションの設定
 GOTO99
 N10G65P9468X0Y0Z0I0J0(T1100.RH.CALIBRATION.90)
 GOTO99
 N20G65P9468X0Y0Z0I0J0(T1100.RH.CALIBRATION.180)
 GOTO99
 N30G65P9468X0Y0Z010J0(T1100.RH.CALIBRATION.270)
 N99M99

〇Note
For details on how to set the probe information (O9451) and calibration (O9460), refer to "■ Probe Information" and "■ Calibration Setting".

How to use with Right angle head (RH)

-The indexing angles that can be centered are 0 °, 90 °, 180 °, and 270 ° in 90 ° increments.
Other angles will be an alarm.
・ The calling method for the horizontal spindle is the program number for the vertical Vertical spindle plus 10.

No.functionVertical spindleFor horizontal spindle
1Inner diameter / concave groove width centeringG201G211
2Outer diameter / convex thickness centeringG202G212
3Reference surface centeringG203G213

・ The concept of axial direction and arguments is commanded by the concept of our 5-sided machining software. In addition, the work coordinate system is set by offsetting the RH ATT. Data.
(Three-dimensional coordinate transformation is not performed.)

・ Lifting to center the inner diameter with RH
Command    G211W55.X50.Y50 .;.
After measurement, set the Y-axis and Z-axis work coordinate system with the RH ATT. Data offset. (The axis to be set depends on the indexing angle.)
・ Lifting to center the reference plane in the tool axis direction with RH
   Command G213W55.Z-20 .;.
After measurement, set the X-axis work coordinate system with the RH ATT. Data and probe length offset. (The axis to be set depends on the indexing angle.)
・ When executing 5-sided processing software at the coordinates after centering
Command    G180C55.B0X0Y0Z0 ;.

Probe information (internal macro)

Specify the dimensions of the probe, feed rate at the time of measurement, etc.

1. Macro call command

G65 P9451 S s X x Y y Z z D d F f R r A a B b I i Q q;

sNumber of measurement skips
If the number of measurement skips is already set to the common variable # 500, set s = 0.
x, yAmount of eccentricity with respect to the center of the spindle at the center of the probe tip sphere
z zProbe length (required setting)
dDiameter of probe tip sphere
For a cross-shaped probe as shown in Figure 2, specify the d dimension in the figure.
f , rMeasured feed rate and rapid traverse speed
a , bAmount of approach and amount of overshoot at the time of measurement
qSpecify the inner diameter / outer diameter measurement method
· Q = 3.—3-point measurement
· Q = 4.— 4-point measurement
If not specified, 4-point measurement will be performed.
iPrinter ON (i = 1) / OFF Ci = 0)

2. Explanation

-Specify all values (s to q) in the first call.
-If you want to change some values in the middle of the program, specify only those values.
However, the argument Ss cannot be specified in the middle of the program.
-At the time of measurement, the probe moves at the specified rapid traverse speed r to the front a of the measurement surface, and moves at the feed speed of f from there until it touches the measurement surface.
Here, set r ≤ maximum Feedrate rate. (It is not the fast-rapid traverse speed of the machine.)
・ If the probe does not come into contact with the measurement surface even if the distance b exceeds the position where the measurement surface should be, it returns to the measurement start point and an alarm is issued.
-When measuring the inner diameter / outer diameter of a cross-shaped probe, only 4-point measurement is possible.
-It is necessary to set parameters for high-precision measurement adjustment and feed rate f in NC.
In this case, the value of f cannot be changed in the middle of the program.
・ Normally, a = b = 5mm, f = 50mm / min, r = 1,000mm / min.
-The eccentricity x and y of the probe can be obtained by G241 (probe eccentricity measurement).
-When using a printer, specify i1. First, and then specify i0. When all printer output is completed.
(You can also turn it off temporarily and then turn it on again.) If you do not have a printer, do not specify the argument Ii.
-Before calling various measurement correction macros, set the measurement conditions using this macro.

Calibration settings

Considering the sensitivity of the probe and the delay of the signal, it is necessary to correct the distance (calibration) until the probe comes into contact with the work and the signal actually turns on. Obtain the calibration value in each axis direction in advance and set it with the following macro.

1. Macro call command

G65 P9460 X x Y y Z z I i J j; (for DMP)
G65 P9468 X x Y y Z z I i J j; (for RH)

xCalibration on the plus side of the X axis (move from X + to X-)
yCalibration on the Y-axis plus side (move from Y + to Y-)
z zCalibration on the plus side of the Z axis (move from Z + to Z-)
iCalibration on the minus side of the X axis (move from X- to X +)
jCalibration on the minus side of the Y axis (move from Y- to Y + direction)

If the probe is the same for RH, the calibration value for RH is usually the same as DMP. However, if you want to adjust a small difference between DMP and RH, set the value.
When measuring with RH,
The argument X corresponds to J when machining 5 faces.
The argument Y corresponds to X when machining 5 faces.
The argument Z corresponds to Z when machining 5 faces.
The argument I corresponds to Y when machining 5 faces.
The argument J corresponds to I when machining 5 faces.
Calibration is automatically requested according to the measurement direction in the macro.

Command method for each centering macro

The command method for each centering macro is as follows. Be sure to add a decimal point to the argument.

1. Inner diameter / concave groove width centering (G201, G211)

Execute this macro after manually positioning the probe near the center of the inner diameter.

G201 XYWC-; (for vertical Vertical spindle)
G211 XYWC-; (for horizontal spindle)

X: Inner diameter (specified when measuring the X-axis direction)
Y: Inner diameter (specified when measuring the Y-axis direction)
W: When the work coordinate system is G54 to G59, it is W54. To W59.
For G54.1P1 to P48, use W101. To W148.
C: Maximum error of manual positioning point (error with respect to true inner diameter center)
If omitted, C = 20 mm.

・ When the arguments X and Y are commanded, the inner diameter is centered, and when only the argument X or Y is commanded, only the X or Y direction is measured and the concave groove is centered.

2. Outer diameter / convex thickness centering (G202, G212)

Execute this macro after manually positioning the probe near the upper center of the outer diameter.

G202 XYZWC-; (for vertical Vertical spindle)
G212 XYZWC-; (for horizontal spindle)

X: Outer diameter (specified when measuring the X-axis direction)
Y: Outer diameter (specified when measuring the Y-axis direction)
Z: Z-axis travel (negative value) (Note) Refer to the attached flowchart.
W: When the work coordinate system is G54 to G59, it is W54. To W59.
For G54.1 P1 to P48, use W101. To W148.
C: Maximum error of manual positioning point (error with respect to true outer diameter center)
If omitted, C = 20 mm.

・ When the argument X. Y is commanded, the outer diameter centering is performed, and when only the argument X or Y is commanded, only the X direction or the Y direction is measured and the convex thickness centering is performed.

3. Reference plane centering (X, Y, Z axis direction) (G203, G213)

Execute this macro after manually positioning the probe near the front of the reference plane.

X: X-axis travel (±)
Y: Y-axis direction travel (±)
Z: travel Z-axis direction (-)
W: When the work coordinate system is G54 to G59, it is W54. To W59.
For G54.1P1 to P48, use W101. To W148.

〇Note
X-, Y-, Z- specify the distance (signed) from the current position (manual positioning point) to the reference plane.

以上