Problem with ATC Macro


Results 1 to 5 of 5

Thread: Problem with ATC Macro

  1. #1
    Registered
    Join Date
    Feb 2006
    Location
    UK
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Problem with ATC Macro

    I have a macro working a 8 position ATC on a Boxford 160 lathe. The problem is that sometimes maybe every 8th change or even every 2 changes the X and Z fail to move to the safe position prior to the change but the change still takes place In the message screen it shows " cannot use G53 incremental Block = G0G53Z0.0000

    I can't see this G53 code anywhere in the macro (below) Can someone offer up any suggestions to why this is happening?

    thanks
    Jason

    'This macro drives an 8 position stepper driven ATC.
    'It drives forward past a ratchet, then backwards a little to stall the motor
    'The Y axis is setup for 20 steps per mm, my ATC requires 900 steps per index
    'of 45 degrees.
    'Because of the stall, steps are lost. So, we switch to INC mode for the ATC,
    'then back to ABS mode before we exit.


    'OEMDRO(1200) is utilized to store the last used tool (OldTool) and is updated
    'upon final execution of the macro. This is resorted to as the Txxyy will overwrite
    'the "CurrentTool" DRO.
    'The Y axis is zeroed if tool is Number1, to prevent an overflow of the DRO after
    'multiple changes.


    'M6Start.m1s
    Message ("macro running")

    OldTool = GetOEMDRO (1200)
    Tool = GetSelectedTool()
    MaxToolNum = 8 'Max number of tools for the changer

    If OldTool = Tool Then
    Message ("Selected Tool already loaded")
    Exit Sub
    End If

    While Tool > MaxToolNum
    Tool = Question ("Enter New Tool Number up to " & MaxToolNum)
    Wend

    xval= getoemdro(800) 'get x
    zval= getoemdro(802) 'get z
    Call Dooembutton(138)
    While IsMoving()
    Wend


    moveto = Tool- OldTool

    If moveto<1 Then moveto=8+moveto

    code "G91" 'inc mode

    code "G00 Y"+Str((moveto*45)+5)
    While IsMoving()
    Wend


    code "G00 Y-5"
    While IsMoving()
    Wend

    code "G01 Y-2 F100"
    While IsMoving()
    Wend

    code "G90" 'abs mode

    NewTool=Tool
    If NewTool=1 Then
    Call DoOemButton (1009) 'zero Y
    End If


    Call SetUserDRO (1200, NewTool)
    SetCurrentTool(NewTool)
    code "G0 Z"+Str(zval) 'return to initial position
    code "G0 X"+Str(xval) 'before tool change
    While IsMoving()
    Wend

    Similar Threads:
    Last edited by JETREBEL; 06-16-2017 at 05:56 AM.


  2. #2
    Registered
    Join Date
    Feb 2006
    Location
    UK
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Problem with ATC Macro

    After some testing I have found a pattern to this problem but I'm no closer to understanding why it's happening.

    It seems that on every 8th turret index I end up with the "cannot use G53 incremental Block = G0G53Z0.0000" So, this could be two tool changes for instance tool from tool 7 to 6 and then 6 to 7 so eight indexes in total I'll get the error message. Or 3 to 4 then 4 to 5 then 5 to 6 then 6 to 7 then 7 to 8 then 8 to 1 then 1 to 2 then on the 2 to 3 I'll get the error message. what ever happens on the 8th tool position I'll get the message and the XZ won't move to safe position but the change still happens..

    Help!

    Last edited by JETREBEL; 06-16-2017 at 05:56 AM.


  3. #3
    Registered
    Join Date
    Feb 2006
    Location
    UK
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Problem with ATC Macro

    OK some further information that may help someone to help me!!!


    It seems the cause in this part of the macro:

    NewTool=Tool
    If NewTool=1 Then
    Call DoOemButton (1009) 'zero Y
    End If


    Where is says "If NewTool=1 Then" I changed the number 1 and the macro seems to work fine as long as the number put in is higher than 8. Of course the DRO is not resetting when tool 1 is selected so this will cause the DRO to overflow.

    Does this give any clue?

    Last edited by JETREBEL; 06-15-2017 at 09:35 PM.


  4. #4
    Registered
    Join Date
    Aug 2017
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default Re: Problem with ATC Macro

    Hi JETREBEL

    Any luck with the macro? I have a Boxford 240 TCL and having a similar problem with my ATC.

    Star



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

    Default Re: Problem with ATC Macro

    There's probably a macro in Button 1009.

    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)


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

Problem with ATC Macro

Problem with ATC Macro