Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Mike_F on November 24, 2010, 12:25:45 PM

Title: Scale X-1 Problem
Post by: Mike_F on November 24, 2010, 12:25:45 PM
Hi,

I am sure that sometime in the distant past I have read of this problem before but I had never had the opportunity to try myself. I needed to machine a mirror image of a component and being lazy, did not want to resort to running the piece through the CAD/Cam process again so I decided to try using the Scale feature in Mach. I set the X axis scale to -1 and machined the part. All went extremely well and it was only on close inspection that I noticed in each corner, the machined arcs were the wrong way round. I have attached a photo that shows the error. The correct one is on the right. I had to highlight the edge with a pencil as it did not show up too well.

Everything else is perfect but because the arcs are reversed, the tool has taken a very small cut into the wanted part.

Is there a solution to this or should I just not be so lazy? It seemed such a simple way to do the mirror image  :(

Mike
Title: Re: Scale X-1 Problem
Post by: Graham Waterworth on November 24, 2010, 12:45:57 PM
I have seen this with g-code that uses R instead of I & J it is to do with the 180 degree rule and the shortest path.  Could be something totally new as well  ;D

Graham
Title: Re: Scale X-1 Problem
Post by: BR549 on November 24, 2010, 03:15:32 PM
I think Graham hit the nail on the head. It is the R method that causes the inversion of the arc useing scale to mirror. I just tested both methods. IJ works ok.

(;-) TP
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 25, 2010, 05:13:35 AM
Thanks for the replies, I think this is probably the reason. Now the biggie - is there a simple solution to this problem? Is it a function of the post processor to use either IJ or R modes for arcs and is it something that can be easily changed within the post processor? I don't fancy trawling through the whole of the code, looking for these instances.

I am fortunate enough to be sponsored by EdgeCam but have been unable to get onto the training scheme and I desperately need to know how their post processing wizard works. I always thought that wizards were pretty fool proof but the EdgeCam one has certainly got this fool beaten :)

Thanks again but I still need some help,

Mike
Title: Re: Scale X-1 Problem
Post by: BR549 on November 25, 2010, 10:47:45 AM
I am afraid you will have to get with edgecam for that help. I was suprised to see they still used the Rmode. Things like this are the reason most Cams moved away from it long ago.

(;-) TP
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 25, 2010, 11:12:20 AM
I have just sent an email to EdgeCam with a link to this thread.

Something is puzzling me though. In the same program that the photos were taken of, all arcs are done using the R word and there are thousands of them yet, only three of them appear to be reversed. This just does not seem consistent.

Cheers,

Mike
Title: Re: Scale X-1 Problem
Post by: BR549 on November 25, 2010, 11:24:41 AM
That is the problem with Rmode the problems only show up in certain conditions(;-) That was the reason IJ mode came about.

Rmode is VERY simple in nature and very easy to understand the basics but the math does not always work out in actual useage.

(;-) TP
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 25, 2010, 11:28:53 AM
Just a thought - does Mach change all the G2s to G3s and vice versa when it scales at -1 or does the fact that all X coordinates are negative give the same effect of reversing the direction of the arc. Just trying to get my head around what is happening.

Mike
Title: Re: Scale X-1 Problem
Post by: BR549 on November 25, 2010, 02:40:16 PM
Don't have a clue as to how it works I only know that it does.  You may want to readup on the Rmode it may explain to you why it does not always work as expected.

(;-) TP
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 26, 2010, 10:37:49 AM
I received a very quick reply from Jim Swales at EdgeCam and it is a post processor issue. The fix was very easy and within EdgeCam there is an option to use IJK mode only. Once I had selected that, and re-ran the code generator, there was not an 'R' word to be seen. Now to see if that solves my problem - I'm sure it will.

Incidentally, while exploring EdgeCam a little more, I discovered that if I use 'splines' instead of 'line arcs' for the nc smoothing, I get very few arcs at all in the code but the splines are all made from very small segments. It will be interesting to see what the difference is, if any is perceptible.

Thanks very much for the pointers.

Mike
Title: Re: Scale X-1 Problem
Post by: BR549 on November 26, 2010, 11:41:31 AM
THat might NOT be the best thing to do. all small line segments can cause a degrading of performance in some situations. Using the mini lines you may need to bump your look ahead setting to 200 or more.



You need to test each combination on YOUR machine.
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 26, 2010, 12:18:57 PM
Yes, just found that out by running the code so I went back and changed the smoothing to 'Line Arc' and now I keep getting an error message in Mach saying 'Radius to end of arc differs from radius to startLine 18' and Mach won't continue to load so I don't know if other arc lines have the same problem or what the cause is - I need help again.

I have copied some code below:

%(TAILPLANE FINISH)
G90 G40 G49 G64
 (DEFINE OPERATION : FLATLAND OPERATION)
T02 M06(8mm End Mill)
G0Z15
G0X-2.807Y164.564
Z5.0
G1Z0.0F1000.0
G17G3X-2.23Z0.0Y164.625I-2.655J165.879F2500.0
X-1.594Z0.0Y164.957I-3.47J167.772
G2X1.47Y166.899Z0.0I47.596J90.722
X2.667Y167.2Z0.0I2.667J164.671
G1X5.907Y167.196
G2X5.965Y166.833Z0.0I5.864J167.003
G3X-1.685Z0.0Y162.027I96.14J14.82
X-2.197Z0.0Y160.975I-0.87J160.98
G1X-2.193Y159.457
G3X-1.603Z0.0Y159.202I-1.817J159.516
G2X10.895Y166.917Z0.0I102.294J4.876
X12.102Y167.2Z0.0I12.102J164.485
G1X15.687Y167.196
G2X15.732Y166.86Z0.0I15.647J167.019
G3X-1.604Z0.0Y156.292I104.368J1.96
X-2.197Z0.0Y155.164I-0.83J155.164
G1X-2.193Y153.623
G3X-1.609Z0.0Y153.375I-1.824J153.68
G2X21.069Y166.941Z0.0I105.99J-0.758
X22.289Y167.2Z0.0I22.289J164.2
G1X26.299Y167.195

Line 18 is the red one.

Thanks,

Mike
Title: Re: Scale X-1 Problem
Post by: Graham Waterworth on November 26, 2010, 12:37:05 PM
You need to swap the ij mode in mach3 config

Graham
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 26, 2010, 12:44:08 PM
Thanks, Graham but I figured that might be the problem and did the swap but now get the same message on a different line - this is not going well :(

Mike
Title: Re: Scale X-1 Problem
Post by: BR549 on November 26, 2010, 01:15:32 PM
CLose down mach and restart again. Then double check your IJ settings. 

It seems that the code wants abs IJ. I would double check your CAM settings.

(;-) TP
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 26, 2010, 03:11:19 PM
I have tried closing Mach, re-opening it, checked the IJ setting and tried it in both modes but I am still getting the 'Radius to end of arc differs from radius to startLine 2081' error but now, in incremental IJ mode, I get the error on line 2081 so it is getting to that line OK, through all the other arcs without a problem. I have copied some more code below, this time from line 2033 - 2085 and again, the red line is the problem.

X91.082Y33.471
G3X135.247Y30.092Z-3.0I184.426J2120.356
X165.909Y28.268Z-3.0I165.381J2521.227
X222.965Y25.87Z-3.0I148.246J2846.988
G1X243.522Y25.261
X262.168Y24.798
G3X343.52Y23.48Z-3.0I154.263J7008.442
X390.709Y23.065Z-3.0I196.538J9999.9999
G1X390.695Y21.065
G2X326.234Y21.684Z-3.0I93.057J9999.9999
X271.483Y22.594Z-3.0I99.173J7608.821
X200.837Y24.657Z-3.0I82.44J4033.896
X160.036Y26.589Z-3.0I95.551J2450.467
G0Z9.231
 (DEFINE OPERATION : PROFILING OPERATION)
X394.722Y25.138
Z4.75
G1Z-0.25F1000.0
X393.391Y55.608F2500.0
X395.401Y55.434
X396.72Y25.225
G2X392.695Y21.05Z-0.25I-3.996J-0.175
G0Z9.231
X393.262Y58.566
Z4.75
G1Z-0.25F1000.0
X392.837Y68.311F2500.0
X394.845Y68.171
X395.272Y58.392
G0Z9.231
X392.707Y71.272
Z4.75
G1Z-0.25F1000.0
X391.353Y102.297F2500.0
X393.361Y102.157
X394.715Y71.131
G0Z9.231
X391.136Y107.271
Z4.75
G1Z-0.25F1000.0
X389.912Y135.301F2500.0
X391.92Y135.16
X393.144Y107.131
G0Z9.231
 (DEFINE OPERATION : PARALLEL LACE OPERATION)
Z15.0
X388.331Y126.091
Z8.873
G1Z3.873F1000.0
G19G3X388.331Y110.905Z4.25J-15.698F2500.0
G1X388.323Y110.669
X388.302Y110.426
X388.268Y110.182

From the earlier lines you can see that the arcs are all there and Mach is accepting them with no problem. The problem line is the first arc in the YZ plane hence the G19.

This is becoming very frustrating,

Mike
Title: Re: Scale X-1 Problem
Post by: Graham Waterworth on November 26, 2010, 03:27:23 PM
Mach3 will not do 3D arcs, turn off helical/spirals in the post processor and try again.

Graham
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 26, 2010, 04:01:57 PM
Graham,

Now I am really confused - for the past two years I have been drilling holes with Mach using helical arcs, produced with EdgeCam. I tried turning helical arcs off in EdgeCam and I still get the same error reported but on a different line. The code below is a drilling cycle using what I thought were helical arcs. If they aren't, please tell me what they are and I can re-set my brain ???

Thanks,

Mike

%(TAILPLANE HOLD DOWN)
G90 G40 G49 G64
 (DEFINE OPERATION : PROFILING OPERATION)
T01 M06(5mm End Mill)
G1X65.0  Y10.75
Z0.0  F100.0
G17G3X65.0  Z-1.0  Y10.75 I0.0  J-3.25 F500.0
X65.0  Z-2.0  Y10.75 I0.0  J-3.25
X65.0  Z-3.0  Y10.75 I0.0  J-3.25
X65.0  Z-4.0  Y10.75 I0.0  J-3.25
X65.0  Z-5.0  Y10.75 I0.0  J-3.25
X65.0  Z-6.0  Y10.75 I0.0  J-3.25
X65.0  Z-7.0  Y10.75 I0.0  J-3.25
X65.0  Z-8.0  Y10.75 I0.0  J-3.25
X65.0  Z-9.0  Y10.75 I0.0  J-3.25
X65.0  Z-10.0  Y10.75 I0.0  J-3.25
X65.0  Z-11.0  Y10.75 I0.0  J-3.25
X65.0  Z-12.0  Y10.75 I0.0  J-3.25
X65.0  Z-12.0  Y10.75 I0.0  J-3.25
G1Z5.0 
Title: Re: Scale X-1 Problem
Post by: Graham Waterworth on November 26, 2010, 04:26:44 PM
Quote
G19G3X388.331Y110.905Z4.25J-15.698F2500.0

You seem to be missing the K from the line.

Graham
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 27, 2010, 05:12:21 PM
After Graham's post about the missing K value, I took a cautious look at the code wizard in EdgeCam by loading the post processor I was sent from New Zealand. Although I did not really know what I was doing, I did manage to find where the error was and it was indeed a missing K token in the pp. Once I had rectified that and proved the code was good, I got adventurous and made a few more changes to suit my machine.

I have to report that all seems to work very well and it is thanks to the help from this forum that I had the confidence to delve into the unknown - thanks.

One slight problem still occurs and that is, when I use the -1 scale on the X axis to do a mirror image, I get the arcs going the wrong way and the toolpath window looks a mess. However, if I mirror in Y, everything is just fine. I figure this is because the arcs are in the YZ plane so if the scaling is in X, the start and finish of the arc is reversed, hence the mess in the toolpath window. By scaling in Y, there is no effect on the X coordinates.

I have learned a great deal over the last couple of days.

Cheers,

Mike
Title: Re: Scale X-1 Problem
Post by: Graham Waterworth on November 28, 2010, 05:17:12 AM
Great news Mike,  I have passed on the remaining issue to the development team.

Graham
Title: Re: Scale X-1 Problem
Post by: Brian Barker on November 28, 2010, 11:14:25 AM
I have fixed this error with R type programming :) Now can you tell me if I need to look at IJ style as well?
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 28, 2010, 03:16:53 PM
Hi Brian,

The machine I have in the workshop is using rev 3.042.040 and this was the one giving the problems at the start of this thread. The computer in the house, with no machine attached, is running rev 3.043.022 and it is this one that is showing the YZ arcs the wrong way round when using the X axis scale factor of -1. After which version was the fix done?

I do not necessarily believe this is a Mach problem as I have already found a problem within my post processor, the missing K token, and I am not dismissing further errors.

I have now re-compiled my post processor to use IJK mode for all arcs. Are you suggesting the R mode is just as valid? BR549 suggests that the R method is outdated and all arcs should be using IJK methods.

As mirroring is working fine in Y, and it makes no difference to the outcome, there is no panic on the X mirror problem.

Thanks,

Mike
Title: Re: Scale X-1 Problem
Post by: BR549 on November 28, 2010, 09:06:44 PM
Just Tested here with V.022 IJ works fine R reverses arcs with -1.000 scale.

Would be nice if ARCS worked in G18 and G19 mode running 3 d code.

(;-) TP
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 29, 2010, 05:16:54 AM
I have attached the file that gives the problem. When you scale in X to -1.000 you get a mess in the toolpath window but not when you scale to -1.000 in Y. I would be interested to know if this happens to you too.

Mike

Edit: Arcs work fine in the XY plane with the -1.000 scale factor it is just the YZ plane that messes up.
Title: Re: Scale X-1 Problem
Post by: Brian Barker on November 29, 2010, 08:37:07 AM
Hello Mike,
I have a rule that save me countless hours of debugging.. the file that you sent IS showing a problem with a - x scale but at .5 MB it is just to big for me to work with.. is there any chance you can show me the trouble is about 10 lines of code. I can hack the file and make an example that is showing the trouble but it takes far to long to do it here.. if you have a post and can make a simple example in your cam program would be great!

Thanks
Brian
Title: Re: Scale X-1 Problem
Post by: Mike_F on November 29, 2010, 09:28:36 AM
Hi Brian,

Thanks for taking a look and apologies for the last file size - I understand your reluctance to look through mega lines of code :).  I have made a simple part that shows the same problem when scaled to -1 in X.

Mike
Title: Re: Scale X-1 Problem
Post by: Mike_F on December 01, 2010, 11:19:58 AM
Hi Graham,

Quote
Mach3 will not do 3D arcs, turn off helical/spirals in the post processor and try again.

This had me confused until I realised there is a difference between helical arcs and spirals. As I said before, most of the holes I machine I use spiral cuts so I could.t understand what you meant by turning it off. However, delving a little deeper into Gcode and my post processor, I realised that true helicals need all the IJ & K words and it is this that Mach does not support, yet Mach does support and IJ arc moving down in Z at the same time (is this not a spiral?) As soon as I clicked on the 'Helicals not supported' box in my post processor wizard, I got good code again.

This does not solve the problem of the -1 scale in X but my understanding is getting better :)

Thanks,

Mike
Title: Re: Scale X-1 Problem
Post by: Mike_F on December 02, 2010, 06:02:48 AM
Still having some problems with Mach and the IJK words so I have reverted to using the R word where possible and everything is now working as it should. Even the -1 scaling in X is working now. In fact, I tried scaling in X and Y and both and all produced good results. This confirms what Brian had said about mirroring and the R word but also confirms that the IJK mode needs looking at.

Cheers,

Mike
Title: Re: Scale X-1 Problem
Post by: Brian Barker on December 02, 2010, 08:45:08 AM
Found the trouble that you where having in the example file that you sent and it is all fixed for the next DEV release..

Thanks for the samples!
Brian
Title: Re: Scale X-1 Problem
Post by: Mike_F on December 02, 2010, 11:25:55 AM
Excellent news, thanks Brian.

Mike
Title: Re: Scale X-1 Problem
Post by: Mike_F on December 04, 2010, 03:45:35 PM
I'm sorry to have to visit this again but I have spent the last two days converting all my files back to using the R word only for arcs as Brian had said he had fixed it. On cursory inspection all seemed to be okay but as I was getting ready to machine, I zoomed in on the toolpath screen and to my horror, the -1 scaling problem has returned. I have attached a couple of screen shots that show the problem clearly. You should be able to read the code line that is creating the arc highlighted in the toolpath screen.

Incidentally, this is Gerry's (Ger) new screen set and, in my opinion, one of the best yet devised for Mach. Not released yet but looking good. Nice one Gerry.

Mike
Title: Re: Scale X-1 Problem
Post by: Mike_F on December 04, 2010, 04:26:28 PM
Aaaaargh, same happens when the Y axis is used too!!

Mike
Title: Re: Scale X-1 Problem
Post by: Brian Barker on December 06, 2010, 09:38:46 AM
I think I need to send you an EXE to play with to see if it is working better for you .. if you would Mail me off list and I will send you the new EXE
Title: Re: Scale X-1 Problem
Post by: rrc1962 on December 07, 2010, 10:01:47 AM
Aaaaargh, same happens when the Y axis is used too!!

Mike

Is that a Flash screen?  I have to agree.  It's one the nicest Mach screens I've seen.  I like the tabbed panel.  It really cleans things up.
Title: Re: Scale X-1 Problem
Post by: Mike_F on December 07, 2010, 02:42:37 PM
Hi rrc1962,

I did not design the screen set, that was the work of Gerry (ger21) and I am sure he will chip in and correct me if I am wrong but I don't think it is a Flash screen. I'm pretty sure it was done using MachScreen designer.

Mike
Title: Re: Scale X-1 Problem
Post by: ger21 on December 07, 2010, 06:19:01 PM
No Flash, it's a regular .set screen done with Screen4.
http://www.machsupport.com/forum/index.php/topic,16609.0.html