Still there is behaviour I cannot comprehend in some aspects:
* Giving Ext1 an offset of 10mm invokes a 10mm move after homing.
* Giving Ext0 an offset of -10mm (suggested fix elsewhere in the forum) has the same result.
* After homing, selecting the Ext1 does nothing. Then selecting Ext0 again nothing. Selecting Ext1 the second time invokes a move.
* When doing a tool change (see code below) T1 works as expected. Calling T0 makes all the moves, except the last move stops before the desired position is reached.
It seems like the selection of the extruder changes the positions in the coordinate system, but not in a controlled moment. Or at least I do not understand when the position change happens and I do not know how to get a grip on it.
if(com->hasT())
{
if(currentExtruder == (int)com->T)
{
return true;
}
else
{
currentExtruder = (int)com->T;
}
switch(com->T)
{
case 0:
GCode::executeFString(PSTR("G1 X528 F6000\n"));
GCode::executeFString(PSTR("G1 Y496 F6000\n"));
GCode::executeFString(PSTR("G1 Y506 F2000 S1\n"));
GCode::executeFString(PSTR("G1 X518 F2000\n"));
GCode::executeFString(PSTR("G1 Y496 F2000 S0\n"));
GCode::executeFString(PSTR("G1 X0 F6000\n"));
GCode::executeFString(PSTR("G92 E0\n"));
return true;
break;
case 1:
GCode::executeFString(PSTR("G0 X0 F6000\n"));
GCode::executeFString(PSTR("G0 Y496 F6000\n"));
GCode::executeFString(PSTR("G0 Y506 F2000 S1\n"));
GCode::executeFString(PSTR("G0 X10 F2000\n"));
GCode::executeFString(PSTR("G0 Y496 F2000 S0\n"));
GCode::executeFString(PSTR("G0 X574 F6000 S0\n"));
GCode::executeFString(PSTR("G92 E0\n"));
return true;
break;
default:
return false;
break;
}
return false;
}