{"id":"gcode-g38-5","model_id":"G38.5","name":"LinuxCNC G38.5","summary":"G38.5 is a LinuxCNC straight-probe G-code that moves the controlled point in a straight line at the current feed rate away from the workpiece. It stops when the probe input changes to the untouched state (loss of contact) or when the programmed endpoint is reached, whichever happens first. It does not signal an error if the probe fails to change state before the endpoint.","study_notes":["G38.5 has target state Untouched, move orientation From piece, and no error signal.","The axis words define the destination point. At least one axis word must be used; omitted axes retain their original value.","The move stops within machine acceleration limits when the programmed point is reached or when the requested change in the probe input occurs, whichever occurs first.","After successful probing, parameters #5061 to #5069 hold the X, Y, Z, A, B, C, U, V, W coordinates of the controlled point when the probe changed state in the current work coordinate system.","After unsuccessful probing, parameters #5061 to #5069 are set to the programmed point coordinates, and parameter 5070 is set to 1 for success and 0 for failure.","In inverse time feed mode, the feed rate is such that the whole motion from the current point to the programmed point takes the specified time.","A (PROBEOPEN filename.txt) comment opens a file and stores the 9-number XYZABCUVW coordinate of each successful straight probe; the file must be closed with (PROBECLOSE)."],"safety_notes":["A probe move cannot be used until the machine is set up to provide a probe input signal connected to motion.probe-input in a .hal file; TRUE means probe contact is closed (touching), FALSE means open.","The tool in the spindle must be a probe or must contact a probe switch.","It is an error if the current point is the same as the programmed point, no axis word is used, cutter compensation is enabled, the feed rate is zero, or the probe is already in the target state."],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g38","title":"G-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":6,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"G38.5","group":"Probing","syntax":"G38.5 axes","parameters":[{"name":"axes","data_type":"real","description":"Axis words define the destination point; at least one axis word must be used."}],"dialect":"LinuxCNC","related":[],"standards":[]},"url":"https://machineschema.com/instruction/gcode-g38-5","license":"https://creativecommons.org/licenses/by/4.0/"}