Thanks that was the hint I needed. It took me a while to figure it out.
This is how I solved my Problem.
Feature Configuration:
#define FEATURE_Z_PROBE 1 //this feature needs to be enabled to use commands G30
#define Z_PROBE_HEIGHT 26 //because my switch has a height of 26mm when its triggered
Also the defines
Z_PROBE_PIN
Z_PROBE_PULLUP
Z_PROBE_ON_HIGH
should be configured.
This is my Setup:
| |
| | <- end mill
| |
\/
|S| <- The S is my Z_Probe (switch for messuring my tool hight)
+-------+
| | <- this is the workpiece i want to mill down
############### <- This is by Bed, lowes Point my tool can reach.
The workpiece is placed on the bed and the switch is placed on the workpiece.
The end mill is then probed onto the switch with the following command.
G30 H<workpiece height> R0
Result if my Workpiece has a height of 10mm
| |
| |
| |
\/
<- This is : Machine(36) = Display Position(26) = Machine(36) + Offset(-10)
|S|
+-------+ <- This is: Machine(10) = Display Position(0) = Machine(10) + Offset (-10)
| |
############## <- This is: Machine(0) = Display Position(-10) = Machine(0)+ Offset(-10)