Print start¶
How a print starts¶
When a file has no C5_PRINT_START line, the print dispatcher
(virtual_sdcard.py, auto_creator5_start: True in printer.base.cfg)
builds one from the first 64 KB and the last 64 KB of the file:
TOOLis the firstT0–T3(orAFC_SELECT_TOOL TOOL=extruderN). If the file has none, it's the first tool with filament used.HOTENDis the firstM109, else the firstM104. If neither exists, it's that tool'snozzle_temperature_initial_layerfrom Orca's config block. Orca leaves out the heating line in single-tool T0 jobs.BEDis the firstM140orM190.
It also adds what it can find in Orca's config block:
| Parameter | From |
|---|---|
FIRST_LAYER_HEIGHT |
; first_layer_height (0.2 mm if missing) |
MATERIAL0–MATERIAL3 |
; filament_type for the slot each tool prints, UNKNOWN without one. Used to pick the MPC material |
USED_TOOLS |
The tools with filament used (; filament used [mm]), mapped to heads by filament_nozzle_map or filament_map |
HOTEND<n> |
Each other used tool's nozzle_temperature_initial_layer |
IDLE<n> |
Each tool's idle_temperature (Orca's Idle temperature) |
CHAMBER |
The first M141/M191, else the highest chamber_temperature of the used filaments with chamber control on |
POOP, DENSITY<n> |
A poop=<grams> line and each tool's filament_density, see Notower |
If no hotend temperature can be found, the job stops before any motion with
No hotend temperature found in G-code header; add C5_PRINT_START TOOL=n HOTEND=n BED=n.
A file with its own C5_PRINT_START line is run as it is, and nothing above
is added. See For one print only for
when that's worth it.
Two more things the dispatcher does for every print:
- Slicer Z offsets are ignored.
G92 Z…andSET_GCODE_OFFSET Z=…/Z_ADJUST=…lines in the file are skipped (with a warning inprinter.log), because the nozzle Z comes from the automatic measurement. Use baby stepping instead. - The end runs by itself. At the end of the file it runs
C5_PRINT_STOP, unless the file already ran it.
When AFC maps a slicer colour to a different head, every per-tool parameter
(TOOL, TOOLS, USED_TOOLS, HOTEND<n>, PRINT_TEMP<n>, IDLE<n>,
MATERIAL<n>, DENSITY<n>) is moved to the head that prints it before
anything else happens.
Preparation order¶
flowchart TD
A[Check filament in every used tool] -->|missing| X[Cancel the job]
A --> C[Bed to temperature, print tool<br/>and one more to max 100 °C]
C --> B[Home, check the build plate,<br/>wait for the bed]
B --> D{Flow calibration<br/>or purge on?}
D -->|yes| E[For each used tool:<br/>pick up, nozzle Z, heat,<br/>flow / purge, dock]
D -->|no| W
E --> W[Wait for used tools<br/>to reach their preheat]
W --> F{Bed leveling on?}
F -->|yes| G[Bed soak if on,<br/>adaptive mesh]
F -->|no| H[Load saved mesh]
G --> I[Pick up first tool, apply nozzle Z,<br/>park, other tools to idle temperature,<br/>wait for print temperature]
H --> I
I --> J{Purge line on?}
J -->|yes| M[KAMP purge line<br/>next to the objects]
J -->|no| O
M --> O[Slicer G-code starts]
- If door_notify is on, warn when a door is open. Check each used tool's
filament presence switch; a tool without filament cancels the print with
Cancelling print: no filament detected in selected T1. Load filament and retry. - Play the start tune, set the bed target, and start a non-blocking preheat of the print tool and one other used tool to at most 100 °C. Only two hotends heat at once at this point: more draws too much power and can reset the printer. The other tools are warmed one at a time before meshing.
- Home for printing (
C5_HOME_FOR_PRINT). If a tool is still attached, it homes X/Y, docks it, then homes Z. Every tool must read as docked, or the print stops withConfirm all heads are docked before print homing. - Check that the build plate is on (
C5_CHECK_BUILD_PLATE, the same pin comparison offset calibration uses). Without a plate the print is cancelled withCancelling print: build plate not detected. Install the build plate and restart the print.BUILDPLATE_CHECK=0skips the check. - Set each used tool's MPC material, start the chamber heater on a Pro (no
wait), and wait for the bed to reach its target. The nozzle Z for every
tool is planned from the hotend and bed temperatures (
C5_PRINT_Z_PLAN). - If flow calibration or purge is enabled, prepare each used tool in turn:
pick it up, move to the purge bucket, establish its nozzle Z, heat it to
its material temperature, run the flow test and/or purge
(
C5_TOOL_PURGE: 50 mm at 3 mm/s in the supplied config), leave the bucket, set it back to its preheat and dock it. A used tool whose filament was put in by hand, without a load, is purged by the load amount (80 mm) even when both are off. - Wait for every used tool to reach its preheat (re-applied, since docking
after priming may have left it cooler). Then clear the old mesh. When bed
leveling is enabled, soak the bed if bed_soak is on (2 minutes in the
supplied config, skipped below a 45 °C bed target) and create an adaptive
mesh. Otherwise, load the saved
defaultmesh if one exists. - With purge_line_all_tools on, draw the other tools' purge lines (below).
- Select the job's initial tool. Apply its automatic nozzle Z, verify that a
safe nozzle Z is available, and smart park (KAMP's
SMART_PARK, 5 mm above the bed). The print's other tools are set to their slicer idle temperature (IDLE<n>), or 100 °C if it has none, two at a time. Then wait for the print tool's temperature and verify the nozzle Z once more. - If the purge line is enabled, draw KAMP's purge line (
LINE_PURGE). It goes 10 mm from the printed objects (purge_margininKAMP_Settings.cfg), on the first side with room: front, left, back, right. Without room on any side it's skipped withKAMP purge skipped: no room 10mm away from the objects on any side. - Arm notower if the print asked for it, and arm power-loss recovery. The slicer's print moves follow.
With purge_line_all_tools on, the print's other tools (TOOLS and the
slicer's used tools) each draw a purge line too, after the mesh and before the
initial tool is picked up. Each one is picked up, heated to its own first-layer
temperature, draws its line further out than the last (purge_tool_spacing in
KAMP_Settings.cfg, 8 mm by default), then goes to its idle temperature and
docks. The initial tool's line is drawn last, nearest the objects. A tool's
line is left out, with a message, if there's no room for it on any side of the
objects, or the file has no object outlines (Orca's Label objects).
A missing safe nozzle Z is a print-stopping condition, not a reason to continue at zero offset. The automatic nozzle Z must be between 0.5 and 5 mm.
Flow calibration, purge, the purge line and bed leveling can be toggled in the
printer's Misc controls or overridden for a job with FLOW_CALIBRATION=0|1,
PURGE=0|1, PURGE_LINE=0|1 and BED_LEVELING=0|1 (see
How to toggle features). Turning off flow and purge removes those
preparation operations; it does not bypass the filament-presence or nozzle-Z
safety checks. See Flow calibration
for how the flow measurement works.
C5_PRINT_START parameters¶
| Parameter | Default | |
|---|---|---|
TOOL |
0 |
First tool, 0–3 |
TOOLS |
TOOL |
Comma-separated tools to prepare; must contain TOOL |
USED_TOOLS |
none | More tools to prepare (the dispatcher fills it in) |
HOTEND |
required | First-layer nozzle temperature, above 0 |
HOTEND0–HOTEND3 |
HOTEND |
Per-tool first-layer temperature |
PRINT_TEMP0–PRINT_TEMP3 |
HOTEND<n> |
Per-tool print temperature, used by notower |
IDLE0–IDLE3 |
100 °C | Temperature a tool waits at while docked |
BED |
0 |
Bed temperature |
CHAMBER |
0 |
Chamber target (Pro only), capped at the heater's max_temp |
FIRST_LAYER_HEIGHT |
0.2 |
Used for the nozzle Z plan |
MATERIAL, MATERIAL0–MATERIAL3 |
none | MPC material per tool |
FLOW_CALIBRATION, PURGE, PURGE_LINE, PURGE_LINE_ALL_TOOLS, BED_LEVELING |
the switch | 0 or 1 |
BUILDPLATE_CHECK |
1 |
0 skips the build plate check |
POOP, DENSITY0–DENSITY3 |
none | Notower grams and filament densities |
Normal completion and error handling continue in Stop, cancel and pause.