Hello Guest it is October 14, 2019, 12:17:49 PM

Author Topic: Tool and Work Offset questions  (Read 6501 times)

0 Members and 1 Guest are viewing this topic.

Tool and Work Offset questions
« on: November 30, 2012, 01:28:50 AM »
I use a K2CNC 3925G router with licensed Mach3 and no presettable tools.  Normally I just set the tool length using "Zero Z" on the Program Run panel.  I now need to cut multiple identical parts using 12 work offsets (G10 L2, G59, M98...).  So I'm learning tool offsets in Mach3, so the Z is correct for all 12 work offsets. 

My first question is on tool offsets, which I've done with other machines but not with Mach3.   The machine's Z home switch is at the top of the travel, so all Z Machine Coors are negative.  Here's what I'm doing:
Put Tool 1 in and jog it to the top of the workpiece.  Say the Z Machine Coordinate is -8.0 
In the Offsets menu, I enter "1" for the Tool and "8.0" for the Z offset.  The Tool Offset On/Off green LED is on.
But now the Z Work Coor is -16.0. 
Next I go to MDI and enter G44, and the Z Work Coor changes to 0.0  So I permanently set the G44 in General Config > Initialization String. 
This works, but I thought most machines used G43 -- am I setting up tool offsets correctly for this machine?  Or perhaps I have something else configured oddly that leads to needing G44? 

My second question is on the work offsets.  When I run the program below, Mach starts outputting the correct Machine Coors for Work Offset P101, but on the Offsets tab it says the Active Work Offset is G59P102 (and Current Work Offset is 102).  Also, when doing Work Offsets P102-P112, the Tool Path Display just draws over the same P101 area.  Are these just (confusing) bugs or is there some other error? 

Thanks for any advice,
David


%
(Multi Bridge Program)
(Cuts 12 bridges in an array: 3 in Y  by  4 in X)
G17 G20 G64
(Setup Work Offset Coordinate Systems)
G10 L2 P101  X-27.5 Y4.0
G10 L2 P102  X-27.5 Y12.0
G10 L2 P103  X-27.5 Y20.0
G10 L2 P104  X-30.0 Y4.0
G10 L2 P105  X-30.0 Y12.0
G10 L2 P106  X-30.0 Y20.0
G10 L2 P107  X-32.5 Y4.0
G10 L2 P108  X-32.5 Y12.0
G10 L2 P109  X-32.5 Y20.0
G10 L2 P1010 X-35.0 Y4.0
G10 L2 P1011 X-35.0 Y12.0
G10 L2 P1012 X-35.0 Y20.0

(Cut 12 bridges referencing subroutine P12345)
G59 P101  (P101)
M98 P12345
G59 P102  (P102)
M98 P12345
G59 P103  (P103)
M98 P12345
G59 P104  (P104)
M98 P12345
G59 P105  (P105)
M98 P12345
G59 P106  (P106)
M98 P12345
G59 P107  (P107)
M98 P12345
G59 P108  (P108)
M98 P12345
G59 P109  (P109)
M98 P12345
G59 P110  (P110)
M98 P12345
G59 P111  (P111)
M98 P12345
G59 P112  (P112)
M98 P12345

(Define subroutine program to cut 1 part.  Normally there a zillion lines below; this just marks the outline.)
O12345
G0 X0.0 Y0.0 Z0.1
M3 S5000
G0 X0.0 Y-3.5
G1 Z-0.1 F100
Y3.5
X1.5
Y-3.5
X0.0
G0 Z0.1
M99 

M5
M30

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Tool and Work Offset questions
« Reply #1 on: November 30, 2012, 11:43:20 PM »
HIYA DAVE I see noone has answered you yet so I will take a swing at it.

First the code you have will not LOAD as is.  Mach3 will error with a note about teh P values being out of range. Mach3 is limited to 255 fixture offsets.

Next the Sub program order is not correct. The M30 HAS to be at teh tale end of the code string BUT in front of the sub itself. You will get anerror as is about a sub return call with no sub in effect.

Try it this way. It will load and run

%
(Multi Bridge Program)
(Cuts 12 bridges in an array: 3 in Y  by  4 in X)
G17 G20 G64 F100
(Setup Work Offset Coordinate Systems)
G10 L2 P101  X-27.5 Y4.0
G10 L2 P102  X-27.5 Y12.0
G10 L2 P103  X-27.5 Y20.0
G10 L2 P104  X-30.0 Y4.0
G10 L2 P105  X-30.0 Y12.0
G10 L2 P106  X-30.0 Y20.0
G10 L2 P107  X-32.5 Y4.0
G10 L2 P108  X-32.5 Y12.0
G10 L2 P109  X-32.5 Y20.0
G10 L2 P110 X-35.0 Y4.0
G10 L2 P111 X-35.0 Y12.0
G10 L2 P112 X-35.0 Y20.0

(Cut 12 bridges referencing subroutine P12345)
G59 P101  (P101)
M98 P12345
G59 P102  (P102)
M98 P12345
G59 P103  (P103)
M98 P12345
G59 P104  (P104)
M98 P12345
G59 P105  (P105)
M98 P12345
G59 P106  (P106)
M98 P12345
G59 P107  (P107)
M98 P12345
G59 P108  (P108)
M98 P12345
G59 P109  (P109)
M98 P12345
G59 P110  (P110)
M98 P12345
G59 P111  (P111)
M98 P12345
G59 P112  (P112)
M98 P12345
M5
M30

(Define subroutine program to cut 1 part.  Normally there a zillion lines below; this just marks the utline.)

O12345
G0 X0.0 Y0.0 Z0.1
M3 S5000
G0 X0.0 Y-3.5
G1 Z-0.1 F500
Y3.5
X1.5
Y-3.5
X0.0
G0 Z0.1
M99 


NOW as to the tooPath display (;-)  It is a glitch in the original toolPath code.  It will SHOW the complete pathing BUT when tht ecode starts to run it only shows the original starting OFFSET toolpath. Then as you apply the next offset XY ZERO gets moved to another spot BUT the toolpathing still sees it starting on X0Y0 again so the display repeats the original path. It does NOT know that the XOYO had been moved as it still starts at XOYO.

The machine WILL cut correctly.

Hope that helps, (;-)TP

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Tool and Work Offset questions
« Reply #2 on: December 01, 2012, 12:05:51 AM »
If you use G92 instead of offsets, you don't have to worry about how to deal with the Z offset. Just zero at the start.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Tool and Work Offset questions
« Reply #3 on: December 01, 2012, 12:42:03 PM »
OK I'll Bite, IF you do not change the Z in the fixture nothing changes with the Z offset correct ? With a fixture you can also have G92 running an offset and it still holds true after a Fixture change with G10L2.

OR have I missed something ?

(;-) TP

Re: Tool and Work Offset questions
« Reply #4 on: December 01, 2012, 06:04:49 PM »
Hi, Thanks for the replies -- those help a lot! 

Yeah I see I forgot to proof the latest code on those P1010 offsets (the last version I ran only had 9)!  Especially thanks for the out of place M5 and M30.  I was wondering why I got those sub return call errors, and why the machine didn't shut off at the end! 

Now I get why the display shows the whole path before a run, but only the sub path during. 

G43/G44 are still confusing me, but I did finally manage to get the program to cut the 12 outlines!  If I have trouble again I'll experiment with G92 on the z only instead of tool offsets -- thanks. 

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Tool and Work Offset questions
« Reply #5 on: December 01, 2012, 06:40:40 PM »
Read the manual on G43 and G44.
Normally, you'd use G43 to turn on tool length offsets, and G49 to turn them off. I'd never seen G44 mentioned before, but the manual says it's provided for compatibility, and is used for negative offsets.

I have a feeling that G43 works for both positive and negative offsets though.

Personally, I find using an auto zero plate is much easier than using G43/G49.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Tool and Work Offset questions
« Reply #6 on: December 01, 2012, 09:30:14 PM »
Oh, I read the manual and understand the commands, but I wasn't understanding why I needed G44 instead of G43.  Yes, if there's a negative number in the tool table, G43 works fine with it.  I think what confused me was that one can't enter a negative number in the Tool Information > Z Offset box; so then I needed G44.  But the tool table takes negative numbers, and the "Set Tool Offset" button will put a negative number in there, too.  So I think I got it now: put a negative number in the tool table, then G43 works fine.  I'll look into the zero plate method, too.  Thanks again.