Hello Guest it is August 18, 2019, 01:40:34 AM

Author Topic: Mach turn & tool change  (Read 8854 times)

0 Members and 1 Guest are viewing this topic.

Mach turn & tool change
« on: January 20, 2009, 04:10:23 PM »
Hi,
 I think I started on this before but can not find my old post . I have a lathe running Mach turn with a turret tool changer ,I know that I have to write a macro to get the turret to work. I'll list some specs and see if anyone can help me get this to work right.

Here are the turret specs.

*It is driven by a gecko powered stepper, its has to turn the same way all the time to make the tool change.
* the turret has 6 positions and has 3 encoders that can be wired to into 3 inputs for mach3 to read. mach3 has to drive the stepper one direction untill it see's the right encoder code for the tool it's calling for and then stop and back up a "hair" to lock the tool.

 The biggest proplem I'm having with this is how to make mach3  turn a axis that it has no DRO for.Any help would be greatly appreciated.

Thanks' Brian



  

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach turn & tool change
« Reply #1 on: January 20, 2009, 04:24:15 PM »
You would probably be best to set the turret up as an axis then do a home move. From that home move you would then be able to call a set distance for each tool in your macro.
Hood
Re: Mach turn & tool change
« Reply #2 on: January 20, 2009, 04:44:09 PM »
hood,
 I had it hooked up to the "A" axis and had it moving , the problem is that it will only turn one way free and locks if it turns the other way. I have played around with using a micro controller to turn it ,but have had a hard time getting mach3 to tell the micro what tool to go tool and confirming the tool change without burning up a bunch of input and output pins.


Brian

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach turn & tool change
« Reply #3 on: January 20, 2009, 05:07:39 PM »
I think the A axis should do what you want if you enable the rotational rollover. Then what you would need  to do is write into your macro that if new tool  was less than current tool   it would do a G0A360 move first. That should then rezero the A Axis and you can then tell it to move to the tool you want.
Hood
Re: Mach turn & tool change
« Reply #4 on: January 20, 2009, 06:57:15 PM »
Ok,
 Let me make sure I have this right.

1. hook up a plc to the 3 encoders , when the plc see's all 3 encoders at 111 (tool 1 and home) it will send a "1" to mach3 to say it's home.
2.If mach3 calls for tool number "3" , it will go home first and then advance  90 degrees and back 1 degree to lock tool number "3" in.

 I can call out a G0A90 and a G0a-01 in the macro ,right ?

Brian
 

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach turn & tool change
« Reply #5 on: January 20, 2009, 07:26:10 PM »
What are you meaning by encoders?
If you have a PLC is it ModBUS capable?
Hood
Re: Mach turn & tool change
« Reply #6 on: January 20, 2009, 08:05:31 PM »
Hood,
 Let me rephrase that ,on my tool changer there are 3 optical  switches. When the 3 slots line up you are at tool "1". I will be using a idec micro smart for the PLC ( should be modBus capable,but I  was not thinking that way). I thought I would take the the optical switches and turn them into just one output and use as a input on the parallel port.

Brian

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach turn & tool change
« Reply #7 on: January 20, 2009, 08:30:37 PM »
OK for setting as an axis you would just do a RefAll like normal when you start Mach and all your axis would be homed (turret included)
 So say you have the home as tool 1 position then  if you call tool 3 you know you have to rotate the axis  by so many steps to get there, if its set in degrees then its really easy. You would just command a move in your macro similar to
If GetSelectedTool=3 Then
Code(" G0A120")
While Ismoving
Sleep(10)
Wend
Code ("G0A119)
End If


You would also need code to make sure it only rotates one way for positioning, something like
 If GetSelectedTool<GetCurrentTool Then
Code("G0A360")........... etc


Hood

Edit
Just tested it here and seems rotational axis is only moving one direction, will have to look further to see if there is a setting for that but its nearly 2am now so I need sleep.
Edit again  ;)
If your want to move back one degree from for example A220 you would do a G0A-119 :)
Hood
« Last Edit: January 20, 2009, 08:35:48 PM by Hood »

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach turn & tool change
« Reply #8 on: January 20, 2009, 08:38:21 PM »
And another Edit, that seems to make life really simple, means it will always rotate one way if your degrees are positive and the other if its negative so no need for the G0A360 move if  the tool number is less than the one set :) now i need sleep :)
Hood
Re: Mach turn & tool change
« Reply #9 on: January 20, 2009, 10:00:25 PM »
Cool,
 It will take me a little time to wire this up and code it. I'm sure I'll have more questions before I'm done , but Thank You for the help so far!


Brian