G38.2 – Straight Probe Cycle
G38.2 probes parts or fixtures. The axis moves towards the given position until the probe input triggers. If the probe doesn't trigger before the axis reaches that position, the program stops and an alarm is shown.
Syntax
G38.2 Z-10 F100
Coordinates
Always machine coordinates
You need
Probe input assigned (Low → High on trigger)
Parameters
Example – basic probe
N10 G38.2 Z-10 F100
Z moves towards machine coordinate Z−10 while watching the probe input. When the probe touches, Z stops immediately and the program continues with the next line. If the probe hasn't triggered by Z−10, the program stops and an alarm is shown.
Example – plasma torch height
G38.2 is often used with G92 to set the initial torch height on plasma machines.
N10 G38.2 Z-50 N20 G92 Z0 N30 G0 Z1
INFORMATION
Units are inches or millimetres, depending on the machine setup and whether G20 or G21 is active.