Router Bit Touch off G-code
- acourtjester
- Offline
- Elite Member
Less
More
- Posts: 282
- Thank you received: 23
10 Sep 2021 00:02 #220089
by acourtjester
Router Bit Touch off G-code was created by acourtjester
Hi GuysI have a simple question, I am using the Axis Gui and I would like to use a G-code touch off for the router bits I use. I have connected with pin #9 for the Probe input and it works very well, but there is a small problem in I get an error just after the touch off and first move up to about .5”. I have attached a screen shot of the G-code and the error I get and the line showing where it stops. I have used this routine on other tables for router bit positioning. I wonder if there is a Debounce setting in the Axis Gui. I have looked in the manual and on-line and the Linuxcnc web page for any info but cannot find a solution. I did find a similar routine but it seems it is written like a Macro with other additional code for other files. This seems like using a bowling ball to kill and ant. The main difference using the Linuxcnc is the probe g-code command is different. Mach and Uccnc both will recognize the G31 for probing where Linuxcnc uses a G38.2 to move the Z axis for this task. Have funTom
Attachments:
Please Log in or Create an account to join the conversation.
- RobC
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 5
11 Sep 2021 18:19 #220245
by RobC
Replied by RobC on topic Router Bit Touch off G-code
This is the gcode routine I use for setting Z height on my gantry router. It's mostly just a copy/paste from a probe routine at diycncdesign.com. Works perfectly. They also have instructions on how to add a button to call this routine without using a separate gcode file, but I haven't gotten into that far.
%
M6 T1
; Cancel all Z offsets
G92.1
G49
G10 L20 P0 Z[#<_hal[axis.z.pos-cmd]>]
; Set incremental mode
G91
; Force LinuxCNC to refresh hal pin states prior to reading HAL pin
M66 E0 L0
; Check if probe is already tripped
O10 if [#<_hal[motion.probe-input]> EQ 1]
O10 return [-1]
O10 endif
G38.2 Z-1 F25 (probe down using fast feedrate)
G0 Z0.1 (move up by .1 inch)
; Allow half second for the probe input to clear
G4 P0.5
; Force LinuxCNC to refresh hal pin states prior to reading HAL pin
M66 E0 L0
; Check if probe is already tripped
O21 if [#<_hal[motion.probe-input]> EQ 1]
O21 return [-1]
O21 endif
G38.2 Z-0.15 F5 (probe down using slow feedrate to get better accuracy)
G10 L20 P0 Z0.253 (set current WCS Z value to plate thickness)
G0 Z1.5 (move up 1.5 inches - Z should be 1.753 at this point)
M2
%
%
M6 T1
; Cancel all Z offsets
G92.1
G49
G10 L20 P0 Z[#<_hal[axis.z.pos-cmd]>]
; Set incremental mode
G91
; Force LinuxCNC to refresh hal pin states prior to reading HAL pin
M66 E0 L0
; Check if probe is already tripped
O10 if [#<_hal[motion.probe-input]> EQ 1]
O10 return [-1]
O10 endif
G38.2 Z-1 F25 (probe down using fast feedrate)
G0 Z0.1 (move up by .1 inch)
; Allow half second for the probe input to clear
G4 P0.5
; Force LinuxCNC to refresh hal pin states prior to reading HAL pin
M66 E0 L0
; Check if probe is already tripped
O21 if [#<_hal[motion.probe-input]> EQ 1]
O21 return [-1]
O21 endif
G38.2 Z-0.15 F5 (probe down using slow feedrate to get better accuracy)
G10 L20 P0 Z0.253 (set current WCS Z value to plate thickness)
G0 Z1.5 (move up 1.5 inches - Z should be 1.753 at this point)
M2
%
Please Log in or Create an account to join the conversation.
- acourtjester
- Offline
- Elite Member
Less
More
- Posts: 282
- Thank you received: 23
12 Sep 2021 02:13 - 12 Sep 2021 02:19 #220274
by acourtjester
Replied by acourtjester on topic Router Bit Touch off G-code
Great thanks Rob, I will try it out on Monday. Is the any other statements that need to be added to the Custom, custom_postgui or other folders?
have fun
Tom
have fun
Tom
Last edit: 12 Sep 2021 02:19 by acourtjester.
Please Log in or Create an account to join the conversation.
- RobC
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 5
13 Sep 2021 19:42 #220490
by RobC
Replied by RobC on topic Router Bit Touch off G-code
No, my files are both completely blank. I needed something I could get working right away with little tinkering, so I went the standalone gcode route. I'll get into all that some day, but it's not needed for this.
Please Log in or Create an account to join the conversation.
- acourtjester
- Offline
- Elite Member
Less
More
- Posts: 282
- Thank you received: 23
13 Sep 2021 21:39 #220511
by acourtjester
Replied by acourtjester on topic Router Bit Touch off G-code
I went to the shop and loaded the G-code and it stops just about in the same location. Just after the torch rise off the metal.
Just something I checked under QTPlasmaC if I click on the Probe test button it moves down touched the metal plate moved back up to the value in the tool window (0.150"). It shows that value in the DRO. Then there is a pause and then it moves back up to where I set the DRO to 0.0 before the start of the test. the line in Hal reads #---probe-in ---
net probe-in <- hm_7i76e.0.7i76.0.0.input-9 Hal show shows it working for the probe in.
Just something I checked under QTPlasmaC if I click on the Probe test button it moves down touched the metal plate moved back up to the value in the tool window (0.150"). It shows that value in the DRO. Then there is a pause and then it moves back up to where I set the DRO to 0.0 before the start of the test. the line in Hal reads #---probe-in ---
net probe-in <- hm_7i76e.0.7i76.0.0.input-9 Hal show shows it working for the probe in.
Attachments:
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19422
- Thank you received: 6516
13 Sep 2021 22:59 #220524
by tommylight
Replied by tommylight on topic Router Bit Touch off G-code
Try
net probe-in <- hm_7i76e.0.7i76.0.0.input-9-not
net probe-in <- hm_7i76e.0.7i76.0.0.input-9-not
Please Log in or Create an account to join the conversation.
- acourtjester
- Offline
- Elite Member
Less
More
- Posts: 282
- Thank you received: 23
14 Sep 2021 18:22 - 14 Sep 2021 18:23 #220639
by acourtjester
Replied by acourtjester on topic Router Bit Touch off G-code
thanks for the input Tommy, it show what I expected with the change of state for the input. It errored out stating the probe was tripped at the start and not movement of the g-code. This happened with either the short G-code shown and with the one Rob sent.
I am open to try other things if someone has an idea to post to get this going.
I am open to try other things if someone has an idea to post to get this going.
Attachments:
Last edit: 14 Sep 2021 18:23 by acourtjester.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19422
- Thank you received: 6516
14 Sep 2021 21:15 #220651
by tommylight
Replied by tommylight on topic Router Bit Touch off G-code
Ok, i am out of ideas as last time i used probing in gcode was 7 or 8 years back, maybe more.
Sorry.
Sorry.
Please Log in or Create an account to join the conversation.
- acourtjester
- Offline
- Elite Member
Less
More
- Posts: 282
- Thank you received: 23
14 Sep 2021 21:24 #220653
by acourtjester
Replied by acourtjester on topic Router Bit Touch off G-code
thanks I can get away without it but it is nice to do it in auto mode.
I would think it is some simple line of code or setting I am missing.
I would think it is some simple line of code or setting I am missing.
Please Log in or Create an account to join the conversation.
Time to create page: 0.105 seconds