I made Scara type printer(prototype) for firmware test.
I used Arduino Mega and RAMPS 1.4 for board and used only motor not timing belt. Then I put DEFAULT_AXIS_STEPS_PER_UNIT as appropriate.
I used a firmware which Vitaminard modified at
github
A first linkage of arm length is 150mm and second one is 90mm.
I put 100 to SCARA_offset_x and -100 to SCARA_offset_y. But I did not know how to put the value to THETA_HOMING_OFFSET and PSI_HOMING_OFFSET, so I put 0 to them. When I tested, I put 10, 20 or 60, 90 to them randomly.
And I put SCARA_offset_x to MANUAL_X_HOME_POS and (Linkage_1 + Linkage_2) + SCARA_offset_y to MANUAL_Y_HOME_POS.
Current motion is as follows: When operated by all axis home, motor Theta and Psi moved together. when a limit switch of Theta pushed twice, motor Theta is stopped. After that motor Psi moved and a limit switch of Psi pushed twice, the motor Psi is stopped. And then no further movement.
I used M114 for checking Serial Monitor and current position. For example:
When SCARA_offset_x and SCARA_offset_y is both 0, current position is X=240 and Y=0.
When SCARA_offset_x is -100 and SCARA_offset_y is -100, current position is X=140 and Y=-100.
But they did not move to those positions after all axis home.
When they operating by code G1, there were no exact motions. So, in the part of ‘SCARA_theta = ( atan2(SCARA_pos[X_AXIS],SCARA_pos[Y_AXIS])-atan2(SCARA_K1, SCARA_K2) ) * -1;’ in calculate_delta
function of file Marlin_main.cpp. I changed SCARA_K1 with SCARA_K2 and they acted exactly.
I tested both cases before and after changing SCARA_K1 with SCARA_K2, but there were same motions(two motor stopped after checking limit switch) after all axis home.
Now, when motion was operated by code G1 and changing K1 with K2, it moved in exact coordinate.
My aim is to make a motion that when I do all axis home, uses only motor Theta and pushes limit switch. Then uses only motor Psi and pushes limit switch and moves towards coordinates saved in MANUAL_X,Y_HOME_POS.
I modified only two sources, file Configuration.h(several arm lengths and settings) and file Marlin_main.cpp(changing only calculate_delta(inverse kinematic) K1 ,K2).
I need someone’s help who knows well about this.
Edited 2 time(s). Last edit at 07/14/2016 03:18AM by scara90.