UltiMaker uses functional, analytical and tracking cookies. Tracking cookies enhance your experience on our website and may also collect your personal data outside of Ultimaker websites. If you agree with the use of tracking cookies, click “I agree, continue browsing”. You can withdraw your consent at any time. If you do not consent with the use of tracking cookies, click “Refuse”. You can find more information about cookies on our Privacy and Cookie Policy page.
Anyone get anywhere on this? I wish slic3r had this option, but for now I'm trying firmware implementation. When I comment out the ifs it seems to work (compiles/uploads fine) and when I send M218 T0 Xxxx Yyyy Zzzz (works fine), but when I send M218 T1 Xxxx Yyyy Zzzz (or even just M218 T0 Xxxx Yyyy) it freezes. I'm thinking there are other areas that have if statements that expect dual_x_carriage to be defined, and are therefor not working...
NEVERMIND I GOT IT! You just have to comment out another if here:
// Extruder offsets
#if EXTRUDERS > 1
#ifndef EXTRUDER_OFFSET_X
#define EXTRUDER_OFFSET_X { 0 }
#endif
#ifndef EXTRUDER_OFFSET_Y
#define EXTRUDER_OFFSET_Y { 0 }
#endif
float extruder_offset[][EXTRUDERS] = {
EXTRUDER_OFFSET_X,
EXTRUDER_OFFSET_Y
//#if ENABLED(DUAL_X_CARRIAGE)
, { 0 } // supports offsets in XYZ plane
//#endif
};
#endif
and the original, both in marlin_main:
#if EXTRUDERS > 1
/**
* M218 - set hotend offset (in mm), T X Y
*/
inline void gcode_M218() {
if (setTargetedHotend(218)) return;
if (code_seen('X')) extruder_offset[X_AXIS][target_extruder] = code_value();
if (code_seen('Y')) extruder_offset[Y_AXIS][target_extruder] = code_value();
//#if ENABLED(DUAL_X_CARRIAGE)
if (code_seen('Z')) extruder_offset[Z_AXIS][target_extruder] = code_value();
Marlin M218 Extruder Offset.Documented as only X / Y but the code says also Z?
in Firmware
Posted · Edited by Guest
solved!
Anyone get anywhere on this? I wish slic3r had this option, but for now I'm trying firmware implementation. When I comment out the ifs it seems to work (compiles/uploads fine) and when I send M218 T0 Xxxx Yyyy Zzzz (works fine), but when I send M218 T1 Xxxx Yyyy Zzzz (or even just M218 T0 Xxxx Yyyy) it freezes. I'm thinking there are other areas that have if statements that expect dual_x_carriage to be defined, and are therefor not working...
NEVERMIND I GOT IT! You just have to comment out another if here:
// Extruder offsets
#if EXTRUDERS > 1
#ifndef EXTRUDER_OFFSET_X
#define EXTRUDER_OFFSET_X { 0 }
#endif
#ifndef EXTRUDER_OFFSET_Y
#define EXTRUDER_OFFSET_Y { 0 }
#endif
float extruder_offset[][EXTRUDERS] = {
EXTRUDER_OFFSET_X,
EXTRUDER_OFFSET_Y
//#if ENABLED(DUAL_X_CARRIAGE)
, { 0 } // supports offsets in XYZ plane
//#endif
};
#endif
and the original, both in marlin_main:
#if EXTRUDERS > 1
/**
* M218 - set hotend offset (in mm), T X Y
*/
inline void gcode_M218() {
if (setTargetedHotend(218)) return;
if (code_seen('X')) extruder_offset[X_AXIS][target_extruder] = code_value();
if (code_seen('Y')) extruder_offset[Y_AXIS][target_extruder] = code_value();
//#if ENABLED(DUAL_X_CARRIAGE)
if (code_seen('Z')) extruder_offset[Z_AXIS][target_extruder] = code_value();
//#endif
SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
for (int e = 0; e < EXTRUDERS; e++) {
SERIAL_CHAR(' ');
SERIAL_ECHO(extruder_offset[X_AXIS][e]);
SERIAL_CHAR(',');
SERIAL_ECHO(extruder_offset[Y_AXIS][e]);
//#if ENABLED(DUAL_X_CARRIAGE)
SERIAL_CHAR(',');
SERIAL_ECHO(extruder_offset[Z_AXIS][e]);
//#endif
}
SERIAL_EOL;
}
#endif // EXTRUDERS > 1