G28.1 vs. REF ALL HOME button


Results 1 to 8 of 8

Thread: G28.1 vs. REF ALL HOME button

  1. #1
    Member
    Join Date
    Dec 2019
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default G28.1 vs. REF ALL HOME button

    I'm new to g-code, so apologies in advance if this is a dumb question:

    I'm trying to improve my machine warmup program. Currently it just ramps up & down the spindle a few times. I'd like to give the lube system a pump & run the axises across their extents a few times as a part of the warmup routine. My machine (AlphaCNC AMN-6040-M) has home sensors, and it works just how I want to when I hit the REF ALL HOME button in Mach-3. I'd like to automate the same thing in g-code. When I execute G28.1 X0 Y0 Z0 a few strange unexpected & potentially bad things happen:

    1. The machine appears to G00 move to the relative (work) home 0 0 0 position. Then moves to absolute-0 0 0, touching the limit switches like I want. But then it G00's back to relative-home & absolute-home, over and over stuck in a loop. I watched it go thru this cycle four times before I aborted it. The g-code execution never moves past that G28.1 line while doing this.

    2. After this, if I unload the g-code file, edit it & re-open it, Mach-3 throws up a dialog box that it's calculating the move (don't recall exact wording) and never finishes. I need to click the cancel button to get it to close. At this point I usually have to exit & restart Mach-3 to get things working normally again.

    Am I doing something wrong?

    I'd like to index the Z-axis up to it's absolute-0 / limit switch (to clear anything on the table) then absolute-x0 y0. My machine is a 6040 set in metric, so I'd like to G00 to absolute x600 y600 (or close to 600) then z300-ish (enough to clear any tool installed). Do this a few times while ramping up spindle speed to max.

    Can anyone suggest how to accomplish this? I'm skimming posts on startup routines but haven't seen what I'm looking for. Am I missing something good?

    FYI the PC running Mach-3 is connected to a WiXHC MKX-V controller via USB. Motors are servos not steppers. Setup is mostly as-configured from the factory.

    Similar Threads:


  2. #2
    Member machinehop5's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    1570
    Downloads
    5
    Uploads
    2

    Default Re: G28.1 vs. REF ALL HOME button

    ...use G28

    looks like linux uses the same 5161-5169 for storage. these links may help ya
    G Codes

    https://machmotion.com/documentation...-Reference.pdf

    DJ

    Last edited by machinehop5; 06-23-2020 at 12:55 AM. Reason: link


  3. #3
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: G28.1 vs. REF ALL HOME button

    FYI the PC running Mach-3 is connected to a WiXHC MKX-V controller via USB.
    Sounds like this controller may not be handling the G28.1 correctly.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  4. #4
    Member
    Join Date
    Jan 2018
    Location
    United Kingdom
    Posts
    1516
    Downloads
    0
    Uploads
    0

    Default Re: G28.1 vs. REF ALL HOME button

    I would write a simple Gcode for a maintenence run at a gentle feedrate then a home at the end.
    Something like:
    Move x left, y back.
    Move x right, y forward.
    Move z down, move z up.
    Maybe a couple of times doing this.
    Then end with:
    M9
    G28
    M30

    The G28 will then send axis to machine reference ready for use.



  5. #5
    Member
    Join Date
    Dec 2019
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: G28.1 vs. REF ALL HOME button

    Thanks for the feedback guys.

    Just wondering, does anyone know what Mach-3 internally does on REF ALL HOME? Since that works correctly, if I understood what it's doing maybe I could figure out how to emulate it? Does it monitor the 'input pins' (whatever that means thru the USB interface) directly or issue a g-code command to this cheap chinese controller I'm running? Is there any documentation on the USB interface available or is it some proprietary mach-3 plugin -> USB -> controller protocol?

    Last edited by dwg123; 06-25-2020 at 12:07 AM.


  6. #6
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: G28.1 vs. REF ALL HOME button

    When you use a motion controller, I believe that the controller handles the homing, and passes the info to Mach3 when finished.

    You'd need the source code for the plugin for your device to know exactly what it's doing.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  7. #7
    Member mjzrpr's Avatar
    Join Date
    Aug 2020
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: G28.1 vs. REF ALL HOME button

    I have same problem.
    I can not solve this.
    I think the mkx board dont have any support.



  8. #8
    Member mjzrpr's Avatar
    Join Date
    Aug 2020
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: G28.1 vs. REF ALL HOME button

    finaly i use mcode to solve mkx problem. after use g28.1 ... the gcode go to first line. you must use mcode to set line and start again.


    code "g28.1 A0"
    while (ismoving())
    sleep 1000
    wend
    setdro(16, xx) ' xx is line number
    dooembutton(156)' set next line
    dobutton(0)'start



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

G28.1 vs. REF ALL HOME button

G28.1 vs. REF ALL HOME button