M218 Z-Offset without DualCarriage or SwitchingExtruder August 29, 2017 03:09AM |
Registered: 9 years ago Posts: 31 |
#if EXTRUDERS > 1 case 218: // M218 - set hotend offset (in mm), T X Y { if(setTargetedHotend(218)){ break; } if(code_seen('X')) { extruder_offset[X_AXIS][tmp_extruder] = code_value(); } if(code_seen('Y')) { extruder_offset[Y_AXIS][tmp_extruder] = code_value(); } #ifdef DUAL_X_CARRIAGE if(code_seen('Z')) { extruder_offset[Z_AXIS][tmp_extruder] = code_value(); } #endif SERIAL_ECHO_START; SERIAL_ECHOPGM(MSG_HOTEND_OFFSET); for(tmp_extruder = 0; tmp_extruder < EXTRUDERS; tmp_extruder++) { SERIAL_ECHO(" "); SERIAL_ECHO(extruder_offset[X_AXIS][tmp_extruder]); SERIAL_ECHO(","); SERIAL_ECHO(extruder_offset[Y_AXIS][tmp_extruder]); #ifdef DUAL_X_CARRIAGE SERIAL_ECHO(","); SERIAL_ECHO(extruder_offset[Z_AXIS][tmp_extruder]); #endif } SERIAL_ECHOLN(""); }break; #endif
Re: M218 Z-Offset without DualCarriage or SwitchingExtruder August 29, 2017 05:10AM |
Registered: 9 years ago Posts: 31 |
current_position[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];This is located in a "#if ENABLED(DUAL_X_CARRIAGE)" section by default. You can post the line right before this section. A z-offset now makes the z_axis move when sending T1/T0.