Originally Posted by
pippin88
I suggest following my guide
7xCNC - Minilathe CNC :: LinuxCNC Z Touch Off Plate
Each MDI command in .ini is separate and needs to be called with it's own halui.mdi-command-xx (where xx is 00, 01 etc corresponding to the commands position in the list in the ini). I'm not sure what happens if you try to call multiple MDI command at once.
You need the commands in a subroutine (an o file). It's in my guide.
i was just trying to set up my Z touch off by your guide for past hour, what i did is that i comment your 2 lines in custom.hal
#net deb-probe-in debounce.0.0.in <= parport.0.pin-13-in-not
#net probe-in debounce.0.0.out
because i was getting the error that probe is already activated (I did that with StepCONF wizard)
then i managed to do 100.ngc program and call sub program with custom button. Everything works great.
The problem now is G-code ... i want 2 touches ... 1st rapid 2nd slower ...
what would be the right G-code to make the same efect like if you would click "Touch Off" buttom who is already build in LinuxCNC for TouchOff Z axis ..
what i writed ... is that good ?
Code:
#1 = 1.47 (PLATE THICKNESS)
#2 = 2 (UP OFF PLATE FOR 2ND TOUCH)
#3 = 8.53 (Distance to retouch)
G21 (metric)
(DEBUG,CHANGE TOOL AND PLACE TOUCH PLATE UNDER TOOL THEN PRESS START TO CONTINUE)
G10 L20 P0 Z0
G38.2 Z-40 F250
G90 G0 Z[#5063+#3]
G91 G38.2 Z-40 F15
G10 L20 P0 Z#1
G90 G0 Z[#5063+20]
(DEBUG,REMOVE TOUCH PLATE AND PRESS START TO CONTINUE)
yours ... what must i add that at 1st touch it moves 2mm above PCB plate and then slowley retouch and then agen move to the hight 10?
Code:
o100 sub
( Set current Z position to 0 so that we will always be moving down )
G10 L20 P0 Z0
( Probe to Z-10 at F25 [Uses machine units, I work in mm, this is meant to be slow!] )
G38.2 Z-10 f25
( Set Z0 at point where probe triggers with offset of +1.47 [this is the thickness of my PCB plate. You must adjust this for your plate / setup] )
G10 L20 P0 Z1.47
( Rapid up to Z10 above the material )
G0 Z10
o100 endsub