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



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)


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


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 11-16-2006, 04:48 PM
zcases's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 245
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
Tweet this Post!Share on Facebook
Reply With Quote

  #2  
Old 11-16-2006, 05:15 PM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,659
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
Tweet this Post!Share on Facebook
Reply With Quote

  #3  
Old 11-16-2006, 06:04 PM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,659
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.









.
Tweet this Post!Share on Facebook
Reply With Quote

  #4  
Old 11-16-2006, 06:34 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 19,571
ger21 is on a distinguished road
Buy me a Beer?

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

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

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

  #5  
Old 11-16-2006, 06:55 PM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,659
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
.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-16-2006, 07:30 PM
zcases's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 245
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...........
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 11-16-2006, 07:36 PM
zcases's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 245
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.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 11-16-2006, 08:41 PM
 
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.
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 11-20-2006, 11:01 PM
 
Join Date: Jan 2004
Location: USA
Posts: 102
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.
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 11-21-2006, 01:01 AM
 
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
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-21-2006, 05:51 AM
 
Join Date: Jan 2004
Location: USA
Posts: 102
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, 39 views)
Tweet this Post!Share on Facebook
Reply With Quote

  #12  
Old 11-21-2006, 06:18 AM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,823
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 11:13 PM. Reason: typo
Tweet this Post!Share on Facebook
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 07:42 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353