Probing on Mitsubishi M700/M70
The Mitsubishi M700/M70 macro layer is close enough to Fanuc Macro B that probing works the same way: a G31 skip move latches the touch position into system variables, the macro does the math, and the result is written into a work or tool offset. If you can probe on a Fanuc, you can probe on the Doosan, Feeler, or other builder iron these controls ship on. What differs is the plumbing — the skip interface is an option the builder wires, a few variable details shift (see the M700/M70 programming & macros reference), and most machines put an OEM conversational or Renishaw macro suite on top of the raw skip function.
G31 Skip on the M700/M70
A G31 X__ Y__ Z__ F__ block feeds toward its endpoint and, the instant the skip input turns on, latches the current position and moves to the next block. The latched positions land in the skip coordinate variables — #5061–#506n, last digit = axis number (1 = X, 2 = Y, 3 = Z on a typical mill), exactly as the variable map documents. The values are captured at the trigger even though the axis overtravels slightly while decelerating, which is what makes the read trustworthy.
- Feed rules. Command the skip feed with
Fin the G31 block; keep it slow enough that the stylus overtravel stays inside its protected range at your servo response. If no F is given, the control can take a skip feedrate from a setup parameter — confirm what the builder configured rather than assuming. - Multi-skip variants. The control also offers
G31.1/G31.2-style multi-stage skip commands that tie to specific skip-signal combinations with their own parameter-set feedrates — useful when a machine carries both a spindle probe and a tool setter on separate inputs. They are option- and wiring-dependent; verify which inputs your builder connected before relying on them. - High-speed skip. An optional hardware latch captures the position at the moment of contact instead of at the next control scan, tightening repeatability at a given feed. If the option is present, use it for gauging-grade measurements.
- No trigger = no alarm. If nothing trips the input, the block simply feeds to its programmed endpoint and execution continues. Always guard: compare the latched position against the commanded endpoint and raise an alarm if the probe never touched (the bore macro below shows the pattern).
The Complete Probe-to-Offset Chain
The M700/M70 macros article already shows the cleanest minimal chain in this wiki: a G31 touch against a fixed sensor, #5063 read for the latched Z, and the result written straight into length offset #10001. That is the whole idea in three blocks — skip, read, write.
The next level is a workpiece measurement that computes a feature, updates a work offset, checks tolerance, and keeps the numbers. This bore-center macro touches X+, X−, Y+, Y− from inside a bore, writes the measured center into the work offset selected by S, alarms via #3000 (displays as P277, message ≤ 31 characters — same conventions as the macros and alarms articles) if the diameter is out, and parks the results in retained common variables for SPC. It assumes the probe is already positioned at the nominal bore center at measuring depth, radius comp off, and that #510 holds the calibrated effective stylus ball diameter.
(MAIN - MEASURE 25MM BORE, UPDATE G54, TOL +/-0.05)
T30 M06 ; (SPINDLE PROBE)
G90 G54 G00 X0 Y0 ;
G43 H30 Z50. ;
G01 Z-8. F500 ; (FEED TO MEASURING DEPTH INSIDE BORE - CLEAR PATH)
G65 P8300 D25. Q3. S1 H0.05 F150. ;
G00 Z50. ;
M30 ;
O8300 (BORE CENTER - 4 TOUCH)
IF [#7 EQ #0] GOTO900 ; (D = NOMINAL DIA REQUIRED)
IF [#19 EQ #0] GOTO900 ; (S = WORK OFFSET 1-6 REQUIRED)
#30 = #7 / 2 + #17 ; (TARGET = NOMINAL RADIUS + Q OVERTRAVEL)
G31 X#30 F#9 ; #1 = #5061 ; (TOUCH X+)
IF [ABS[#1 - #30] LT 0.001] GOTO910 ; (REACHED ENDPOINT = NO TOUCH)
G00 X0 ;
G31 X-#30 F#9 ; #2 = #5061 ; (TOUCH X-)
G00 X0 ;
G31 Y#30 F#9 ; #3 = #5062 ; (TOUCH Y+)
G00 Y0 ;
G31 Y-#30 F#9 ; #4 = #5062 ; (TOUCH Y-)
G00 Y0 ;
#31 = [#1 + #2] / 2 ; (CENTER ERROR X, WORK COORDS)
#32 = [#3 + #4] / 2 ; (CENTER ERROR Y)
#33 = [#1 - #2] + #510 ; (DIA = BALL-CENTER SPAN + STYLUS DIA)
#27 = 5201 + 20 * #19 ; (S1=G54 X VAR #5221, S2=G55 #5241 ...)
#[#27] = #[#27] + #31 ; (SHIFT WORK OFFSET X BY MEASURED ERROR)
#[#27 + 1] = #[#27 + 1] + #32 ; (SHIFT WORK OFFSET Y)
#531 = #33 ; (RETAINED COMMONS - SURVIVE POWER-OFF)
#532 = #31 ;
#533 = #32 ;
IF [ABS[#33 - #7] GT #11] GOTO920 ; (H = DIA TOLERANCE)
M99 ;
N900 #3000 = 101 (BORE MACRO ARG MISSING) ;
N910 #3000 = 102 (PROBE NO TOUCH) ;
N920 #3000 = 103 (BORE DIA OUT OF TOL) ;
Per the argument table: D = #7, F = #9, H = #11, Q = #17, S = #19. The #5201 + 20 * #19 arithmetic lands on the G54–G59 offset variables (#5221–#5321, stride 20, same numbers as Fanuc), and #531–#533 sit in common variables 1, which the control retains through power-off — pull them with DPRNT or by hand for your SPC log before the next part overwrites them.
Tool Measurement
A tool setter is the same G31 chain pointed at a fixed sensor: feed the tool down, read #5063, write the length into the offset variables the macros article documents — #10001+n length (type 1) or #2001+n (type 2), wear at #11001+n/#2201+n. Example 1 in that article is exactly this workflow for a first-time length set.
Broken-tool detection is the re-measure of the same thing: touch the setter again after (or before) the cut, compare against the stored offset, and alarm if the delta says the tip is gone.
O8310 (BROKEN TOOL CHECK - T = TOOL/OFFSET NO, K = MAX DELTA)
#1 = #5003 ; (Z REFERENCE, PREVIOUS BLOCK END)
G31 Z-150. F300 ; (FEED TO SETTER)
#30 = #5063 - #1 ; (MEASURED LENGTH)
#31 = #[10000 + #20] ; (STORED LENGTH OFFSET FOR T)
IF [ABS[#30 - #31] GT #6] GOTO900 ;
M99 ;
N900 #3000 = 110 (TOOL BROKEN OR WRONG) ;
T = #20, K = #6. Set K to something the setter's repeatability plus normal wear cannot reach — 0.5 mm catches a snapped drill without false-tripping on a resharpened one. For automatic wear compensation instead of a hard alarm, write the delta into #[11000 + #20] with sanity limits.
OEM Packages and Renishaw
Almost no one probes an M700/M70 machine with raw G31 alone. Builders ship conversational probing screens (Doosan's EZ Guide-style setup pages, Feeler's setup cycles) and most spindle probes arrive with a Renishaw macro suite whose calling pattern matches Fanuc Inspection Plus: G65 P____ with letter arguments for nominal size, tolerance, and the offset to update, protected positioning cycles, and results parked in common variables. The concepts in that article — calibrate first, protected moves, copy outputs before the next cycle overwrites them — carry over wholesale. What does not carry over reliably is the program numbers and variable ranges: they are the installer's choice on a Mitsubishi, so treat your machine's macro printout and the builder's manual as the map rather than assuming O9810-series numbering.
Gotchas
| Gotcha | Why |
|---|---|
| Skip input is an option + wiring | G31 only latches if the skip interface option is present and the probe/setter output is actually wired to it. On a used machine, verify with a manual stylus deflection during a slow G31 before trusting anything. |
| Calibrate before trusting centers | Stylus runout and trigger-force lobing mean the effective ball diameter (#510 above) and X/Y offsets must come from probing a known ring or bore, not from the stylus spec sheet. |
| Radius comp off during probe moves | Run G40 before any G31. Compensated skip moves corrupt the geometry the latched position describes — and comp interacts badly with skip motion. |
| Look-ahead buffering | The latched #5061–#506n values are a snapshot, but blocks already read into the buffer can evaluate other reads (current position, modals) or consume an offset you just wrote before the motion around them completes — the same look-ahead behavior described throughout this wiki. Where a read or write must line up with motion, drain the buffer first; a G04 dwell between the write and the block that uses it is the common idiom. |
| No-touch is silent | A G31 that never triggers just completes and moves on. Every probing macro needs the endpoint-compare guard shown above, or a scrapped part becomes a crashed probe on the next move. |
▶ Try these in the Macro Playground — pick the Mitsubishi control, paste the bore-center macro, set #5061/#5062 as inputs to simulate the touches, and watch the center math and offset write happen live.
See Also
- Mitsubishi M700/M70 Programming & Macros — the variable map, argument table, and skip-to-length example this article builds on
- Mitsubishi M700 Alarms & Parameters — decoding the alarms your probing macros raise (and the ones the control raises back)
- Fanuc Renishaw Inspection Plus — the packaged-cycle pattern most Mitsubishi Renishaw installs mirror
- Reading & Writing System Variables — cross-control rules for the reads and writes probing depends on
References
- Mitsubishi Electric, MITSUBISHI CNC 700/70 Series Programming Manual (Machining Center System), IB-1500072, Mitsubishi Electric Corporation.
- Renishaw, Probing Systems for CNC Machine Tools / Inspection Plus Programming Manuals, Renishaw plc.
Have a question or want to contribute?
Contact us with corrections, additions, or topics you'd like covered.
Get in Touch