Renishaw Inspection Plus Macro Programming Guide

Document Version: V2.0Applicable Systems: Fanuc Macro B (0M~32iM)/Mitsubishi Meldas (M3~M800)Software Part Number: A-4012-0516 (Fanuc/Meldas with SupaTouch)Compilation Unit: Technical Department of Ni

Renishaw Inspection Plus Macro Programming Guide

Fanuc/Moldas machining center article

Document Version: V2.0
Applicable Systems: Fanuc Macro B (0M~32iM)/Mitsubishi Meldas (M3~M800)
Software Part Number: A-4012-0516 (Fanuc/Meldas with SupaTouch)
Compilation Unit: Technical Department of Ningbo Jiangce Technology Co., Ltd.
Release Date: June 2026

catalogue

  • Overview
  • Programming Core Rules
  • Programming Standard Process
  • Three basic macro programs
    • 4.1 O9832 — Probe turned on
    • 4.2 O9833 — Probe closed
    • 4.3 O9810 — Protect positioning(Probe triggers monitoring)
    • Calibration cycle
      • 5.1 O9800 — SupaTouch Optimize the cycle
      • 5.2 O9801(K1) — Calibration probe length
      • 5.3 O9801(K4) — Calibrate the offset and radius of the measuring ball(Calibration of environmental standards)
      • 5.4 O9801(K5) — Standard ball calibration
      • 5.5 O9801(K0/K2/K-3) — Other calibration modes
      • 5.6 O9804 — Calibrate the center position of the ball
      • Standard measurement cycle
        • 6.1 O9811 — XYZ Single sided measurement
        • 6.2 O9812 — boss/Groove measurement
        • 6.3 O9814 — inner hole/Outer circle measurement
        • 6.4 O9815 — Determine the inner corner
        • 6.5 O9816 — Determine the outer corner
        • 6.6 O9817 — 5Point rectangle measurement
        • Vector measurement cycle
          • 7.1 O9821 — Tilt plane measurement
          • 7.2 O9822 — Tilted convex platform/Groove measurement
          • 7.3 O9823 — 3Point inner hole/Outer circle measurement
          • Advanced Loop
            • 8.1 O9818 — Fourth axis measurement
            • 8.2 O9819 — PCD The inner hole on top/Outer circle measurement
            • 8.3 O9820 — blank stock
            • 8.4 O9834 — Feature to feature data
            • 8.5 O9835 — Statistical Process Control(SPC)Knife repair update
            • 8.6 O9843 — Angle Measurement
            • Output Variable Table
            • General Parameter Description Table
            • Installation and Configuration
            • Complete Programming Example
            • Common pitfalls and precautions (at least 10)
            • 1. Overview

              1.1 About Inspection Plus

              Inspection Plus is a probe macro program software package developed by Renishaw in the UK, specifically designed for machining centers equipped with Fanuc or Mitsubishi Meldas systems. This software package provides a complete solution for workpiece measurement and probe management, supporting:

            • Automatic measurement and alignment of workpieces
            • Tool breakage detection
            • Statistical Process Control (SPC)
            • Multi probe system management
            • SupaTouch optimization (reducing cycle time)
            • 1.2 System Requirements

              project requirement
              Controller Fanuc 0M/0i/16i/18i/21i/30i/31i/32i series, or Mitsubishi Meldas M3~M800
              Macro program functionality Must be enabled (parameter 8000 series)
              storage space At least 8KB (approximately 20m paper tape length)
              Probe interface Support Renishaw optical/wireless/inductive probe receivers

              1.3 Macro Program Summary Table

              Macro Number function Chapter
              O9832 Probe opening (including spindle orientation) Chapter 4
              O9833 Probe closed Chapter 4
              O9810 Protection positioning (probe triggered monitoring) Chapter 4
              O9800 SupaTouch optimizes calibration cycle Chapter 5
              O9801 Probe calibration cycle (K1/K4/K5/K0/K2/K-3) Chapter 5
              O9804 Calibrate the center position of the ball Chapter 5
              O9811 XYZ single-sided measurement Chapter 6
              O9812 Convex/groove measurement Chapter 6
              O9814 Inner hole/outer circle measurement Chapter 6
              O9815 Determine the inner corner Chapter 6
              O9816 Determine the outer corner Chapter 6
              O9817 5-point rectangular measurement (external/internal) Chapter 6
              O9821 Tilt plane measurement (angle input/XYZ input) Chapter 7
              O9822 Measurement of inclined convex platform/groove Chapter 7
              O9823 3-point inner hole/outer circle measurement Chapter 7
              O9818 Fourth axis measurement Chapter 8
              O9819 Inner hole/outer circle measurement on PCD Chapter 8
              O9820 blank stock Chapter 8
              O9834 Feature to feature data (XY/Z plane) Chapter 8
              O9835 Statistical Process Control (SPC) tool replenishment update Chapter 8
              O9843 Angle measurement on the X or Y plane Chapter 8

              1.4 Uncovering the mechanical and hardware principles at the bottom of the probe (demonstrating professionalism)

              Many CNC operators and debugging personnel believe that when the probe contacts the workpiece, the internal structure is a regular gear transmission mechanism. In fact, this is a huge industry technical misconception. Renishaw high-precision (taking Renishaw OMP400 strain gauge probe as an example, the unidirectional repeatability accuracy can reach 0.25 µ m 2 σ at 50mm probe/240mm/min touch speed) three-dimensional trigger probes (such as OMP40-2, OMP60, RMP60) use a precision micro motion electrical contact switch structure at the bottom layer, rather than a pure mechanical gear structure:

            • Classic three-point touch impedance switch (Kinematic Mount): The probe has an extremely clever mechanical positioning structure inside, consisting of three conductive pull pins that form a 120 ° angle with each other, located on six precision hard alloy positioning balls (i.e. three electrical grooves), forming an interlocking series electrical circuit.
            • Micron level signal interruption triggering: In the non triggered state, the built-in precision spring presses the three-way connecting rod tightly against the positioning groove, and the circuit is completely conductive with impedance close to zero.. Once the measuring needle comes into contact with the workpiece, even if there is an extremely weak0.1 microndisplacement, it will cause one of the contact points to undergo micro motion separation, resulting in the impedance of the entire closed circuit instantly becoming infinite.
            • optoelectronics/Wireless signal transmission:Optical inside the probe/After the RF module captures the impedance high impedance jump,Instantly emit infrared or radio encoded signals to external receivers at microsecond speeds,Implement numerical control system(G31)The high-speed hard skip touch test interrupt。
            • Piezoelectric Sensor (Advanced Version): In high-precision detection applications such as Renishaw OMP400/RMP600 probes,Precision Silicon strain gaugesare further used, completely eliminating the deflection and micro swing dead zone caused by the rigidity of the contact pin, and achieving a repeatability accuracy of0.25 micronslimit..
            • Understanding the underlying physical structure can help us make the most professional fault diagnosis in the workshop when troubleshooting “unstable repeated positioning accuracy” or “signal not triggering” faults (such as checking the wear of three-point electrical contacts, grease viscosity, or spring tension attenuation, rather than blindly guessing gear faults).

              2. Core programming rules

              2.1 Call Format

              All loops call instructions through macro programs G65 Execute,Parameters are passed through letter addresses:

              G65 P9xxx <Required Parameters> [Optional parameters]

            • P9xxx– Macro program number (e.g.P9814)
            • Letter parameters (X,Y,Z,D,B,K, etc.) pass numerical values
            • The parameter value must contain a decimal point, even if it is an integer, it must be added with.(such asK1.instead ofK1)
            • 2.2 Parameter Transmission Rules

              Correct writing:

              G65 P9814 D50.005 Z-10. S1.

              Incorrect spelling:

              G65 P9814 D50 Z-10 S1 ❌ Missing decimal point
              G65 P9814 D50.005 Z-10.0 S01. ❌ SParameter format error

              2.3 Variable System

              Variable Scope Purpose Explanation
              #1~#33 local variable G65 Automatically assign values to parameters during invocation,Each cycle is independent
              #100~#199 General variables Loop for internal use, users should not modify
              #100~#109 loop control Internal loop counter, etc
              #110~#119 configuration parameters Feed rate, roll back coefficient, etc
              #120~#131 System Configuration Verification mode, multi probe configuration, etc
              #132~#134 Internal parameters Temporary Storage
              #135~#149 Measurement result output User reads measurement values
              #150~#199 Internal temporary variables Mid cycle calculation
              #500~#531 Universal reserved variables User backup storage, recommended for backing up measurement values

              2.4 Metric/Imperial Units

              All loops are executed according toMetric system(mm)Write。Fanuc system usage G20(imperial system)G21(Metric system) Switching to Unit System:

              G21 ; Switch to metric system(mm)pattern — Recommendation
              G20 ; Switch to Imperial System(inch)pattern

              Important: The Imperial System of Fanuc/The metric switching code is G20/G21,rather than G70/G71。G70/G71 It’s Siemens(Siemens)The code name used by the system,It will cause confusion in the unit system on the Fanuc control system。

              If the machine tool operates in imperial mode(G20),The values in the variable will be automatically converted,But the tolerance、Parameters such as positional accuracy should be inputted into the system according to the units used during programming。

              2.5 I, J, K input sequence

              When the loop contains optional inputs I, J, K,must be declared strictly in the order of I → J → K:

              G65 P9xxx I30. J10. K9. ✅ Correct — 按 I→J→K order
              G65 P9xxx K9. J10. I30. ❌ Error — Incorrect order

              2.6 Dual security mechanism

              Each measurement program should always follow the following safety principles:

            • O9810 Protect positioning — All probes move(Except for touch testing process)All should be used O9810
            • Z first, then XY– When descending, move the Z-axis first, then XY; When exiting, first raise the Z-axis to a safe height, and then move XY
            • 3. Programming standard process

              3.1 General Programming Template

              Every machining program using a probe should follow the following standard process:

              ; ============================================================
              ; Renishaw Inspection Plus Standard Measurement Procedure Template
              ; ============================================================
              T01 M06 ; one Change Tool – Install Probe

              G90 G21 G40 G80 ; 2. Safe mode setting(Metric mm)

              G65 P9832 ; 3. Activate the probe(Including spindle orientation M19)

              G65 P9810 Z100. F3000. ; 4. Protect positioning to a safe height

              G65 P9810 Xxx. Yyy. F3000. ; 5. Protect positioning above the measurement starting point

              G65 P9810 Zzz. ; 6. Descend to measurement height

              G65 P9xxx … ; 7. Execute measurement cycle

              ; — Read measurement results #135~#149 —

              G65 P9810 Z100. ; 8. Protect the positioning and exit to a safe height

              G65 P9833 ; 9. Close the probe

              G28 G91 Z0. ; 10. Reset to zero
              M30

              3.2 Standard process with bias update

              If it is necessary to automatically update the offset of the workpiece coordinate system based on the measurement results:

              T01 M06
              G65 P9832
              G65 P9810 Z100. F3000.
              G65 P9810 X0. Y0. F3000.
              G65 P9810 Z-10.
              G65 P9814 D50. S1. ; Measure the inner hole,S1=Update current bias
              G65 P9810 Z100.
              G65 P9833
              M30

              3.3 Multi probe system call

              G65 P9832 D2. ; Open probe 2(D2=Probe number)
              G65 P9810 Z50. F3000.
              G65 P9811 X0. S1.
              G65 P9810 Z100.
              G65 P9833 ; Close the current probe(O9833Do not accept parameter D)
              M30

              Attention: O9833(Close the probe)do not accept D parameter。Only O9832(Activate the probe)Through Dd. Parameter selection probe number。O9833 Only accept optional options W1. Parameters are used for status checks。

              4. Three basic macro programs

              The three basic macro programs are the foundation of all probe applications:Probe turned on(O9832)、Probe closed(O9833)And protection positioning(O9810)。

              4.1 O9832 — Probe turned on

              Function: Enable the probe, perform spindle orientation (M19), and send the corresponding probe enable M code according to the configuration..

              Format:

              G65 P9832 [Dd. W1.]

              parameter Explanation default value
              Dd D=probe number (multi probe system), D1=probe 1 D1
              W1 Enable probe status check (optional) Close

              Example:

              G65 P9832 ; Activate the probe(Default probe 1)
              G65 P9832 D1. ; Activate probe 1
              G65 P9832 D2. ; Open probe 2(Multiple probe support needs to be configured)
              G65 P9832 W1. ; Turn on the probe and check its status
              G65 P9832 D1. W1. ; Turn on probe 1 and check its status

              Complete calling process:

              T01 M06 ; Tool changing probe
              G65 P9832 ; Activate the probe + Main axis orientation
              G65 P9810 Z100. F3000. ; Security positioning

              Internal mechanism:

            • Perform M19 spindle orientation
            • Send probe activation M code(Through O9724 Configuration)
            • If W1. is specified, check the status signal of the probe LED
            • Return to the main program
            • 4.2 O9833 — Probe closed

              Function: Turn off the probe and disable the probe trigger signal..

              Format:

              G65 P9833 [W1.]

              parameter Explanation default value
              W1 Enable probe status check (optional) Close

              Important: O9833 do not accept D parameter。The selection of probe number is only available when O9832(Activate the probe)Through Dd. Parameter specification。O9833 The official macro input parameters do not include D parameter。If you see anything about it in the manual O9833 Use D Description of parameters,That’s not correct。

              Example:

              G65 P9833 ; Close the probe
              G65 P9833 W1. ; Close the probe and check its status

              Complete Exit Process:

              G65 P9810 Z100. ; Retreat to a safe height first
              G65 P9833 ; Close the probe again
              G28 G91 Z0. ; Reset to zero
              M30

              Internal mechanism:

            • Send probe to close M code(Through O9724 Configuration)
            • If W1. is specified, check the status signal that the probe has been turned off
            • Return to the main program
            • 4.3 O9810 — Protect positioning(Probe triggers monitoring)

              Function: Safe movement with probe triggered monitoring.. Once the probe collides (accidentally touches) during movement, immediately stop moving and issue an alarm to prevent damage to the probe or workpiece.

              Format:

              G65 P9810 Xx. Yy. Zz. [Ff. Mm. C1.]

              parameter Explanation default value
              Xx X=X-axis endpoint position necessary
              Yy Y=Y-axis endpoint position necessary
              Zz Z=Z-axis endpoint position necessary
              Ff F=Positioning feed rate (mm/min) F3000
              Mm M=Mobile mode: 1=Single axis, 2=Multi axis M1
              C1 Check in place detection (confirm position after in place) Close

              Example:

              ; ZAxis single axis descent
              G65 P9810 Z10. F3000. M1.

              ; XAxis single axis movement
              G65 P9810 X-60. F4000.

              ; XY Linkage positioning
              G65 P9810 X30. Y50. F3000. M2.

              ; Carry in place detection
              G65 P9810 Z-5. F1000. C1.

              Programming principles:

            • All probes move(Including approach and retreat)All should be used O9810
            • Higher speed for regular mobile use (F3000~F5000)
            • Approaching the last section of the workpiece at a lower speed (F500~F1000)
            • C1 can enable in place detection to ensure positioning accuracy
            • Example of secure programming:

              T01 M06
              G65 P9832
              G65 P9810 Z100. F3000. ; Quickly ascend to a safe height
              G65 P9810 X50. Y0. F5000. ; XYLocate to the starting point of measurement
              G65 P9810 Z-5. F2000. ; Slowly approaching the measurement area
              G65 P9811 X50. ; Perform measurement
              G65 P9810 Z100. F3000. ; Exit to a safe altitude
              G65 P9833
              M30

              5. Calibration cycle

              The calibration cycle is the foundation for ensuring the accuracy of all measurement results. Calibration must be performed when using the probe for the first time, replacing the probe, or when there is doubt about the measurement accuracy.

              5.1 O9800 — SupaTouch Optimize the cycle

              Function: Overall optimization of the machine tool+controller+probe system, reducing cycle time and improving measurement performance.. By analyzing the acceleration and deceleration characteristics of the machine tool and the trigger delay of the probe, the measurement parameters are automatically adjusted.

              Format:

              G65 P9800 Bb. Xx. 或 Yy. [Hh. Ff. Uu. Ww. Qq. Rr. Zz.]

              parameter Explanation
              Bb B=measuring ball diameter (mm)
              Xx or Yy Optimization direction (either X or Y, mandatory)
              Hh H=optimized tolerance (mm)
              Ff F=optimized feed rate (mm/min)
              Uu U=rollback over travel increment
              Ww W=Over axis outer limit
              Qq Q=safety increment
              Rr R=proximity distance
              Zz Z=measuring height

              Example:

              ; SupaTouch Optimize — Xdirection
              G65 P9800 B6. X15. Z-8. H0.002 U7. W15. Q10. R15. F9000.

              ; SupaTouch Optimize — Ydirection
              G65 P9800 B6. Y15. Z-8. H0.002 U7. W15. Q10. R15. F9000.

              Execution timing:

            • When installing and debugging machine tools
            • After major repairs or recalibration of the machine tool
            • Regularly execute once a year
            • After replacing the control system or drive system
            • 5.2 O9801(K1) — Calibration probe length

              Function: Determine the precise length of the measuring ball by touching a reference surface with a known height.. This process establishes the correspondence between the length of the probe and the coordinate system of the machine tool.

              Format:

              G65 P9801 Bb. Zz. Tt. [K1.]

              parameter Explanation
              K1. Specify the calibration probe length mode
              Bb B=measuring ball diameter (mm)
              Zz Z=calibration position on the Z-axis (reference plane Z coordinate)
              Tt T=rollback amount (mm)

              Example:

              ; Calibration probe length,Measuring ball diameter 6mm,Reference plane Z0,Retract 20mm
              G65 P9801 B6. K1. Z0. T20.

              ; Calibration probe length,Use environmental gauges on the surface
              G65 P9801 B6. K1. Z50. T15.

              Precautions:

            • The reference surface must be clean and flat
            • The Z value should be the absolute coordinate of the reference plane
            • The calibration results are automatically stored in the length offset of the probe
            • 5.3 O9801(K4) — Calibrate the offset and radius of the measuring ball(Calibration of environmental standards)

              function: Calibrate the measuring ball using a ring gauge with a known diameter X/Y Bias and radius。This is the most commonly used calibration method,After calibration O9814 Accurate diameter and center position can only be output after the measurement cycle。

              Format:

              G65 P9801 K4. Bb. Dd. [M180. Ss. Zz.]

              parameter Explanation
              K4. Specify calibration bias and radius mode
              Bb B=measuring ball diameter (mm)
              Dd D=ring gauge diameter (mm)
              M180. Enable 180 ° spindle orientation (default enabled)
              Ss S=bias update method
              Zz Z=Calibrate Z position

              Example:

              ; UseΦ50.005Calibration of environmental standards,Measuring ball diameter 6mm
              G65 P9801 K4. B6. D50.005 M180. Z50.

              ; Do not update bias after calibration,Only calculate
              G65 P9801 K4. B6. D50.005 S2. Z50.

              Calibration process:

            • Move the probe above the center of the ring gauge
            • Descend to Z measurement height
            • Touch the inner wall of the ring gauge in 4 directions (X+/X -/Y+/Y -)
            • Calculate the offset and effective radius of the measuring ball
            • Update to system bias memory
            • 5.4 O9801(K5) — Standard ball calibration

              Function: Calibrate on a standard ball with a known diameter.. Suitable for situations where environmental gauges cannot be used or require higher calibration flexibility.

              Format:

              G65 P9801 K5. Zz. Dd. Bb. Tt. [M180. Ee. Xx. Yy.]

              parameter Explanation
              K5. Specify the standard ball calibration mode
              Zz Z=calibration position on the Z-axis
              Dd D=standard ball diameter (mm)
              Bb B=measuring ball diameter (mm)
              Tt T=rollback amount (mm)
              M180. Enable 180 ° spindle orientation
              Ee E=Position deviation of the standard ball on the Z-axis
              Xx X=center X position of the standard ball
              Yy Y=center Y position of the standard ball

              Example:

              ; UseΦ30Standard ball calibration,The center of the standard ball is X250.Y100.Z0
              G65 P9801 K5. Z0. D30. B6. T14. M180. E-300.157 X250. Y100.

              5.5 O9801(K0/K2/K-3) — Other calibration modes

              K value function format Explanation
              K0 Calibrate the probe bias in the hole G65 P9801 K0. Dd. Bb. Dd=aperture, Bb=measuring ball diameter
              K2 Calibrate the XY offset of the probe on the ring gauge or standard ball G65 P9801 K2. Dd. Bb. Only calibrate XY bias
              K-3 Calibrate the radius of the measuring ball with an environmental gauge G65 P9801 K-3. Dd. Bb. Only calibrate the radius

              Example K0:

              G65 P9801 K0. D50. B6. ; 在Φ50Calibration bias in the hole

              K2 Example:

              G65 P9801 K2. D50. B6. ; 在Φ50Calibrate XY bias on the ring gauge

              K-3 Example:

              G65 P9801 K-3. D50. B6. ; 用Φ50Calibration of measuring sphere radius with environmental gauge

              5.6 O9804 — Calibrate the center position of the ball

              Function: Calibrate the center position of the standard ball or calibration ball, providing a reference for subsequent tilt measurements and 5-point calibration..

              Format:

              G65 P9804 Xx. Yy. Zz. [Bb. Dd. Qq. Ss.]

              parameter Explanation
              Xx The nominal X position of the center of the ball
              Yy Ball center nominal Y position
              Zz The nominal Z-position of the center of the ball
              Bb Measuring ball diameter
              Dd Calibration ball diameter
              Qq Security increment
              Ss Offset update method

              6. Standard measurement cycle

              6.1 O9811 — XYZ Single sided measurement

              Function: Measure a surface to determine size or position.. Suitable for X, Y, or Z-axis directions. Can be used for workpiece alignment, offset update, allowance check, etc.

              Format:

              G65 P9811 Xx. 或 Yy. 或 Zz. [Ee. Ff. Hh. Mm. Qq. Ss. Tt. Uu. Vv. Ww.]

              parameter Explanation default value
              Xx/Yy/Zz The nominal position of the measured surface necessary
              Ee E=Over travel distance (mm) Z=4, XY=10
              Ff F=measured feed rate (mm/min) Machine tool setup
              Hh H=tolerance (mm) – alarm when exceeding the tolerance Close
              Mm M=positional tolerance (mm) Close
              Qq Q=safety increment (mm) thirty
              Ss S=bias update method S1=Update
              Tt T=rollback amount (mm) two
              Uu U=empirical value Ee (mm) – compensating for wear/thermal drift 0
              Vv V=Verification mode (%) Close
              Ww W=Over travel judgment (mm) three

              Example:

              ; standard Z Single sided measurement of axis
              G65 P9832
              G65 P9810 Z-8. F3000.
              G65 P9811 X-50. T10.
              G65 P9810 Z10.
              G65 P9833

              ; measurement Z direction,Inspection with tolerance
              G65 P9832
              G65 P9810 X-60. F3000.
              G65 P9810 Z5.
              G65 P9811 Z0. T11. H0.05 ; Tolerance ± 0.05mm
              G65 P9810 Z100.
              G65 P9833

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | X Actual measurement location / Y Actual measurement location / Z Actual measurement location |
              | #136 | Depends on the measuring axis |
              | #137 | Depends on the measuring axis |
              | #138 | Direction of the measured axis(1=X, 2=Y, 3=Z) |
              | #141 | Actual measurement location – nominal position (bias) |

              6.2 O9812 — boss/Groove measurement

              Function: Measure the width of protrusions (external features) or grooves (internal features).. Determine the center position and actual width by measuring the movement twice in opposite directions.

              Format:

              ; 仅 XY direction
              G65 P9812 Xx. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]
              G65 P9812 Yy. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              ; XY + Z height
              G65 P9812 Xx. Zz. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]
              G65 P9812 Yy. Zz. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              additional parameters Explanation
              Rr R=Quick positioning proximity distance (mm)

              Example:

              ; Measure the width of the groove in the X direction
              G65 P9832
              G65 P9810 Z10. F3000.
              G65 P9812 X50. Z-10. S2. ; XDirectional groove,Z-10height
              G65 P9810 Z100.
              G65 P9833

              ; Measure the width of the Y-axis convex platform,With tolerance
              G65 P9832
              G65 P9810 Z50.
              G65 P9812 Y80. Z20. H0.1 ; Ydirection,Tolerance ± 0.1mm
              G65 P9810 Z100.
              G65 P9833

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | X central location |
              | #136 | Y central location |
              | #138 | Measured width |
              | #140 | Nominal width |
              | #141 | Width deviation |

              6.3 O9814 — inner hole/Outer circle measurement

              Function: Measure the diameter and center position of the inner hole or outer circle.. Use 4-point (X+/X -/Y+/Y -) touch to determine the center and diameter. This is one of the most commonly used measurement cycles.

              Format:

              ; inner hole/Outer circle measurement
              G65 P9814 Dd. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              ; designate Z measure height
              G65 P9814 Dd. Zz. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              parameter Explanation
              Dd D=nominal diameter of the feature (mm)
              Zz Z=measuring height position
              Rr R=proximity distance: inner hole ≈ 2 x radius, outer circle=diameter+increment

              Example:

              ; measurementΦ50inner hole,S2=Do not update bias
              G65 P9832
              G65 P9810 Z10. F3000.
              G65 P9814 D50. Z-10. S2. R10.
              G65 P9810 Z100.
              G65 P9833

              ; Measure the inner hole,Automatically update the current workpiece bias
              G65 P9832
              G65 P9810 X0. Y0. F3000.
              G65 P9810 Z-10.
              G65 P9814 D80. S1. ; Measure and update bias
              G65 P9810 Z100.
              G65 P9833

              ; Measure the outer circle,Inspection with tolerance
              G65 P9832
              G65 P9810 Z50. F3000.
              G65 P9814 D120. Z30. H0.05 R130. ; outer circleΦ120,Tolerance ± 0.05mm
              G65 P9810 Z100.
              G65 P9833

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | center X Position |
              | #136 | center Y Position |
              | #137 | Z measure height |
              | #138 | Actual measured diameter |
              | #139 | roundness(Maximum radius – Minimum radius) |
              | #140 | Nominal diameter |
              | #141 | Diameter deviation |

              Data saving example:

              G65 P9814 D50. S1.
              #595=#135 ; Save Center X to#595
              #596=#136 ; Save Center Y to#596
              #598=#138 ; Save the measured diameter to#598
              #599=#139 ; Save roundness to#599
              #601=#141 ; Save diameter deviation to#601

              6.4 O9815 — Determine the inner corner

              Function: Determine the position of the inner corner from the four sides to the corner.. Even if the corner is not exactly 90 degrees, the true intersection can still be found.

              Format:

              G65 P9815 Xx. Yy. [Bb. Dd. Ee. Ii. Jj. Mm. Qq. Ss. Uu. Ww. Zz.]

              parameter Explanation
              Xx X=nominal X position at the corner
              Yy Y=nominal Y position at the corner
              Bb B=angular tolerance (°), such as B0.25=± 0.25 °
              Dd D=distance from the corner of the X wheelbase to the first measuring point
              Ee E=distance from the corner of the Y wheelbase to the first measuring point
              Ii I=incremental distance of the second measurement point along X
              Jj J=incremental distance of the second measurement point along Y
              Zz Z=Z measuring height

              Example:

              ; Determine the inner corner
              G65 P9832
              G65 P9810 Z-5. F3000.
              G65 P9815 X20. Y20. I10. J10.
              G65 P9810 Z100.
              G65 P9833

              ; Angle tolerance inspection
              G65 P9832
              G65 P9810 Z-5. F3000.
              G65 P9815 X100. Y50. B0.5 D10. E10. I15. J15.
              G65 P9810 Z100.
              G65 P9833

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | X Measured corner position |
              | #136 | Y Measured corner position |
              | #139 | X Plane to X+ Axis angle |
              | #141 | X Directional deviation |
              | #142 | Y Plane to X+ Axis angle |
              | #143 | Y Directional deviation |

              6.5 O9816 — Determine the outer corner

              Function: Determine the position and angle of the outer corner (convex corner)..

              Format:

              G65 P9816 Xx. Yy. [Bb. Dd. Ee. Ii. Jj. Mm. Qq. Ss. Uu. Ww. Zz.]

              Parameter description is the same O9815。

              Example:

              T01 M06
              G54 X-10. Y-10.
              G43 H1 Z100.
              G65 P9832
              G65 P9810 Z-5. F3000.
              G65 P9816 X0. Y0. I10. J10.
              G65 P9810 Z100.
              G65 P9833
              G28 Z100.
              G17
              G68 X#135 Y#136 R#139 ; Align corners in a rotating coordinate system

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | X Measured corner position |
              | #136 | Y Measured corner position |
              | #139 | X Plane to X+ Axis angle |
              | #141 | X Directional deviation |
              | #142 | Y Plane to X+ Axis angle |
              | #143 | Y Directional deviation |

              6.6 O9817 — 5Point rectangle measurement

              Function: Determine the center, size, and rotation angle of a rectangle (convex or concave) through 5 measurement points.. Even if the features are not perpendicular to the machine axis, the true center can still be found.

              External feature format(convex platform):

              G65 P9817 Dd. Ee. Zz. [Aa. Bb. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              Internal feature format(groove/cavity):

              G65 P9817 Dd. Ee. [Aa. Bb. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              parameter Explanation
              Dd D=nominal length of features on the X-axis
              Ee E=nominal length of features on the Y-axis
              Zz Z=Z Measure height position (only required for external features)
              Aa A=Measurement surface: A14=default, A12=top surface, A11=right surface, A13=left surface
              Bb B=Angle tolerance (°)
              Hh H=P2/P4 point’s position relative to the lower left corner on X
              Tt T=distance between two measuring points on the same surface
              Vv The position of point v=P1/P3 relative to the lower left corner on Y

              Example:

              ; External rectangular measurement,Nominal length 80, width 50
              G65 P9832
              G65 P9810 Z10. F3000.
              G65 P9817 D80. E50. Z-10.
              G65 P9810 Z100.
              G65 P9833

              ; Internal rectangular measurement,With angle tolerance
              G65 P9832
              G65 P9810 Z10. F3000.
              G65 P9817 D60. E40. A12. B0.2 H0.1 M0.1 Q10. R10. S1. T60. U2. W2.
              G65 P9810 Z100.
              G65 P9833

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | center X Position |
              | #136 | center Y Position |
              | #137 | Z measure height |
              | #138 | X Shaft measured length |
              | #139 | rotation angle(从 X+ Axis measurement) |
              | #140 | Y Nominal length of shaft |
              | #141 | X Length deviation |
              | #142 | Y Actual measured length |
              | #143 | Y Length deviation |

              7. Vector measurement cycle

              7.1 O9821 — Tilt plane measurement

              Function: Measure a plane with a tilt angle.. Supports both angle input and XYZ coordinate modes.

              Format (Angle Input):

              G65 P9821 Aa. Dd. [Ee. Ff. Hh. Mm. Qq. Ss. Tt. Uu. Vv. Ww.]

              Format (XYZ input):

              G65 P9821 Xx. Yy. Zz. [Cc. Hh. Mm. Qq. Ww.]

              parameter Explanation
              Aa A=angle of the corresponding plane (°)
              Dd D=distance from the feature center to the measurement point
              Xx/Yy/Zz Coordinate position of measurement point
              Cc C=Measurement surface of the plane: 1=Front+Z, 2=Rear – Z, 3=Front+XY

              Example:

              ; Angle input mode — 45°inclined plane
              G65 P9821 A45.005 D50.005 E21. F0.8 H0.2 M0.2 Q10. S1. T20. U0.5 V0.5 W2.

              ; XYZ Input mode
              G65 P9821 X25. Y25. Z25. C1.

              7.2 O9822 — Tilted convex platform/Groove measurement

              Function: Measure protrusions or grooves with tilted angles..

              Format:

              ; Axial only
              G65 P9822 Aa. Dd. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              ; designate Z height
              G65 P9822 Aa. Dd. Zz. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              parameter Explanation
              Aa A=angle of the feature (°)
              Dd D=nominal length/diameter of the feature on the X-axis
              Zz Z=measuring height

              Example:

              ; Tilted groove,45°角,Nominal length 50mm
              G65 P9822 A45.005 D50.005 Z50. E21. F0.8 H0.2 M0.2 Q10. R10. S1. T20. U0.5 V0.5 W2.

              7.3 O9823 — 3Point inner hole or outer circle measurement

              function: Use 3 Sub vector measurement, mobile measurement, inner hole or outer circle。比 O9814 的 4 Point method is more flexible,Can be measured at any angle position,Suitable for non orthogonal pore systems。

              Format:

              ; 3Point measurement
              G65 P9823 Aa. Bb. Cc. Dd. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              ; designate Z height
              G65 P9823 Aa. Bb. Cc. Dd. Zz. [Ee. Ff. Hh. Mm. Qq. Rr. Ss. Tt. Uu. Vv. Ww.]

              parameter Explanation
              Aa A=angle of the first point (°)
              Bb B=angle of the second point (°)
              Cc C=angle of the third point (°)
              Dd D=nominal diameter of the feature (mm)
              Zz Z=measuring height

              Example:

              ; At 0 °、150°、35°Measurement in three directionsΦ50inner hole
              G65 P9823 A45.005 B150. C35.005 D50.005 Z50. E21. F0.8 H0.2 M0.2 Q10. R10. S1. T20. U0.5 V0.5 W2.

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | center X Position |
              | #136 | center Y Position |
              | #138 | Actual measured diameter |
              | #139 | roundness(Maximum radius – Minimum radius) |

              8. Advanced Loop

              8.1 O9818 — Fourth axis measurement

              Function: Measure the direction and position of the workpiece rotation axis on a 4-axis machine tool.. Supports measurement on the B-axis (rotating around Y) and A-axis (rotating around X).

              Format (4 modes):

              ; K1=BAxis up and down measurement(Y-Zplane)
              G65 P9818 Yy. Zz. [Kk. Qq. Bb. Ss. Ww.]

              ; K2=BAxis left and right measurement(X-Zplane)
              G65 P9818 Xx. Zz. [Kk. Qq. Bb. Ss. Ww.]

              ; K3=A轴(CExternal axis)
              G65 P9818 Xx. Yy. [Kk. Qq. Bb. Ss. Ww.]

              ; K4=From the outside to the center
              G65 P9818 Xx. Yy. [Kk. Qq. Bb. Ss. Ww.]

              parameter Explanation
              Kk K=Mode: 1=B-axis up and down, 2=B-axis left and right, 3=A-axis outside, 4=outside to center
              Bb B=Angle tolerance (°)
              Xx/Yy/Zz measurement position

              Example:

              ; BAxis up and down measurement
              G65 P9818 Y100. Z50. K1. Q10. B2. S1. W2.

              ; BAxis left and right measurement
              G65 P9818 X100. Z50. K2. Q10. B2. S1. W2.

              ; AExternal measurement of axis
              G65 P9818 X100. Y50. K3. Q10. B2. S1. W2.

              ; From external to central
              G65 P9818 X50. Y100. K4. Q10. B2. S1. W2.

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | Deviation in the 4th axis direction |
              | #136 | Position of the 4th axis |
              | #141 | Rotation center deviation |

              8.2 O9819 — PCD The inner hole on top/Outer circle measurement

              Function: Measure the pitch circle diameter of PCD (Pitch Circle Diameter) holes.. The accuracy of measuring the overall pitch diameter of the hole group can be achieved.

              Format:

              ; Outer circle mode
              G65 P9819 Cc. Dd. Zz. [Aa. Bb. Hh. Mm. Qq. Rr. Ww.]

              ; Internal hole mode
              G65 P9819 Cc. Dd. Kk. [Aa. Bb. Hh. Mm. Qq. Rr. Ww.]

              parameter Explanation
              Cc C=nominal value of pitch circle diameter (PCD)
              Dd D=hole/outer diameter
              Kk K=Z measurement height for inner hole mode
              Aa A=starting angle (°)
              Bb B=Angle tolerance (°)

              Example:

              ; Internal hole mode:PCD=Φ28.003,apertureΦ50.005
              G65 P9819 C28.003 D50.005 K11. A45.005 B2. H0.2 M0.2 Q10. R10. W2.

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | PCD center X |
              | #136 | PCD center Y |
              | #138 | actual measurement PCD diameter |
              | #141 | PCD Diameter deviation |

              8.3 O9820 — blank stock

              Function: Measure the surface margin at multiple locations, determine the maximum margin, minimum margin, and their positions.. Suitable for predicting the quantity of raw materials such as castings and forgings.

              Format:

              ; X Direction surface
              G65 P9820 Xx. [Jj. Kk. Ss. Uu. Qq.]

              ; Y Direction surface
              G65 P9820 Yy. [Ii. Kk. Ss. Uu. Qq.]

              ; Z Direction surface
              G65 P9820 Zz. [Ii. Jj. Ss. Uu. Qq.]

              parameter Explanation
              Xx/Yy/Zz The nominal position of the measured surface
              Ii I=starting position for X-axis measurement (with Y/Z direction margin)
              Jj J=Y-axis measurement starting position (with X/Z direction margin)
              Kk K=starting position for Z-axis measurement (with X/Y direction margin)

              Example:

              ; Measure the surface allowance in the X direction,YDirection starting from J10,ZDirection starting from K11
              G65 P9820 X100. J10. K11. S1. U0.5 Q5.

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | Minimum margin |
              | #136 | Maximum margin |
              | #141 | Average margin |
              | #142 | Minimum margin position |
              | #143 | Maximum margin position |

              8.4 O9834 — Feature to feature data

              function: Calculate the positional relationship between two measurement features。Call between two measurement cycles O9834,The system automatically calculates the relative distance from the first feature to the second feature/Position Bias。Support XY Flat and Z plane。

              XY plane format:

              ; X direction
              G65 P9834 Xx. [Ee. Ff. Hh. Mm. Ss. Tt. Uu. Vv. Ww.]

              ; Y direction
              G65 P9834 Yy. [Ee. Ff. Hh. Mm. Ss. Tt. Uu. Vv. Ww.]

              ; XY direction
              G65 P9834 Xx. Yy. [Bb. Ee. Hh. Mm. Ss. Uu. Ww.]

              ; Angle direction
              G65 P9834 Aa. Dd. [Bb. Ee. Hh. Mm. Ss. Uu. Ww.]

              ; Copy the previous feature data(No parameter)
              G65 P9834

              Z-plane format:

              G65 P9834 Zz. [Ee. Ff. Hh. Mm. Ss. Tt. Uu. Vv. Ww.]
              G65 P9834 Aa. Zz. [Bb. Ww.]
              G65 P9834 Dd. Zz. [Bb. Ww.]

              Example:

              ; Measure the positional accuracy of two holes
              G65 P9810 X30. Y50. F3000.
              G65 P9810 Z-10.
              G65 P9814 D20. ; Measure the first hole
              G65 P9834 ; Copy the first feature data
              G65 P9810 Z10.
              G65 P9810 X80. Y78.867
              G65 P9810 Z-10.
              G65 P9814 D30. ; Measure the second hole
              G65 P9834 X50. Y28.867 M0.1 ; Calculate the center deviation of two holes

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | Features 1 to 2 X Directional deviation |
              | #136 | Features 1 to 2 Y Directional deviation |
              | #137 | Features 1 to 2 Z Directional deviation |
              | #141 | XY Synthetic bias |

              8.5 O9835 — Statistical Process Control(SPC)Knife repair update

              Function: Control the automatic update of tool offset based on the average value of multiple measurements.. Suitable for automatic compensation of tool wear in mass production.

              Format:

              G65 P9835 Tt. Mm. [Vv. Cc. Ff. Zz.]

              parameter Explanation
              Tt T=tool offset number
              Mm M=update mode: M31=average value update
              Vv V=update limit (no updates beyond this value)
              Cc C=number of measured samples
              Ff F=measure feed rate
              Zz Z=Z measuring height

              Example:

              ; Update the average value of tool bias T20,Sample size 4
              G65 P9835 T20. M31. V0.25 C4. F0.8 Z1.

              8.6 O9843 — Angle Measurement

              Function: Measure the angle of a surface between two positions.. Can be used to compensate for the fourth axis or verify the slope angle.

              Format:

              G65 P9843 Xx. Dd. [Aa. Bb. Qq. Ww. Zz.]
              G65 P9843 Yy. Dd. [Aa. Bb. Qq. Ww. Zz.]

              parameter Explanation
              Xx/Yy Measure the nominal position of the surface
              Dd D=measurement spacing (distance between two measurement points)
              Aa A=4th axis angle for compensation (°)
              Bb B=Angle tolerance (°)

              Example:

              ; XDirection and angle measurement,Distance 30mm
              G65 P9843 X50. D30. A45. B0.2 Q15. W1. Z10.

              ; YDirection and angle measurement
              G65 P9843 Y100. D50. A30. B0.1 Q20. W1. Z15.

              Output variables:
              | variable | Content |
              |:—|:—|
              | #135 | Location of the first measurement point |
              | #136 | Location of the second measurement point |
              | #139 | Measured angle (°) |
              | #141 | angular deviation |

              9. Output variable table

              9.1 Overview of Output Variables

              The execution results of all measurement loops are stored in the following common variables. Different loops may have different interpretations of the same variable, please refer to the explanations for each loop.

              variable Basic meaning Detailed Explanation
              #135 The measured position of the feature on the X-axis See specific definitions for each cycle
              #136 The measured position of the feature on the Y-axis See specific definitions for each cycle
              #137 The measured position of the feature on the Z-axis See specific definitions for each cycle
              #138 Characteristic diameter/width See specific definitions for each cycle
              #139 Characteristic angle or formal value (roundness, angle, etc.) See specific definitions for each cycle
              #140 Theoretical value (nominal value) The target value entered during programming
              #141 Deviation value (measured value nominal value) Positive=too large, negative=too small
              #142 Second angle or deviation component See specific definitions for each cycle
              #143 Second axis deviation See specific definitions for each cycle
              #144~#149 Retain or cycle specific values Each cycle is different

              9.2 Comparison Table of Output Variables for Each Cycle

              Macro Number function #135 #136 #137 #138 #139 #140 #141 #142 #143
              O9811 Single sided measurement Actual measurement location Measure axis direction bias
              O9812 Convex/groove X Center Y Center Measured width Nominal width Width deviation
              O9814 Inner hole/outer circle X Center Y Center Z height Actual measured diameter roundness Nominal diameter Diameter deviation
              O9815 Inner corner X Corner Y Corner X-plane angle X deviation Y-plane angle Y deviation
              O9816 Outer corner X Corner Y Corner X-plane angle X deviation Y-plane angle Y deviation
              O9817 5-point rectangle X Center Y Center Z height X measured length rotation angle Y nominal length X deviation Y actual measurement Y deviation
              O9823 3-point measurement X Center Y Center Actual measured diameter roundness
              O9818 The 4th axis Directional deviation Position Rotation center deviation
              O9819 PCD PCD Center X PCD Center Y Tested PCD PCD deviation
              O9820 blank stock Minimum margin Maximum margin Average margin Minimum position Maximum position
              O9834 Features to Features X deviation Y deviation Z deviation XY synthesis deviation
              O9843 Angle Measurement Point 1 The second point Measured angle angular deviation

              9.3 Recommended variable saving

              Due to output variables #135~#149 It will be covered after each measurement cycle,Suggest copying the results to the reserved variable area if necessary(#500~#531):

              ; O9814 Save data after measuring the inner hole
              G65 P9814 D50. S1. ; measurementΦ50inner hole
              #500=#135 ; Save Center X to#500
              #501=#136 ; Save Center Y to#501
              #502=#137 ; Save Z height to#502
              #503=#138 ; Save the measured diameter to#503
              #504=#139 ; Save roundness to#504
              #505=#140 ; Save nominal diameter to#505
              #506=#141 ; Save diameter deviation to#506

              Recommended variable mapping:

              Retain variables Purpose Corresponding output
              #500 backup #135 X position/first value
              #501 backup #136 Y position/second value
              #502 backup #137 Z position/third value
              #503 backup #138 Diameter/Width
              #504 backup #139 Angle/roundness
              #505 backup #140 nominal value
              #506 backup #141 deviation value
              #507 backup #142 Second angle/Y actual measurement
              #508 backup #143 Y deviation

              10. General Parameter Description Table

              10.1 Common parameters for all measurement cycles

              The following parameters apply to all measurement cycles(O9811~O9823),Unless otherwise specified:

              parameter letter meaning default value Explanation
              Travel distance Ee Distance of the probe from the expected position (mm) Z=4, XY=10 The distance that continues to move after touch testing is used to compensate for positional deviation
              Measure feed rate Ff Feed rate during touch testing (mm/min) Machine tool setup It is recommended to use low speed to achieve high accuracy (mainstream brand probes usually have a one-way repeatability accuracy in the range of 0.25~1.0 µ m 2 σ in machine measurement), and 0.5~2 mm/min is commonly used
              tolerance value Hh Characteristic dimension tolerance (mm) Close Triggered when exceeding the tolerance O9700 alarm
              Position tolerance Mm Cylindrical tolerance zone around theoretical position (mm) Close Assess whether the location of the evaluation center is within the allowable range
              Security increment Qq Backward distance before approaching the measuring surface (mm) thirty Test the rollback after touch testing, prepare for the next approach
              approach distance Rr Quickly locate the distance to the measurement location (mm) Cycle related Inner hole ≈ 2 x radius, outer circle=diameter+increment
              Offset update method Ss How to update measurement results to workpiece bias S1=Update 1=Update current, 2=Do not update, 3~6=Update to G54~G57
              backoff Tt Backward distance after touch testing (mm) two Ensure that the measuring needle leaves the surface of the workpiece
              Experience value Ee Uu Tool wear/thermal drift compensation amount (mm) 0 Pre compensation for thermal deformation of machine tools
              Verification Mode Vv Verification of the percentage deviation between the measured value and the nominal value (%) Close Used to detect serious deviations (such as after a collision)
              Travel itinerary assessment Ww Determine whether the probe has exceeded its travel distance (mm) three Exceeding this value is considered an abnormal touch test

              10.2 Detailed explanation of Ss bias update method

              S value behavior Explanation
              S1 Update the current activated workpiece bias (G54~G59) most commonly used
              S2 Do not update bias,Only output measurement values to #135~#149 Only for measurement/inspection purposes
              S3 update to G54 Write directly G54
              S4 update to G55 Write directly G55
              S5 update to G56 Write directly G56
              S6 update to G57 Write directly G57

              10.3 System Configuration Variables

              variable Purpose default value Explanation
              #120 Verification mode ratio (%) 0=Disabled 1=Enable verification mode
              #123 In place detection tolerance (mm) zero point zero one zero O9810 中 C1 Precision in use
              #111+6 Regression coefficient zero point five Adjust the rollback distance after touch testing, with a value range of 0.1~2.0
              #111+9 Rapid positioning feed rate (mm/min) three thousand O9810 Fast movement speed for protection

              10.4 Probe numbering agreement

              Number Explanation
              D1 Probe 1 (default, used for measuring workpieces)
              D2 Probe 2(can pass through O9724 Configuration)
              D3 Probe 3
              More probes can be used through O9724 Configuration

              The probe number is only available in O9832(Activate the probe) Used in China Dd. Parameter specification。O9833(Close the probe)do not accept D parameter

              11. Installation and Configuration

              11.1 Software Installation

              Content: Software toolkit A-4012-0516

              Memory Requirements:

            • 8KB macro program storage space (approximately 20m paper tape length)
            • Fanuc system needs to enable macro program function (parameter 8000 series)
            • Installation method (recommended: use installation wizard):

            • Set CNC to EDIT mode
            • Load paper tape/memory card containing installation wizard
            • Run the installation program to automatically load all macro programs
            • Manual configuration (if the installation wizard is not available):

            • Integrate each macro program(O9700~O9843)Pass through the paper tape one by one/CF卡/RS232 Load to CNC
            • Ensure that the macro program number does not conflict with the existing program number in the system
            • Edit O9724(set up programs)Configure machine specific parameters
            • 11.2 Machine Tool Parameter Settings

              parameter Setting Explanation
              Parameter 6006 Bit4=1 Enable macro program pre reading control
              Parameter 6019 Bit4=1 Enable macro program storage
              Parameter 5006 Bit6=1 Enable variable reading

              11.3 Unit System Setting

              Fanuc system usage G20/G21 Switching to Unit System:

              G21 ; Metric system(mm)— Recommendation
              G20 ; imperial system(inch)

              All loops are written in metric system. If using the imperial mode, the values in the variables will be automatically converted, but the tolerance and positional parameters will be inputted in the unit system as programmed.

              11.4 Multi probe configuration

              By editing O9724 Program enables multi probe support:

            • read O9724 Program
            • Find the multi probe setting area
            • Enable #120 The corresponding position in
            • Set the on/off M code for each probe
            • Example of probe selection:

              G65 P9832 D2. ; Open probe 2
              G65 P9832 D1. W1. ; Turn on probe 1 and check its status
              G65 P9833 ; Close the current probe(No D parameter)

              11.5 Error message (O9700)

              Can be edited through O9700 Program custom alarm information:

            • All alarms and information listed in Chapter 9 are stored in this program
            • Users can add custom machine specific alarms
            • 11.6 Variable Usage Regulations

              Variable Scope Purpose user access
              #1~#33 Local variable (G65 parameter pass) Read only (during transmission)
              #100~#109 loop control Should not be modified
              #110~#119 configuration parameters readable
              #120~#131 System Configuration Set as needed
              #132~#134 Internal parameters Should not be modified
              #135~#149 Measurement result output Read the main interface
              #150~#199 Internal temporary variables Should not be modified
              #500~#531 Universal reserved variables Free use

              12. Complete programming example

              Example 1: Inner hole measurement and workpiece alignment

              Scenario: Measure a Φ 80 inner hole on a milling center and automatically update the origin of the workpiece coordinate system..

              %O1000
              ; ============================================================
              ; Program Name: O1000 — Inner hole measurement and workpiece alignment
              ; workpiece: Φ80 inner hole
              ; Probe: Renishaw OMP40 (Measuring ball diameter 6mm)
              ; system: Fanuc 31i-B5
              ; Compile: Ningbo Jiangce Technology Co., Ltd Technical Department
              ; ============================================================

              T01 M06 ; Replace the tool and install the probe
              G90 G21 G40 G80 G17 ; safe mode:Metric mm
              G54 ; Activate G54 Workpiece Coordinate System

              G65 P9832 ; Activate the probe(Including spindle orientation)

              ; — 1. Safely locate above the center of the hole —
              G65 P9810 X0. Y0. F5000. ; XYLocate to the center of the hole
              G65 P9810 Z100. F3000. ; Raise to a safe height
              G65 P9810 Z10. F2000. ; Approaching the orifice

              ; — 2. Descend to measurement height —
              G65 P9810 Z-20. F1000. ; Descend to measurement height(With protection)

              ; — 3. Perform inner hole measurement,S1=Update current bias —
              G65 P9814 D80. S1. R40. ; R40=approach distance

              ; — 4. Read and save measurement results —
              #500=#135 ; Save Test Center X
              #501=#136 ; Save Test Center Y
              #502=#138 ; Save measured diameter
              #503=#139 ; Save roundness
              #504=#141 ; Save diameter deviation

              ; — 5. Exit to a safe altitude —
              G65 P9810 Z100. F3000.

              ; — 6. Close the probe —
              G65 P9833

              ; — 7. Program ended —
              G28 G91 Z0. ; ZAxis zeroing
              M30
              %

              Example 2: Calibration → Measurement → Compensation Complete Process

              Scenario: When using the probe for the first time, perform calibration, measurement, and tool repair updates in sequence..

              %O2000
              ; ============================================================
              ; Program Name: O2000 — Calibration→measurement→Complete compensation process
              ; workpiece: Standard environmental regulations + Tested workpiece
              ; Probe: Renishaw OMP40 (Measuring ball diameter 6mm)
              ; system: Fanuc 31i-B5
              ; Compile: Ningbo Jiangce Technology Co., Ltd Technical Department
              ; ============================================================

              ; ========== Phase One:Probe calibration ==========
              T01 M06
              G90 G21 G40 G80
              G65 P9832

              ; — 1.1 Calibration probe length —
              ; Using a known height reference plane Z0
              G65 P9810 Z50. F3000.
              G65 P9810 X0. Y0. F3000.
              G65 P9810 Z5. F500.
              G65 P9801 B6. K1. Z0. T20. ; K1=Length calibration
              G65 P9810 Z100. F3000.

              ; — 1.2 Calibrate the offset and radius of the measuring ball —
              ; UseΦ50.005Ring gauge
              G65 P9810 X0. Y0. F3000.
              G65 P9810 Z50. F2000.
              G65 P9801 K4. B6. D50.005 M180. Z50. ; K4=bias+Radius calibration
              G65 P9810 Z100. F3000.

              ; ========== Phase Two:Measuring workpiece ==========
              ; — 2.1 measurementΦ80inner hole —
              G65 P9810 X0. Y0. F3000.
              G65 P9810 Z10.
              G65 P9810 Z-15. F1000.
              G65 P9814 D80. S1. R45. ; measurementΦ80inner hole,Update bias
              G65 P9810 Z100. F3000.

              ; — 2.2 Save measurement results —
              #520=#135 ; Hole center X
              #521=#136 ; Hole center Y
              #522=#138 ; Actual measured diameter
              #523=#139 ; roundness
              #524=#141 ; Diameter deviation

              ; — 2.3 measurementΦ50boss —
              G65 P9810 X150. Y0. F3000.
              G65 P9810 Z10.
              G65 P9810 Z-10. F1000.
              G65 P9814 D50. Z-10. S2. R65. ; measurementΦ50outer circle,Do not update bias
              G65 P9810 Z100. F3000.

              ; — 2.4 Save the second measurement result —
              #530=#135 ; Convex center X
              #531=#136 ; Center Y of the convex platform
              #532=#138 ; Actual measured diameter of convex platform
              #534=#141 ; Deviation of convex diameter

              ; ========== Phase Three:Close the probe ==========
              G65 P9833

              ; ========== Phase Four:Knife repair update(According to the measurement results)==========
              ; hypothesis#522=Actual measured diameter,#524=bias
              ; If the diameter is too large by 0.05mm,Update tool wear compensation
              IF [#524 GT 0.05] GOTO 100
              IF [#524 LT -0.05] GOTO 200
              GOTO 900

              N100
              #3003=1 ; Prohibit single segment
              G10 L10 P1 R[#522-80.] ; Update tool radius compensation 1
              #3003=0 ; Restore Single Segment
              M00 ; Pause — Offset updated
              GOTO 900

              N200
              #3003=1
              G10 L10 P1 R[#522-80.]
              #3003=0
              M00

              N900
              G28 G91 Z0.
              M30
              %

              Example 3: Multi feature measurement and coordinate system rotation

              Scene: Measure the outer corner of the workpiece,Calculate rotation angle,Through G68 Rotating coordinate system for machining。

              %O3000
              ; ============================================================
              ; Program Name: O3000 — External corner measurement and coordinate system rotation
              ; workpiece: Rectangular workpiece,Need to measure the outer corners and rotate the coordinate system for alignment
              ; Compile: Ningbo Jiangce Technology Co., Ltd Technical Department
              ; ============================================================

              T01 M06
              G90 G21 G40 G80
              G54 X-10. Y-10. ; Preset starting point
              G43 H1 Z100.

              G65 P9832 ; Activate the probe

              ; — Locate near the outer corner —
              G65 P9810 Z-5. F3000.
              G65 P9810 X0. Y0. F2000.

              ; — Measure the outer corner —
              G65 P9816 X0. Y0. I10. J10. ; I10 J10 = Measurement increment

              ; — Read measurement results —
              #506=#135 ; XCorner position
              #507=#136 ; YCorner position
              #508=#139 ; XPlane angle
              #509=#141 ; Xbias
              #510=#142 ; YPlane angle
              #511=#143 ; Ybias

              ; — Exit —
              G65 P9810 Z100. F3000.
              G65 P9833

              ; — Apply coordinate system rotation —
              G28 G91 Z0.
              G90 G17
              G68 X#506 Y#507 R#508 ; Rotate around the measured corner as the center

              ; —Insert machining program here (in the rotated coordinate system) —
              ; . ..

              G69 ; Cancel Rotation
              M30
              %

              12.4 Example 4: Blank allowance detection

              Scenario: Conduct allowance testing on casting blanks to determine the minimum and maximum machining allowances..

              %O4000
              ; ============================================================
              ; Program Name: O4000 — Measurement of residual amount of casting blank
              ; Compile: Ningbo Jiangce Technology Co., Ltd Technical Department
              ; ============================================================

              T01 M06
              G90 G21 G40 G80
              G65 P9832

              ; — Position above the Z surface —
              G65 P9810 Z100. F3000.
              G65 P9810 X0. Y0. F3000.
              G65 P9810 Z10. F500.

              ; — Measure the surface allowance of Z at multiple locations —
              ; From I0 to I100 in the X direction,YMeasure on the grid from J0 to J100 in the direction
              G65 P9820 Z0. I0. J0. S1. U0.5 Q5.

              ; — Read the residual result —
              #535=#135 ; Minimum margin
              #536=#136 ; Maximum margin
              #537=#141 ; Average margin
              #538=#142 ; Minimum margin position
              #539=#143 ; Maximum margin position

              G65 P9810 Z100. F3000.
              G65 P9833
              M30
              %

              13. Common pitfalls and precautions

              Here are the 10+most common pitfalls when using the Renishaw Inspection Plus macro program, please be sure to pay attention to them:

              trap 1:O9833 incorrect use D parameter

              Error:

              G65 P9833 D1. ❌ — O9833 do not accept D parameter

              Correct:

              G65 P9833 ✅ — Close the probe(无 D parameter)

              O9833(Close the probe)In the official macro input parametersnot included D parameter。Only O9832(Activate the probe)Just received Dd. Parameter selection probe number。

              Trap 2: Confusing the Unit System Codes of Fanuc and Siemens

              Error:

              G70 ❌ — G70/G71 It is the unit system code of Siemens system

              Correct:

              G21 ✅ — Fanuc System Metric
              G20 ✅ — Fanuc System Imperial System

              Fanuc system usage G20/G21 Switch to Imperial System/Metric system。G70/G71 It’s Siemens(Siemens)Code used by the system,In the Fanuc control system, these codes have completely different functions(G70=British precise positioning,G71=Metric outer diameter coarse car cycle)。

              Trap 3: Missing decimal point when calling parameters

              Error:

              G65 P9814 D50 Z-10 ❌ — Missing decimal point

              Correct:

              G65 P9814 D50. Z-10. ✅ — Must include a decimal point

              In Fanuc macro programs, integer parameters must also contain a decimal point, otherwise the variable is assigned a value of zero.

              Trap 4: Incorrect order of I, J, K parameters

              Error:

              G65 P9xxx K9. J10. I30. ❌ — incorrect order

              Correct:

              G65 P9xxx I30. J10. K9. ✅ — Must press I→J→K order

              When the loop contains optional inputs I, J, K,must be declared strictly in the order of I → J → K..

              Trap 5: Forgetting to prioritize Z before XY

              Error:

              G65 P9810 X50. Y100. ❌ — 在 Z Move before lifting XY
              G65 P9810 Z10.

              Correct:

              G65 P9810 Z100. F3000. ✅ — 先 Z rise,再 XY move
              G65 P9810 X50. Y100.

              When descending, first descend Z and then move XY, and when ascending, first ascend Z and then move XY. This is the first principle of probe safety.

              Trap 6: Measurement results not saved in a timely manner and covered

              Error:

              G65 P9814 D50. ; The first measurement
              G65 P9814 D30. ; The second measurement — #135~#149 covered!
              ; #135 Now it’s the center of the second hole,The first data loss

              Correct:

              G65 P9814 D50. ; The first measurement
              #500=#135 ; Save Center X Now
              #501=#136 ; Save Center Y Now
              #503=#138 ; Save diameter immediately
              G65 P9814 D30. ; The second measurement — Use #500/#501 Can retain the first data

              Trap 7: Insufficient or incorrect calibration

              Re calibration is necessary in the following situations:

            • First installation of probe
            • Replace the measuring needle or measuring ball
            • After collision of the probe
            • When the thermal state of the machine tool changes significantly
            • After long-term disuse
            • Consequences of direct measurement without calibration: Diameter deviation can reach 0.05~0.20mm..

              trap 8:O9810 Excessive feed rate leads to probe damage

              Error:

              G65 P9810 Z-50. F10000. ❌ — Feed rate too high,High collision risk

              Correct:

              G65 P9810 Z10. F3000. ✅ — Standard safety feed rate
              G65 P9810 Z-5. F500. ✅ — Approaching low speed in the area

              Suggestion: Remote movement ≤ F5000, proximity to workpiece area ≤ F2000, precision proximity ≤ F500.

              Trap 9: Incorrect use of S parameter bias update method

              G65 P9814 D50. S3. ; S3=Update to G54
              ; Attention:If the currently activated one is not G5x,Updates may be unexpected

              S1=Update the currently activated bias;S3~S6=Update separately to G54~G57。Confirm the currently activated coordinate system before use S1。

              Trap 10: Measuring feed rate Ff set too slowly or too fast

            • Too slow (<100 mm/min): The measuring needle "crawls" on the surface of the workpiece, causing vibration and poor measurement repeatability
            • Too fast (>2000 mm/min): excessive travel, decreased positioning accuracy
            • Recommended: 480~1000 mm/min (standard steel parts), aluminum parts can be appropriately reduced
            • Trap 11: Improper setting of Tt rollback amount

              The retraction amount is the distance between the measuring needle and the surface of the workpiece after touch testing. Setting too small (<1mm) may cause the measuring needle to not completely leave, affecting the next measurement; Setting too large wastes cycle time.

              Suggestion: T5~T15 are commonly used ranges, and larger values are used for thick workpieces..

              Trap 12: Positive and negative sign directions in loop parameters

              O9811 的 Xx/Yy/Zz Parameter representationThe nominal position of the measured surface,Rather than the endpoint of the probe’s movement。The positive and negative signs determine which direction the probe approaches from:

              G65 P9811 X50. ; 从 X+ Approaching direction(measurement X+ 面)
              G65 P9811 X-50. ; 从 X- Approaching direction(measurement X- 面)

              Incorrect symbols can cause the probe to move away from the workpiece, resulting in an alarm if it passes through the stroke without touching.

              Trap 13: Forgetting to activate in place detection before moving the probe

              When it is necessary to perform measurements at precise positions, use C1 to enable in place detection:

              G65 P9810 Z-15. F500. C1. ; Accurate positioning with in place detection

              do not use C1 时,O9810 Stop immediately upon reaching the target location,May result in minor positioning errors。

              trap 14:confusion O9814(4点)和 O9823(3点)of choice

            • O9814: 4点(X+/X-/Y+/Y-),fast speed,Applicable to standard inner holes/outer circle
            • O9823: 3点(Any three angles),flexible,Applicable to non orthogonal features、Large diameter hole、Or in situations where space is limited
            • Incorrect selection may result in insufficient measurement accuracy or cycle timeout.

              Trap 15: Programming in English mode without conversion

              If the machine tool is used G20(imperial system),All parameter values should be converted to English units for input:

              G20 ; Imperial mode
              G65 P9814 D1.9685 ; correspond toΦ50mm = 1.9685 inch

              But the Inspection Plus loop is internally written in metric, and the values in the variables are automatically converted in English mode. The most prone to error is when the tolerance value (Hh) is not converted.

              Appendix A: Quick Reference Card

              A. 1. Common macro quick search

              Macro Number function Required Parameters Commonly used options
              O9832 Activate the probe Dd. W1.
              O9833 Close the probe W1.
              O9810 Protect positioning Xx/Yy/Zz Ff. Mm. C1.
              O9801 Calibration Kk. Bb. Dd. Zz. Tt.
              O9811 Single sided measurement Xx/Yy/Zz Ss. Qq. Tt.
              O9812 Convex/groove Xx/Yy Zz. Rr. Ss.
              O9814 Inner hole/outer circle Dd. Zz. Rr. Ss.
              O9815 Inner corner Xx. Yy. Ii. Jj.
              O9816 Outer corner Xx. Yy. Ii. Jj.
              O9817 5-point rectangle Dd. Ee. Zz. Aa. Bb.
              O9823 3-point measurement Aa. Bb. Cc. Dd. Zz. Ss.
              O9834 Features to Features Xx/Yy/Zz/Aa Bb. Mm.
              O9843 Angle Measurement Xx/Yy. Dd. Aa. Bb.

              A. Quick lookup of output variables

              variable O9814 O9811 O9812 O9817 O9823 O9834 O9843
              #135 Center X measured value Center X Center X Center X X deviation Point 1
              #136 Center Y Center Y Center Y Center Y Y deviation The second point
              #137 Z height Z height Z deviation
              #138 Actual measured diameter axial direction Measured width X length Actual measured diameter
              #139 roundness rotation angle roundness Actual measured angle
              #141 Diameter deviation bias Width deviation X deviation XY deviation angular deviation

              A. 3 Safety Programming Checklist

            • Execute after changing the knife G65 P9832 Activate the probe
            • All mobile usage G65 P9810 Protect positioning
            • Raise Z first and then move XY (when exiting)
            • Lower Z first and then move XY (when entering)
            • Execute after measurement is completed G65 P9833 Close the probe
            • Timely copy the measurement results to #500~#531 Retain variables
            • Calibration → Measurement → Compensation Process Complete
            • Parameter values with decimal points
            • The order of I → J → K is correct
            • Used in metric mode G21
            • Document Version: V2.0
              Applicable Systems: Fanuc Macro B/Mitsubishi Meldas
              Software Part Number: A-4012-0516
              Reference Manual: Renishaw H-5755-8600-08-A (English)/H-5755-8608-08-A (Chinese)

              Compilation Unit: Technical Department of Ningbo Jiangce Technology Co., Ltd.
              Technical Support: Ningbo Jiangce Technology Co., Ltd.
              Copyright Notice: This document is compiled by the Technical Department of Ningbo Jiangce Technology Co., Ltd. and is only used for technical exchange and training purposes..

              The Renishaw and related product names referenced in this document are registered trademarks of Renishaw Corporation. All macro program parameters are based on Renishaw’s official programming manual (H-5755-8600-08-A).

              FAQ Selected Q&A

              问:Inspection PlusP9810 protection positioning and ordinary G00/G01What is the difference between moving?
              答:P9810Continuously monitor the status of the probe during movement——If the probe is accidentally triggered(For example, hitting a workpiece),It will immediately come to an emergency stop and trigger an alarm,Protect the probe from further damage。And G00/G01Not able to monitor probe signals,Directly collide with it。Therefore, all probe related movements should use P9810 instead of G00/G01,This is the first rule of Renishaw programming security。

              Q: How to confirm the accuracy of the results after calibration is completed?
              Answer: After calibration is completed, use a standard ring gauge or standard ball for verification measurement (P9814 measuring the inner diameter of the ring gauge), compare the measured value with the standard value, and if the deviation is within ± 2 μ m, it is considered qualified. Many on-site calibrations are started without verification, and then checked for accuracy issues. However, it was found that the systematic deviation was caused by the collision of the calibration benchmark. It is recommended to conduct a validation and record it after each batch calibration.

              Q: When measuring the inner hole with P9814, there is a significant deviation in the aperture. What should be the first step to check?
              Answer:Three step troubleshooting: ① Check if the calibration data (O9801 calibration for each K mode) is accurate – if the calibration is incorrect, all measurement data is incorrect;; ② Check if the measuring needle is bent or if there are ruby balls sticking to aluminum/debris (recalibration is necessary after replacing the measuring needle); ③ Confirm that the D parameter (standard diameter) of P9814 is consistent with the actual diameter of the ring gauge. These three reasons account for over 80% of the aperture measurement deviation.

              Related Reading

            • <a href=" https://jcetech.cn/scene-config-nav/ CNC machine internal measurement configuration scheme: Processing scenario x brand– View all brand recommended schemes by processing scenario
            • <a href=" https://jcetech.cn/inspection-plus-program-mazak/ Inspection Plus Macro Programming Guide (Mazak Chapter)
            • <a href=" https://jcetech.cn/fanuc-probe-programming/ Fanuc System Probe and Tool Alignment Programming Guide
            • <a href=" https://jcetech.cn/goprobe-program-toolsetter/ GoProbe tool setter independent programming and tool breakage detection
            • Official Appointment:jcetech.cn/contact
              Consultation Hotline: 157-5780-7400/132-2194-1413
              Shipping address: A2-12B17, Yinzhou R&D Park, Ningbo