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 > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-22-2008, 02:33 PM
 
Join Date: Sep 2007
Location: USA
Posts: 16
p8md is on a distinguished road
Question Need Automatic Wear Offset

I am running a Wasino G6 w/ Fanuc 21i controls. I'm looking for a G or M code or macro to automatically increment the wear offset register. One of our tools seems to have a predictable wear amount and should be incremented by that certain amount every cycle. Is there such a thing where it can be programmed? Would this be a G10?

I know it could probably be set as a variable and added to the wear offset, but I need it to actually change the number in the wear offset page. I don't want to rely on the operator to reset the variable after a tool change.

Thanks,
Mark
Reply With Quote

  #2   Ban this user!
Old 10-22-2008, 04:11 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

I am unsure of the tool variables for the 21i control. However I have the same for the 15 and 18 series control so they might be the same. If you want to set it up with G or M code instead of programming it you have to use the custom macro parameters to set a G or M code to call a macro program. Then you can write the macro program to adjust the tool wear. At that point all you have to do is program the G or M code in your main program when you want to adjust the wear.

#2000= Tool length geometry
#2200=Tool length wear
#2400= Tool radius geometry
#2600= Tool radius wear
These numbers have to have the tool number in them. For example tool length geometry for tool 5 is #2005. Tool radius geometry for tool 5 is #2405.

Now if it always the same tool then you could set up your macro something like this. If it is always tool 5. You have to set up in the parameters a G code to call program 9001 like G500 or something. I don’t have the 21i manual in front of me but I can look them up tomorrow.


G500
O9001(wear program)
#100=.0025(predictable wear)
#2205=#2205-#100(use the variables #2000,#2200,#2400,#2600 whatever one you’re trying to set)
M99
You can also just change the line to #2205=#2205-.0025 if the amount is always the same.

The other way you can do it if you want to for different tools get a variable that is used to track the tool that is in the spindle. If you don’t have a macro variable that tracks that you can find a system variable that does. Let s say macro variable #500 tracks the current tool in the spindle

G500
O9001(wear program)
#100=.0025
#[2200+#500]=#[2200+#500]-#100
M99
This way you’re not stuck to one tool. Whenever you want to adjust the wear .0025 just program a G500 in your main program.

If you do it G10 way you would always have to know were your wear number is at and what the number is going to be from there and program it in the G10 line.

Stevo
Reply With Quote

  #3   Ban this user!
Old 10-23-2008, 07:04 AM
 
Join Date: Jan 2005
Location: USA
Posts: 237
cogsman1 is on a distinguished road

I will use offset # 3 "X" axis for my sample. I will use 10 for the "trigger" to make adjustment.
You will need macro "B" for this to work.

(First you need to have a counter to keep track of how many parts are run.)
#149=[#149+1]
(Then check for the number you KNOW is the trigger to make an adjustment.)
IF[#149LE10]GOTO123 (skip over adjustment IF counter trigger NOT reached)
#2003=[#2003+.0005] (Adjust "X" offset #3 by +.0005)
#149=0(Reset counter AFTER adjustment is made)

N123(Address to jump to when NOT doing adjustment)


Here it is without comments. Add these lines to your program.

#149=[#149+1]
IF[#149LE10]GOTO123
#2003=[#2003+.0005]
#149=0
N123
Reply With Quote

  #4   Ban this user!
Old 10-23-2008, 07:20 AM
chucker's Avatar  
Join Date: Nov 2007
Location: USA
Posts: 132
chucker is on a distinguished road
offsets

You may want to use an number of #500 or above because I think on the fanuc control that Below #500 you will loose the vaule you have in your register if you reset the control or turn off your machine with any vairble below #500
Reply With Quote

  #5   Ban this user!
Old 10-23-2008, 10:12 AM
 
Join Date: Sep 2007
Location: USA
Posts: 16
p8md is on a distinguished road

So... If I can take an educated guess that the ID cutter (Tool #2) wears .00005 EVERY part (wear in X), then I don't have to do the counter and IF statement, correct?

All I would need is #2002=[#2002+.00005] at the end of the program.

Is this all I need?

Thanks again,
Mark
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-23-2008, 10:53 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Chucker you are correct. The local variables #1-#33 are set to clear at program end, reset button, or power down of machine. #100-#199 common variables will rest at power down. #500-#999 permanent common variables will stay until changed.

P8md you are correct. If it is always the same tool and the same wear amount in the same program then that will work. Cogsman1 was refering to if there was a loop in the program that ran a set number of parts and the wear was consistant and did not need adjustments until after the 10pc then the auto adjusments would be made after 10pcs.

#2002 is your geometry for tool 2 in the X. I would leave that alone if the wear that you are seeing is insert wear. I would use the #2202 X wear. The tool geometry is not what is changing it is the insert. So when the insert needs to be changed you can clear the wear offset to 0 and you are back were you started. You will also have to figure out the proper + or - to adjust. If I assume that you have your offsets to gauge line then your ID tool offset geometry should read a - number. There for your line of code is correct. Adding a + number to the - offset creates a small - telling the tool to move closer to the part and remove more material.

Stevo
Reply With Quote

  #7   Ban this user!
Old 10-24-2008, 06:46 AM
 
Join Date: Jan 2005
Location: USA
Posts: 237
cogsman1 is on a distinguished road

Stevo, your are correct. Good catch!
On the Fanuc the #100 variables DO reset at power off. I run Fanuc and Mitsubishi controls. The Mitsubishi does NOT reset automatically.
Reply With Quote

  #8   Ban this user!
Old 10-24-2008, 07:39 AM
 
Join Date: Sep 2007
Location: USA
Posts: 16
p8md is on a distinguished road

OK... I'm missing something. I put #2202=[#2202+.0001] in the end of the program before it looped back around and it didn't do anything. No errors, no changing offsets, nothing. We wrote down all the offsets just to make sure nothing unexpected changed.

Is the syntax correct? Where do the brackets go? Do I even need the brackets?

Also, stevo says that the #2200's are Tool Length Wear. Wouldn't that be the Z direction? I'm wanting to offset in the X direction because we keep loosing our ID size. Would that be the #2600's?

Thanks,
Mark
Reply With Quote

  #9   Ban this user!
Old 10-24-2008, 07:42 AM
 
Join Date: Sep 2007
Location: USA
Posts: 16
p8md is on a distinguished road

BTW, we do have macro B.
Reply With Quote

  #10   Ban this user!
Old 10-24-2008, 07:55 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Hmmmm that is weird. You have the correct format. Do you have tool offset memory C? The easiest way to figure out what system variables are for which offset area program it whole. Use a offse number that you don't use or write on down. Say its offset 25. Program #2025=12.3456 and look at offset 25 acroos the board and see were 12.3456 was input. Do the same for #2225, #2425,#2625. One at a time to see what gets changed.

I have the same format a system variables across the board on all my controls. However I have never used a 21i control. I think the only thing that can change or dictate it is which offset memory you have. If you can see the 4 colums for offset memory then there are system variables to set these so doing what I stated above should find what you need.

Stevo

One other thing I just remembered. If you have a radius tool tip line in your offset page that could be using the #2200 parameters and if it does not have enough decimals .0000 then it might not show up.

Stevo
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 10-24-2008, 08:01 AM
 
Join Date: Sep 2007
Location: USA
Posts: 16
p8md is on a distinguished road

Thanks SteveO. I haven't tried this yet, but should I be able to do this in MDI also? I tried in MDI and in the program the 1st try and neither worked.
Reply With Quote

  #12   Ban this user!
Old 10-24-2008, 08:39 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Yes you can do this in MDI. I should apologize. I should have had you set common variables equal to the system variables. It is not a good idea to start changing system variables if you don’t know what they are. If the machine took the .0001 change you made and you can’t see it. It is set somewhere.

The best way is to set and find offsets (example offset 25) set to different numbers across the geometry, radius and wears to like 1, 2, 3, 4 Then MDI #100=#2025, #101=#2225, #102=#2425, #103=#2625. Then look at variable 100-103 and see if they equal any of the 1,2,3,4.

I also found some system variables for a 21i-TB/210i-TB (pdf attached). According to this #2000 are your X axis wear column. And as I see I might be right when I edited my last post. When you were using #2200 that is the wear for the tool nose radius comp. That is probably why you did not see a change.

Stevo
Attached Files
File Type: pdf 0832_001.pdf‎ (48.5 KB, 88 views)
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radius Offset and Length Offset jim_stoll Dolphin CADCAM 13 10-14-2010 07:47 PM
Wear offset and writing parameters gollame Colchester Tornado lathes 2 10-28-2009 12:06 AM
Need Help!- Fanuc O-T Wear Offset Parameter gollame General CNC (Mill and Lathe) Control Software (NC) 4 03-10-2008 06:40 PM
Wear offset and writing parameters Fanuc gollame General CNC (Mill and Lathe) Control Software (NC) 0 03-03-2008 03:15 AM
Does a CNC wear out? Bear Mazak, Mitsubishi, Mazatrol 7 06-12-2006 05:46 PM




All times are GMT -5. The time now is 12:06 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 354 355 356 357 358 359 360 361