Rotary tool changer and Mach3

Results 1 to 6 of 6

Thread: Rotary tool changer and Mach3

  1. #1
    Registered
    Join Date
    Jul 2009
    Location
    USA
    Posts
    34
    Downloads
    3
    Uploads
    0

    Default Rotary tool changer and Mach3

    Hello,

    I am working on a D&M retrofit. I designed a 6 tool tool changer and am having trouble with the VB script macro. I am not sure if the problem is Mach3, the Pokeys57cnc board I am using or the fact that I am using Vista 32 bit. Below is my Macro:

    'ToolChange Macro For Rotary type tool changer mounted to end of X axis
    Sub Main()
    OldTool = GetOEMDRO (1200) 'Tool In spindle DRO
    x = GetToolChangeStart( 0 )
    y = GetToolChangeStart( 1 )
    z = GetToolChangeStart( 2 )
    a = GetToolChangeStart( 3 )
    b = GetToolChangeStart( 4 )
    c = GetToolChangeStart( 5 )
    tool = GetSelectedTool()
    NewTool = tool
    'Tool Changer Macro (Bed Type)
    MaxToolNum = 6 'Max number off tools for the changer
    ToolDown = -1.5 'Z Pos to Get or drop a tool
    ToolUp = 0.0 'Z Hieght to Rapid from tool to tool
    Yprep = 2.81 'Y pos for turret alignment
    Xout = 2.0 'X pos to clear spindle for turret rotation
    Xin = .095 'X pos for tool to clip for pickup
    If NewTool = OldTool Then
    Exit Sub
    End If
    While NewTool > MaxToolNum
    NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
    Wend
    Code "G00 G53 Z" & ToolUp 'Moves spindle up to 0 for safe pos
    While IsMoving()
    Wend
    Code "G53 Y" & Yprep 'Moves center of tool turret to centerline of spindle
    Code "G4 P.5"
    While IsMoving()
    Wend
    Code "G53 X" & Xout 'Moves X away from spinle sor turret rotation clearence
    Code "G4 P.5"
    While IsMoving()
    Wend
    Call MovePos(OldTool) 'Rotates turret to tool position from table below
    While IsMoving()
    Wend
    Code "G53 Z" & ToolDown 'Brings spindle down
    Code "G4 P.75"
    While IsMoving()
    Wend
    Code "G53 X" & Xin 'Moves X tword spinle to clip tool
    While IsMoving()
    Wend
    ActivateSignal(Output2) 'Turn On Draw bar to release the tool
    Code "G4 P1.0" 'Wait for the tool to release
    Code "G53 Z" & ToolUp 'Lift spindle to clear tool turret
    Code "G4 P.5"
    While IsMoving()
    Wend
    Call MovePos(NewTool) 'Rotate turret to new tool from table below
    While IsMoving()
    Wend
    Code "G53 Z" & ToolDown 'Lowers spindle to pick up new tool
    Code "G4 P.75"
    While IsMoving()
    Wend
    DeActivateSignal(Output2) 'Turn Off Draw bar to Clamp the tool
    Code "G4 P1.0" 'Wait for the tool to Clamp
    While IsMoving()
    Wend
    Code "G53 X" & Xout 'Moves X away from spindle to un clip tool
    While IsMoving()
    Wend
    Code "G53 Z" & ToolUp 'Moves spindle to 0 safe pos for move
    While IsMoving()
    Wend
    Code "G53 A 0.0" 'Rotates turret to 0 park pos
    Call SetUserDRO (1200,NewTool)
    SetCurrentTool( NewTool )
    Code "G00 X" & x & " Y" & y 'Move back to where the tool change was prompted
    End Sub

    Sub MovePos(ByVal ToolNumber As Integer)

    Select Case ToolNumber
    Case Is = 1
    APos = 86.25
    Case Is = 2
    APos = 122.25
    Case Is = 3
    APos = 158.25
    Case Is = 4
    APos = 194.25
    Case Is = 5
    Apos = 230.25
    Case Is = 6
    Apos = 266.25

    End Select

    Code "G53 X" & XPos & " Y" & YPos
    End Sub


    The tool changer is a 6 tool rotary that is mounted on the end of the x axis. It has a nema 17 motor to rotate the tools and is configured as an angular axis with a 360 degree roll over. The sequence above is for the tool changer to move to the Y position after the z has gone to 0 in machine coordinates. Move x to 2 inches to clear the the spindle while the turret turns. Rotate the turret to the appropriate position. lower the spindle and then move the x position in to clip the tormach type tooling. Activate output 2 to release the air actuated draw bar and then move z back to 0 in machine coordinates. Move x back to 2 inches and Rotate tool changer to new tool and then lower z to pick up new tool. move x back in to clip tool. Deactivate output 2 to grip tool and then move x out to clear spindle. Raise z to 0 and move back to x and y position before the tool change.

    This is the basic operation and the intention is to add auto z zero later and or possibly tool offset comp. The problem is the Macro shows no bugs and when I do a m6 tX call in MDI it moves to position but the rotary axis dose not turn. the other issue is upon completion of the tool change the y axis re-zeros at it's tool change location but not the x?

    This project has been an overwhelming nightmare trying to integrate Mach3 with Pokeys57cnc. This is one of the many issues I have been having and am hoping someone can give me a clue what I am doing wrong while I continue with support on the other issues. I may post in another section of the form in regard to the other issues? I would like to include a photo of the tool changer here but am having difficulty figuring out how to attach it.

    I have been told that Mach3 has too many glitches and I should upgrade to Mach4. I have two other machines that run flawlessly on Mach3 and have never experienced these issues before? However they are running on old XP machines with a parallel port. I tried to come into the 21st century and think I am now regretting it! The learning curve is steep and every step I take someone wants me to go deeper before I can get past the step I am on?

    Please help as I am sure I am not the first to tread this path!

    Thanks,

    Jeff K.Rotary tool changer and Mach3-2017-01-31-16-53-47-jpgRotary tool changer and Mach3-2017-01-31-16-53-35-jpg

    Similar Threads:


  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    United States
    Posts
    29411
    Downloads
    0
    Uploads
    0

    Default Re: Rotary tool changer and Mach3

    Call MovePos(NewTool) 'Rotate turret to new tool from table below
    While IsMoving()
    Wend
    There's no command in your MovePos sub to rotate the A axis.

    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

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

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


  3. #3
    Registered
    Join Date
    Jul 2009
    Location
    USA
    Posts
    34
    Downloads
    3
    Uploads
    0

    Default Re: Rotary tool changer and Mach3

    Gerry,

    Thanks so much for the reply. I had a "G53 G00 A" & APos in the sub at the bottom but it seemed it was not working so I deleted it. Turns out it was working but for some reason It was going at a default feed that was so slow it did not have enough torque to turn. I put it back with a G00 in front of the A and it worked great. I also added a G90 before the G53 in the first move and that fixed the incremental Y problem. I find that one confusing?

    The interesting and frustrating thing is that it all works in a G code program but not from the MDI? If I type a m6 tX into the MDI it dose nothing and I loose keyboard and MPG jog? I can still move with G code commands in the MDI but no tool change. I have to shut down and restart Mach to get jog back.

    Thanks again for the help,

    Jeff



  4. #4
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    United States
    Posts
    29411
    Downloads
    0
    Uploads
    0

    Default Re: Rotary tool changer and Mach3

    Try T# M6 and see if it makes a difference?

    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

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

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


  5. #5
    Registered
    Join Date
    Jul 2009
    Location
    USA
    Posts
    34
    Downloads
    3
    Uploads
    0

    Default Re: Rotary tool changer and Mach3

    Well Pokeys is turning into a nightmare. I had lost communication and it has taken me this long to get it back! I am still having trouble with the index pulse but am continuing to work on that. As for the tool changer it was a no go trying the tool number first and then the M6 command. Do you possibly have any other suggestions? I am working on the front control panel and was going to add a tool change button with a six position selector. I had decided against it and figured I would just use the MDI. I am now re thinking the decision as I can not figure out why the MDI will not do the tool change?



  6. #6
    Registered
    Join Date
    Sep 2014
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default Re: Rotary tool changer and Mach3

    Quote Originally Posted by jkcab95 View Post
    Well Pokeys is turning into a nightmare. I had lost communication and it has taken me this long to get it back! I am still having trouble with the index pulse but am continuing to work on that. As for the tool changer it was a no go trying the tool number first and then the M6 command. Do you possibly have any other suggestions? I am working on the front control panel and was going to add a tool change button with a six position selector. I had decided against it and figured I would just use the MDI. I am now re thinking the decision as I can not figure out why the MDI will not do the tool change?
    Just ran across your thread did you ever get this working?
    I recently built a Mach 3 Screen set for a guy with a half circle changer his was a 10 tool setup but could be easily changed.

    www.CNC4XR7.com



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

Rotary tool changer and Mach3
Rotary tool changer and Mach3