Decimal Point Input: Is X1000 1000 mm or 1 mm?

In NC programs, a number written with a decimal point, such as X100. is read as 100 mm on any machine. But a number without a decimal point, such as X1000 , can be 1000 mm, 1 mm or even 0.1 mm, depending on the machine setting. This is the cause of accidents in which a program brought over from another machine or from CAM moves the tool to a place off by a factor of 1000. This page covers the two ways of reading and the exceptions for each address.

Diagram: how X1000 without a decimal point is read (compared on the same scale)

Calculator-typeX1000 → 1000 mm05001000 mmStandard type IS-BX1000 → 1 mm05001000 mm01 mmZoomed in 1000× around 0Standard type IS-CX1000 → 0.1 mm05001000 mm01 mmZoomed in 1000× around 0
Calculator-type reads a number without a decimal point as mm as it is, so X1000 is 1000 mm. Standard type multiplies by the least input increment, so with IS-B it is 1000 × 0.001 = 1 mm, and with IS-C it is 1000 × 0.0001 = 0.1 mm. Even with the same program, the tool moves to a place off by a factor of 1000 or 10000 depending on the machine setting (a figure drawn by Kezuriba based on an example in the Siemens ISO dialect manual).

.Two ways of reading: calculator-type and standard type

Where it is set and how to check it

Calculator: how this word is read (mm, seconds…)

WordAddress typeValue as read

The conversion factors follow the table in the Siemens ISO dialect manual (mm, inch, IS-B, IS-C). Which reading your machine uses is set by a parameter (MD 10884 on the Siemens ISO dialect, #1078 on Mitsubishi Electric). Do not test it by moving the machine: check the parameter screen or ask the machine builder first. Some controls have exceptions not covered here.

Units by address (standard type, in mm)

What the number 1 without a decimal point stands for. Compiled from the table in the Siemens ISO dialect manual[1]. In this table, the addresses whose reading changes are X Y Z U V W A B C I J K Q R F.

AddressStandard type IS-BStandard type IS-CCalculator-type
Linear axes X Y Z U V W0.001 mm0.0001 mm1 mm
Rotary axes A B C0.001°0.0001°1°
Arc center I J K, radius R, Q0.001 mm0.0001 mm1 mm
F (feed per minute)1 mm/min1 mm/min1 mm/min
F (feed per revolution)0.01 mm/rev0.01 mm/rev1 mm/rev
F (thread lead)0.01 mm0.01 mm1 mm
X, U of dwell G040.001 s0.001 s1 s

For inch, a linear axis is 0.0001 inch with IS-B and 0.00001 inch with IS-C[1]. Example with dwell: G04 X1000 is 1 second in standard type and 1000 seconds in calculator-type (it stops for nearly 17 minutes)[2].

×Addresses where the decimal point has no effect

The Mitsubishi Electric manual lists D H L M N O P S T as “addresses where the decimal point is invalid”; even if you add a decimal point, the fractional part is dropped and the value is read as an integer[3]. These are numbers (N, O, T, H, D), counts (L), spindle speed (S), M-codes and so on. Even if you write S1000.5 , it is still read as 1000.

Exceptions within the same NC (easy to get wrong here)

Diagram: start angle Q of a multi-start thread (seen from the end face)

2-start threadOnce-per-revolution signal position = 0°0°180°Start angles 0° and 180°Siemens: Q0 Q180.Haas: Q0 Q1800003-start threadOnce-per-revolution signal position = 0°0°120°240°Start angles 0°, 120°, 240°Siemens: Q120. Q240.Haas: Q120000 Q240000
For the k-th start of an n-start thread, repeat the same G32 shifted by the start angle Q = 360 × (k − 1) ÷ n. F is the lead (pitch × number of starts), not the pitch. How Q is written is the exact opposite depending on the model: the Siemens ISO dialect writes it in degrees with a decimal point (Q180.), and Haas writes it as an integer in 0.001° units (Q180000).

Expressions, variables and macro arguments

Differences between NCs

NCNumbers without a decimal pointPoints to watch
FANUC-compatibleStandard type by default; some models can be switched to calculator-type by a settingP and Q in cycles are integers in least input increments
Mitsubishi ElectricSelect type I (least input increment) or type II (mm) with #1078[3]D H L M N O P S T drop the fractional part. F for threading is read as the integer part in mm
Siemens (ISO dialect)Select calculator-type or standard type with MD 10884. The standard-type factors are IS-B and IS-C[1][2]Q for multi-start threads takes a decimal point (Q180.)
HaasThere are cases where an argument without a decimal point is read in the least increment[5]Q of G32 is an integer without a decimal point (Q180000)[4]
LinuxCNCA number without a decimal point is read as its face value (in effect, calculator-type)[6][7]Bringing in a FANUC-type program written without decimal points shifts values by a factor of 1000

Shop-floor checklist

Related: Introduction to NC Lathe Programming (try forgetting a decimal point in the simulator), Canned cycle list (sign and decimal point of Q), G32 threading, Codes with clashing numbers

Sources

A summary, in Kezuriba's own words, of the key points of each maker's public documents. Text and tables from the manuals are not copied.

  1. Siemens AG「SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Milling, 04.2007 Edition (6FC5398-7BP10-0BA0)」 cache.industry.siemens.com
  2. Siemens AG, "SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition" cache.industry.siemens.com
  3. Mitsubishi Electric“MITSUBISHI CNC 700/70 Series Programming Manual (Lathe System) (IB-1500057)” mitsubishielectric.com
  4. Haas Automation, Inc.“G32 Thread Cutting (Group 01) (lathe, per-code explanation page)” haascnc.com
  5. Haas Automation, Inc.“Mill Operator's Manual – 13 Macros (online version)” haascnc.com
  6. LinuxCNC project“G-code Overview (LinuxCNC Documentation)” linuxcnc.org
  7. National Institute of Standards and Technology (NIST)「The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000)」 nvlpubs.nist.gov