In attempting to get my Scara working with the newer firmware Bugfix 2.1x, I was having nothing but problems with the MP Scara config and could not make it work until I found a youtube video that changed some configuration settings that did make it work. ,[
www.youtube.com] but could not home and when trying to home both arms were moving together. I have noticed many people have posted about the Scara arms moving the wrong direction and not stopping when endstop triggered but I could not find a solution. But I beleive this might be the problem. That video makes changes in Scara.ccp. It instructs to change ln 75 from #if ENABLED(MORGAN_SCARA) to #if ENABLED(MP_SCARA) and that did make it work. However, the Morgan Scara has two arms and the homing process is a dance to prevent the arms from hitting each other while homing. So they both move in one direction then the other and the Morgan_scara uses a Cartesian XY home position. So I think this is why many people are posting the problem. The solution I found is to copy the homing procedures from the MP_Scara below and comment out the Morgan_Scara procedures. ie. (starting at SCARA.CPP ln 75)
#if ENABLED(MP_SCARA) //instead of MORGAN_SCARA
// the following pasted from MP_SCARA BELOW)
void scara_set_axis_is_at_home(const AxisEnum axis) {
if (axis == Z_AXIS)
current_position.z = Z_HOME_POS;
else {
// MP_SCARA uses arm angles for AB home position
#ifndef SCARA_OFFSET_THETA1
#define SCARA_OFFSET_THETA1 12 // degrees
#endif
#ifndef SCARA_OFFSET_THETA2
#define SCARA_OFFSET_THETA2 131 // degrees
#endif
ab_float_t homeposition = { SCARA_OFFSET_THETA1, SCARA_OFFSET_THETA2 };
//DEBUG_ECHOLNPGM("homeposition A:", homeposition.a, " B:", homeposition.b);
inverse_kinematics(homeposition);
forward_kinematics(delta.a, delta.b);
current_position[axis] = cartes[axis];
//DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y);
update_software_endstops(axis);
}
}
// Comment out the MORGAN Homing.......
// void scara_set_axis_is_at_home(const AxisEnum axis) {
// if (axis == Z_AXIS)
// current_position.z = Z_HOME_POS;
// else {
// MORGAN_SCARA uses a Cartesian XY home position
// xyz_pos_t homeposition = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS };
//DEBUG_ECHOLNPGM_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y);
// delta = homeposition;
// forward_kinematics(delta.a, delta.b);
// current_position[axis] = cartes[axis];
//DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y);
// update_software_endstops(axis);
// }
// }
/**
* Morgan SCARA Inverse Kinematics. Results are stored in 'delta'.
*
* See [
reprap.org]
*
* Maths and first version by QHARLEY.
* Integrated into Marlin and slightly restructured by Joachim Cerny.
*/
void inverse_kinematics(const xyz_pos_t &raw) {
float C2, S2, SK1, SK2, THETA, PSI;
After I made these changes, it works and the homing works. So I think I am using the Morgan_Scara for the inverse Kinematics and the MP Scara for homing. But I am far from an expert.