Welcome to Our Community

Some features disabled for guests. Register Today.

LaserGRBL and plasma cutter. G4 dwell executing before M3.

Discussion in 'Other Builds' started by Homefabricator, Jul 24, 2024.

  1. Homefabricator

    Builder

    Joined:
    Jun 25, 2024
    Messages:
    2
    Likes Received:
    0
    Hi, I hope this is the right place to pose this question.
    I have converted a chinese made laser engraver to run a plasma cutter.
    The machine mostly works but has a peculiar fault where the G code spindle start M3 and G4 dwell commands are executed in the reverse order. I have wired the spindle start (M3) output to a relay that starts the plasma cutter. The G4 dwell is normally about 1 second (depending on steel thickness) and is required to give the plasma cutter time to pierce the steel before starting the subsequent cut moves.
    That's the theory but what actually happens is the machine pauses/dwells, then starts the plasma cutter and immediately does the cut moves. Because it hasn't pierced the steel before moving it messes up the cuts.
    Here's the gcode I set up to figure out what was going on. You will see I have exaggerated the pause/dwell to 10 seconds so I had time to observe what was happening. This trial code assumes we are starting at X0 Y0.

    G90 G94 G17
    G21
    (Plasma cutting with GRBL.)
    M3 S1000
    G4 P10.0
    G1 X0 Y208 F1800
    M5
    M30
    I'm using LaserGRBL v7.12.0
    GRBL version is 1.1f which came loaded into the machine.
    I'm using Fusion 360 for CAD and CAM with the OpenBuilds Fusion360 Postprocessor installed to generate the Gcode files (although the sample here is hand edited to keep it simple for diagnosis)
    I found a work-around - if I insert G1 command(s) between M3 and G4 then it does the steps in the correct order.
    For example assuming we are starting at position X0 Y0 the code that works would look like this
    G90 G94 G17
    G21
    (Plasma cutting with GRBL.)
    M3 S1000
    G1 X0 Y0.01 F400
    G1 X0 Y0
    G4 P10.0
    G1 X0 Y208 F1800
    M5
    M30
    Finding every M3 command in a big gcode file and inserting G1 commands is tedious to say the least.
    I tried putting in the M3 and G4 command sequence twice - it made no difference
    Can anyone suggest either how to fix the problem, or an easier work-around?
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,454
    Likes Received:
    1,915
    Peter Van Der Walt likes this.
  3. Homefabricator

    Builder

    Joined:
    Jun 25, 2024
    Messages:
    2
    Likes Received:
    0
    Problem solved by turning off laser mode.
    I very much appreciate your help and prompt response.
    I'm new to GRBL so didn't know this setting existed, and my search for the symptoms didn't find an answer.
    Thanks for your patience.
     
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,454
    Likes Received:
    1,915
    being new you should read the GRBL wiki, yep, all of it. it will give you background info so you know where to look for any furture things to adjust.
    Home
    knowledge is power!

    yes, I know we are now in the grblHAL world, and there is a wiki there too, but it is a bit more fragmented at this time and the old wiki gives a much better overview IMHO
    grblHAL
    each of the parts of it now have their own wiki, so we have to look under 'core' for the system then 'drivers' for the ESP32 details (ESP32 is in the Blackbox X32).
     
    Peter Van Der Walt 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