Welcome to Our Community

Some features disabled for guests. Register Today.

G-Code posting issue with Fusion360

Discussion in 'CNC Mills/Routers' started by ahojekk, Jan 1, 2022.

  1. ahojekk

    ahojekk New
    Builder

    Joined:
    May 19, 2019
    Messages:
    24
    Likes Received:
    17
    Hello guys, decided to celebrate the new year with some morning milling, but it started of with some issues. What happens is that the mill is going to Z- (directly into t he material) when traveling to the starting point, and does the same thing after the job is done and it's going back to the home position. But the co-ords during the mill are working fine and the process if running fine. The problem is when it starts to travel toward the starting point, and after finishing the job.

    I'm using the BlackBox controller.

    Code:
    (Made in : Autodesk CAM Post Processor)
    (G Code optimized for Grbl 1.1 BlackBox controller)
    (OpenBuilds CNC : GRBL BlackBox)
    (Post Processor : OpenbuildsFusion360PostGrbl.cps V1.0.21)
    (Units = mm)
    
    
    G90 G94 G17
    G21
    
    (Operation 1 of 1 : 2D Contour1)
    G54
    G53 G0 Z-10
    S12000 M3
    G4 P1.8
    G0 X90.8 Y28.6
    Z15 F1000
    Z5
    G1 Z3 F333
    Z-1.2
    Y28.639 Z-1.447 F1000
    Y28.753 Z-1.67
    
    .....Milling operations in the middle~~
    
    G0 Z15
    
    G53 G0 Z-10
    M5
    G0 X-10 Y-10
    M30
    %
    
    Link to full code: https://www.paste.org/120974


    So looking at the code there are two lines that are catching my attention with this issue:
    • (Operation 1 of 1 : 2D Contour1)
    • G54
    • G53 G0 Z-10

    and the one at the end
    • G0 Z15
    • G53 G0 Z-10
    • M5
    • G0 X-10 Y-10

    When I manually changed the line in the code to G53 G0 Z5 it worked fine, what I dont understand why does it post this way so I'm having issues - but it is fine between the operations in one program - lets say it goes from on Contour operation to another Contour operation it works fine with the line G0 Z5

    Am I doing it wrong or is something wrong with the post-processor I'm using, please help.
     
    #1 ahojekk, Jan 1, 2022
    Last edited: Jan 1, 2022
  2. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,761
    Likes Received:
    1,352
    Do you have a grbl controller - if so that code would be correct if you set (MACHINE CO-ORDINATES) Z home to zero at the top of its travel. G53 G0 Z-10 should raise Z to 10 mm below the home position.
    Did you perhaps forget to home your machine?
    Alex.
     
  3. ahojekk

    ahojekk New
    Builder

    Joined:
    May 19, 2019
    Messages:
    24
    Likes Received:
    17
    I am using the Blackbox controller which I believe is a Grbl.

    Thats true I didnt home the machine before starting the program - what I did is:

    • Loading up the .gcode
    • Unlocked the machine, and proceeded with traveling x and y axis towards the milling stock
    • Setting the 0 values for X and Y axis, probing the Z and started the job.
    Shall I be proceeding differently?
     
  4. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,761
    Likes Received:
    1,352
    Yes, you are presumably using the Openbuilds post processor. Always home the machine when you switch on - do you have limit switches installed and homing enabled?
    Because that post processor uses G53 (machine co-ordinates) for the first and last Z safety moves you must set a reference point for the machine co-ordinate system - grbl does that when you switch on, but sets wherever the machine is as the machine co-ordinate system zero.
    Alex.
     
    ahojekk likes this.
  5. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,759
    Likes Received:
    4,266
    Always Home, then Zero.
     
    ahojekk likes this.
  6. ahojekk

    ahojekk New
    Builder

    Joined:
    May 19, 2019
    Messages:
    24
    Likes Received:
    17
    Yes I do have the limit switches. I see, many thanks! Just so I understand this correctly if I dont home the machine, it takes the X,Y,Z positions that were set on turn-on as the "home" positions. And as my Z starting position on turn on was lets say 10mm above the material, it then collided beacuse it considered that <stock+10mm> as home, while the home was like 30-40mm above the actual stock.
     
  7. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,761
    Likes Received:
    1,352
    Not quite - when you turn on grbl will set the MACHINE co-ordinates for X, Y and Z to zero wherever your machine happens to be. Your jobs are done in a separate co-ordinates system.
    The machine co-ordinate system has a zero (in grbl that is normally the maximum dimension for each axis - that means that as you move away from it the numbers become negative). The MAXIMUM dimension of each axis is ALWAYS the back, right, up corner on a cnc machine. The machine co-ordinate system tells the controller where the edges and corners of the machine are and soft limits stop you from starting a command that would go past.
    You set WORKPLACE coordinates system zero when you "set XYZ". The workplace coordinates system doesn't have any effect on soft limits settings.
    Because the first and last Z safety moves are in the MACHINE co-ordinate system the command you highlighted goes to 10 mm BELOW where you set the Z home position - when it's moving in the machine co-ordinate system the controller takes no account of where the workpiece is.
    Hope that makes sense - understanding how the machine and workplace coordinates systems work will help you understand a lot of your machine's behaviour.
    Alex.
     
    Peter Van Der Walt and ahojekk like this.

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