Welcome to Our Community

Some features disabled for guests. Register Today.

Excessive Z axis retract

Discussion in 'CNC Mills/Routers' started by travisty42, Jan 29, 2022.

  1. travisty42

    Builder

    Joined:
    Oct 18, 2021
    Messages:
    5
    Likes Received:
    1
    I have a brand new Lead 1010 assembled. Im trying to post process files off of fusion 360.
    I have installed this post processor

    Fusion 360/Duet post processor

    Oddly enough the very first test file I posted worked but wouldn't show the preview in Open builds control.
    Since then all my files preview fine but when I run the file the machine retracts on Z to the limit switch no matter what comes out of fusion 360. I have zeroed out all my retracts and simulate looks good.
    I tested code out of open builds code generator and the machine runs fine, so the problem appears to be a fusion or post processor setting.

    Thanks for any input.
     
  2. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,784
    Likes Received:
    1,364
    If you have a grbl controller use this post processor docs:software:fusion360 [OpenBuilds Documentation]

    As the name suggests, the post processor you were using is specifically for the Duet controller, which uses a slightly different "dialect" of g-code than grbl, and the machine co-ordinates are usually different too.
    Alex.
     
  3. travisty42

    Builder

    Joined:
    Oct 18, 2021
    Messages:
    5
    Likes Received:
    1
    Perfect! Thanks for the help!
     
  4. travisty42

    Builder

    Joined:
    Oct 18, 2021
    Messages:
    5
    Likes Received:
    1
    Well... I thought I had it figured out but no. For two days I was able to create several 2D tool paths with z axis retract in between cuts. (I 3D printed a sharpie holder so I can draw designs and not waste wood and have more oops forgiveness.) And a small routed sign that came out great.
    I'd set all axes to zero and the programs would start with my intended z retract (5mm). BUT Yesterday I ran the homing cycle and now programs that I thought worked before will now retract on Z all the way to the limit switch. I can reset the GRBL and it seems to fix it as long as I don't run the homing cycle again, but Z now stays at zero instead of +5mm. The thing that has me stumped is that now when I look at the G code some programs (the Bigfoot in attached pic) that I swear I ran and worked before with sharpie have a GO Z-10 diving down...

    Thanks!
     

    Attached Files:

  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    Our Fusion Post's Z Retract is in Machine Coordinates. Make sure you have homed, and make sure you have a negative number in the Start and End of Job Z Position fields. (for example - 5 = 5mm below the Z homing switch) - without understanding Machine Coordinates, you may expect it to raise a certain height above the material, but that is not what it should do. It should clear up and out of the way to avoid crashing into clamps and fixtures too

    • Z homes to the top - and establishes the Machine Coords (G53)
    • Top of the Z axis = G53 Z0 - Z can only move negative/downward (Frequently Asked Questions · gnea/grbl Wiki for further reading)
    • Clearance moves goes to, say G53 Z-5 or G53 Z-10 (5 or 10mm below the switch. Can't go to G53 Z0 as that would hit the switch. Can't go to G53Z-positive as that is in the space above the switch where you really can't go)
    • Rest of your Job runs in G54-59.1 (Work Coordinates) which you Zero by using a Probe or manually by jogging and settings Zero
    • Work Coordinates are Offsets from Machine Coordinates and stored in EEPROM

    Make sure you are using our Post, not the one included in Fusion (which uses even harder to understand G28 instead of Machine Coordinates)
     
  6. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,462
    Likes Received:
    1,915
    Everyone needs to know where home is and have a suitable sense of self (-:
    For a CNC machine this is 'home' and the Machine Coordinate System 'MCS'.
    Industry standard for CNC home is the positive ends of tool travel.
    For a LEAD, this means X right, Y back, Z up.

    Always 'home' after turn on or reset, always always always. If you have any doubts about the machine state, then home it again.
    You may need to jog to clear clamps before this, the machine does not know where the clamps are, YOU do, so you must do the thinking.

    Now that we have a home we can go travelling into Work Coordinate System (WCS) territory.
    GRBL has 6 WCS systems though using only the first default one, G54, is the most common.
    The 'setZero' buttons tell the controller where 0 is on the raw material, the origin point that you set in Fusion360.
    This is stored as an offset from home in the controller.
    This offset is stored and will survive a power cycle,so if the power goes off during a cut, your part 0,0,0 is still known, but only after homing, which is why homing is so important.

    With this home we can now do safe moves at the start and end of a job.
    The job does not know where the tool is so the first movement to the starting cut might hit a clamp or whatever is in the way.
    The correct thing to do is raise the tool as high as it will go, (almost) guarranteed to miss all clamps, before moving.
    This is done by telling it to move in Machine coordinates (the default is the current WCS) so you will see a line like
    G53 G0 Z-10 (Z-0.39 if you are in inch mode)
    in the Gcode. This tells Z to raise to 10mm below the Z home position.
    The 10mm is the default, it is sure to clear the limit switch. If it goes to Z0 it will trigger an alarm, so we need some clearance below it. You can change the option to 1mm if that is enough to clear the switch reliably.

    Having raised Z to a safe height, the machine can move anywhere safely (unless you have some weird job setup that is pushing the limits of what your machine can do) before it lowers to begin the cut.

    At the end of the job it raises again, this gives us clearance to jog it out of the way so we can unload the part, or clearance for a tool change. The post also has an option for moving X and Y at the end of a job. You can use that if you want it.

    You can get the OpenBuilds Fusion 360 Postprocessor from docs:software:fusion360 [OpenBuilds Documentation]

    NOTE: Every operation in Fusion also has a 'Heights' tab and those retract and clearance heights need to be sensible for your job and machine. My machine has 90mm of Z travel and I once did a thick job where Z-5 would have hit the stock. This means that I had to make sure my retract heights were all set to 3mm, and a safe height of -0.5mm worked ok for me. But I did a lot of doublechecking before hitting 'run' (-:



     
    Mark Carew and Pascal Theriault like this.
  7. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,016
    Likes Received:
    1,682
    Totally off topic, but I am very interested in your pen mount. Do you have files for it? I looked on Thingiverse, but my searches failed. I like how it mounts to the side of the spindle mount.
     
    #7 Giarc, Feb 4, 2022
    Last edited: Feb 4, 2022
    David the swarfer likes this.
  8. travisty42

    Builder

    Joined:
    Oct 18, 2021
    Messages:
    5
    Likes Received:
    1
    That makes sense, Thank you!
     
  9. travisty42

    Builder

    Joined:
    Oct 18, 2021
    Messages:
    5
    Likes Received:
    1
    Mark Carew likes this.
  10. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,016
    Likes Received:
    1,682
    Thank you for the link to the file!

    Also thank for the tip of removing it.
     
  11. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,784
    Likes Received:
    1,364
    You can use the switches to set a machine home position. Where have you located the switches? Your machine will set the position it is in on power up, but you can then tell it to home and it will reset the home position when it finds the switches.

    Alex.
     
  12. Dr.Deo

    Dr.Deo New
    Builder

    Joined:
    Jun 4, 2023
    Messages:
    36
    Likes Received:
    2
    the switches are on the negative end of x and y and on the positive end of z.
    Also im very happy i finaly got that digital coordinate system moving.
    literly took me 5 Months.
     
  13. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,784
    Likes Received:
    1,364
    I'm assuming you have a blackbox controller? The back, right, up corner is ALWAYS the maximum dimension for each axis in the MACHINE co-ordinate system - it is set to zero and as you move away from that corner the MACHINE co-ordinates become more negative. You can put your switches where you like (except Z HAS to be triggered at the top of it's travel) but homing the machine, regardless of where your switches are, is setting that back, right, up corner as zero - it tells your controller where all the edges and corners of your machines workspace are. If you haven't got all your switches in that corner there are settings in grbl to tell it where they are.

    You run a job in a WORKPLACE coordinates system - you set a zero point for that (set XYZ) on the same place on your workpiece as you set the ORIGIN in your cam software. That is saved as an offset from the MACHINE co-ordinate system using that back, right, up corner as a reference point. Then your controller knows where in the machines workspace you have put your workpiece and knows where to move to do the cutting actions you have defined when you created a g-code file in your cam software.

    Alex.
     
  14. Dr.Deo

    Dr.Deo New
    Builder

    Joined:
    Jun 4, 2023
    Messages:
    36
    Likes Received:
    2
    i replied to the wrong thread.
    here is where it should have went :p
    MKS DLC 32 problem.
     
  15. tomfitzphilly

    Builder

    Joined:
    Jun 20, 2022
    Messages:
    3
    Likes Received:
    2
    I have an open build controller using Fusion 360.
    I removed the G53 line to use G54 and set the G54 X-Y-Z Zero positions. G 21 should be active.

    Here is the Gcode

    (Made in : Autodesk CAM Post Processor)
    (G-Code optimized for default controller)
    (OpenBuilds CNC : GRBL/BlackBox)
    (Post-Processor : OpenbuildsFusion360PostGrbl.cps V1.0.30)
    (Units = mm)

    (Drawing name : Case Master 2_9Jar v15)
    (Program Name : Repair 4)

    (1 Operation :)
    (1 : 2D Contour3)
    ( Work Coordinate System : G107)
    ( Tool 1: Flat End Mill 2 Flutes, Diam = 6.35mm, Len = 34.92mm)
    ( Spindle : RPM = 10000)
    ( Machining time : 18 sec)

    G90 G94 G17
    G21


    (Operation 1 of 1 : 2D Contour3)
    G54
    G0 Z-10
    G0 X115.57 Y348.336
    S10000 M3
    G4 P1.8
    G0 X115.57 Y348.336 Z6
    Z5
    G1 X115.57 Y348.336 Z1 F203
    X115.57 Y348.336 Z-5.715
    X115.601 Y348.336 Z-5.911 F1016
    X115.691 Y348.336 Z-6.088
    X115.832 Y348.336 Z-6.229
    X116.009 Y348.336 Z-6.319
    X116.205 Y348.336 Z-6.35
    X116.84 Y348.336
    X117.036 Y348.367
    X117.213 Y348.457
    X117.354 Y348.598
    X117.444 Y348.775
    X117.475 Y348.971
    G3 X34.925 Y348.971 I-41.275 J0
    X117.475 Y348.971 I41.275 J0
    G1 X117.444 Y349.167
    X117.354 Y349.344
    X117.213 Y349.485
    X117.036 Y349.575
    X116.84 Y349.606
    X116.205 Y349.606
    X116.009 Y349.606 Z-6.319
    X115.832 Y349.606 Z-6.229
    X115.691 Y349.606 Z-6.088
    X115.601 Y349.606 Z-5.911
    X115.57 Y349.606 Z-5.715
    G0 Z6

    (This relies on homing, see Search Results for Query: G53 fusion | OpenBuilds )
    G53 G0 Z-10
    M5
    G0 X-10 Y-10
    M30

    The initial move is to max out the Z axis until it hits the limit switch at roughly 90 mm

    any thoughts as to why this happens. Should I leave in the g53 and then offset to the desired G54? I'm throwing away material...

    Thanks
     
  16. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,784
    Likes Received:
    1,364
    Now that you have removed the G53 move your first move G0 Z-10 is in the WORKPLACE coordinates system and should go to 10 mm BELOW where you set the Z zero - 10 mm into the workpiece if you set Z zero on the workpiece surface.
    Why do you want to remove the G53 move? It's a standard safety move to raise Z to 10 mm below the limit switch before moving to the start of the cut.
    Do you understand the difference between the MACHINE co-ordinate system and the WORKPLACE coordinates systems?
    G53 switches to the machine co-ordinate system FOR THIS LINE ONLY. Once it has completed that line it switches to the workplace coordinates system that you set in Fusion cam setup.

    MACHINE co-ordinate system - defines the machines workspace - tells your controller where all the edges and corners of your machine are. Provides a reference point (the axes maxima - back, right, up corner) to calculate the workplace coordinates system zero.

    WORKPLACE coordinates system - when you set XYZ zero in the same place on your workpiece as you set the origin in your cam software - tells your controller where you put your workpiece in the machines workspace (setting XYZ zero sets the offset for G54 - you don't have to set it yourself)

    It sounds as though you are not homing your machine from the behaviour you describe.

    Alex.
     
    #16 Alex Chambers, Sep 30, 2023
    Last edited: Sep 30, 2023
  17. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,462
    Likes Received:
    1,915
    and if you are not homing, then you should, really really should, either with the switches you have, or if you don't have, then fake the home
    How to 'Fake the home'
     
  18. tomfitzphilly

    Builder

    Joined:
    Jun 20, 2022
    Messages:
    3
    Likes Received:
    2
    OK Let me try this. But just to be clear, am I setting the g54 XYZ zero BEFORE I run the G53 move?
     
  19. tomfitzphilly

    Builder

    Joined:
    Jun 20, 2022
    Messages:
    3
    Likes Received:
    2
    OK So it turns out that I was completely wrong in my understanding of what was happening. I homed the machine thereby setting in the openbuilds memory all of the home coordinates. Then set my G54 zero coordinates and voila. THANKS for the advice and explanation!!!

    I only occasionally use my machine, and transitioned from Chilipeper (plus I'm old and my memory is not what it was :)), but now I know - Yippee.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice