Marlin code for scissor lift z-axis February 22, 2014 04:06AM |
Registered: 12 years ago Posts: 11 |
// The target position of the tool in absolute steps // Calculate target position in absolute steps //this should be done after the wait, because otherwise a M92 code within the gcode disrupts this calculation somehow long target[4]; target[X_AXIS] = lround(x*axis_steps_per_unit[X_AXIS]); target[Y_AXIS] = lround(y*axis_steps_per_unit[Y_AXIS]); target[Z_AXIS] = lround(z*axis_steps_per_unit[Z_AXIS]); target[E_AXIS] = lround(e*axis_steps_per_unit[E_AXIS]);
target[Z_AXIS] = 1round(sqrt((sq(Scissor_arm_length)-sq(y*axis_steps_per_unit[Z-AXIS])));
Re: Marlin code for scissor lift z-axis February 25, 2014 01:42AM |
Registered: 14 years ago Posts: 43 |
float c = z*axis_steps_per_unit[Z-AXIS]; target[Z_AXIS] = lround( sqrt( Scissor_arm_length*Scissor_arm_length - c*c ) );
Re: Marlin code for scissor lift z-axis February 27, 2014 02:06AM |
Registered: 12 years ago Posts: 11 |
Re: Marlin code for scissor lift z-axis April 04, 2014 07:36PM |
Registered: 11 years ago Posts: 250 |
Re: Marlin code for scissor lift z-axis December 17, 2014 09:06PM |
Registered: 9 years ago Posts: 3 |
Re: Marlin code for scissor lift z-axis December 31, 2014 08:48PM |
Registered: 10 years ago Posts: 56 |
Re: Marlin code for scissor lift z-axis April 12, 2015 06:42AM |
Registered: 9 years ago Posts: 6 |
Re: Marlin code for scissor lift z-axis January 11, 2017 05:07PM |
Registered: 7 years ago Posts: 1 |