Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Brian Barker on December 22, 2008, 01:05:20 AM

Title: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 01:05:20 AM
Hello all,
I have been hard at work on the Cutter Comp code (this a complete rewrite). The old code was a bit of a mess and needed to be made more like what you will see in all the training books. The new Comp code is Type C (anti-gouge). This does not mean that it will act like a CAM program (ie. intelligent enough to skip segments that it cannot cut - it *will* cut every line of code), and there are rules that you MUST follow. So, first things first, we will go over what you should *not* do:


1. You can  NOT do Comp on and Comp off moves with G2 or G3.
2. All moves should be longer than the amount that you would like to offset (ie. no small segmented files).
3. All inside arcs must be greater than the amount you are comping.
4. G20, G21, and G30 CAN NOT be used when Comp is on.
5. No more than 50 non-movement lines in a row in the file (this is all we have for a lookahead buffer).
6. Leadin moves should be longer than the amount that you are going to offset.

If you follow these 5 rules, you should be all set... :)

Now for the fun, lets see it working!


Example 1

I am going to start with a program that is mostly in Inc format and has a sub call to get it to depth. Please note that I cam calling the Comp on and off out of the sub, and that it is a simple leadin... ;)

Code: [Select]
G90 G0 X0.0 Y0.0
Z0
G01 G91 G41 D2 Y1.0F30 (.5 for the tool DIA)
M98 P1001 L5
G40
G0 Z.5 Y-1
X3
G01 G91 G41 Y1.0
M98 P1001 L5
G40
G0 Y-1 Z.5
G90
M30

O1001
X-1
Y2
X2
Y-2
X-1
Z-.1
M99

(http://www.machsupport.com/images/examples/CompExample1.jpg)


Example 2

In this example, you will see Cap moves added and arcs trimmed to fit the intersection. Also note that the leadin moves are about 180 from where they should be! Mach3 knows that this would scrap your part, so it adds an arc to go around the end of the move to prevent gouging. This Arc move around the tip is Type C Comp at work... :)

Code: [Select]
G00 Z 1.0
N6G00 X1.50 Y4.5
 Z.1
G01 Z-.5 F30
G01 G41 D2 X1.0Y5.52982 F100 (Dia == .5)
N11G02X4.33052Y5.17443I1.5437J-1.3165
N12X4.9639Y5.28092I0.4737J-0.8807
N13G03X4.80423Y8.29375I-7.0347J1.1378
N14G02X5.49542Y5.01642I-0.775J-1.875
N15X5.79242Y4.44694I-0.6912J-0.7227
N16G03X8.60845Y5.52982I-1.0917J7.042
N17G02X5.70512Y3.8597I-2.0227J0.1577
N18X5.25529Y3.40126I-0.9009J0.434
N19G03X7.15537Y1.05768I6.36J3.2144
N20G02X4.66981Y3.30282I-0.4751J1.9724
N21X4.09481Y3.58896I0.1344J0.9909
N22G03X2.45309Y1.05768I5.0224J-5.0554
N23G02X3.82026Y4.11537I1.7291J1.0614
N24X3.91471Y4.75066I0.984J0.1784
N25G03X1.0Y5.52982I-3.256J-6.3388
G01G40X1.50 y7.5
G00 Z.5
m30

(http://www.machsupport.com/images/examples/CompExample2.jpg)


Example 3

Not all programming with comp is for Part Line programming. I like to do Center Line programming and use the Comp for wear offsetting. Here is an example of a slot being cut with Comp. The first is a Comp offset of zero and the second is .05 for an undersized end mill.
 
Code: [Select]
G00 Z.1
G00 X0 Y.1
G00 G41 D1 Y0.0 (Offset 0.0 - .05)
G01 Z-.2
X1.0
X0
G40
G00 Z.10
Y-.1
M30

(http://www.machsupport.com/images/examples/CompExample3_1.jpg)

(http://www.machsupport.com/images/examples/CompExample3_2.jpg)


Example 4

In this example, we will see how the Comp works inside pockets. This is a nice simple ABS file that I made by hand, so sorry for the sloppy code... :)

Code: [Select]
G00 X-1.75 Y0.0
Z.1
G1 Z-.5 F30
G42 D4 Y-.25 F45 (.25Tool Dia)
G2 X-2 Y0.0 R.25
G1 Y1
G2 X1.5 R2
G1Y2
X3.0
Y-.5
X-2
Y0
G2 Y.25 X-1.75 R.25
G40
G01 y0.0
Z.5
M30

(http://www.machsupport.com/images/examples/CompExample4.jpg)


Example 5

Here is an example that is using the Type C Comp  leadin moves, and will not gouge the part with a parallell leadin move.

Code: [Select]
G00 X0.0 Y1.5
Z-.5
G1 G41 D3 Y1.0 F10 (Tool DIA == .375)
Y0.0
G3 X.25 Y-.5 R.35
G1Y-1
G40Y-1.5
G0 Z1.0
M30

(http://www.machsupport.com/images/examples/CompExample5.jpg)



If you have any questions about what was done in the examples, I can answer them, but if you are looking for books that you can read about how this works I would highly recommend "Programming of CNC Machines" by Ken Evans or "CNC Programming Handbook" Peter Smid. I have found that Ken's book has more depth of knowledge about what the machine will do with odd situations, and Peter's book explains how Comp in general works, with good explanations and diagrams of the different types - both good to know... ;)

This code is soon to be released in the 3.043.00 development version for testing, and any comments should be posted in this thread.

Thanks and enjoy!

Brian
Title: Re: New Cutter Comp code and Examples
Post by: mvcalypso on December 22, 2008, 02:02:14 AM
Hi Brian,

Looking nice!
I've a couple of detail questions -
In your post you gave some rules:

1. You can only do Comp on and Comp off moves with G2 or G3
?: Is this what you meant to say? I'm a tad confused as I would have thought that the comp moves woudl have to be linear and NOT arcs, but the sentence seem to me to say the opposite. The examples seem to do G01 moves on the G41 lines...
Example 1 has "G01 G91 G41 D2 Y1.0F30 (.5 for the tool DIA)"    - have I misunderstood?

2. All moves should be longer than the amount that you would like to offset (no small segmented files)
?: I think you meant all "comp on/off" moves - correct? I'd think that one can move the cutter by an amount less than the radius comp amount.

3. All inside arcs must be greater then the amount you are comping
?: OK, I think this means "don't try to squeeze a .5 cutter into a .25 radius hole".
What does mach do if you try?
Throw an error?
Is this checked for when mach simulates the code?

4. G20 G21 and G30 CAN NOT bu used when comp is on..
?: I think you mean that you can not change from G20 ro G21 or vise vera while comp is on - but that either G20 or G21 can be an active mode while comp is active - correct?
G30 is verboten, how about G28 and G28.1?

5. No more then 50 non movement lines in a row in the file ( this is all we have for a lookahead buffer)
?: Is this really non-movement "lines" or is it non-movement "blocks"? I.e does two lines, each with 3 m-code blocks on each line count as 2 or 6? I'd guess 6, could you confirm which is correct?

Dave
Title: Re: New Cutter Comp code and Examples
Post by: Graham Waterworth on December 22, 2008, 08:20:26 AM
I think Brian is a bit punch drunk with programming code so let me try to clarify this.

Rule 1.

You can not apply or cancel cutter comp on a G02 or a G03 command :-

e.g.

G01 G42 P2.5 X20. is legal code

G02 G42 P2.5 X20. Y0 R10. is NOT

Rule 2.

The lead in and lead out lines must be longer than the rad of the cutter, so if you are using a .5" diameter cutter the lead lines must be longer than .25", the general rule is 1.5 X radius of cutter.

Rule 3.

You can not use a cutter larger than the smallest internal diameter, if your smallest rad is .25" then the largest cutter you can use is .4999" diameter.

Rule 4.

G20, G21, G28, G28.1, G30, G31 and G52 can NOT be used with in a block of comp code, e.g. these g-codes must not be used between G41/42 and the G40

Rule 5.

You can NOT have 50 consecutive lines of code without a movement command, e.g. X,Y

A line is 1 or more blocks terminated by a return

I hope this clears the confusion.

Graham
 
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 08:33:09 AM
Yeah I was up way to late making that post.. in other news I now have about 16" of new snow LOL

Thanks for setting that straight for me Graham!
Brian
Title: Re: New Cutter Comp code and Examples
Post by: vmax549 on December 22, 2008, 10:21:18 AM
Brian had me worried(;-) BUT Graham got my heart back started again(;-)

Brian don't you have a CNC snow shovel powered by MACH ? Heck we even have snow shovels down here (to pick up the fall leaves)

(;-) TP
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 10:56:01 AM
I took out the 60 Hp 4wd tractor with the loader :) that made short work of the problem LOL

Yeah I made that post after I got in from plowing and was ready for bed..

Shoudl have this version out soon for you to play with!

Thansk
Brian
Title: Re: New Cutter Comp code and Examples
Post by: GrahamH on December 22, 2008, 12:03:07 PM

Rule 3.

You can not use a cutter larger than the smallest internal diameter, if your smallest rad is .25" then the largest cutter you can use is .5" diameter.


Rule 3 is the only one I think is a problem with the new comp. Firstly the rule says the inside arcs must be greater than the comp, and I found this to be the case in my testing of the new comp code.

So if the smallest rad is .25 then the largest cutter must be .4999 or smaller. A .5 cuter with a comp of .25 wont work as its equal to the smallest arc. Very limiting as code with .125 inside arcs almost cant be cut now.

Graham Hollis



Title: Re: New Cutter Comp code and Examples
Post by: Hillbilly9749 on December 22, 2008, 12:27:16 PM
Is there any way that cutter comp can be used on the X/Z plane (G18). I want to use the equivilent of a ball end mill to cut a sort of semi circular path with the X/Z axis using comp with re ground tools. Alternatively could I use the scaling facility by working out how much under nominal size my cutter is then scaling the program to compensate.
Title: Re: New Cutter Comp code and Examples
Post by: Graham Waterworth on December 22, 2008, 02:49:04 PM
Quote
So if the smallest rad is .25 then the largest cutter must be .4999 or smaller. A .5 cuter with a comp of .25 wont work as its equal to the smallest arc. Very limiting as code with .125 inside arcs almost cant be cut now.

so what is wrong with using a 6mm (.236") cutter

Graham
Title: Re: New Cutter Comp code and Examples
Post by: vmax549 on December 22, 2008, 03:19:17 PM
HUM so you guys are saying we still can't cut a .250 radius with a .500 cutter??  WHere this comes into play is with deep pockets where it would be best to use as large a tool as possible. Reaching down 2.000" into a pocket is better cut with a .500 tool rather than to back up to a  .437 or .375 tool (flex).

OR can we fudge and say the cutter is .4999 and it will still run????

(;-) TP

Title: Re: New Cutter Comp code and Examples
Post by: Hillbilly9749 on December 22, 2008, 04:03:11 PM
Surely if you want to cut a 0.25 radius with a 0.5 cutter all you need to do is take the cutter to the radius centre point and feed down to the required depth.
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 04:22:45 PM
ONLY G17... Sorry :)

Yes the tool must be less.. You could se the same size tool if you use R style progamming :)  The problem that I have is the rounding from the cam programs... I can't make a .5 tool fit in a .499999 space.. The math blows up..

Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: Hillbilly9749 on December 22, 2008, 04:39:16 PM
Hi Brian, I think I have now figured out how to get around my problem. I will be using a grinding disc of around 25mm diameter x 3mm thick which will be dressed to a 1.5 convex radius on it diameter. Thinking about it all I need to do is program the path of the centre of the 1.5 rad to produce the required shape using the X/Z axis without comp but have this tool controled by a second work offset that will be the distance between the centre of the 1.5 rad and the centre of the wheels spindle. This way if I need to dress the wheel I can reduce this second offset by half the amount I reduce the wheels diameter by. Then all the various programs will not need to be re done when I dress the wheel.
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 05:13:04 PM
I would like to move comp ove so  that it can be used on the G18 and G19 but it is not in the cards for this release :(

Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: Hillbilly9749 on December 22, 2008, 05:40:02 PM
No probs Brian, where there's a will there's a way.
Title: Re: New Cutter Comp code and Examples
Post by: Graham Waterworth on December 22, 2008, 05:42:28 PM
Funny, I thought it was a relative  ;D
Title: Re: New Cutter Comp code and Examples
Post by: GrahamH on December 22, 2008, 07:21:20 PM

so what is wrong with using a 6mm (.236") cutter


Nothing wrong with that unless you live in USA, Liberia or Myanmar (the last three countries in the world using imperial measurement) or unless you have 3mm inside arcs.   :)

I guess you've never tried to buy a 6mm cutter in the USA, they hard to find and cost twice that of an imperial cutter. But really where does this reduction end? A .5 cutter should fit a .25 arc.

Graham
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 07:25:59 PM
It will fit if you have your numbers right .. I would use R type programming so I can get a good center point :) The IJK modes don't work so well with rounding errors..

Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: GrahamH on December 22, 2008, 07:32:06 PM

Yes the tool must be less.. You could se the same size tool if you use R style progamming :)  The problem that I have is the rounding from the cam programs... I can't make a .5 tool fit in a .499999 space.. The math blows up..


But right now a .5 tool wont fit a .5 space. The problem as I see it is, if the gcode is only to 4 decimal places, so the space you trying to fit the tool into should also only be calculated to 4 places. By using double float math, an arc calculated as .5000000001 should be rounded to .5000 as the original I or J word was .5000. The resolution of the error should not exceed the resolution of the gcode.

Graham  
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 09:32:00 PM
If you round your numbers in the cad system to the safe side (Make the arc bigger by where you place the arc center) I can be sure that I cut all the parts right..  I can not change Mach3 to round because the guys running micro machines will have trouble. You need to fix it on your side and I need to run many types of machines.

Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 09:36:47 PM
Also did you see this message:

Quote
It will fit if you have your numbers right .. I would use R type programming so I can get a good center point  The IJK modes don't work so well with rounding errors..


That will fix your trouble...

Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: GrahamH on December 22, 2008, 10:28:32 PM
If you round your numbers in the cad system to the safe side (Make the arc bigger by where you place the arc center) I can be sure that I cut all the parts right..  I can not change Mach3 to round because the guys running micro machines will have trouble. You need to fix it on your side and I need to run many types of machines.

The following comp code is a simple square with 1 inch sides and .5 arc corners. If you look at the I and J words of the four corner arcs you will see they are all exactly .5000 or .0000 so there has been no rounding on the CAM side. These are the exact coordinates in the precise location and yet the new comp code will not work with it. If I change the G42 P.5000 line to G42 P.499999999999 it works fine. That would indicate the error is on the Mach side and not with the CAM as there would be no rounding I could do on the CAM side to fix this.

Using the R-word in place of an I and J is not really an option as it has its own problems with ambiguity of arcs greater than 180 degrees. 

G00 Z.3
G00 X0 Y0
G00 X1.5000 Y-.2500
G42 P.5000
G00 Z.1000
G01 Z-.1000 F10
G01 X.7500 Y-.2500 F20
G02 X.0000 Y.5000 I.0000 J.7500
G01 X.0000 Y1.0000
G02 X.5000 Y1.5000 I.5000 J.0000
G01 X1.5000 Y1.5000
G02 X2.0000 Y1.0000 I.0000 J-.5000
G01 X2.0000 Y.0000
G02 X1.5000 Y-.5000 I-.5000 J.0000
G01 X.5000 Y-.5000
G02 X.0000 Y.0000 I.0000 J.5000
G01 X.0000 Y.5000
G02 X.7500 Y1.2500 I.7500 J.0000
G40  (cancel cutter radius comp)
G01 X1.5000 Y1.2500
G00 Z.3

Graham
Title: Re: New Cutter Comp code and Examples
Post by: vmax549 on December 22, 2008, 10:30:04 PM
HOPEFULLY it will allow us to get closer than it did before(;-) I had stopped using comp in mach because of the large difference in allowed cutter sizes to the arc radius. Pretty nmuch you had to stay about .625 smaller with the cutter than the arc to be safe that MACH did not throw an error at you. You never really knew untill you tried to run it if it worked or not.

AND you don't always have controll over the radius used in a part drawing. (Customer supplied and a tight tolerance sheet). So I for one think a .500" cutter should cut a .250" radius(;-)

Thanks (;-) TP
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 10:39:14 PM
Well I will take you bitching into acount.. I think I have a pan in what I can do but IF it is going to hose ANY file that I test I am taking it out.. In the an error message is better then a scrap part..

Here is a Quote from Peter Smid's "CNC Programming Handbook" 3rd Edition

Pg 270 "Make sure you the cutter radius is always smaller than the smallest inside radius of the part countour"


Thanks for your support
Brian
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 22, 2008, 11:13:12 PM
Hello Graham H. ,
Just a note if you are going to use the P for setting the offset amount. the P is the offset ammount not the DIA of the tool that you would like to run..

So G41 P.25 would be what you would put in for a .5 tool

Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: vmax549 on December 22, 2008, 11:38:52 PM
OK I  guess I am dumb but why would a .500 NOT cut a .250 radius . It by all counts should not gouge. Now I agree that a .5001 cannot cut a .250 R. IS it the rounding factor of the numbers (.000011111=.0000 ) that we cannot see  the problem???

AND I agree a type c comp cannot gouge in any circumstance.

(;-) TP
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 23, 2008, 12:26:24 AM
Okay it will now run the part.. I have tested it on as many files as I can find and they all work without killing the part.
I have changed the price of mach3 to reflect this enhancement LOL (there will be a 10% increase the first of the year and that is not a joke... )
Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: vlmarshall on December 23, 2008, 12:42:04 AM
Ah, well... even a new carbide endmill isn't exactly onsize. A little cutter diameter tweaking is nothing new, it's why we have tool offset and diameter tables. :)

Great work on these improvements!
Title: Re: New Cutter Comp code and Examples
Post by: GrahamH on December 23, 2008, 01:02:20 AM
Hello Graham H. ,
Just a note if you are going to use the P for setting the offset amount. the P is the offset ammount not the DIA of the tool that you would like to run..

So G41 P.25 would be what you would put in for a .5 tool

Yes that is correct. in my example above you will see I was using .5 radius arcs with a 1 inch diameter cutter (.5 radius hence P.5000). I could have used .25 arcs with a P word of .2500 or .125 arcs with a P word of .1250, its all the same thing. None of those will work.

I agree that any cutter less than .5 will work with .5 arcs....  What we discussing is if the arc is the same as the cutter radius.

Graham
Title: Re: New Cutter Comp code and Examples
Post by: GrahamH on December 23, 2008, 01:06:44 AM
Okay it will now run the part.. I have tested it on as many files as I can find and they all work without killing the part.
I have changed the price of mach3 to reflect this enhancement LOL (there will be a 10% increase the first of the year and that is not a joke... )

Sounds good Brian, I knew the bitching would pay off. :)   Let me know when I can give it a run...

Graham
Title: Re: New Cutter Comp code and Examples
Post by: scudzuki on December 23, 2008, 07:55:56 AM
Seems to me that specifying a cutter diameter .0001" undersize (even if the cutter is onsize) will result in 50 millionths error in the part whilst allowing the comp path to run. My mill can't split .00005", can yours?
Joe
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 23, 2008, 08:08:11 AM
I need to have one of the other testers finish testing before I can put out a copy...
My thinking at this time is that I may be able to have a version out for you to look at in a day or so.
Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: vmax549 on December 23, 2008, 11:05:01 AM
OK Before I buy a new copy at the new price you will have to  make the feed rate display what the commanded feedrate is. (;-) LOL

F20 = 20IPM not 19.36 ipm (;-) TP
Title: Re: New Cutter Comp code and Examples
Post by: simpson36 on December 23, 2008, 11:05:42 AM
First, let me say that I am glad to see work going forward on comp. That is what I have had the most problems with. It is useable for me, but only if I manually go into the gcode and add a custom lead-in for each circumstance. Also the comp would often do odd things where arcs came together without a straight section in between. If I added a tiny straight section, one problem (mismatched endpoint vectors) would go away and another (pausing at the tangent) would replace it.  I look forward to having the new code to play with!

I just want to weigh in on the cutter vs inside radius debate. As one who has written a fair amount of code with higher level math, I can tell you that a .5" cutter cannot cut a .25" inside radius as far as the computer is concerned if a check is first made using a "<" comparo.    i.e. the radius of .500000000000000000000000 is NOT LESS than .25000000000000000000000.

That being said, I don't see why "< -or- =" could not be used in comparing the cutter dia with the smallest inside radius. If there is some program reason that this is not possible, surely adding a 1 at the highest precision to the inside radius or subtracting it from the cutter would not result in any appreciable error. If internally, you are out 16 places (or more), methinks that this amount of error would be imperceptible except by a scanning electron microscope. This 'trick' could easily be done inside or outside of the comp processing, unless I am really missing something.  If inside, then a simple switch could turn it on or off so that people machining to a millionth of an inch would not suffer  ::)

Seems moot now since I gather from reading the posts that something has been done to resolve this? As a matter of curiosity, I would be interested in what method was chosen.

Title: Re: New Cutter Comp code and Examples
Post by: GrahamH on December 23, 2008, 11:18:38 AM
Seems to me that specifying a cutter diameter .0001" undersize (even if the cutter is onsize) will result in 50 millionths error in the part whilst allowing the comp path to run. My mill can't split .00005", can yours?
Joe

Hi Joe

I think you missing the point. Its fine to do that, if you know about it and know what to do as a fudge to make it work. The fact is that it remains a fudge and does not work as someone would reasonably expect it to. Do you enter all your cutters in the tool table .0001 undersized? Its not about the error in the part but the fact you had to follow special procedures to use comp.

Graham
Title: Re: New Cutter Comp code and Examples
Post by: scudzuki on December 23, 2008, 12:43:54 PM
Well I suppose you could always roll up your sleeves and get programming to fix it. Since there is no Windows based competitior for Mach3, having comp pretty close to fully functional is a better option than we've had to date.
Joe
Title: Re: New Cutter Comp code and Examples
Post by: GrahamH on December 23, 2008, 07:30:58 PM
Well I suppose you could always roll up your sleeves and get programming to fix it. Since there is no Windows based competitior for Mach3, having comp pretty close to fully functional is a better option than we've had to date.

Well that's exactly what I'm doing. Not programming, but extensive testing of the new code which Brian was kind enough to give me and advance copy of. I've in return been giving him all the feedback I can, both offline and on. Its best to get these things sorted while they are being worked on rather than revisiting them later. The comp crowd has waited a long time for some attention and now that we getting it, I'm making the most of it. Brian has invited the comments and feedback and I've been giving them. Mach has become the top class product it is through user involvement and feedback. It sounds like you have a problem with this process....

Graham
Title: Re: New Cutter Comp code and Examples
Post by: scudzuki on December 23, 2008, 07:46:35 PM
I'm not the one whining about it not working perfectly. Life is a series of workarounds.
Joe
Title: Re: New Cutter Comp code and Examples
Post by: vmax549 on December 23, 2008, 08:03:32 PM
Graham I am with you buddy, best to sort it out from the start before the workarounds become the gossple then no one wants to correct them for fear of their old code not working correctly. 

Many quirks of other controllers are still there for that reason. 

I appreciate all yalls hard work, I know what it iis like to test and verify code.

(;-) TP
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 25, 2008, 10:53:10 AM
The new rev is on downloads page for testing :) It is 3.043.000 and if you are looking at this thread I would say give it a try :)

Merry Christmas and if you run your machine today you are as bad as I am LOL

Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: vlmarshall on December 25, 2008, 11:50:17 AM
Hahaha, thank you!

Yes, I just shut my machine off, wife is dragging me out the door...but wait, I MUST download the new version first...  ;D
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 25, 2008, 01:20:20 PM
My wife asked me "You really think anyone is going to be on today" . I told her that it was a die hard group and that there where guys all over the world that where going to get get in trouble with this release LOL... I see the first as fallen LOL Thanks for taking one for the team  ;D
Title: Re: New Cutter Comp code and Examples
Post by: Chip on December 25, 2008, 03:39:51 PM
HO HO HO,

Is this "Let The Games Begin", Good, Needed a De-Version, Look Honey, A new version of Mach3 for X-Mass's.

Thanks, Chip
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 25, 2008, 09:22:14 PM
So how soon before we get pics of parts that have been cut LOL ;)
O cut some parts on the router that I have here with this version... And my wife was happy! (I just cut what she asks for and I can do it any time I like!! )

Thanks
Brian
Title: Re: New Cutter Comp code and Examples
Post by: simpson36 on December 28, 2008, 08:33:02 AM
G92 for the A axis is broken in the .43 development version.


Works fine in the lockdown version.

In .43, if you step thru one line at a time and it works OK, but run the code and the A axis does really strange things.

Gcode attached. (ignore note on depth of cut . . partial edit left over from earlier iteration)

Problem in at first G92 A0 when the program is RUN.
Title: Re: New Cutter Comp code and Examples
Post by: Brian Barker on December 28, 2008, 09:34:24 AM
I know where the problem came in and will look at it next week. It has to do with how the Current position is being calculated... I moved some of that stuff about for Comp.

Thanks
Brian
Title: Found a bug??
Post by: ger21 on February 12, 2009, 06:57:08 PM
Can someone confirm this?

If I run this code to cut a hole, it works fine.

G40
G20
M3
G0 Z0.1250
G0 X0.2500 Y0.3750 Z0.1250
G41P0.125
G1 X0.3750 Y0.6250 Z0.0000 F30
G3 X0.0000 Y1.0000 Z0.0000 I-0.3750 J0.0000 F30
G3 X0.0000 Y1.0000 Z-0.2500 I0.0000 J-1.0000
G3 X0.0000 Y1.0000 Z-0.2500 I0.0000 J-1.0000
G0 X0.0000 Y1.0000 Z0.1250
G40
G0 X0 Y0
M5
M30

But when I add a second hole, the first one no longer cuts correctly, even though the code is identical. But the second one cuts OK.

G40
G20
M3
G0 Z0.1250
G0 X0.2500 Y0.3750 Z0.1250
G41P0.125
G1 X0.3750 Y0.6250 Z0.0000 F30
G3 X0.0000 Y1.0000 Z0.0000 I-0.3750 J0.0000 F30
G3 X0.0000 Y1.0000 Z-0.2500 I0.0000 J-1.0000
G3 X0.0000 Y1.0000 Z-0.2500 I0.0000 J-1.0000
G0 X0.0000 Y1.0000 Z0.1250
G40
G0 X2.2500 Y2.3750 Z0.1250
G41P0.125
G1 X2.3750 Y2.6250 Z0.0000 F30
G3 X2.0000 Y3.0000 Z0.0000 I-0.3750 J0.0000 F30
G3 X2.0000 Y3.0000 Z-0.2500 I0.0000 J-1.0000
G3 X2.0000 Y3.0000 Z-0.2500 I0.0000 J-1.0000
G0 X2.0000 Y3.0000 Z0.1250
G40
G0 X0 Y0
M5
M30



Edit:

I've found that adding a short G1 move after the G40 gets rid of the error.


Gerry