Welcome to Our Community

Some features disabled for guests. Register Today.

G4 PX command help please?

Discussion in 'Control Software' started by simon ayton, Feb 18, 2024.

  1. simon ayton

    Builder

    Joined:
    Dec 25, 2023
    Messages:
    6
    Likes Received:
    0
    First, Thanks so much for this great, software! I’m using OB CAM and controller.

    I’m running Grbl 1.1h and cannot get the G4 command to work even with laser mode off. 32=0.

    If I leave out a value for P I get an error as expected but any value I enter seems to be disregarded?
    I’m using a a pilot arc plasma torch so don’t need touch off but I do want the torch to dwell at the piercing position so that my torch height controller has time once getting the PWM arc start signal (via a 12v relay) to move its z position down to the work surface to get an ok signal to start the arc and track arc voltage. That part of it as all good except for waiting.
    Instead of dwelling though, the code simply turns on the arc via M4 S1000 and begins moving regardless of the G4 P value.

    I normally never ask questions preferring to work it out myself but read through all the similar questions, googled, ask other users etc and haven’t found a reason? 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:
    15,191
    Likes Received:
    4,346
    What do you send?

    G4 P2 = dwell in place for 2 seconds
     
  3. simon ayton

    Builder

    Joined:
    Dec 25, 2023
    Messages:
    6
    Likes Received:
    0
    Thanks yes that first then P2000 but no difference.
    I then left out a value and got an error naturally.
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,191
    Likes Received:
    4,346
    2000 seconds is a bit long
    No parameter would error yes
     
  5. simon ayton

    Builder

    Joined:
    Dec 25, 2023
    Messages:
    6
    Likes Received:
    0
    I tried many values of 1 to 2, 5 and numerous values then tried 2000 in case it was expecting msecs. I actually only need 2 seconds or so but no go. I do have a pierce delay adjustment on the THC but it’s stand alone and doesn’t feedback to the controller so irrelevant and just adds to the dwell time after.
     
  6. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,489
    Likes Received:
    1,925
    I have tried this on a bare Uno and now again on a BlackBox 4X with GRBL 1.1f loaded via OpenBuildsCONTROL (and just tried it with the X32 with freshly loaded firmware, also 1.1f)

    G21 G90 G17
    G0 X100
    G4 P4
    G0 X200
    M30

    and it pauses for the expected 4 seconds between the X moves.

    You said you have GRBL 1.1h
    where did that come from, which exact version is it?

    you also mentioned laser mode, but you are using a plasma cutter. one would not use laser mode with a plasma cutter since laser mode does funky things with the PWM to control laser power during a move, plasma will not like that since it is on/off that it needs.
     
  7. simon ayton

    Builder

    Joined:
    Dec 25, 2023
    Messages:
    6
    Likes Received:
    0
    thanks it's a Foxalien Masuta Pro with it's stock GRBL 1.1h firmware as reported in O.B when I connect to the USB port. I don't have any more specifics. Maybe G4 is disabled in that but it's designed for CNC so doubt that.

    My machine is laser, spindle and plasma all in one. I use the PWM signal to switch a relay which turns on the plasma arc. works fine because I set it to full power so it doesn't vary the PWM, the plasma just sees arc start and stop.
     
  8. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,489
    Likes Received:
    1,925
    ok, but with GRBL in laser mode then M4 will ramp the PWM as the motion speed ramps, not what you want for plasma (-:

    look sliek anice machine and looks like they are running some variant of grblHAL or FluidNC on a 32bit controller, so you will have to ask them about the actual code running on the controller and whay it won't delay with a standard G4 word.
     
  9. simon ayton

    Builder

    Joined:
    Dec 25, 2023
    Messages:
    6
    Likes Received:
    0
    thanks for the reply David. In my first message I said I'm running 32=0 for laser mode off so do you mean the GRBL I'm running doesn't allow for it to be turned off possibly?
    I don't mind throwing the Masuta controller board over the fence so that's no issue I just want a solution that works asap for THC. which is the best OB option please? It needs an input i can connect to ARC OK from my THC to give it the OK to fire...So far Mach3 looks like the only option?
     
  10. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,191
    Likes Received:
    4,346
    Show us what your macro looks like, serial logs etc. Pretty sure they wouldn't disable G4

    THC is over complicated and mostly unnecessary on a hobby machine. Use a Floating head: watch



    And



    Along with



    None has THC
     
  11. simon ayton

    Builder

    Joined:
    Dec 25, 2023
    Messages:
    6
    Likes Received:
    0
    Thanks yes seen those. I had a floating head which was ok for thick flat pieces but I’m now doing cuts on thin curved body panels for a specific custom motorbike project. The THC is easy, cheap and works brilliantly so I’ll just nut out the solution thanks if need be with some lead in. All good thanks for your help!
     

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