CNCzone.com-The Largest Machinist Community on the net!


Welcome to the CNCzone.com-The Largest Machinist Community on the net! forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Mach Software (ArtSoft software)

Notices

Mach Software (ArtSoft software) Discuss Mach 1 , 2 and the new Mach3 here NC software here!


Reply
 
Thread Tools Display Modes
  #1   Ban this user!
Old 11-16-2006, 03:48 PM
zcases's Avatar
zcases zcases is offline
 
Join Date: Apr 2005
Location: USA
Posts: 216
zcases is on a distinguished road
toolchanging

I have asked on the yahoo forum also, but hoping someone here may also have some insight into my toolchanging issue. If my second tool is
longer than the first, it crashes into the part. The first tool at a programs
beginning always works fine. It seems the second tool height does not
get activated in Mach in time.

Heres my toolchange posting format, should I reorder the Txx and M06?

N000186 G49
N000187 (END TOOL)
N000188 T2 M06 (.342 END MILL)
N000189 G90 G80 G40 G43 H2
N000190 G00 Z0.25
N000191 S2197 M03
N000192 G00 X-0.7705 Y0.6532 Z0.25
N000193 Z0.1

And here are my macros, which I am beginning to suspect:
(start)........
tool = GetSelectedTool()
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y, SafeZ
SetCurrentTool( tool )

(end)...........
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y, SafeZ
StraightFeed x, y, z


So - could I add a line to activate the G43 somewhere in the M6end
macro? Or should I post the G43 on the toolchange line 188 in my
example?

Thanks
Scott
Reply With Quote

  #2  
Old 11-16-2006, 04:15 PM
Switcher's Avatar
Switcher Switcher is offline
Moderator
 
Join Date: Apr 2005
Location: www.myDXF.blogspot.com
Posts: 3,482
Blog Entries: 2
Switcher is on a distinguished road
Have you watched this video?

http://www.machsupport.com/ToolChange/Tool_Change.html

On the Mach site?


-----------------------------------------------------------------------------------------------------------

You might need to add this code between your axis moves, so that it completes the move of the axis (first) then moves on to the next code.

While IsMoving()
Wend
Reply With Quote

  #3  
Old 11-16-2006, 05:04 PM
Switcher's Avatar
Switcher Switcher is offline
Moderator
 
Join Date: Apr 2005
Location: www.myDXF.blogspot.com
Posts: 3,482
Blog Entries: 2
Switcher is on a distinguished road
How many tools are in your ATC?

Is your cnc machine diy?

I think you would be better off, to take the code from that video ( http://www.machsupport.com/ToolChange/Tool_Change.html ) and modify it for your machine, looks like a good start.

I don't see in your code where you swap the old tool, for the new tool. I think the Mach program is thinking that the same tool is in the spindle. That could be why it's crashing the 2nd tool.









.
Reply With Quote

  #4  
Old 11-16-2006, 05:34 PM
ger21 ger21 is online now
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 15,644
ger21 is on a distinguished road
Originally Posted by Switcher View Post

I don't see in your code where you swap the old tool, for the new tool.

N000188 T2 M06 (.342 END MILL)

I haven't watched the video, but you may want to use a G43 H2 for the tool length offset.
__________________
Gerry


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

  #5  
Old 11-16-2006, 05:55 PM
Switcher's Avatar
Switcher Switcher is offline
Moderator
 
Join Date: Apr 2005
Location: www.myDXF.blogspot.com
Posts: 3,482
Blog Entries: 2
Switcher is on a distinguished road
And here are my macros, which I am beginning to suspect:
(start)........
tool = GetSelectedTool()
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y, SafeZ
SetCurrentTool( tool )

(end)...........
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y, SafeZ
StraightFeed x, y, z

Ger21,

I meant I dont see it in the Macro, the g-code tells the macro what tool to select, his macro isn't switching the Mach program. Looks like the control thinks the tool number is the same tool (just in a different location on the ATC)

The macro is supposed to be doing all the work, T2 is just the tool to pick out of the macro.






I copied the code from the video, they said it was on the Mach site, (I couldn't find it). Anyway here is the code from the video. The code has 8 tool positions.

'ToolChange Macro For Bed type tool changer 11/05 Brian
Sub Main()
OldTool = GetOEMDRO (1200) 'Tool In spindle DRO You must add this to your settings screen
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 = 8 'Max number off tools for the changer
ToolDown = -3.125 'Z Pos to Get or drop a tool
ToolUp = 0.0 'Z Height to Rapid from tool to tool
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
While IsMoving()
Wend
Call MovePos(OldTool)
While IsMoving()
Wend
Code "G53 Z" & ToolDown
Code "G4 P.75"
While IsMoving()
Wend
ActivateSignal(Output1) 'Turn on Draw bar to release the tool
Code "G4 P1.0" 'Wait for tool to release
'SystemWaitFor (7) 'Wait for the tool Release Limit switch
Code "G53 Z" & ToolUp
Call MovePos(NewTool)
While IsMoving()
Wend
Code "G53 Z" & ToolDown
Code "G4 P.75"
While IsMoving()
Wend
DeActivateSignal(Output1) 'Turn Off Draw bar to Clamp the tool
Code "G4 P1.0" 'Wait for the tool to Clamp
While IsMoving()
Wend
Code "G53 Z" & ToolUp
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
Xpos = 12.00
Ypos = 2.00
Case Is = 2
Xpos = 14.00
Ypos = 2.00
Case Is = 3
Xpos = 16.00
Ypos = 2.00
Case Is = 4
Xpos = 18.00
Ypos = 2.00
Case Is = 5
Xpos = 12.00
Ypos = 4.00
Case Is = 6
Xpos = 14.00
Ypos = 4.00
Case Is = 7
Xpos = 16.00
Ypos = 4.00
Case Is = 8
Xpos = 18.00
Ypos = 4.00
End Select

Code "G53 X" & XPos & " Y" & YPos
End Sub
Main
.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-16-2006, 06:30 PM
zcases's Avatar
zcases zcases is offline
 
Join Date: Apr 2005
Location: USA
Posts: 216
zcases is on a distinguished road
Oh - no ATC. But you guys may be on to something. I notice when I put the second tool in, the control does, like you say, still think the prior tool is in. So, the second tool goes down (and crashes if it is longer). If the second tool is shorter, it works, because the G43 seems to be getting applied later than it should be...........
Reply With Quote

  #7   Ban this user!
Old 11-16-2006, 06:36 PM
zcases's Avatar
zcases zcases is offline
 
Join Date: Apr 2005
Location: USA
Posts: 216
zcases is on a distinguished road
The more I look at the Macro (standard Mach macro), it does look like it doesn't tell the control there is a new tool in the spindle, and it drives back to z safe with the new tool, before it gets the G43 from the program. Is this it? If so, how can I add the G43 to the macro?

Thanks.
Reply With Quote

  #8   Ban this user!
Old 11-16-2006, 07:41 PM
merl merl is offline
 
Join Date: Nov 2006
Location: usa
Posts: 114
merl is on a distinguished road
I happen to see you were on line here and read your question.

i would tend to agree with ger21 however, the problem you describe sounds like a previouse tool length offset is not beeing cancelled when you pick up the new tool. I used to have a K&T Data Mill that would do the same thing if you didn't call the tool length offset 0.0 before calling up the next tool.
this was a big machine and the crashes were dramatic.
Another peculair thing about that set up was weather to add or subtract the number.
It's been awhile but it went somthing like, if the first tool was 5" long and that was set as Z zreo and the next tool was shorter then the length offset was put in the programe as a positive??
Think about it, maybe that is what is going on. Also, do you use the same "H" number for all your tools? I believe that if you call a different H with the same T number (T1 H1, T1 H2,...) you can use different length offsets for the same tool. I'm not as familiar with G code as I should be so don't hold me to this.
Reply With Quote

  #9   Ban this user!
Old 11-20-2006, 10:01 PM
bbuonomo bbuonomo is offline
 
Join Date: Jan 2004
Location: USA
Posts: 99
bbuonomo is on a distinguished road
Just so you know, your not alone, I've been having the same trouble and still can't find an answer to fix it yet.

I Set Z with the longest bit, they set tool 1, tool 2 and tool 3. I can verify the offset but number and by running "goto Z" for each tool. All is good until i run the g code.

Then tool 1 stops somewhere above the work piece. and the only tool that touches the work piece is the tool used to set Z zero.

If you use a shorter bit to set zero, then all the other bits crash (did that twice).

Let me know if you find the solution. I'll post back as soon as I figure it out.
Reply With Quote

  #10   Ban this user!
Old 11-21-2006, 12:01 AM
merl merl is offline
 
Join Date: Nov 2006
Location: usa
Posts: 114
merl is on a distinguished road
bbuonomo,
consider that on most controles the tool data page and the fixture offset page are two different G codes in the program, are you sure you are defineing the fixture/work location with the correct G code?
Also do you need to "home" the nachine before you set tools or find the work location?
I know that some machines I've run,would run w/o homing first but wouldn't know ware they were, some won't start w/o homing first, some pick up right ware they left off.
Examin your situation carefully I'm sure it must be somthing subtle that you're missingin your procedure...?

merl
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-21-2006, 04:51 AM
bbuonomo bbuonomo is offline
 
Join Date: Jan 2004
Location: USA
Posts: 99
bbuonomo is on a distinguished road
i don't have a x.y home, but I can home Z.

I turn on PC, load Mach3, turn on machine (bridgeport Series 1 CNC connected to a breakoutboard that plugs into the PC). The machine has no inteligence, just stepper motors and a few limit switches. Spindle control is manual.

I load the g code into mach3, i find Y and Y zero positions and zero them in mach3. Then I do my tool offsets. I insert the longest tool, use that to find Z Zero (top of workpiece). Then I type in the tool number for that tool, set offset (which is now 0.00 because it is equal to Z zero). Then I reference all home, insert tool 1, type tool 1 into tool number field, hit enter, jog tool down, hit set tool offset, reference all zero and then goto Z to test offset. That works. I do the same thing with tool 2. Test goto Z with all tools everything is good.

Hit cycle start, mach3 stops for tool change,i make sure correct bit is in spindle, hit cycle start and then tool 1 offset is now down at workpiece. Program operates above the part.

So I hit stop, reference all home and when I run goto Z for each tool, all the tools are above the table. Except the tool that was used to set Z zero, that tool will still touch the top of the work piece.

I'm sure it is something proceedural or a very silly setting in Mach3 that I didn't see or know to select. Attached is the gcode for teh 36 tooth sproeck that I'm trying to cut. The code runs perfectly as long as I run 1 tool at a time. 4 tools as 4 seperate processes.

any help is gretaly appreciated.
Attached Files
File Type: zip 36tooth.zip‎ (172.8 KB, 34 views)
Reply With Quote

  #12  
Old 11-21-2006, 05:18 AM
HuFlungDung's Avatar
HuFlungDung HuFlungDung is offline
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,644
HuFlungDung is on a distinguished road
My WAG would be that the tool change macro is not responsible for calling the length offset.

As Merl said, put a T0 and/or G43 H0 in your gcode before the tool change, as this should cancel an existing offset. This would be a precaution in case there is some kind of mixup in how the difference between length offsets is being handled in MACH.

Also, try putting the call for the length offset on a line by itself. Include a motion command (G00) with it.
G00 G43 H
__________________
First you get good, then you get fast. Then grouchiness sets in.

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

Last edited by HuFlungDung; 11-21-2006 at 10:13 PM. Reason: typo
Reply With Quote

Reply

Bookmarks




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump




All times are GMT -5. The time now is 02:19 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.