DM3000 Tool Change Macro (M6Start)
This file was given to me quite a while ago by a very generous unnamed member. I am posting this to help others as he helped me.
You will have to copy and save this as an m1s file and then install it in place of your existing M6Start macro in Mach3.
If IsLoading() Then
'Do Nothing, program loading
Else
' Dim Variables
Dim Num_Tools As Integer
Dim CW_Steps_Per_Tool As Integer
Dim CCW_Steps As Integer
Dim HoldingDRO As Integer
Dim Requested_Tool As Integer
Dim Current_Tool As Integer
Dim CW_Feed As Integer
Dim CCW_Feed As Integer
'Dim moves As Integer
'Dim total_move As Integer
' set up some vars
Num_Tools = 6
CW_Move_Per_Tool = 360/Num_Tools
CCW_Move = 10
HoldingDRO = 1050
Requested_Tool = GetSelectedTool()
Current_Tool = GetCurrentTool()
CW_Feed = 3000
CCW_Feed = 2000
Current_Feed = GetOEMDRO(818)
' start tool change
Message ("Requested Tool No=" & Requested_Tool)
If Requested_Tool > Num_Tools Then
Message "Requested Tool No. too high, program stopped."
Code "M30"
End
End If
If Requested_Tool < 1 Then
'Message "Requested Tool No. too low, program stopped."
Code "M30"
End
End If
If Requested_Tool = Current_Tool Then
' do nothing
Else
' lets do some changing
If Requested_Tool > Current_Tool Then moves = Requested_Tool - Current_Tool
If Requested_Tool < Current_Tool Then moves = Num_Tools - Current_Tool + Requested_Tool
total_move = (moves * CW_Move_Per_Tool)+(CCW_Move/2)
'Move to safe position
Code "G0 G53 Z-1 X-.25"
'Pause for 1/2 second
Code "G04 P0.5"
Code "G91 G94" 'incremental & Feed per minute
Code "G01 A" & total_move & " F" & CW_Feed
Code "G01 A-" & CCW_Move & " F" & CCW_Feed
While IsMoving()
sleep(10)
Wend
SetCurrentTool Requested_Tool
SetUserDRO HoldingDRO, Requested_Tool
Code "G90" ' back to absolute movement
Code "F" & Current_Feed
End If
End If
' end of tool change
Re: DM3000 Tool Change Macro (M6Start)
Now that I have posted this, hopefully it will be of benefit to others in the future.
A question to those who understand how to write a tool change macro.
Being that the DM3000 has a bidirectional tool changer. How would one write a macro that if a tool was closer CCW? The macro would need to power a relay that releases the pawl and turns the tool turret CCW. Then depowers the relay upon reaching the correct tool and backs up against the pawl.
Everyone I have ever seen with a DM3000 has their tool changer set up the way of this macro. Yet the changer itself is capable of bidirectional travel IF the electromagnetic pawl is lifted via 12v. I do have the power supply in the cabinet that can be used and a relay, the extra pins etc.
In case you are not familiar with the mechanism itself, here is picture of MRM's tool changer as it is disassembled. Clearly there is a pawl and electromagnetic switch, I have verified it does work. http://www.cnczone.com/forums/dyna-m...ml#post1120441, see post #22.
DM3000 Tool Change Macro (M6Start)
Your ports and pins for the turret will have to be set up in Mach and tuned. Because it is angular, there are 360 steps to a revolution. Also select angular in General Config.
The macro needs to be installed in the Mach3 file. It will replace the M6 start file there.
This doesn't use the sensor or the solenoid. This macro passes the assigned tool location and backs onto the pawl.
Sent from my iPhone using Tapatalk
Re: DM3000 Tool Change Macro (M6Start)
I finally got around to wiring up the turret with a new stepper motor. I installed your macro and my turret now moves. Thank you. I am having a weird issue though perhaps I don't have something set right in mach3. If I have tool 1 up and call up the next tool, the turret indexes perfectly and backs up against the pawl. It will do this perfectly every single time for every "next" tool without any issues. For some reason though if I am at tool1 and decide to call up tool 6, the motor over rotates and doesn't back up tightly against the pawl. Seems odd since it will work fine if I call up each tool in order. Any ideas? I did check the a axis angular in general config.
I did delete this line in your macro, would that have anything to do with it?
'Move to safe position
Code "G0 G53 Z-1 X-.25"
'Pause for 1/2 second
Code "G04 P0.5"
Ever since day 1 I always program the turret to move a safe distance away prior to indexing
Re: DM3000 Tool Change Macro (M6Start)
I did mention this was given to me. I dont know much about editing but I have changed some values during set ups over the years.
My suspicion first would be the rotational reset in mach gen config. It is not called that but something along those lines. And also check persistent tool.
In regards to the removal of the safe position script. You are still using some form of code in its place arent you?
Re: DM3000 Tool Change Macro (M6Start)
Quote:
Originally Posted by
mike3385
I finally got around to wiring up the turret with a new stepper motor. I installed your macro and my turret now moves. Thank you. I am having a weird issue though perhaps I don't have something set right in mach3. If I have tool 1 up and call up the next tool, the turret indexes perfectly and backs up against the pawl. It will do this perfectly every single time for every "next" tool without any issues. For some reason though if I am at tool1 and decide to call up tool 6, the motor over rotates and doesn't back up tightly against the pawl. Seems odd since it will work fine if I call up each tool in order. Any ideas? I did check the a axis angular in general config.
I did delete this line in your macro, would that have anything to do with it?
'Move to safe position
Code "G0 G53 Z-1 X-.25"
'Pause for 1/2 second
Code "G04 P0.5"
Ever since day 1 I always program the turret to move a safe distance away prior to indexing
Did you guys get this to Work?
Bi directional I may be able to help.
Re: DM3000 Tool Change Macro (M6Start)
CNC, I havent been working on the DM3000 lately. However I did pose the question to you on YouTube about modifying the macro. The above macro is the 1 I was referring to. At this point I have not assigned an output pin for the solenoid but I do have the 24v power supply and relay ready.
My boat has been getting my attention lately.
Re: DM3000 Tool Change Macro (M6Start)
Quote:
Originally Posted by
Fastest1
CNC, I havent been working on the DM3000 lately. However I did pose the question to you on YouTube about modifying the macro. The above macro is the 1 I was referring to. At this point I have not assigned an output pin for the solenoid but I do have the 24v power supply and relay ready.
My boat has been getting my attention lately.
I thought you may be one in the same OK well you no how to reach me I think it may be a simple fix. I'm interested because I would like to one day add a turret to the G0602.
Be Safe,
Sam
Re: DM3000 Tool Change Macro (M6Start)
The Gecko Conversion on the DM3000 lathe I purchased does have a working uni-directional tool change M6 macro.
If anyone has an update to get the lathe working in bi-directional tool change mode - I would greatly appreciate it.
You can contact me here, or PM here, or EM me: JoeComunale <at> Comcast.net (obviously delete spaces and change "<at>" to @ symbol
Would be interested in hearing from other DM3000 owners that made a Gecko/Mach3 conversion.
Re: DM3000 Tool Change Macro (M6Start)
It is going to take more than the macro. The solenoid for the pawl will have to be connected and have a pin assigned.
Re: DM3000 Tool Change Macro (M6Start)
Thanks Fastest1. I'm looking forward to using my D-3000. and getting the other one converted to Mach3
(Two lathes are better than 1)
Re: DM3000 Tool Change Macro (M6Start)
Quote:
Originally Posted by
CNC-Joe
Thanks Fastest1. I'm looking forward to using my D-3000. and getting the other one converted to Mach3
(Two lathes are better than 1)
I will be looking for the videos
Re: DM3000 Tool Change Macro (M6Start)
Retracting the pawl won't be a problem... just activate the relay.... Hoping to get more time in out in the shop.. if my cars will quit breaking down... and things around the house.