SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
6.92k stars 812 forks source link

Change filament feature (M600) macros for Klipper #2230

Closed Luigisvc closed 11 months ago

Luigisvc commented 1 year ago

OrcaSlicer Version

1.7.0

OS version

Windows 11

Additional system information

CPU: I7 8th 8750H 16GB RAM GPU 1050Ti 4GB

Printer

BIQU B1 modified with klipper and H2V2S extruder

How to reproduce

Add a stl add a second filament in tab slice and select the layer you want to change filament/color re slice export gcode to your computer and open with text editor. Inspect Gcode and find M600 and T0 in the beginning after the Start Print macro call out keep finding and will encounter a second M600 and T1 in the correct layer.

image

Actual results

the result is that after the purge line when the printer should start printing with the loaded filament instead, it executes the macro to replace filament which consists in park the head, unload the filament and pauses waiting to the new filament. Also it selects T0 as extruder. Then change to T1 at the correct layer which cause to stop extruding

image

image

Expected results

The expected behavior is to start printing with the current filament and pauses with M600 only in the desired layer as planned. AND no changes in the extruder selection

Project file & Debug log uploads

BUGM600_Cube.zip

Checklist of files to include

wmariz commented 1 year ago

Same here

wmariz commented 1 year ago

As a workaround, put:

SAVE_VARIABLE VARIABLE=ignorefc VALUE=1

on the last line off Machine start G-code and warp the M600 macro with:

[gcode_macro M600]
gcode:
  {% if printer.save_variables.variables.ignorefc|float == 0 %}

  {% endif %}
  SAVE_VARIABLE VARIABLE=ignorefc VALUE=0
SoftFever commented 1 year ago

Just to clarify, M600 is a standard Filament Change gcode command recognized by most firmwares like Marlin, RRF, Prusa, and others.

Klipper doesn't come with an in-built filament change command, so we'll need to create a macro for this purpose ourselves.

Luigisvc commented 1 year ago

Just to clarify, M600 is a standard Filament Change gcode command recognized by most firmwares like Marlin, RRF, Prusa, and others.

Klipper doesn't come with an in-built filament change command, so we'll need to create a macro for this purpose ourselves.

Yes, The macro emulating M600 I have already done in Klipper.

As a workaround I am using the feature in Orca to add Custom Gcode and put the M600 there, but would be good if we can use the built in change filament feature without having a MMU, AMS or other multi material solution.

Luigisvc commented 1 year ago

As a workaround, put:

SAVE_VARIABLE VARIABLE=ignorefc VALUE=1

on the last line off Machine start G-code and warp the M600 macro with:

[gcode_macro M600]
gcode:
  {% if printer.save_variables.variables.ignorefc|float == 0 %}

  {% endif %}
  SAVE_VARIABLE VARIABLE=ignorefc VALUE=0

I have to try this.

Ocraftyone commented 1 year ago

@SoftFever we may be able to use the SEMM flag in the printer config and if that flag is there, don't write the first change filament

wmariz commented 1 year ago

In my understanding, the problem described here is not the need for a macro for the M600, but rather the fact that the slicer inserts an apparently incorrect filament change command at the beginning of the gcode, right after the initialization code . My suggestion is just a temporary workaround while the bug persists. I chose this approach because this way it is possible to use filaments that require different temperatures and settings, which is not so simple when adding an M600 manually.

wmariz commented 1 year ago

SEMM flag

How to do this? Can you please clarify? In my printer settings I cannot uncheck the "Single Extruder Multi Material" option. Maybe this is related to the problem?

Ocraftyone commented 1 year ago

@wmariz sorry for not being a bit more descriptive. this would have to be a change made to the code of the program in the next update. in the mean time, i would suggest using the workaround macro @Luigisvc provided

Ltek commented 10 months ago

note to others find this... you MUST enable the 'Manual Change Option' under Printer Settings 'Multimaterial'

Ludancv commented 8 months ago

note to others find this... you MUST enable the 'Manual Change Option' under Printer Settings 'Multimaterial'

Thank you so much, that bug was driving me crazy.

Ocraftyone commented 8 months ago

note to others find this... you MUST enable the 'Manual Change Option' under Printer Settings 'Multimaterial'

Thank you so much, that bug was driving me crazy.

This is not a bug. It is intended to make sure that the correct filament is loaded on automatic tool changers. It should only skip this if the user is manually changing the filaments.

Ltek commented 8 months ago

note to others find this... you MUST enable the 'Manual Change Option' under Printer Settings 'Multimaterial'

Thank you so much, that bug was driving me crazy.

This is not a bug. It is intended to make sure that the correct filament is loaded on automatic tool changers. It should only skip this if the user is manually changing the filaments.

technically not a bug but its not good, and somewhat annoying, that its hidden... Orca allows you to configure filament changes in 'Prepare' while -it- knows you dont have that setting set. It should -at least- alert you to that setting not being set when you add your first filament in Prepare. Ideally, it turns it on for you after asking if you want it on.

FR added... https://github.com/SoftFever/OrcaSlicer/issues/3943

Ocraftyone commented 8 months ago

I don't particularly think that a popup every single time a second filament is added is the best idea. I don't feel as that would fit the current design philosophy of the UI (where it stays out of the way and doesn't typically recommend anything to the user).

I think that the solutions that should be considered are either updating printer profiles, add it to the tips section, adding it to the add printer profile dialog, and/or improving the GitHub wiki for Orca.

I am personally leaning more towards updating the wiki and adding it as a tip.

Ltek commented 8 months ago

I don't particularly think that a popup every single time a second filament is added is the best idea. I don't feel as that would fit the current design philosophy of the UI (where it stays out of the way and doesn't typically recommend anything to the user).

I think that the solutions that should be considered are either updating printer profiles, add it to the tips section, adding it to the add printer profile dialog, and/or improving the GitHub wiki for Orca.

I am personally leaning more towards updating the wiki and adding it as a tip.

Orca without a doubt should ask user if they want the printer setting turned on... the the 'exact' same thing Orca does for Vase Mode... its that important... and 100% aligned with the rest of the Orca UX.

without this popup, Orca is 'staying out of the way' so much is problematic in many ways and 100% bad UX for this setting

Allowing Orca's UI to add a filament without the user knowing (aka, being warned) that it may literally do nothing for them will cause, and has caused, a lot of confusions. I've personally answered this on the forums several times and this is a very new setting.