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! > MetalWorking Machines > Haas Mills


Haas Mills Discuss Haas machinery here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 08-15-2005, 04:42 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road
A sample tool change macro.

[CODE]050815-1532 EST USA

A sample tool change macro.

Following is a tool change macro that I use on HAAS machines.

The O6901 can be any O-number you choose. Whatever number you use must be used in the calling program.

This macro will not work on our 1993 machine because variables are not allowed for P in the G10. A much more complicated macro is required to accomplish the same result and allow no modification in the calling program.

For your reference on alpha to # addresses see the HAAS manual under MACROS the section on Alphabetic Addressing.


The calling line looks like

G65 P6901 E54 R 0.250 S 7500 T07 D07 ( call tool chg sub )

where

G65 is the call to external subroutine P6901.

E54 --- The E maps to variable #8 in the subroutine and
....... 54 specifies the coordinate system. You will see
....... G#8 in the fourth row of the subroutine.

R 0.250 The R maps to variable #18 in the subroutine and
....... 0.250 provides the cutter diameter for G10 L12 to load.

S 7500 -The S maps to variable #19 in the sub and
....... 7500 provides the value for spindle speed.

T07 --- The T maps to #20 in the sub and
....... 07 provides the value for the next tool.

D07 --- The D maps to #7 in the sub and
....... 07 provides the value for cutter comp address.
....... Used with P in the G10 L12, and D in G43.

Depending on your normal useage and how offsets are used may require
modifications to this subroutine.

Also there are people that do not like this general approach.

The reason I like it is that all pertinent parameters are on one easily read line and entered only once. In particular the #7 variable, and the #20. This reduces errors.

We have setting 33 Fanuc, 40 dia, 58 Fanuc, 49 ON (skip same tool change).

Note that by changing the value for R but using the same tool we change from roughing to finishing.



%
O6901
(Beta TOOL CHANGE macro subroutine 981212-1750)
G10 G90 L12 P#7 R#18
G80 M09
G90 M06 T#20
G#8 M08
S#19 M03
G43 H#20 D#7
M99



A sample calling program:

O3002
(BRAD_2.CNC Date-time created 08-14-2005 11:13:20)
(Beta prog 981226-1009 )


(**** TOOL Change to Mill Roughing **** --->1 IDM12R HAAS TL # 7 )

G65 P6901 E54 R 0.250 S 7500 T07 D07 ( call tool chg sub )

G0 X -0.4000 Y 2.3000
Z 0.1000
F 60.0 G1 M97 P 11 Z -0.1300
G90 G0 Z 0.1000




(**** TOOL Change to Mill Finishing **** -->2 IDM12F HAAS TL # 7 )

G65 P6901 E54 R 0.248 S 7500 T07 D07 ( call tool chg sub )

G0 X -0.4000 Y 2.3000
Z 0.1000
F 20.0 G1 M97 P 11 Z -0.1300
G90 G0 Z 0.1000




(**** TOOL Change to Mill Finishing **** -->3 IDM12F HAAS TL # 8 )

G65 P6901 E54 R 0.060 S 7500 T08 D08 ( call tool chg sub )

G0 X -0.4000 Y 2.3000
Z 0.1000
F 20.0 G1 M97 P 11 Z -0.0300
G90 G0 Z 0.1000




M09
M05
G90 G0 G53 Z0
G53 X-15.0 Y0
M30


(This file BRAD_2.SUB Date-time created 08-14-2005 11:13:20)
(Program 981226-1009 CNC_H4.BAS, .EXE QB45)


N 11
G1 G41 X -0.4000 Y 2.0000
G1 X -0.1000 Y 1.8750
G1 X 6.7500 Y 1.8750
G1 X 6.7500 Y 0.0000
G1 X 0.0000 Y 0.0000
G1 X 0.0000 Y 2.0000
G1 G40 X 0.0000 Y 2.2000
M99




%
[/CODE

Unfortunately the preview format does not correspond with actual format.

.]

Last edited by gar; 08-15-2005 at 05:32 PM.
Tweet this Post!Share on Facebook
Reply With Quote

  #2  
Old 08-15-2005, 04:46 PM
miljnor's Avatar
S.N.A.F.U.
 
Join Date: Jan 2005
Location: usa
Posts: 1,809
miljnor is on a distinguished road
What is the macros appplication? To change a current tool to a different tool when broke (lights off)?
__________________
thanks
Michael T.
"If you don't stand for something, chances are, you'll fall for anything!"
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 08-15-2005, 05:22 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road
050815-1602 EST USA

miljnor:

The purpose of this macro is to place the tool change details and associated details like coolant on, spindle forward, etc. that for my use almost always go together in a location outside of the point in the program where the the function is needed, and in the place of these details have the single easily read subroutine calling line.

In particular I change the tool diameter for a selected tool in the tool table with the G10 line every time I do a tool change. So even if the same tool remains in the spindle from one tool change subroutine call to the next I can change the cutter diameter from one value to another and thus change cutter position (obviously using cutter comp). This is one way to go from roughing to finishing with the same tool and the same basic path and in the main program easily see the tool position change. This is illustrated in the sample program.

Also one does not need to worry about making a mistake in the value for T and H, and P and D when one operates as I do in this subroutine.

This has nothing to do with broken tools, but just normal program execution.

In the sample calling program there is a single rectangular path that is first roughed, then finished, both with the same tool but assigning a different diameter, and last a chamfer is done with a different tool.

.
Tweet this Post!Share on Facebook
Reply With Quote

  #4  
Old 08-15-2005, 05:46 PM
miljnor's Avatar
S.N.A.F.U.
 
Join Date: Jan 2005
Location: usa
Posts: 1,809
miljnor is on a distinguished road
ahhhhh. Thanks for the explanation man.

This is a non cad/cam intensive way to write code. Very ingenious!

Reminds my of my video game programing days! When you had to have massive amounts of pre-written code for the little things because assembly was a biatch to write and rewrite in. So your worth to a company was in how many progrs you already wrote and could cobble them together for a bigger end result, in very little time.

thanks
__________________
thanks
Michael T.
"If you don't stand for something, chances are, you'll fall for anything!"
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 08-15-2005, 06:06 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road
050815-1652 EST USA

miljnor:

In a single part application and milling a hole to a very close tolerance like 0.0002 in 6061 I might restart at the finish tool change and run another pass to minutely change the diameter. This might be done with or without changing the cutter diameter. Alternatively one might write a loop at the finish cut with a halt in the loop for checking dia.

Something else you might do in a production environment is create a counter that is incremented in the tool change subroutine, and every X counts make a correction in the tool wear value in this subroutine.

Part of my reason to show this subroutine was to maybe interest some of the readers to play with useful techniques by using macros. There may be many readers that have never made use of macros, or written their own.

.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-15-2005, 07:48 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,419
Geof will become famous soon enough
Originally Posted by gar
050815-1652 EST USA
Something else you might do in a production environment is create a counter that is incremented in the tool change subroutine, and every X counts make a correction in the tool wear value in this subroutine.
.
This is something we might be able to implement on our SL-10 which drifts about 0.0015 on diameter while warming up. We know more or less when to adjust the wear or offset to compensate and do it by hand now.

On the topic of macros do you find that the technical schools teaching programmers down play the usefulness of macros? I sent a guy on a sixteen week course and whenever he started asking about macros the answer was: "you don't need macros. they are old fashioned, use CAD/CAM it's a lot easier". Needless to say he didn't learn anything about macros.
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 08-15-2005, 09:42 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road
050815-2007 EST USA

Geof:

Yes you should be able to use a time modification of the X position via a macro or straight code at the beginning of the program.

The algorithm you develop for the increment of modification per unit of time has to be non-linear and might simply come from a table, or maybe you can develop a simple equation as an approximation.

A macro to do this would not be a part of a tool change, but a stand alone macro because I believe it is primarily a machine frame, lead screw, etc. type of growth.

The variable #3001 would be your time base. This is the millisecond timer and is set to 0 at power on. It's range is 497 days or thereabouts. Way beyond your needs. You might need an hour to two.

G52 can not be used directly on the lathe to accumulate the change because it is zeroed at program start. However, if your algorithm or table provides the offset from time 0 of #3001, then this value can be copied to the G52 X at the start of each program start. G52 X is at #5201. See offsets in macros in the lathe manual.

If you develop time constant information that might be useful to share with others.

If there was a useful single point at which to measure temperature rise that would relate to the expansion, then an external temperature monitor could be used to feed infromation back to your program.

If the machine gets turned off and right back on, then you will need a method to handle this because you start from scratch with #3001 at 0.


On your school question I am too far removed from this to have any knowledge. However, in the computer field there are many people today that have never worked with assembler or basic logical design ( in my school days minimization was a very important part of logic circuit design ) and these current people only know how to work in high level languages which can be very inefficient. The last time I did anything in Fortran you could not do a bitwise logical and of two words, yet the computer at assembler level had that capability.

If you are doing a contour surface, then high level is the way to go in all probability. But if you are doing a simple production job, then you want minimum cycle time and G-code with macros is probably the best route.

.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 08-15-2005, 11:44 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,419
Geof will become famous soon enough
Originally Posted by gar
050815-2007 EST USA
.....If there was a useful single point at which to measure temperature rise that would relate to the expansion, then an external temperature monitor could be used to feed infromation back to your program.....
If I had my head screwed on correctly I would have ordered the temperature compensation option when I bought the machine!

Your comments will be very helpful when I get the time to pursue this. The machine is used in production; turned on, run 10 hours and then off until tomorrow so the #3001 timer is appropriate.

Thanks
Tweet this Post!Share on Facebook
Reply With Quote

  #9  
Old 08-16-2005, 01:10 PM
miljnor's Avatar
S.N.A.F.U.
 
Join Date: Jan 2005
Location: usa
Posts: 1,809
miljnor is on a distinguished road
The only down side to a macro in that application is the complexity. I used to do alot of bearing journals that requiered something similar (cant find my old docs) and I actually had to right something in it to compensate for idle time as well as just warm up (do to breaks for bathroom ect.) if the machine was left to sit for over about 12min. then the offset would start drifting again.

So unless you have your guys chained to the machine (hmm sound like an idea i should implement ) you might have to wright something of this nature.

If I can find my old macros (its been a few years, so don't get your hopes up) if will post them.
__________________
thanks
Michael T.
"If you don't stand for something, chances are, you'll fall for anything!"
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 08-16-2005, 02:09 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,419
Geof will become famous soon enough
[QUOTE=miljnor] ....So unless you have your guys chained to the machine..../QUOTE]

No I'm not suicidal (in a business sense) yet.

The complexity you bring up will be less likely in our application. The parts only need +/-0.0005 which is less than the initial warmup but the backward drift over lunch break is not enough to worry about.

Your comment about chaining to machines brings up the idea of having a thread titled "Are your operators allowed to wander around while their machine is running?" I figure if you have the confidence to set Power Off at M30 and leave a cycle running at quitting time or if you are doing lights out manufacturing there is no reason to insist that the operator stand there all the time peering through a dirty window. We do production work on a repeat basis on more than 200 different parts using around 600 different programs. For most of my guys it is a case of "same old same old" and I would have a revolt if I didn't let them break up the boredom somehow with cycle times ranging from 2 minutes to 2-1/2 hours.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 08-16-2005, 09:43 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road
050816-2043 EST USA

My son gave me some additional information.

He said that HAAS has a timed correction function in our machine. However, he does not use it, but rather prefers manual correction. I have not looked into this so I do not know what the HAAS algorithm is.

His second point was that during a 30 min break he has seen the machine grow in the same direction it was moving while running. This probably means it is heat from the spindle and that there is a long time constant.

.
Tweet this Post!Share on Facebook
Reply With Quote

  #12  
Old 08-16-2005, 11:57 PM
miljnor's Avatar
S.N.A.F.U.
 
Join Date: Jan 2005
Location: usa
Posts: 1,809
miljnor is on a distinguished road
I honestly don't think that the thermal expansion of the machine is all there is to blame. I have messured a half thou of movement in a h13 tool steel blank I made for a mold maker a couple of years ago. I machined it in the afternoon at about 87deg F. and when he decided to check the part is was about 43 deg. in the early morning. I had to convince him to check them in the afternoon (after all the machine is hot as hell when in operation). I don't think the material should have grown so much but it was customer supplied so there was nothing to say there (fortunatly).

So with that said I think the coolant heat transfer to the part is a big cause and coolant looses its heat alot faster than the machine.

just a thought and since I haven't done any in depth study (being since I rarley do that close tol. stuff anymore) I have no way to verify my theory. :P
__________________
thanks
Michael T.
"If you don't stand for something, chances are, you'll fall for anything!"
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 12:20 PM.





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