Skip to content

G-code

Opening and replaying G-code

Open a .nc or .gcode file as is, read its colored text, wireframe view and summary, send it with the same checks as a Dusty job, or resume at a chosen line.

File › Open G-code… (⇧⌘O) opens a G-code file (.nc, .gcode, .ngc, .tap…) as is, to send it to the machine: a program saved by Dusty or by another software. The open project is not touched (neither the drawing nor the undo history); to rework a file’s paths as shapes, use Import… instead (see Importing).

The G-code Program window (a sheet on iPad; Machine › G-code Program to come back to it) shows:

  • the text, line by line and colored: comments in gray, M codes in orange, G codes, feeds and speeds in blue, X in red, Y in green; a line Dusty cannot read is marked;
  • the wireframe view, a top view to scale: cuts tinted by depth, rapids dashed; the line chosen in the text is highlighted;
  • the summary: lines, estimated time with the active machine’s kinematics, tools, feeds, spindle speed (the file’s highest S value and the actual spindle speed on this machine), cut extent, cutting length;
  • the pre-send check without a link (the work zero is checked when sending).

Send to machine… (or Send… in the Job section of the Machine panel) follows exactly the path of a job: pre-send check of the program and of the machine, your consent (“The spindle will turn”), job log, and resume if it is interrupted. The check is as strict as for a job prepared by Dusty:

  • machine travel (from the work zero read on the controller), safe height, feeds;
  • the tool diameters of a file are not known: Dusty assumes Z zero on top of the stock and refuses any rapid move below Z 0 (a file that lifts the tool with rapids inside a pocket is therefore refused);
  • cutting with the spindle stopped is refused (unless the spindle is started by hand); an S speed above the machine’s maximum S value is reported, with the actual speed the spindle will run at;
  • a line Dusty cannot read (G81 drilling cycle, # parameters…) blocks sending: the path that follows could not be checked;
  • commands the controller would refuse are reported by the machine check.

While sending, the current line is marked in the text (and followed when Follow the current line is on) and highlighted in orange in the wireframe view; a red crosshair shows the tool position. STOP stays in the window’s toolbar.

Resume at a line… (or a line’s context menu, Resume at this line…) resumes the program at the chosen line. Dusty rebuilds the program’s state at that point (units, distances, plane, coordinate system, spindle and its speed, coolant, feed), rises to the safe height, moves to the resume point, starts the spindle, then goes down at the chosen feed. At the start of the pass (recommended), the tool restarts from a point outside the material. The resume then goes through the pre-send check and the confirmation of a job; it is refused while the position is lost. An interrupted program can also be resumed like any job (see Resuming an interrupted job).

The program follows the active machine: changing it rereads the file (flavor) and redoes its check.

This manual is also built into Dusty: press F1, or open the Help menu, to read the topic for what you are doing. A mistake, a missing answer? Tell us

Try it in Dusty, for free.

Free CNC milling software: design, toolpaths and machine control. Mac, iPad, iPhone, Windows and Linux.