Marlin successive home issue June 17, 2015 08:56AM |
Registered: 8 years ago Posts: 5 |
Re: Marlin successive home issue June 17, 2015 09:12AM |
Registered: 9 years ago Posts: 43 |
Re: Marlin successive home issue June 17, 2015 09:13AM |
Registered: 9 years ago Posts: 95 |
Quote
Sodombar
For bring back on top the Z motor, I use the command G28 Z0 to home it because I don't have enought skill to write my own command to do something like that.
G0 Z0
Re: Marlin successive home issue June 17, 2015 09:35AM |
Registered: 8 years ago Posts: 5 |
Re: Marlin successive home issue June 17, 2015 10:35AM |
Registered: 8 years ago Posts: 5,232 |
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. #define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
Re: Marlin successive home issue June 17, 2015 11:04AM |
Registered: 8 years ago Posts: 5 |
Re: Marlin successive home issue June 17, 2015 11:59AM |
Registered: 9 years ago Posts: 43 |
Re: Marlin successive home issue June 17, 2015 12:38PM |
Registered: 8 years ago Posts: 5 |
Re: Marlin successive home issue June 17, 2015 12:47PM |
Registered: 9 years ago Posts: 43 |
Quote
Sodombar
The tool is a kind of sensor.
I use this function to drive the motor :
// Takes a single step
void takeSingleStep() {
Z_STEP_WRITE(LOW);
delayMicroseconds(stepPulseWidthInMicroSec);
Z_STEP_WRITE(HIGH);
delayMicroseconds(timeBetweenStepsInMicroSec);
}
In relation to the state of the sensor :
// GO UP
if (state1 < threshold && state2 >= threshold) {
Z_DIR_WRITE(HIGH);
takeSingleStep();
// GO DOWN
if (state2 < threshold && state1 >= threshold) {
Z_DIR_WRITE(LOW);
takeSingleStep();
In fact, the motor moves but return no information about its motion. Because, if it could return some informations about its position then it would be possible to use G0 Z0 as the motor is no longer at the position Z0.
Re: Marlin successive home issue June 17, 2015 01:38PM |
Registered: 8 years ago Posts: 5,232 |
Re: Marlin successive home issue June 18, 2015 06:10AM |
Registered: 8 years ago Posts: 5 |