Home › M-codes › Centroid CNC12 Acorn › M122
M122 Write local position to data file
Centroid CNC12 Acorn M-code · Mill and lathe
Writes the current part position of all axes, or the named axes, to the open data file, plus any comment on the line.
Format
M122 [/axis] [L1] [Q1]
Addresses
| Address | What it does |
|---|---|
axis | Axes to write |
L1 | No new line after it |
Q1 | Write the DSP probe position |
How it works
One shot.
Example program
M120 "POINTS.TXT" ; OPEN FILE
M115 /Z P-15 F10. ; PROBE DOWN
M122 ; WRITE X Y Z
M115 /Z P-15 F10. ; PROBE DOWN
M122 ; WRITE X Y Z
Example is in inch. Check offsets and clearances first.
Watch out for
- The job stops with an error if no file was opened with M120 or M121.
Machine builders set many M codes, and they change by model and options. Check the M code list for your machine.
Related codes
M122 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Built in M code relay 2 with M-Fin |
| DMG Mori MAPPS (Fanuc) | External output |
Every M-code for Centroid CNC12 Acorn in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open M122 in the app All Centroid CNC12 Acorn M-codes