Welcome to Our Community

Some features disabled for guests. Register Today.

Surfacing / Flattening Wizard issue

Discussion in 'Control Software' started by Dave Pinchbeck, Jun 16, 2020.

  1. Dave Pinchbeck

    Builder

    Joined:
    Feb 8, 2014
    Messages:
    12
    Likes Received:
    3
    Hi All

    Decided to run the inbuilt Surfacing/Flattening Wizard on my WorkBee1510's sacrafive board today and came across a small issue - the code generated by the wizard caused me to get a limit switch error, while doing a simulation run before putting the bit into the spindle.

    What I did ...
    • Homed the machine, which for me is to the Left front corner for X and Y and all the way down for Z
    • Used the wizard to generate its code
    • Moved the Z axis up 10mm from home and set this to 0.00mm, so I could hopefully see it go to -0.10mm on the machine positioning window as it performed its sweeps
    What the Machine did when I started to run the code
    • Moved Z up 10mm
    • Moved X and Y out a few mm, looking at the Gcode it must have been 12.5
    • Moved Z down until it triggered the endstop microswitch and stayed there
    Here are the first few lines of code to see if someone can see what it is meant to be doing,

    Original
    ; Surfacing / Flattening Operation: undefined
    ; Endmill Diameter: 25mm
    ; Stepover: 40%, Feedrate: 800mm/min
    ; X: 800, Y: 800, Z: 0.1
    G54; Work Coordinates
    G21; mm-mode
    G90; Absolute Positioning
    M3 S1000; Spindle On
    G0 X0 Y0 Z10
    G1 F800
    G0 X12.5 Y12.5 Z10
    G1 X12.5 Y12.5 Z-0.1
    G1 Y12.5000
    G1 X12.5 Y12.5000 Z-0.1
    G1 X787.5 Y12.5000 Z-0.1
    G1 Y22.5000
    G1 X787.5 Y22.5000 Z-0.1
    G1 X12.5 Y22.5000 Z-0.1
    G1 Y32.5000​

    With my comments in Red to try and understand
    ; Surfacing / Flattening Operation: undefined​
    ; Endmill Diameter: 25mm
    ; Stepover: 40%, Feedrate: 800mm/min
    ; X: 800, Y: 800, Z: 0.1
    G54; Work Coordinates
    G21; mm-mode
    G90; Absolute Positioning
    ; M3 S1000; Spindle On
    G0 X0 Y0 Z10; Rapid move X and Y to 0mm and Z to 10mm
    G1 F800; Feedrate
    G0 X12.5 Y12.5 Z10; Rapid move X and Y to 12.5mm and Z to 10mm
    G1 X12.5 Y12.5 Z-0.1; Move X and Y to 12.5mm and Z to -0.1mm
    G1 Y12.5000; Move Y to 12.5mm
    G1 X12.5 Y12.5000 Z-0.1; Move X and Y to 12.5mm and Z to -0.1mm
    G1 X787.5 Y12.5000 Z-0.1; Move X to 787.5mm keep Y at 12.5mm and Z at -0.1mm
    G1 Y22.5000; Move Y to 22.5mm
    G1 X787.5 Y22.5000 Z-0.1; Keep X at 787.5mm move Y to 22.5mm and Z at -0.1mm
    G1 X12.5 Y22.5000 Z-0.1; Move X to 12.5.5mm keep Y at 22.5mm and Z at -0.1mm
    G1 Y32.5000; Move Y to 32.5mm

    Thanks in advance
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,290
    Your Z home is incorrect. Z should home UP and out of the work area! Thats the industry standard. You'll also have issues with Fusion posts, and almost every other CAM by not following standards
     
  3. Dave Pinchbeck

    Builder

    Joined:
    Feb 8, 2014
    Messages:
    12
    Likes Received:
    3
    Thanks for this Peter, used the logic of 3D printers for my error here.

    Now I just have to figure out how to mount the limit switch in a new position and tell the machine that home for 'Z' is at the other end of the movement.
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,290
    Refer to the Grbl documentation: gnea/grbl
     
    Dave Pinchbeck likes this.
  5. Dave Pinchbeck

    Builder

    Joined:
    Feb 8, 2014
    Messages:
    12
    Likes Received:
    3
    Thanks Peter - this, along with the video on your Youtube Channel about wiring the 1510 () will help getting it all sorted.

    I only wish that I had found these video's before as it would have made things a lot easier, even though some of the components are different her in Australia.
     
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,290
    Just look upwards :)

    videos.PNG


    Also, checkout start [OpenBuilds Documentation] as another great resource
     
    Dave Pinchbeck likes this.
  7. Dave Pinchbeck

    Builder

    Joined:
    Feb 8, 2014
    Messages:
    12
    Likes Received:
    3
    Peter, the link is broken

    upload_2020-6-19_14-38-47.png

    I have changed the position of my 'Z' axis endstop and updated $23 from $23=7 to $23=3 so the machine now knows that the homing point is the other end of the movement.

    Now when I run the code from the Wizard for leveling the bed, it treats home as 0, and tries to drive the 'Z' axis UP to do the skimming. I noticed that $3 also =7 and I'm wondering if this needs to be changed also. Should 'Z' home actually be 98mm - the maximum travel I have?

    The error messages I'm getting now when I start to run the Gcode file include
    • Error:9 - G-code locked out during alarm or jog state [G1 X777.5 Y82.5 Z-0.5]
    • ALARM: 1 - Hard limit triggered. Machine position is likely lost due to sudden and immediate halt. Rehoming is hichly recommended [G1 X12.5 Y72.5000 Z-0.5]
     
  8. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,435
    Likes Received:
    1,908
    Z home must be at the top of Z travel, the positive end.
    axis directions are
    [​IMG]
    then you use the 'setzero' buttons to set the 'work' zero position, all the Gcode runs relative to the work zero, but some Gcode also uses the machine home for some safety moves so having the machine home correct is critical.
     
    Peter Van Der Walt likes this.
  9. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,917
    Likes Received:
    4,290
    Surfacing wizard only uses work coordinates. So you likely forgot to SETZERO at the top of the surface you want to skim.
    Homing does NOT set Work coordinates. Homing only sets Machine coordinates (G53). All other coordinates are stores as offsets from Machine coordinates to allow reestablishing them after power/reset by rehoming, but you still have to to set those offsets with the Setzero buttons
     
    David the swarfer likes 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