Skip to content

Misc. Commands

Miscellaneous Commands

These commands are used for various purposes, including error handling, tool changes, and AFC status updates.


[AFC_TOGGLE_MACRO]

Enable/disable TOOL_CUT/PARK/POOP/KICK/WIPE/FORM_TIP macros.

Usage

AFC_TOGGLE_MACRO TOOL_CUT=<0/1> PARK=<0/1> POOP=<0/1> KICK=<0/1> WIPE=<0/1> FORM_TIP=<0/1>

Example
AFC_TOGGLE_MACRO TOOL_CUT=0

[AFC_QUIET_MODE]

Set lower speed on any filament moves.

Mainly this would be used to turn down motor noise during late quiet runs. Only exceptions are during bowden calibration and lane reset, which are manually triggered

Usage

AFC_QUIET_MODE SPEED=<new quietmode speed> ENABLE=<1 or 0>

Example
AFC_QUIET_MODE SPEED=75 ENABLE=1

[HUB_LOAD]

This function handles the loading of a specified lane into the hub. It performs several checks and movements to ensure the lane is properly loaded.

Usage

HUB_LOAD LANE=<lane>

Example
HUB_LOAD LANE=lane1

[CHANGE_TOOL]

This function handles the tool change process. It retrieves the lane specified by the 'LANE' parameter, checks the filament sensor, saves the current position, and performs the tool change by unloading the current lane and loading the new lane.

Optionally setting PURGE_LENGTH parameter to pass a value into poop macro.

Usage

CHANGE_TOOL LANE=<lane> PURGE_LENGTH=<purge_length>(optional value)

Example
CHANGE_TOOL LANE=lane1 PURGE_LENGTH=100

[AFC_STATUS]

This function generates a status message for each unit and lane, indicating the preparation, loading, hub, and tool states. The status message is formatted with HTML tags for display.

Usage

AFC_STATUS

Example
AFC_STATUS

[TURN_OFF_AFC_LED]

This macro handles turning off all LEDs for AFC_led configurations. Color for LEDs are saved if colors are changed while they are turned off.

Usage

TURN_OFF_AFC_LED

Example
TURN_OFF_AFC_LED

[TURN_ON_AFC_LED]

This macro handles turning on all LEDs for AFC_led configurations. LEDs are restored to last previous state.

Usage

TURN_ON_AFC_LED

Example
TURN_ON_AFC_LED

[RESET_FAILURE]

This function clears the error state of the AFC system by setting the error state to False.

Usage

RESET_FAILURE

Example

RESET_FAILURE


[AFC_RESUME]

During the PREP phase of startup, the user's RESUME macro is renamed and replaced with AFC_RESUME. This function clears the error state of the AFC system, sets the in_toolchange flag to False, runs the resume script, and restores the toolhead position to the last saved position.

This is not a macro that should normally need to be called by the user.

Usage

AFC_RESUME

Example
AFC_RESUME

[AFC_PAUSE]

During the PREP phase of startup, the user's PAUSE macro is renamed and replaced with AFC_PAUSE. This function pauses the print, raises the Z axis by the z-hop amount, and then calls the user's pause macro.

This is not a macro that should normally need to be called by the user.

Usage

AFC_PAUSE

Example
AFC_PAUSE

[AFC_LANE_RESET]

This function resets a specified lane to the hub position in the AFC system. It checks for various error conditions, such as whether the toolhead is loaded or whether the hub is already clear. The function moves the lane back to the hub based on the specified or default distances, ensuring the lane's correct state before completing the reset.

Usage

AFC_LANE_RESET LANE=<lane> DISTANCE=<distance>

Example

(Resets lane1 to the hub with a move of 50mm)

AFC_LANE_RESET LANE=lane1 DISTANCE=50
(Resets lane2 to the hub using default settings)
AFC_LANE_RESET LANE=lane2


[AFC_RESET]

This function opens a prompt allowing the user to select a loaded lane for reset. It displays a list of loaded lanes and provides a reset button for each lane. If no lanes are loaded, an informative message is displayed indicating that a lane must be loaded to proceed with resetting.

Usage

AFC_RESET DISTANCE=<distance>

Example

(Shows the prompt for resetting lanes with a distance value of 30mm)

AFC_RESET DISTANCE=30
(Shows the prompt for resetting lanes without specifying a distance)
AFC_RESET


[TEST]

This function tests the assist motors of a specified lane at various speeds. Spins the spoolers in reverse like trying to rewind the spool.
It performs the following steps:
1. Retrieves the lane specified by the 'LANE' parameter.
2. Tests the assist motor at full speed, 50%, 30%, and 10% speeds.
3. Reports the status of each test step.

Usage

TEST LANE=<lane>

Example
TEST LANE=lane1

[HUB_CUT_TEST]

This function tests the cutting sequence of the hub cutter for a specified lane. It retrieves the lane specified by the 'LANE' parameter, performs the hub cut, and responds with the status of the operation.

Usage

HUB_CUT_TEST LANE=<lane>

Example
HUB_CUT_TEST LANE=lane1

[AFC_STATS]

This macro handles printing toolchange statistics to console.

Optional Values

Set SHORT=1 to have a smaller print that fits better on smaller screens. Setting print_short_stats variable in [AFC] section in the AFC.cfg file to True will always print statistics in short form.

Usage

AFC_STATS SHORT=<1|0>

Example
AFC_STATS

[AFC_CHANGE_BLADE]

This macro handles resetting cut total since blade was last changed and updates the data the blade was last changed to current date time when this macro was run.

Usage

AFC_CHANGE_BLADE

Example
AFC_CHANGE_BLADE

[AFC_CLEAR_MESSAGE]

This macro handles clearing one message at a time for messages that show up mainsail/klipperscreen/fluidd gui's.

USAGE

AFC_CLEAR_MESSAGE

Example
AFC_CLEAR_MESSAGE