DryRun

Research notes

The FANUC Series 0i / 30i milling dialect (ROBODRILL, 31i-B5)

DryRun's FANUC dialect follows these notes; in this version only the catalogue ROBODRILL uses it. They were written from the ROBODRILL operator's manual and the standard FANUC rules, not on a real control: rows marked [K] or [A] are not verified (user guide §7.13; the simulator's own table is in §6.4).

Research date: 2026-10-14. How a FANUC milling control reads G-code, which alarms it raises, and what DryRun's fanuc dialect does with each code. The machine is in 06-fanuc-robodrill-d21.md; the other dialects are in 03-ddcs-v41-dialect.md (DDCS V4.1) and 05-grbl-dialects.md (GRBL family).

Review 2026-10-14: the decisions of the review after this research are applied in the tables below: rapidMode defaults to "independent" (dog-leg), duplicate words take the last value (PS5074 only with 3403#6 AD2 = 1), G41/G42 and G65/G66 are listed as assumed, macro control flow stops the run, and "FANUC" is not offered in the Library editor in v1 (only the catalogue ROBODRILL uses the dialect). The "DryRun v1" columns say what the simulator does; the user guide §6.4 is the reference, §7.13 lists what is assumed.

0. Evidence levels and sources

Main finding. FANUC is the reference dialect the DDCS imitates ("comprehensive Fanuc G code set"), so most of the DDCS table and code already fit: modal groups, canned cycles with absolute R/Z and K repeats, G98/G99, G43 H, M98/M99 with O labels in one file, macro lines skipped. From the GRBL family it needs the alarm model: a FANUC control stops the program at the first block it cannot accept and shows a numbered alarm (PS0010 IMPROPER G-CODE), as GRBL stops on error:20. FANUC-specific work: the decimal-point rule, G54.1 P1–P48, G52, G28/G30 through an intermediate point to the reference positions, the ROBODRILL tool-change rules (M06 alarms, T without M06), PS/OT alarm wording.

1. Program format and words

Item FANUC rule Source DryRun v1
% Start and end of a file on tape / I/O; not part of the program in memory [K] First % ignored; a second % ends the program (as DDCS percentEnds)
O number O0001–O9999 names a program; other numbers: PS0074 ILLEGAL PROGRAM NUMBER ("The program number is other than 1 to 9999") [OM] App. D The first O line is the main program's name; later O lines label subprograms (existing pre-scan). O0 or > 9999: alarm PS0074
(comment) Comment; text inside is ignored [K] As DDCS
; End of block (EOB) as printed on the screen and in manuals ("G91G28Z0;") — not a comment [OM] examples A trailing ; is dropped silently [A]; text after a mid-line ; is read as the next block on the control, so the line is skipped with a warning [A]
N Sequence number, 1–99999, optional [K] Accepted, no note
/ Optional block skip (/1–/9), skipped only when the operator switch is on [OM] §III-5.4 (optional block skip) The line runs; one note per program that it runs "as with BLOCK SKIP off"
Lower case Not documented as accepted outside comments [A] Accepted with one "not confirmed" note
Spaces Ignored between words [K] Accepted
Word letters G M X Y Z (A/B with a 4th/5th axis) I J K R F S T H D P Q L N O; an unusable address is PS0009 IMPROPER NC-ADDRESS [OM] App. D Same letters (A only with an A joint); any other letter: alarm PS0009
Letter without a value PS0005 NO DATA AFTER ADDRESS [OM] App. D Alarm PS0005
Too many digits PS0003 TOO MANY DIGIT (more digits than the word format allows; X ±99999.999 at 0.001 mm) [OM] App. D; range [K] Values ≥ 100 000 mm: alarm PS0003 (replaces the generic "number out of range")
Minus sign where not allowed PS0006 ILLEGAL USE OF MINUS SIGN [OM] Alarm for T-1, H-1, D-1, P-1 (M98), K-1
Decimal point where not allowed, or two PS0007 ILLEGAL USE OF DECIMAL POINT [OM] Alarm for G04 P1.5, M98 P10., T1., H1., K2., 1.2.3
Same word twice PS5074 ADDRESS DUPLICATION ERROR is in the alarm list; its trigger is not in the copy. With parameter 3403#6 (AD2) = 0, the default, the last value counts [OM] App. D; 3403#6 [K] Last value wins, one note; no PS5074 (T6)
Two G codes of one group "only the last G code specified is effective" — no alarm [OM] App. B note 4 Last wins, no alarm, one note (differs from DDCS and GRBL)
Group 01 code in a canned cycle Cancels the cycle ("the state set by specifying G80") [OM] App. B note 5 As G80 (already the DDCS behaviour)
Program end without M30/M02/M99 — [A] Warning program has no M30 (as DDCS)

1.1 The decimal point (the "X100" rule)

With parameter 3401#0 (DPI) = 0, the FANUC default, a length without a decimal point is in least input increments: on a metric control with IS-B (0.001 mm), X100 = 0.100 mm, X100. = 100 mm. With DPI = 1 ("calculator type") X100 = 100 mm [K; mfgrobots.com, §8]. F, S, T, H, D, M, K, L and the program number are integers either way; G04 P is in ms and takes no point; G04 X is seconds and takes one; G83 Q and G73 Q follow the length rule (Q2000 = 2 mm) [K]. The ROBODRILL manual tells the user to "Specify each value with a decimal point" in its own macro calls [OM §33, DDR M16 call], which matches DPI = 0. CAM posts for FANUC always write the point.

DryRun v1: a machine switch decimalPoint: "standard" | "calculator", default "standard". In standard mode an axis, I/J/K, R, Q or G04 X value without a point is scaled by 0.001 (inch: 0.0001) and the program gets one warning: X100 has no decimal point: read as 0.100 mm (FANUC parameter 3401#0 = 0); write X100. for 100 mm.

2. Code table

"Executed" = simulated. "Note" = runs, the Check lists a note. "Ignored" = the code is dropped with a warning, the rest of the line runs. "Skipped" = the line does not run (warning). "Alarm" = the control stops with that alarm: the line is not executed and the verdict is DO NOT RUN (as GRBL's rejected lines). Modal groups are from [OM] App. B; * = the state at power-on / reset.

2.1 G codes

Code Group FANUC behaviour Source DryRun v1
G00* 01 Rapid; on FANUC usually non-linear (each axis at its own rapid, dog-leg) unless parameter 1401#1 (LRP) = 1 [OM] App. B; LRP [K] Executed; rapidMode switch (DDCS field, reused): default "independent" (the factory LRP = 0): a dog-leg, every axis at its own rapid (T7)
G01 01 Linear feed; F never given → PS0011 FEED ZERO (COMMAND) [OM] App. D Executed; F missing → alarm PS0011
G02 / G03 01 Arc by R (R < 0: over 180°) or I/J/K (incremental from the start; omitted = 0). No R and no IJK: PS0022 R OR I,J,K COMMAND NOT FOUND. Radius mismatch beyond parameter 3410: PS0020 OVER TOLERANCE OF RADIUS. Helix with a third axis (standard on ROBODRILL: "Helical interpolation") [OM] App. D; [BR] Executed. Tolerance 3410 not found: v1 uses 0.005 mm [A] and says so in the alarm hint. An R arc to its own start point is a zero move [K] → note
G04 00 Dwell: X seconds (point allowed) or P ms (no point: PS0007) [K]; [OM] uses G04 P200, G04 X1. Executed
G05.1 Q1 / Q0, G05.4, G08 P1/P0 00 AI contour control on/off, HRV3; no path change [OM] App. B Executed, no effect (Fusion's FANUC post writes G05.1 Q1)
G09, G61, G62, G63, G64* 00/15 Exact stop / cutting modes [OM] App. B Executed, no effect
G10 L2 P0–P6 / L20 P1–P48 00 Writes work offsets (P0 = external, P1–P6 = G54–G59; L20 = G54.1 P1–P48) [OM] §37 template "G10 L2 P? X? Y? Z? (P=0-6)", "G10 L20 P? … (P=1-48)" L2 P1–P6 and L20 P1–P48 executed with the GRBL-family code (the run's copy changes; warning that the control keeps it). G10 L2 P0 (the external offset): line skipped. P outside the range: PS0031 ILLEGAL P COMMAND IN G10
G10 L10–L13 P R 00 Writes tool offsets (L10 H geometry, L11 H wear, L12 D geometry, L13 D wear) [OM] §37 Ignored, note: lengths come from the setup's tools
G15* / G16 17 Polar coordinates (option) [OM] App. B Ignored, "positions after this line may differ" (as DDCS)
G17* / G18 / G19 02 Plane [OM] Executed
G20 / G21 06 Inch / mm (kept over reset) [OM] App. B suppl. (2) Executed
G22 / G23* 04 Stored stroke check 2 on/off [OM] Executed, no effect
G27 00 Reference position check [OM] Skipped (no motion of its own needed)
G28 00 Rapid to the intermediate point (current G90/G91, work coordinates), then the named axes to the reference position. In a canned cycle: PS0044 G27-G30 NOT ALLOWED IN FIXED CYC [OM] App. D; semantics [K] Executed with the GRBL-family G28 code (controller.g28 = reference position, default machine 0). The G90 G28 X0 Y0 Z0 trap (intermediate = work zero) runs as written; note when the intermediate is in G90
G29 00 Return from the reference position through the G28 intermediate [OM] Skipped
G30 P2 (default) / P3 / P4 00 Second reference position (P3/P4 option) [OM] App. B; PS0046 ILLEGAL REFERENCE RETURN COMMAND [OM] P2 executed to controller.g30; P3/P4: alarm PS0046
G31 00 Skip (probing) [OM] Skipped
G37 00 Automatic tool length measurement (option) [OM] Skipped
G40* 07 Cutter compensation cancel [OM] Executed
G41 / G42 D 07 Cutter compensation left / right with offset D [OM] App. B Assumed: the path runs uncompensated and one entry per G41…G40 span, cutter compensation not simulated: lines 12–40, path off by D1, goes under "Assumed, not known", so the program never shows a clean measured result. Right only if D holds a wear value (CAM "wear" compensation)
G43 / G44 H 08 Tool length compensation + / −; H outside the offset table: PS0030 ILLEGAL OFFSET NUMBER (ROBODRILL: 200 offset pairs) [OM] App. D; [BR] G43 executed as on the DDCS (H n = tool n's length); G44 subtracts; H > 200 or negative: alarm PS0030
G49* 08 Cancel tool length compensation [OM] Executed
G50 / G51, G50.1 / G51.1 11 / 22 Scaling, programmable mirror (options) [OM] G50 / G50.1 (cancel): no effect; G51 / G51.1: line skipped
G52 00 Local coordinate system: shifts every work system by the given values; G52 X0 Y0 Z0 cancels [OM] App. B; semantics [K] Executed (an offset added to the active work system; cancelled by G52 with zeros, M30 or reset)
G53 00 Machine coordinates, this block only, at rapid [OM] App. B Executed (rapid)
G54*–G59 14 Work systems 1–6 [OM] Executed from the setup's zeros
G54.1 P1–P48 (also G54 P1) 14 Additional work systems, 48 standard on ROBODRILL [OM] App. B; [BR] "Addition of workpiece coordinate system 48 pairs" Executed: the setup's zero table gains G54.1 P1…P48; an undefined one reads 0 with a warning. P outside 1–48: alarm PS0031 [A]
G60 00 One-direction positioning (option) [OM] Executed as G00 with a note
G65 / G66 / G66.1 / G67 00/12 Macro call [OM] G65 / G66 / G66.1: line skipped, listed as assumed (macro P9810 not simulated (line 12); its motion is not checked; §2.3). G67: no effect
G68 / G69* 16 Coordinate system rotation (standard on ROBODRILL) [OM]; [BR] Ignored, "positions after this line may differ" (as DDCS); v2 candidate
G73 09 High-speed peck: retract d = parameter 5114 [K]; no Q or Q0: PS0045 ADDRESS Q NOT FOUND (G73/G83) [OM] App. D Executed (shared cycle code), retract read as 1 mm with a note
G74 09 Counter (left-hand) tapping [OM] Executed as G84
G76 09 Fine boring (oriented shift Q) [OM] Skipped
G80* 09 Cancel canned cycle [OM] Executed
G81 / G82 09 Drill / drill with dwell P (ms) [OM] Executed (shared)
G83 09 Peck drill, clearance d = parameter 5115 [K]; Q required (PS0045) [OM] Executed (shared), clearance 1 mm with a note
G84 09 Tapping; rigid with M29 S.. before it [OM] (M29 "Tapping cycle is rigid mode") Executed: feed to Z, dwell P, feed back to R (G85 geometry), note spindle reversal not simulated
G85 / G86 / G89 09 Bore: feed out / spindle stop + rapid out / dwell + feed out [OM] Executed with grblHAL's cycle code
G87 / G88 09 Back boring / boring with manual retract [OM] Skipped
Canned cycles: words — R, Z absolute in G90; in G91 R from the initial level and Z from R; K = repeat count; P dwell; Q peck. G98* return to the initial level, G99 to R [K] As the DDCS code: G90 only (G91 cycles skipped, as today), K repeats; L in a cycle: note "read as repeat count (FS15 format)"
G90* / G91 03 Absolute / incremental (parameter 3402#3 can make G91 the power-on state) [OM] App. B suppl. Executed
G90.1 / G91.1 — Not FANUC [OM] list Alarm PS0010
G92 / G92.1 00 Work coordinate system setting / preset [OM] G92 executed (shared); G92.1 clears the G92 shift on the named axes [K]
G93 05 Inverse time (option) [OM] Executed with the GRBL-family code
G94* / G95 05 Feed per minute / per revolution [OM] G94 executed; G95 executed for time as F × S [A]
G98* / G99 10 Canned-cycle return level [OM] App. B (*G98) Executed
Any other G code — PS0010 IMPROPER G-CODE ("An unusable G code is specified") [OM] App. D, App. B note 3 Alarm PS0010

2.2 M, T, S, F

Code FANUC / ROBODRILL behaviour Source DryRun v1
M00 / M01 Program stop / optional stop [OM] §IV-2.7.3 Executed (no pause)
M02 / M30 End of program [OM] Executed, program end
M03 / M04 / M05 Spindle CW / CCW / stop [OM] Executed (readout)
M06 T Tool change: Z to the reference position, then up into the turret while it indexes; X/Y on the same block move at the same time. T = 1–21 (ROBODRILL α-D21). Rules (all [OM] §III-6.2): T outside 1–21 → PS0251 TOOL CHANGE ILLEGAL T COMMAND; a Z word on the block → PS0250 TOOL CHANGE ILLEGAL Z AXIS COMMAND; M06 during cutter compensation, tool length compensation or a canned cycle → alarm 252 (ATC alarm) ("G49 and G80 may be specified within the block for M06"); S on the same block: "Do not specify" [OM] Executed as toolChange: "controller": rapid Z to machine 0, then the change (0.9 s for the estimate). Alarms PS0251, PS0250 and alarm 252 (ATC): M06 while tool length compensation (G43/G44 H2) is active. Add G49 (and G80) to the M06 block or before it; the ROBODRILL post does this (message text not in the copy). S with M06: warning
M06 P The n-th tool clockwise from the current one [OM] Executed
T without M06 On a "DRILL-MATE ATC" (the ROBODRILL's turret), "M06 is not specified in a block that specifies a T code" → PS0043 ILLEGAL T-CODE COMMAND [OM] App. D Alarm PS0043 — catches posts that pre-select the next tool (T2 on its own line), with the hint The ROBODRILL turret has no pre-selection; turn off 'preload tool' in the post (T11)
M07 Air blow on (ROBODRILL), not mist [OM] Executed, no effect
M08 / M09 Coolant on / off [OM] Executed, no effect
M19 Spindle orientation [OM] Executed, no effect
M29 Rigid tapping mode [OM] Executed, no effect
M98 P L; M98 P<tttt><pppp> Subprogram call; nesting beyond the limit → PS0077 TOO MANY SUB,MACRO NESTING; missing program → PS0076 PROGRAM NOT FOUND [OM] App. D; P/L format [K] Executed with the DDCS code (same-file O labels), 8-digit P decoded as repeats + program, depth 10 [K]; alarms PS0076 / PS0077; no "#122" note
M99 / M99 P Return; in the main program: restart from the top (endless); P<n> returns to N, missing → PS0078 SEQUENCE NUMBER NOT FOUND [OM] App. D; [OM] §1 pallet example M99 executed; in the main program ends the run with a note (shared); M99 P executed to N [A] or alarm PS0078
M198 Subprogram from external memory [OM] Skipped
Other M (M10–M17, M20–M28, M31–M79, M90–M133, M170–M172) ROBODRILL machine functions (clamps, probe, AI, doors, counters) [OM] §IV-2.7.3 Ignored with machine M code, no motion simulated
Unknown M Depends on the PMC (ladder); usually an alarm or a hang [A] Ignored with a warning
F mm/min (G94); F0 on an arc: PS0025 CIRCLE CUT IN RAPID (F0) [OM] F ≤ 0 on a feed move: PS0011
S 100–10 000 (24 000 option) 06 §1 Readout only

2.3 Custom macro B

# variables, [ ] expressions, IF [..] GOTO n, WHILE [..] DO m … END m, #3000 = n (MESSAGE), G65 calls are standard on the ROBODRILL ("Custom macro" [BR]). Alarms exist for each (PS0112 ZERO DIVIDE, PS0114 ILLEGAL EXPRESSION FORMAT, PS0115 VARIABLE NO. OUT OF RANGE, PS0124 MISSING END STATEMENT, PS0126 ILLEGAL LOOP NUMBER, PS0127 DUPLICATE NC,MACRO STATEMENT, PS0128 ILLEGAL MACRO SEQUENCE NUMBER [OM] App. D).

v1: not executed; each line is sorted by its effect. Variable assignments (#100 = 5.) and #3006 messages are skipped with a note. An unconditional #3000 = n (MESSAGE) is the control's macro alarm. G65 / G66 calls are skipped and listed as assumed (macro P9810 not simulated (line 12); its motion is not checked); a probe call (an S word, or P9853) reads G54 set by probe on line 12 — the setup's G54 is assumed to match where the probe finds the stock. GOTO, IF … GOTO, WHILE … DO … END and any word with a # value stop the run there: macro not simulated — results after line 12 not checked. Probing and tool-measurement macros (O9xxx calls) are typical victims.

3. Alarm wording (what the Check prints)

FANUC shows PS<4 digits> <MESSAGE> [OM App. D: "PS"alarm number", e.g. PS0003]. DryRun prints the same, then a short cause: PS0010 IMPROPER G-CODE: G90.1 is not a FANUC code — the control stops here; the simulation goes on as if you continued. Messages are copied exactly from [OM] App. D:

Alarm Message (as on the control) DryRun trigger
PS0003 TOO MANY DIGIT value ≥ 100 000 mm
PS0005 NO DATA AFTER ADDRESS letter without a number
PS0006 ILLEGAL USE OF MINUS SIGN negative T, H, D, K, M98 P
PS0007 ILLEGAL USE OF DECIMAL POINT point in G04 P, M98 P, T, H, D, K; two points
PS0009 IMPROPER NC-ADDRESS unknown letter, or A without an A joint
PS0010 IMPROPER G-CODE unknown G code
PS0011 FEED ZERO (COMMAND) G01/G02/G03 or a cycle with no F yet, or F0
PS0020 OVER TOLERANCE OF RADIUS IJK arc, start/end radius differ > tolerance
PS0022 R OR I,J,K COMMAND NOT FOUND G02/G03 with neither
PS0025 CIRCLE CUT IN RAPID (F0) G02/G03 with F0
PS0030 ILLEGAL OFFSET NUMBER H or D outside 0–200
PS0031 ILLEGAL P COMMAND IN G10 G10 L2 P > 6, L20 P > 48
PS0043 ILLEGAL T-CODE COMMAND T without M06
PS0044 G27-G30 NOT ALLOWED IN FIXED CYC G28/G30 while a cycle is active
PS0045 ADDRESS Q NOT FOUND (G73/G83) G73/G83 without Q or Q0
PS0046 ILLEGAL REFERENCE RETURN COMMAND G30 P3/P4 (option absent)
PS0074 ILLEGAL PROGRAM NUMBER O0 or O > 9999
PS0076 PROGRAM NOT FOUND M98 P to a missing O
PS0077 TOO MANY SUB,MACRO NESTING nesting > 10
PS0078 SEQUENCE NUMBER NOT FOUND M99 P to a missing N
PS0250 TOOL CHANGE ILLEGAL Z AXIS COMMAND Z on an M06 block
PS0251 TOOL CHANGE ILLEGAL T COMMAND M06 T outside 1–21 (machine's pocket count)
252 (ATC) text not in the copy M06 with G41/G42, G43/G44 or a cycle active
PS5074 ADDRESS DUPLICATION ERROR not raised: with 3403#6 = 0 (the default) the last value counts, with a note (T6)
OT0500 / OT0501 + OVERTRAVEL ( SOFT 1 ) / - OVERTRAVEL ( SOFT 1 ), shown as OT0500 (X) + OVERTRAVEL (SOFT 1) axis limit (stored stroke check 1): the run stops there, X 640.000 > max 600.000 — OT0500 (X) + OVERTRAVEL (SOFT 1) — the machine stops here; the rest of the job does not run

Not used in v1: PS0224 ZERO RETURN NOT FINISHED (the simulation always starts at the reference position), EX alarms (machine-side: door, tool clamp, spindle without tool).

5. Machine switches for dialect: "fanuc"

Field Values Default Meaning
rapidFeed mm/min 54000 on the ROBODRILL shared
rapidMode "interpolated" / "independent" "independent" (dog-leg) FANUC parameter 1401#1 LRP [K]; the factory value 0 is non-linear
decimalPoint "standard" / "calculator" "standard" parameter 3401#0 DPI
home, g28, g30 [x, y, z] machine [0, 0, 0] start pose, reference positions 1 and 2
toolChange "controller" "controller" M06 moves Z to the reference first
maxTool integer 21 turret pockets (PS0251 above)
toolChangeTime s 0.9 tool-to-tool time added to the estimate [optional]

6. Assumed but not verified (user guide §7.13)

  1. T6 Duplicate words: the last value assumed (parameter 3403#6 AD2 = 0, the default); with AD2 = 1 the control raises PS5074 instead.
  2. T7 G00 path: the non-linear dog-leg assumed (LRP = 0, the factory value; what the ROBODRILL ships with is not known); with LRP = 1 the rapid is a straight line. The real dog-leg is a rounded curve (acceleration).
  3. T8 Arc tolerance (parameter 3410) assumed 0.005 mm.
  4. T9 G73 retract (5114) and G83 clearance (5115) assumed 1 mm.
  5. T10 M06 always goes to the Z reference; X/Y stay unless commanded on the same block (manual says so; post habits like G91 G28 Z0 before M06 are harmless).
  6. T11 T without M06 is PS0043 on the ROBODRILL (the manual names the "DRILL-MATE ATC"); other FANUC machines with an arm-type ATC accept tool pre-selection.
  7. T12 Lower case and ; mid-line.
  8. T13 The decimal-point default (DPI = 0) on the owner's / user's control.
  9. T14 M99 in the main program loops forever on the control; simulated once.
  10. T15 Two codes of one group: last wins without an alarm (App. B note 4) — verify on a 0i-F, which may alarm.

7. Typical program (FANUC post, as the ROBODRILL manual's own example)

%
O0400 (FACE)
G91 G28 Z0
G00 G40 G49 G80 G90
G54 G28 X0 Y0 Z0          (G90: intermediate point = work zero — runs as written, with a note)
M06 T01
M03 S800
G00 X0 Y0
G00 G90 G43 Z1. H01
M08
G01 G90 Z-1. F600
X250.
Y-40.
X0
M05
G91 M09
G28 Z0 G49
M02
%

Program O400 in [OM] §I-1 (machining capability); the % and the comments are added.

8. Sources

Other controllers

The DDCS V4.1 dialect notes and GRBL 1.1 and grblHAL in DryRun.