Home › M-codes › Centroid CNC12 Acorn › M123
M123 Write value to data file
Centroid CNC12 Acorn M-code · Mill and lathe
Writes the value of P and any comment on the line to the open data file. R sets field width and Q the decimal places.
Format
M123 [P] [R] [Q] [L1]
Addresses
| Address | What it does |
|---|---|
P | Value or variable to write |
R | Field width |
Q | Decimal places |
L1 | No new line after it |
How it works
One shot.
Example program
M121 "LOG.TXT" ; OPEN FILE
#100 = 1.2345 ; MEASURED VALUE
M123 P#100 ; BORE DIAMETER
#100 = 1.2345 ; MEASURED VALUE
M123 P#100 ; BORE DIAMETER
Example is in inch. Check offsets and clearances first.
Watch out for
- Text after the semicolon on the line is written as the comment.
Machine builders set many M codes, and they change by model and options. Check the M code list for your machine.
Related codes
M123 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Built in M code relay 3 with M-Fin |
| DMG Mori MAPPS (Fanuc) | External output |
| Swiss (Citizen Star) | Back spindle high torque limit on (Citizen) |
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 M123 in the app All Centroid CNC12 Acorn M-codes