Steve Pavey | 19/01/2021 14:46:59 |
369 forum posts 41 photos | I've got to the stage of attempting a first run with my cnc router. I drew up a 100x50x4mm cuboid in Fusion360, and generated the g-code file attached below. Loading it into Mach4 the preview of the path shows that the tool is going to describe some large arcs at three of the corners - possibly the lines which include I and J codes such as G2 X105 Y51 I101 J51. Am I right in thinking that this is because I have added or omitted something in one of the F360 dialogs at the manufacture setup stage? Maybe something to do with lead-in and lead-out?? Also, I am confused on setting up the work origin. I have started by homing the spindle and zeroing the X,Y and Z axes, followed by manually jogging the cutter to the corner of the stock. At this point I'm setting G54 in the Mach4 dialog, so the DRO's display the offset (lets say that X Y and Z show 300, 200 and 80 for example). I'm not sure how Fusion360 can use this though - do I have to add a line of g-code along the lines of G54 X300 Y200 Z80? In which case where do I add it? Or does Mach4 use the G54 info I put in to sort out where the cutter actually moves to before it starts running the Fusion360 code? Sorry for the dumb questions, but it has taken a bit of effort to get this far and I really don't want to destroy the machine before I've done any real work with it! And this first test will be run with the stepper motor couplings disconnected and the cutter removed!! : (PGM, NAME="1001"
|
Andrew Johnston | 19/01/2021 14:57:20 |
![]() 7061 forum posts 719 photos | There are two ways to program a cutter to go round a corner. One, let the cutter go one radius beyond the corner as it decelerates. Then accelerate in the perpendicular direction. That way you get a sharp corner unaffected by acceleration/deceleration effects. The alternative is to pivot the cutter around the corner point, which means the centre of the cutter follows an arc. The latter is most common as it saves time and leaves an acceptable corner. Andrew |
geoff adams | 19/01/2021 16:53:24 |
214 forum posts 207 photos | hope this helps when using fusion you set where you want the zero in xy and z to be on your part transfer the data to your machine control you then need to set the machine to zero on your workpart by joging probimg or edge finder then set the dros to zero this will give you g54 zero fusion is a cam package it does not no where you part is on the machine table the machine needs to now where the part is to the table confusing i know think of it as two separate operations fusion does the cam then you need to set the machine to zero on the part looking at your g code you have h0 for tool 1 this needs to be g43 h1 for the length off to work pm me and we can talk if you need Geoff |
JasonB | 19/01/2021 17:00:50 |
![]() 25215 forum posts 3105 photos 1 articles | You should be able to see what path the tool is taking in F360's simulator and it will also show the tool path in both the manufacture and simulation screens. Under passes you have probably set it to "keep shape corners with loop, I tend to leave it on "roll around corners" and if it's a large movement then look in linking as your linear lead in is large, the default 0.6mm should so for most things. I set the datum point I want to use during setup, usually top ctr of the work and then locate ctr of work on machine and zero X & Y then set my tool 20mm above top of work with a block and set Z as +20 Edited By JasonB on 19/01/2021 17:11:16 |
JasonB | 19/01/2021 17:19:30 |
![]() 25215 forum posts 3105 photos 1 articles | This shows the tool path in blue for the usual roll around corners. I set the stock to have 5mm waste all around the sides. You can also dee my datum top ctr of the part. And this is the sharp corners with loop. It actually goes past the corner in a straight line which is shown in green, then lifts, repositions and drops yellow and red before a green leading at 90deg to the previous cut. as andrew says it takes longer |
Steve Pavey | 19/01/2021 18:44:29 |
369 forum posts 41 photos | Thanks Geoff, a kind offer and useful to read your summary on setting the work co-ordinates. i’m Afraid you lost me on the H0 and G43 H1 bit at the end though. Jason - checking on the setup in F360, I actually already have it set to roll round the corners. Also the simulation in F360 doesn’t show the loops at all. They only show up when I import the code into Mach4. For my last test I edited the code in Mach4 to reduce all the Ixx and Jxx codes down to 5 (mm) which obviously reduced the size of the loops considerably. And when running the code I noticed that the Z height remained the same, ie the tool didn’t retract out of the work. Of course, if I was cutting this shape from a large sheet these loops would result in a lot of waste! I’m pretty sure this is all something to do with the setup options in Fusion360, and me not being familiar with them, along with Mach4 being mostly incomprehensible for novices. |
Andrew Johnston | 19/01/2021 19:04:11 |
![]() 7061 forum posts 719 photos | The toolpath that the CAM program simulates and what the G-code actually cuts are not always the same. I use NCPlot to backplot the toolpath from the G-code as a sanity check on the real toolpath. It also calculates maximum excursions in all axes, which is another useful sanity check. Andrew |
Martin Connelly | 19/01/2021 19:15:41 |
![]() 2549 forum posts 235 photos | Rolling around corners also keeps the cutter engaged with the workpiece. Usually a better option. The facing wizards in Mach3 do not have this option (that I could find) so I had to write a parameterized file to do it for when I wanted to do it without going down the CAD CAM route. Martin C |
JasonB | 19/01/2021 19:35:20 |
![]() 25215 forum posts 3105 photos 1 articles | This is the G-Code I get out for Mach3mill which I think does for Mach4 too for roll around. The 4mm is the radius as the tools ctr line goes around each corner, the 0.3 radius is lead in/out. Apart from knocking out the G28 codes as I don't use homing I have not had to alter any code so far and it seems to have gone where the simulator said it would. 1001) (2D CONTOUR1) M9 Edited By JasonB on 19/01/2021 19:45:23 |
Steve Pavey | 19/01/2021 20:41:10 |
369 forum posts 41 photos | I've just drawn a new test piece, making sure I selected the 'roll round corner' option. Again the file produced large loops on three of the corners, with no Z command to raise the tool. The offending lines in the code are: G2 X2 Y56 I2 J52 G2 X106 Y52 I102 J52 G2 X102 Y-2 I102 J2 I think the I value gives a loop of 102 mm radius, judging by the shape of the toolpath it displayed. I edited these lines, changing the values of I and J to 2, which results in smaller loops as expected, though clearly it is still no good, resulting in this toolpath: The toolpath in F360 looks like this, annoyingly showing the tool path I want: And the dialog relating to corners in the setup looks like this: I'm starting to think that perhaps I should be looking at an alternative program to sort out the G code if Fusion is going to insist on putting in secret moves that I only discover after I've made the trip to the workshop!
|
Andrew Johnston | 19/01/2021 20:48:57 |
![]() 7061 forum posts 719 photos | I suspect your post-processor may not be set up correctly. How are you setting up G02 and G03? I've seen the odd wobbly in generating G02/G03 commands, but never on every one in a design. Andrew |
JasonB | 19/01/2021 20:49:01 |
![]() 25215 forum posts 3105 photos 1 articles | The other thing I can see in your code is that you have presumably entered a machine as it says CNC router and generic 3-axis. Try it without entering a machine and just leave it showing "select" on the first item of set up. The blue screenshot you show doe snot have 102mm radius loops if the part is only 100 x 50mm As I said I've never found it to have any "secret moves" the only time I've had the odd issue is either by entering datum point wrongly between what I used when setting up in fusion and what I did on the machine eg top of part on model and bottom of part when setting up but that's all down to my errors Edited By JasonB on 19/01/2021 20:52:17 |
Steve Pavey | 19/01/2021 21:25:50 |
369 forum posts 41 photos | Andrew - I’m not setting up G02/G03 commands, unless that is something that happens when F360 generates its G codes. But putting your comment alongside Jason’s suggestion that I shouldn’t be specifying a machine suggests that this could be the cause of the problem maybe, ie choosing the wrong hardware setup gives me the wrong ‘starting point’ so to speak. I will try changing that first thing tomorrow. And the reason the blue screenshot doesn’t show the large 102mm loops is that I edited them to 2mm before recording this screen - still there but very much smaller. I really appreciate the help from everyone - sometimes even YouTube fails to provide the sort of answers that this forum does so helpfully. |
blowlamp | 19/01/2021 21:40:24 |
![]() 1885 forum posts 111 photos | This is a common problem in Mach 3. You'll probably need to change the I&J arc centre settings, either in your post-processor or within Mach settings.
Martin. |
pete hammond | 19/01/2021 21:49:32 |
22 forum posts | Steve, I think if you change , in mach general config screen ,IJ mode ,from incremental to absolute you will be a happy man! Good Luck Pete |
JasonB | 20/01/2021 07:06:11 |
![]() 25215 forum posts 3105 photos 1 articles | I can't see it being something that needs changing in Mach as the G-code that the F360 post processor gives me is one without the loops but Steve is getting loops before he has even got to the computer running mach4, seems more likely a PP issue as it looks OK on the F360 screen. Though with the difference in the X position and I being 4 (106-102) that does point to incremental and absolute as the 8mm tool should follow a 4mm radius but that is being put in at PP stage. Even if your blue screen capture is after alteration the arcs are more than 2mm radius, top left may be that size but others are larger. Bottom left will take a chunk out the work if you say it is not lifting the tool. Edited By JasonB on 20/01/2021 08:45:40 |
geoff adams | 20/01/2021 10:42:22 |
214 forum posts 207 photos | hi Steve had a closer look at your code this morning are you using mach3 post processor there some errors as i said before h0 needs a g43 command you are using tool1 so the command needs to be g43 h1 if you are using multiple tools the machine needs to know the length difference of each tool and entered into the offset page there is no g54 command mach3 needs this to know where your part is on the table in xy and z m26 at the end of the prog mach does not have that code looked it up tool unclamp ? when i use fusion i get g28 codes at being and end of prog and tool changes this takes the machine back to the machine home position it does need more code to work if you look at Jasons code you can this if you look at Jasons code for his g2 and g3 its incremental g91.1 g71 metric in your code g21 metric in Jasons so there are a lot of differences between the to two programs makes me think your using the wrong the wrong p.p spent many years programming cnc by hand Geoff |
JasonB | 20/01/2021 11:03:41 |
![]() 25215 forum posts 3105 photos 1 articles | I suppose the obvious question is have you selected Mach3mill? My code comes up OK on teh Mach3 computer Edited By JasonB on 20/01/2021 11:07:17 |
Emgee | 20/01/2021 11:24:04 |
2610 forum posts 312 photos | Perhaps there is a difference in Mach 4 to Mach 3 operation but as Jason says "roll around " does produce a square corner using Mach 3 PP Perhaps using a different PP would give the result required, especially if no machine is entered in the set-up, Emgee
|
Steve Pavey | 20/01/2021 11:45:46 |
369 forum posts 41 photos | Well, thanks to all of you - Pete has solved it and he is absolutely right, as I’m now happy. The Defaults tab in the Mach4 Configuration dialog has a setting for Arc Centre Mode, which was set to Incremental rather than Absolute (there is a similar setting for Distance Mode, which also needs setting to Absolute). But all the other suggestions and information has proved to be very useful - it’s forced me to work through a lot of Fusion dialogs and become more familiar with at least a few of those settings as well. Re my earlier G54 question, I have inserted a line near the start, just before the spindle switches on: G54 X00 Y00 Z00 intended to take the cutter from the machine home position to the workpiece zero position. Am I right in thinking that this is something that isn’t (or can’t be) done in Fusion, but needs to be done manually for every job? And is that particular syntax ok? Thanks again - now to fit the couplings to the steppers and try it again (without a cutter fitted - one step at a time!). Edited By Steve Pavey on 20/01/2021 11:47:21 |
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
Sign up to our newsletter and get a free digital issue.
You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy
You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.
Click THIS LINK for full contact details.
For subscription issues please see THIS LINK.