İçeriğe geç
İletişim Başlayın

Probing from a Program

Bu içerik henüz dilinizde mevcut değil.

The panel cycles cover the usual measurements. When you need one they do not cover, such as a feature at an angle, a check in the middle of a program, or a decision that depends on what was measured, you write it with G31.

G31 Z-50. F100. (feed down until the probe triggers)
IF [#5070 EQ 0] GOTO 900 (it never touched)
#100 = #5063 (the Z it triggered at)

The move stops the moment the probe trips, and where it stopped is recorded:

VariablesHold
#5061#5066the trip position: X, Y, Z, A, B, C in machine coordinates
#50701 if it triggered, 0 if it ran all the way to the target

A move that does not touch leaves the trip position as it was. It holds the previous touch, not an error and not zero, so read #5070 first. A macro that skips that check can measure the touch before last and carry on as though nothing were wrong.

P selects which input to watch: P1 is the tool probe, P2 is the part probe. P1 is the default.

G38.2 is refused. G31 is the probing move on this control.

G31 P11 and G31 P12 run the same move on the same inputs, but as a protected move rather than a measurement.

Nothing is being measured. The control is watching for an obstacle, and a trigger is a fault, not a result.

Use it to travel through space you are not certain is clear: reaching into a fixture, or approaching a part whose position you only roughly know. Use plain G31 when you want a number.

Every probe cycle publishes the same record, so a macro can check what happened instead of assuming it worked:

VariableHolds
#900which cycle ran
#901run counter, incremented every run
#902status: 0 is OK, anything else is the alarm number
#9031 when the cycle wrote the active work offset
#911the run number the values below belong to
#904 onwardsthe cycle’s own values: trigger position, compensated position, stylus radius applied

The values persist after a cycle finishes, so reading them tells you nothing about which run left them there. #911 is stamped with the run that wrote them:

IF [#911 NE #901] GOTO 900 (stale: this run did not write these)
IF [#902 NE 0] GOTO 910 (the cycle alarmed)

Without that check a macro reads whatever the previous cycle left behind, and cannot tell the difference between a fresh measurement and yesterday’s.

The pieces are all here: G31 to touch, #5061… to read where, the tool table for the stylus radius to take off, and G10 L2 to write the datum you worked out.

Keep the approach protected and the retreat along a path you know is clear. The shipped cycles return to the position they were handed, in machine coordinates, for exactly that reason.