Hello Guest it is April 19, 2024, 12:53:03 AM

Author Topic: Probing for different fixture offsets  (Read 4638 times)

0 Members and 1 Guest are viewing this topic.

Probing for different fixture offsets
« on: March 04, 2012, 11:04:31 AM »
Search isn't working and google isn't answering my question very well. 

Here's what I'm trying to do.  I have a sheet of plastic that varies in thickness from 0.130" - 0.090", I always put the thick side towards the back of my X2 cnc converted mill, and I have a series of milling operations to do including engraving and corner rounding.  Some tools get zeroed on the fixture, IE on the bottom of the part.  But since the sheet varies in thickness I like to zero my corner rounder and engraver on the thick part of the surface, that way I always know that I will get a perfectly rounded corner or less, but never undercut.  I just installed my power drawbar and have a bunch of TTS style toolholders, so I'm obviously using a tooltable.  I have a wired touch probe that I made.

I am trying to use my touch probe to probe several locations on the sheet, load those Z heights into different G55/G56/G57/etc coordinates so that each operation can run from a different fixture offset.  I can't get it to work.  G31 works great, it'll probe down and stop when it touches.  G92 Z0 will reset the DRO to 0, but doesn't seem to affect my fixture offsets table at all.  I've tried following that with G92.1, G92.2, and G92.3 with no success either.  Here is one of the many codes that I've tried, also I'm using this in the Gcode, not as a macro.

(TOUCH PROBE CYCLE)
G90 G00 G40
(FIXTURE SURFACE)
G54
G0 X-0.3 Y0
G31
G92 Z0
G0 Z0.5
(UPPER CHAMFER)
G55
G0 X2 Y-0.2
G31
G92 Z0
G0 Z0.5
(LOWER CHAMFER)
G56
G0 X4 Y-1.75
G31
G92 Z0
G0 Z0.5
(UPPER CORNER ROUNDER)
G57
G0 X1.6 Y0.04
G31
G92 Z0
G0 Z0.5
(LOWER CORNER ROUNDER)
G58
G0 X4.45 Y-1.51
G31
G92 Z0
G0 Z0.5
(UPPER ENGRAVING)
G59
G0 X1.15 Y-0.875
G31
G92 Z0
G0 Z0.5
(LOWER ENGRAVING)
G59P7
G0 X4.7 Y-2.5
G31
G92 Z0
G0 Z0.5

Thanks for any help!!
John

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Probing for different fixture offsets
« Reply #1 on: March 04, 2012, 12:49:11 PM »
G92 is a separate offset from the fixture offsets. Take a look at the Diagnostics page and you'll see what's going on.

I'd do it in a macro, where you can probe, and then directly right to the DRO, which sets the offset.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Probing for different fixture offsets
« Reply #2 on: March 04, 2012, 02:34:40 PM »
Thanks!  That makes a lot of sense, especially as to why G92 wasn't changing my fixture offset values at all.  I didn't realize that the diagnostics page showed all those coordinates, very very helpful.  I'll play with it, maybe try writing a macro, and report back.  Again, thanks for your help!

John
Re: Probing for different fixture offsets
« Reply #3 on: March 04, 2012, 03:55:55 PM »
Testing on my home PC looks like this will work great!  I used a keyboard key to trigger the probe signal and I got a full offset table for the Z value.  Here's my Gcode:
G54
G0 Z0.5
M123
G55
M123
G56
M123
G57
M123
G58
M123
G59
M123
M30

And here is the macro, I found it here: http://www.cnczone.com/forums/cnc_wood_router_project_log/36099-another_aussie_auto_tool_zero.html
The only change I made to it was that he created a new button for his plate thickness, I just used the original Gauge Block Height box which is 1002.

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = GetUserDRO(1002) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P0.25" ' this delay gives me time to get from computer to hold probe in place
Code "G31 Z-2 F10" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z0.5" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If
Re: Probing for different fixture offsets
« Reply #4 on: March 07, 2012, 12:05:54 PM »
Thanks for your help Gerry, I got it all figured out and working great!  PS your screenset looks awesome, might have to get that one day.

Here's the Gcode that I ended up using:

G90 G17 G40
G17
G00
M6 T21 G43 H21
(TOUCH PROBE CYCLE)
(FIXTURE SURFACE)
G54
G0 X-0.3 Y0
M123
(UPPER CHAMFER)
G55
G0 X2 Y-0.2
M123
(LOWER CHAMFER)
G56
G0 X4 Y-1.75
M123
(UPPER CORNER ROUNDER)
G57
G0 X1.6 Y0.04
M123
(LOWER CORNER ROUNDER)
G58
G0 X4.45 Y-1.51
M123
(UPPER ENGRAVING)
G59
G0 X1.15 Y-0.875
M123
(LOWER ENGRAVING)
G59P7
G0 X4.7 Y-2.5
M123
G0 Z1.5
G0 X0 Y0
(CHANGE TO T7 0.25 COUNTERSINK)
M6 T7 G43 H7 (**** NOTE BELOW****)
M00
G0 Z2
G55
G0 X1.049 Y0.006 Z0.5 S4500
M3
(-----------------------------------)
(CHAMFER 2 UPPER FRAME HOLES - DRILL)
(-----------------------------------)
   X1.049 Y0.006 Z0.5
G99 G81 Z-0.103 R0.079 F10
    X2.477 Y0.028
G80
ETC
ETC
ETC
M30
%

**** NOTICE HOW THIS IS BEFORE THE PROGRAM PAUSE, I FOUND THIS TO BE VERY IMPORTANT!  OTHERWISE WHEN YOU HIT CYCLE START AGAIN IT WOULD JUST RAISE THE Z AXIS UP INFINITELY FOR WHATEVER REASON.

And the macro in my last post worked great, obviously called it M123.

Hopefully this will help someone out in the future, it's a very handy piece of code for me. 

John