DryRun

Research notes

The Digital Dream DDCS V4.1 G-code dialect

DryRun's interpreter follows these notes. They were written from the manuals and forum reports, not on a real controller: where they say "not confirmed", the simulator warns.

Research date: 2026-10-04. Scope: how the owner's DDCS V4.1 (4-axis: XYZ + one rotary axis) interprets G-code, so that our interpreter (see 02 §4.2–4.3, which this document does not repeat) behaves the same way and warns in the same cases.

0. Evidence levels and sources used

Each claim below is tagged:

Page numbers are the printed page numbers. Digital Dream's forum (bbs.ddcnc.com) did not respond during this research (timeouts and connection refused), and the Internet Archive was offline. Forum content therefore comes only from search-result snippets and is marked [F].

Main finding. The V4.1 manual's G/M table is short, and most of it is copied from V3.1, Mach3 or LinuxCNC wording. It does not document modal groups, the comment syntax, behaviour on unknown codes, or rotary feed semantics. The dialect is "Fanuc-ish" ("DDCS V4.1 support comprehensive Fanuc G code set" [M41a p.4]), with real deviations listed in §3. Several behaviours can only be settled on the owner's controller, so §5 lists concrete test programs.


1. Code table

Column "Sim" means: MVP = implement in the MVP; Later = after the MVP; Warn = parse, do not execute, and emit a warning. Modal groups are [I]: no DDCS document defines them, so I assume Fanuc/RS274 groups.

1.1 G codes

Code Syntax (as documented) Group [I] Source Deviation from Fanuc / LinuxCNC Sim Reasoning
G0 G0 X Y Z A motion M41 p.87 Speed is the single parameter #103 "G0 Speed" (default 3000), not a per-axis rapid. #120 selects "Independent" (each axis at its own speed, so a dog-leg path) or "Interpolation" (straight line, the default). #121 says whether FRO applies to G0 MVP Core. Model #120: an independent G0 gives a different path, which matters for collision checks
G1 G1 X Y Z A F motion M41 p.87 F may be ignored entirely if #101 = 1 (the default!). See §3.1. Rotary feed semantics in §3.3 MVP Core
G2 / G3 G2 X Y Z R F or G2 X Y Z I J K F motion M41 p.87; M31 p.75 IJK are incremental from the start point by default; G90.1 switches to absolute (M31). Z in an XY arc = helix. See §3.2 MVP Core
G4 G4 P10000 = 10 000 ms non-modal M41 p.87; M31 p.75, p.80 P is in milliseconds (Mach3/Fanuc-P style). In LinuxCNC P is seconds. Whether X (seconds) is accepted is undocumented MVP Wrong units = 1000× dwell error
G12 / G13 G12 I<r> full circle around the current XY — M31 p.75 only Mach3-style. Not in the V4.1 table Warn Unknown on V4.1 (§5)
G15 / G16 G16 polar on: X = radius, Y = angle; G15 off polar M41 p.87 Fanuc-like. Example: G16 X10 Y90 → (0,10) Later CAM never emits it; hand code might
G17 / G18 / G19 plane select plane M41 p.87 none documented MVP Arcs and cycles
G20 / G21 inch / mm units M41 p.87 Machine units also come from param #001 (mm/inch), and all parameters are in those units [M41 p.76]. Interaction with G20/21 is undocumented. Forum users report inch-mode inaccuracy [F, madmodder] MVP Convert to mm internally
G28 G91 G28 X10 Y0 Z0 non-modal M41 p.87; M31 p.76 Manual: the axes go via the given point, "then the XYZ axes will go to the machine axis 0". V3.1: "Works only with G91"; unspecified axes do not move. Contradiction: the home parameters name #800–#803 "Mach Position of Reference Point 1 (G28)" (default X-30 Y-30 Z10), which suggests the target is reference point 1, not machine 0 MVP CAM posts emit G28 G91 Z0. Target = #800–#803 vs machine 0 is an open question (§5)
G30 G90 G30 X Y Z A P1..3 non-modal M41 p.87, p.82 P selects the reference point: P1 → #805–#808, P2 → #810–#813, P3 → #815–#818 (machine coordinates). "Need to Home each axis in advance, or system alarms" Later Rare in CAM output
G31 G31 X Y Z A L Q K F non-modal M41 p.87 Non-standard words: L = probe active level, Q = stop mode (0 decelerate, 1 immediate), K = hard limits on/off during probing. Example G91 G31 Z-1000 L0 Q1 K0 F100 Later Simulate as "move until a surface is hit", or stop at the target with a warning
G40 / G41 / G42 G41 D<n> cutter comp M31 p.76: "The function does not work yet". MEX: D table G41/G42 D01..D16. M41 p.6: "completed Radius compensation commands on DDCS V4.1" Not in the V4.1 G-code table, although the V4.1 feature list claims it. The tool table has D01–D16 diameters (#296–#311) Warn (Later: implement) Contradictory. CAM output is usually already compensated. Accept G40 silently, warn on G41/G42
G43 / G44 / G49 G43 H<n>, G49 tool length M41 p.46; M31 p.76; MEX H indexes a 16-entry table: H01–H16 length #264–#279, wear #280–#295 [M41 p.85]. G44 is in M31/MEX only, with "does not work yet" (M31) MVP (G43/G49); Warn (G44) Needed for correct Z
G53 G53 X10 Y10 non-modal M41 p.87; M31 p.76 Requires homed axes, otherwise "system alarms and exits". V3.1 says "malfunctioning, working analog G153" MVP CAM uses G53 G0 Z0 for safe retracts. Also accept G153 (=G53 with F) with a warning
G54–G59 select WCS WCS M41 p.87 Six offsets, set through the UI. No G59.1–.3 and no G10 L2/L20 documented MVP Offsets come from the machine setup file
G68 / G69 G68 X10 Y5 R45 rotation M41 p.87 Fanuc-like 2D rotation Later Hand code only
G73 see §3.4 cycle M41a p.88 vs M41b p.88 vs M31 p.76 Three conflicting definitions of Z/R/K Later CAM rarely uses it
G74 / G84 G74 X Y Z R P F (needs M29 first) cycle M41 p.88/89 Rigid tapping only with a servo spindle Later Simulate as a feed in/out
G80 cancel cycle cycle M31 p.76 (in the example column) Not in the V4.1 table, but CAM always emits it MVP Accept
G81 G81 X Y Z A R L F [M41a]; G81 X Y Z R K F [M31] cycle M41a p.88; M31 p.76 Repeat count is L (M41a) or K (M31). Missing from M41b MVP The most common cycle
G82 G82 X Y Z A R P L F cycle M41a p.89; M31 p.76 P units conflict: "dwell P seconds" (M41a) vs "P is the delay in milliseconds" (M31, also the P row on p.80) MVP Pick ms (consistent with G4) and warn. Open question
G83 G83 X Y Z A R Q K L F [M41a]; G83 X Y Z R Q I K F [M31] cycle M41a p.89; M31 p.76 M41a: Q = peck, K = clearance (LinuxCNC "d"-like), L = repeats. M31: Q = peck, I = "distance of failure", K = repeats MVP Common in CAM. K is ambiguous, so warn when K is present
G85–G89, G76 — — not documented anywhere — Warn Unsupported (§5)
G90 / G91 distance mode distance M41b p.88; M31 p.77 M31: in G90, "the centers of the arcs are relative" (incremental IJK) MVP Core
G90.1 / G91.1 arc centre mode arc distance M31 p.77; MEX The M31 table is internally inconsistent (G91.1 row says "centers absolute") Later (G90.1) CAM normally emits incremental IJK
G92 G92 X Y Z A non-modal M41b p.88; M31 p.77 Shifts the current coordinate system. No G92.1/.2 documented MVP Some posts emit G92 A0 to reset the rotary
G93 / G94 inverse time / per-minute feed mode M31 p.77 only ("Requires version 2019-05-27-111") Absent from both V4.1 manuals G94 MVP; G93 Later + warn Critical for 4-axis CAM (§3.3)
G98 / G99 initial / R-plane return return mode M41b p.88; M31 p.77 standard MVP With the cycles
G102/G103, G110–G112 ellipse and pocket macros — M31 p.78 DDCS-specific (V3.1) Warn Unknown on V4.1
G128 G128 X1 Y1 Z1 = home those axes non-modal M41b p.88 DDCS-specific Later Treat as a move to the home position
G153 G153 X Y Z A F non-modal M31 p.78 "Analog G53 … with speed F" Later

1.2 M codes

Code Meaning Source Notes Sim
M0 pause until Start M41 p.90 V3.1: like the Pause key, may lift Z (#903/#904 pause action) MVP
M1 optional stop MEX only not in the V4.1 table Warn
M2 end none Not documented for any DDCS Warn, but treat as end
M3 / M5 spindle CW / stop M41 p.90 MVP
M4 spindle CCW not in the V4.1 table, but param #128 "M4 Output Port CCW" exists [M41 p.79]; MEX lists it MVP
M6 tool change: stops and waits for Cycle Start M41 p.90 No ATC. With #905 = Yes, it first goes to reference point 1 and pauses. V3.1: "plays the contents of the T.nc file" MVP (pause + switch tool)
M7 mist none only the M8 output exists (#129) Warn
M8 / M9 flood on / all off M41 p.90 MVP
M10 / M11 lubrication on / off M41 p.90 DDCS-specific (Fanuc uses these for clamping) Accept, state only
M29 enter rigid tap mode M41 p.90 before G74/G84 Later
M30 program end M41 p.90 V3.1: "Do not use immediately after M6". #412 stops the spindle automatically at end MVP
M47 repeat program from the first line M41 p.90 Infinite loop: the simulator must stop after one pass and warn MVP (as "end + warning")
M98 / M99 subroutine call / return "within the current part program file" M41 p.90 Needs #122 Macro programming mode = Enable (default Disable), otherwise "the subprogram will be invalid" [M41 p.78/79]. #123 = main program number. Syntax M98 P100 → O100 … M99 [F, forum tid 689 snippet] Later (MVP: warn)
M101 / M102 probe monitoring on / off M31 p.79 V3.1 Warn
M105–M108 home X / Y / Z / A (several on one line home together) M41 p.90 Later
M110 stop + beep (manual tool change) M31 p.79 V3.1 Warn
M50/M51 etc. output control MEX p.135 Expert only Warn
other M dispatched to slib-m.nc (user M-code library) [M41 p.73] [I] Contents are machine-specific Warn, plus an optional user mapping

1.3 Other words


2. Arc handling (Q2)

3. Dialect quirks the interpreter must reproduce

3.1 F can be ignored (machine setting)

#101 "Speed Selection": 0 = F from the G-code, 1 = use default speed #102 (factory default = 1, i.e. 3000 unit/min) [M41 p.78]. The UI can also toggle "F from G code" vs a default F [M41 p.33–34]. The spindle works the same way: #190/#191 (default "Default", 12000 rpm) [M41 p.81]. → The machine definition needs feedSource: program|default and defaultFeed. When it is default, the simulator should warn: "controller will ignore programmed F".

3.2 Feed limiting (affects time estimation only)

The effective feed is FRO × F (FRO 0–300%), capped by #113 maximum speed (default 8000). It is then projected onto each axis and each axis is capped by its protection speed #114–#117 (X, Y, Z, A; default Z = 3000); the slower value wins [M41 p.78–79]. #119 caps Z-down speed. Acceleration is one compound value, #104 (500 unit/s²), optionally limited per axis by the M_Ctrl start accelerations #046–#049 when #107 = Yes [M41 p.78].

3.3 Rotary axis (Q3)

3.4 Canned cycles: contradictory documentation

M41a (2022-09) M41b (2023-01) M31 / MEX
Cycles listed G73, G74, G81, G82, G83, G84 G73, G74, G84 (G81–G83 removed from the table) G73, G81, G82, G83, G74/G84 (MEX)
Z "Position of the Z axis at the bottom of hole" (absolute) "distance between R position and hole bottom" "distance from R to the bottom"
R "Position of the R plane" "distance between initial position and R point" "drilling depth (usually 0)"
Repeat count L (G91 only; holes spaced by the first hole's offset) K (G73) K
G73/G83 K retract / clearance repeats repeats (I = "distance of failure")
G82 P seconds — (G74/G84 P = pause) milliseconds
Cycles with X/Y/A XYA hole positions (A allowed) XY XY

Expert-only parameter #224: "G73 G83 drilling retraction distance" [MEX], so the clearance may be a parameter rather than a K word. → MVP: implement G81/G82/G83 with Fanuc semantics (absolute Z and R in G90; G98/G99; K = repeats, which is what Fanuc posts emit). Warn on L, on K in G73/G83, and on cycles in G91. Settle Z/R with test T3 (§5).

3.5 Other quirks

4. Machine-side settings to mirror (Q5)

All live in the controller's parameter file setting, which can be exported to a USB stick through the Parameters page (F4 export / F5 import, or Menu → Parameter backup) [M41 p.75]. The format is undocumented, so ask the owner for an exported setting file and we can write an importer [I].

Machine-file field DDCS V4.1 param Default
units #001 mm
steps/unit X,Y,Z,A #002–#005 / #007–#010 1000/1
rotary letter A/B #039 A
rotary wrap enable / range #036, #037, #038 No, 180, −180
slave (gantry) axis #033–#035 off
rapid speed (single) #103 3000
G0 mode independent/interpolated #120 Interpolation
feed source / default F #101 / #102 default / 3000
max feed (global) #113 8000
per-axis max (auto) #114–#117 99999, 99999, 3000, 99999
Z-down max #119 3000
accel (path) #104 500 unit/s²
per-axis accel (manual; optionally auto with #107) #046–#049 start, #051–#054 stop 300 / 600
per-axis manual max #091–#094 12000
arc chord / path tolerance #110 / #109 0.001 / 0.002
arc speed factor / centrifugal acc #112 / #111 1.0 / 0
soft limits enable, min, max #234; #235–#238; #240–#243 Disable; −1200/−600/−300/0; 1200/600/300/0
home dir / offset / sequence #199–#202, #214–#217, #225 Neg, 0, ZXYA
G28 ref point 1 (machine) #800–#803 −30, −30, 10, 0
G30 P1/P2/P3 #805–#808, #810–#813, #815–#818 3…, 4…, 5…
safe Z (machine), pause lift #902, #904 5, 5
tool length, wear, diameter #264–#279, #280–#295, #296–#311 0
macro / subprogram enable #122, #123 Disable, 0
spindle default / max #190–#192 Default, 12000, 24000
backlash X..A #254–#262 off

Work offsets G54–G59 are edited in a UI window [M41 p.35–36]. Their parameter numbers are not given, so the user enters them in our setup file.

5. Open questions and tests for the owner's controller

Run these with the spindle off, in air or in the controller's own Simulation mode (F1 "Emulation" on the File page [M41 p.58, p.57]), and with the current firmware version noted.

# Question Test program What to observe
T1 Rotary feed model G21 G90 G94 G1 X0 A0 F1000 then G1 X10 A90 F100 time ≈ 54 s → compound 4D (√(10²+90²)/100 min); ≈ 6 s → XYZ-only (LinuxCNC); ≈ 54 s with #6-like projection → other
T2 G93 support G93 G1 A90 F6 then G94 runs 10 s / parse error / ignored
T3 Cycle Z/R semantics G90 G0 X0 Y0 Z10 / G98 G81 X0 Y0 Z-5 R2 F100 / G80 bottom at Z−5 (absolute, Fanuc) or Z−3 (incremental from R)
T4 K/L in G83 G83 X0 Y0 Z-6 R1 Q2 K1 F100 is K a clearance or a repeat count?
T5 G82 P units G82 X0 Y0 Z-1 R1 P2 F100 2 ms or 2 s dwell
T6 G28 target G91 G28 Z0 goes to machine Z0 or to #802
T7 Unknown codes separate files with G85, G41 D1, M7, M2, G10 L2 P1 X0, G59.1 error prompt / silent skip / executes
T8 Comments / format lines with ;comment, (comment), a % first/last line, N10 numbers, O1000, lowercase g1 x1, block delete /, no spaces G1X1Y1 which are accepted
T9 R arcs > 180° G2 X10 Y0 R-10 from (0,0) major arc or error
T10 Arc radius mismatch G2 X10 Y0 I5.01 J0 error threshold
T11 Rotary wrap #036 on; G0 A350 then G0 A370 direction and display
T12 M98/M99 and macros #1=5 / G0 X#1 and M98 P100 with O100 … M99 at the end of the file, with #122 on/off
T13 G41/G42 actually work? simple square with G41 D1 offset path or ignored
T14 Accepted file extensions, max line length .nc, .tap, .txt, .gcode, .ngc visible in the file browser?

Other unknowns: the content of slib-g.nc ("System library file") and slib-m.nc ("The users self-define M code library file") [M41 p.73]. Ask the owner to copy both files from the ddcsv4 system folder, because they define what custom M codes do on this specific machine. Firmware version is also needed: M41b documents commands (G128) that M41a lacks.

6. File format (Q6)

7. CAM post-processors (Q7)

(4-axis wrap, A axis, 50 mm stock)
G21 G90 G94 G17
G54
G49 G40 G80
M6 T1          (pauses; operator changes tool)
G43 H1
M3 S12000
G0 Z30
G0 X0 Y0 A0
G1 Z24 F300
G1 X5 A36 F800      (combined XA: feed semantics, see 3.3)
G1 X10 A72
G1 A360             (rotary-only)
G0 Z30
G53 G0 Z0           (requires homing)
M5
G0 A0               (unwind; or G92 A0 if cyclic encoding off)
M30

The inverse-time variant replaces the feed moves with G93 G1 X5 A36 F12.5 … G94. See T2 before relying on it.

8. Recommendations for our interpreter (summary)

  1. Add a dialect: "ddcs-v41" profile with: G4/G82 P in ms; IJK incremental (G90.1 optional); compound-4D rotary feed; F/S source flags (#101/#190); a 16-entry tool table; a rotary letter from config (A|B); optional cyclic A wrap; G0 independent/interpolated; G28 target configurable (machine 0 | ref point 1).
  2. Strictness: error on unknown codes and G-words not in §1, warn on the "Warn" rows, and warn on anything §5 marks as unverified when the program actually uses it (G93, G41/42, G83 K, G82 P, R-arcs > 180°).
  3. A machine-file importer for the setting export (after obtaining a sample) is the cheapest way to mirror limits, speeds, offsets and tools.

9. Sources

Other controllers

GRBL 1.1 and grblHAL routers (Shapeoko, X-Carve, 3018, LEAD, LongMill): GRBL 1.1 and grblHAL in DryRun.