Macro for disabling and enabling soft limits between tool changes


Results 1 to 3 of 3

Thread: Macro for disabling and enabling soft limits between tool changes

  1. #1
    3Dinfinity's Avatar
    Join Date
    Oct 2021
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default Macro for disabling and enabling soft limits between tool changes

    Hey all. I just built an Avid CNC with Mach4 as the control. I'm also using an S30C tool changer from CNC Depot as the spindle. I built and populated a tool rack for the holders. The rack is along the back of the machine and I would like a way to toggle soft limits on and off between tool changes, as the spindle while in cycle can travel into the rack region and crash into the holders. I can't seem to find any documentation regarding a macro or code used to execute for this scenario.

    They (Avid) are currently in development for a tool changer product, but it's on the horizon and they have nothing to release at this time. I, however, would like to have something in place so I don't have to be super vigilant about my workpiece and machine travel. Any help would be greatly appreciated.

    Many thanks
    Dean



  2. #2
    Member
    Join Date
    Nov 2013
    Posts
    4347
    Downloads
    0
    Uploads
    0

    Default Re: Macro for disabling and enabling soft limits between tool changes

    Hi,
    yes that can be done. This post would best be on the Mach4 General Discussion board of the Mach4 forum to get max exposure to those who can program in Lua.

    This is from the Mach4 API:

    Code:
    LUA Syntax: 
    rc = mc.mcSoftLimitSetState(
    		number mInst, 
    		number axis, 
    		number on)
    
    Description:
    Set softlimits to be on or off for an axis.
    Using this API you can include it in your m6 macro, first to set the SoftLimits to off which would require three calls to the API, one for each axis, and then at the
    end of the m6 three calls to the API turning SoftLimits back on, one for each axis.

    Craig



  3. #3
    3Dinfinity's Avatar
    Join Date
    Oct 2021
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default Re: Macro for disabling and enabling soft limits between tool changes

    Hey thanks Craig. I'll try this next when I'm back at the control. Quick question, will the machine travel back into the limit area from outside the limits or does it need to be within the boundary? Apologies in advance if I respond more to this post, I'm new to doing script.

    Many thanks
    Dean



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

Macro for disabling and enabling soft limits between tool changes

Macro for disabling and enabling soft limits between tool changes