MarlinFirmware / MarlinDocumentation

Marlin Firmware Documentation Project
https://marlinfw.org
GNU General Public License v3.0
366 stars 764 forks source link

A question regarding the M600 parameters E, U, and L #563

Open GregValiant opened 1 month ago

GregValiant commented 1 month ago

Did you test the latest bugfix-2.1.x code?

N\A

Question

I want to configure M600 on the fly in a UM Cura post-processor. I am looking for a clarification regarding whether the E, U and L parameters should be entered as positive or negative values. The information I've found appears to be contradictory.

The M600 command parameters E, U, L are listed on the Gcodes page as requiring negative values. It seems odd that the L (load filament) parameter would also require a negative value.

It appears that configured like this: M600 B1 E-6.5 U-450 R205 T0 L-30 X0 Y0 Z2 there will be an E movement of -6.5mm (retraction), an unload of -450mm, and a reload of -30mm??

These are from M600.cpp:

Then later in M600.cpp these appear to be switching the +/- signs:

That appears that they are a mix and get changed later...or something.

If someone could take a moment to clarify the proper input for "Retract, Unload, and Load" I'd be much obliged.

GregValiant

thisiskeithb commented 1 month ago

I agree that documentation can be cleared up a bit, but you can use positive or negative values.

Marlin will use the absolute value (ABS()), but unloads/retracts need to be negative and loads/extrudes need to be positive, so that is done automatically with -ABS() or ABS().

The same goes for M603 - Configure Filament Change. If you enter M603 U120 L125 or M603 U-120 L-125, the absolute values are used/reported, but with fc_settings[target_extruder].unload_length & fc_settings[target_extruder].load_length:

Unload length

  if (parser.seenval('U')) {
    fc_settings[target_extruder].unload_length = ABS(parser.value_axis_units(E_AXIS));

Load length

  if (parser.seenval('L')) {
    fc_settings[target_extruder].load_length = ABS(parser.value_axis_units(E_AXIS));
GregValiant commented 1 month ago

Thanks for that. The question is in regards to the Cura "FilamentChange" post processor. I'll clear it up the the tooltip.