If ENDSTOP_INTERRUPTS_FEATURE is enabled this tries to set up interrupt routines
for all used endstop pins. If this worked without errors, `endstops.update()` is called
only if one of the endstops changed its state.
The new interrupt routines do not really check the endstops and react upon them. All what they
do, is to set a flag if it makes sense to call the endstop test we are used to.
This can be used on:
* ARM (DUE) based boards - all pins can raise interrupts,
* RAMPS - all 6 endstop pins plus some other on EXT-2 can raise interrupts,
* RAMPS based boards - as long the designers did not change the pins for the endstops or at least left enough,
* all boards, if there are enough pins that can raise interrupts, and you are willing/able to swap with pins dedicated to other purpose.
1) modified 3 code files
Marlin.h
Marlin_main.cpp
endstops.cpp
2) modified config files so I could test on my machine
Testing was done on an AzteegX3pro based machine.
The probe was hooked to the Z_MIN endstop.
My controller doesn't have a dedicated Z_PROBE input so I couldn't test
that functionality.
Verified that a large file (without any G38 commands) executed the same
before and after the changes.
Verified that the head moves as expected when G38.2 and G38.3 commands
are issued. Single & multiple axis moves were tested along with + and -
directions.
Code was added to the main ISR. In normal operation only one extra IF
statement is evaluated. I didn't notice any performance degradation
because of the added code.
The G38 commands are expected to be issued manually by the operator
during machine setup. The G38 commands wait until the machine is idle
before proceeding. That way the other commands are minimally impacted
by the extra ISR overhead when a G38 command is in the queue.
The G38 commands are very similar to the G28 commands except 1) only the
Z_PROBE is used and movement can be in the + or - direction.
See issue 4677 for a discussion on adding G38 commands to Marlin.
Feature request: add ability to use G38.2 command (CNC)
MarlinFirmware/Marlin#4677
About Configuration.h:
・Fix the PR #4899 (ABL: Enable by type. Bilinear for all.)
Remove Duplicated contents
・Fix the PR #4305 (Custom boot screen feature improvement)
Revert from "during boot" to "during bootup" in all the example
Configuration.h
・Fix the PR #4207 (Clean up, simplify and generalize the Allen-key-probe
code.)
Resolve and relocate the duplicated definitions in Z_PROBE_ALLEN_KEY
section
・Follow-up the PR #4805 (Additional documentation of Configuration.h)
Add forgotten changes to all the example Configuration.h
Adjust spacing
About Configuration_adv.h:
Add missing description of SLOWDOWN for DELTA
Adjust spacing
Why double touch probing is not a good thing.
It's widely believed we can get better __probing__ results when using a double touch when probing.
Let's compare to double touch __homing__.
Or better let's begin with single touch __homing__.
We home to find out out position, so our position is unknown.
To find the endstop we have to move into the direction of the endstop.
The maximum way we have to move is a bit longer than the axis length.
When we arrive at the endstop - when it triggers, the stepper pulses are stopped immediately.
It's a sudden stop. No smooth deacceleration is possible.
Depending on the speed and the moving mass we lose steps here.
Only if we approached slow enough (below jerk speed?) we will not lose steps.
Moving a complete axis length, that slow, takes for ever.
To speed up homing, we now make the first approach faster, get a guess about our position,
back up a bit and make a second slower approach to get a exact result without losing steps.
What we do in double touch probing is the same. But the difference here is:
a. we already know where we are
b. if the first approach is to fast we will lose steps here to.
But this time there is no second approach to set the position to 0. We are measuring only.
The lost steps are permanent until we home the next time.
So if you experienced permanently rising values in M48 you now know why. (Too fast, suddenly stopped, first approach)
What can we do to improve probing?
We can use the information about our current position.
We can make a really fast, but deaccelerated, move to a place we know it is a bit before the trigger point.
And then move the rest of the way really slow.