Fusion 360, Mach4 and first test of cnc router

Advert

Fusion 360, Mach4 and first test of cnc router

Home Forums CNC machines, Home builds, Conversions, ELS, automation, software, etc tools Fusion 360, Mach4 and first test of cnc router

Viewing 25 posts - 1 through 25 (of 30 total)
  • Author
    Posts
  • #15322
    Steve Pavey
    Participant
      @stevepavey65865
      Advert
      #521019
      Steve Pavey
      Participant
        @stevepavey65865

        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&quot
        ; MACHINE
        ; VENDOR AUTODESK
        ; MODEL CNC ROUTER
        ; DESCRIPTION GENERIC 3-AXIS
        ; T1 D=8 CR=0 – ZMIN=-4.5 – FLAT END MILL
        : G90 G40 G94
        G17
        G71
        ; WHEN USING FUSION 360 FOR PERSONAL USE, THE FEEDRATE OF
        ; RAPID MOVES IS REDUCED TO MATCH THE FEEDRATE OF CUTTING
        ; MOVES, WHICH CAN INCREASE MACHINING TIME. UNRESTRICTED
        ; RAPID MOVES ARE AVAILABLE WITH A FUSION 360 SUBSCRIPTION.
        M26
        ; 2D CONTOUR1
        :T1 M6
        S3500 M3
        H0
        G0 X101 Y-3
        G1 Z20 F175
        Z6
        Z2
        Z-4.5 F1059
        X83 F175
        Z-3.5
        X69
        Z-4.5 F1059
        X33 F175
        Z-3.5
        X19
        Z-4.5 F1059
        X1 F175
        G17 G2 X-3 Y1 I1 J1
        G1 Y19
        Z-3.5
        Y33
        Z-4.5 F1059
        Y51 F175
        G2 X1 Y55 I1 J51
        G1 X19
        Z-3.5
        X33
        Z-4.5 F1059
        X69 F175
        Z-3.5
        X83
        Z-4.5 F1059
        X101 F175
        G2 X105 Y51 I101 J51
        G1 Y33
        Z-3.5
        Y19
        Z-4.5 F1059
        Y1 F175
        G2 X101 Y-3 I101 J1
        G3 X100.2 Y-3.8 I101 J-3.8
        G1 Y-4.6
        G19 G2 Y-5.4 Z-3.7 J-4.6 K-3.7
        G1 Z20
        G17
        M26
        G0 X0 Y0
        M30
        M2

        #521023
        Anonymous

          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

          #521060
          geoff adams
          Participant
            @geoffadams14047

            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

            #521063
            JasonB
            Moderator
              @jasonb

              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

              #521067
              JasonB
              Moderator
                @jasonb

                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.

                roll around.jpg

                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

                sharp with loop.jpg

                #521091
                Steve Pavey
                Participant
                  @stevepavey65865

                  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.

                  #521098
                  Anonymous

                    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

                    #521100
                    Martin Connelly
                    Participant
                      @martinconnelly55370

                      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

                      #521104
                      JasonB
                      Moderator
                        @jasonb

                        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)
                        (ALL OPS)
                        (T2 D=8. CR=0. – ZMIN=-4.5 – FLAT END MILL)
                        G90 G94 G91.1 G40 G49 G17
                        G21
                        (WHEN USING FUSION 360 FOR PERSONAL USE, THE FEEDRATE OF )
                        (RAPID MOVES IS REDUCED TO MATCH THE FEEDRATE OF CUTTING )
                        (MOVES, WHICH CAN INCREASE MACHINING TIME. UNRESTRICTED )
                        (RAPID MOVES ARE AVAILABLE WITH A FUSION 360 SUBSCRIPTION. )
                        G28 G91 Z0.
                        G90

                        (2D CONTOUR1)
                        M5
                        T2 M6
                        S2426 M3
                        G54
                        M8
                        G0 X-50.3 Y30.2
                        G43 Z15. H2
                        G1 Z5. F182.
                        Z1. F61.
                        Z-4.2
                        G19 G2 Y29.9 Z-4.5 J-0.3 K0. F182.
                        G1 Y29.3
                        G17 G3 X-50. Y29. I0.3 J0.
                        G1 X50.
                        G2 X54. Y25. I0. J-4.
                        G1 Y-25.
                        G2 X50. Y-29. I-4. J0.
                        G1 X-50.
                        G2 X-54. Y-25. I0. J4.
                        G1 Y25.
                        G2 X-50. Y29. I4. J0.
                        G3 X-49.7 Y29.3 I0. J0.3
                        G1 Y29.9
                        G19 G3 Y30.2 Z-4.2 J0. K0.3
                        G1 Z15.
                        G17

                        M9
                        G28 G91 Z0.
                        G90
                        G28 G91 X0. Y0.
                        G90
                        M30

                        Edited By JasonB on 19/01/2021 19:45:23

                        #521137
                        Steve Pavey
                        Participant
                          @stevepavey65865

                          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!

                          #521140
                          Anonymous

                            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

                            #521141
                            JasonB
                            Moderator
                              @jasonb

                              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

                              #521153
                              Steve Pavey
                              Participant
                                @stevepavey65865

                                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.

                                #521154
                                blowlamp
                                Participant
                                  @blowlamp

                                  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.

                                  #521155
                                  pete hammond
                                  Participant
                                    @petehammond94283

                                    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

                                    #521190
                                    JasonB
                                    Moderator
                                      @jasonb

                                      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

                                      #521239
                                      geoff adams
                                      Participant
                                        @geoffadams14047

                                        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

                                        #521243
                                        JasonB
                                        Moderator
                                          @jasonb

                                          I suppose the obvious question is have you selected Mach3mill?

                                          pp f360.jpg

                                          My code comes up OK on teh Mach3 computer

                                          20210120_084859[1].jpg

                                          Edited By JasonB on 20/01/2021 11:07:17

                                          #521249
                                          Emgee
                                          Participant
                                            @emgee

                                            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,
                                            try a Fanuc PP.

                                            Emgee

                                            #521252
                                            Steve Pavey
                                            Participant
                                              @stevepavey65865

                                              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

                                              #521257
                                              JasonB
                                              Moderator
                                                @jasonb

                                                The G-code that you posted was that from the mach4 machine or the one you did the PP on? as I still can't see how the F360 PP knows you are using Mack3 or 4 and there is only the Mach3mill option to choose

                                                Not sure I would want to take it to any of those co-ordinates before switching on. If the top of the work is Z0 and tou are using a piece of stock that has a machining allowance on the top you will crash, even if not machining the top any slight backlash or poor tool setting could see the tool touching th etop of the work before it's rotating.

                                                Same with X and Y If there is material to come off the sides you want to at least start by the cutter diameter away from the work

                                                #521271
                                                geoff adams
                                                Participant
                                                  @geoffadams14047

                                                  Steve i would put g54 on its on line then g0x0y0# z5# g1f300z1# if you want the machine to go to zero before cutting in my opinion a move not needed if you have a g0 command before its going to rapid all three axis. if z0 is top of work it could hit the work if setting are not right if you are a beginner this can be frighting it all happens so fast before you hit the panic button me personally i rapid to 5mm above the work as most my work is one offs it saves a lot of scrap parts

                                                  i am sure mach3 has function to stop z moves it used to be called dry run or set zero well above the work

                                                  Geoff

                                                  #521274
                                                  geoff adams
                                                  Participant
                                                    @geoffadams14047

                                                    Jason beat me to it cnc is a great tool but can be very dangerous stay safe turn feed rates down on first run you have time to stop

                                                    Geoff

                                                    #521310
                                                    Martin Connelly
                                                    Participant
                                                      @martinconnelly55370

                                                      Geoff, Mach3 has Z inhibit burried under Config, Ports and Pins, Mill Options. I have a toggle and DRO on the Program Run screen but I don't know if it is something I added to the screen because it is hard to find.

                                                      Martin C

                                                    Viewing 25 posts - 1 through 25 (of 30 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up