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 > Fanuc


Fanuc Discuss Fanuc controllers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 02-27-2010, 04:03 AM
LVX LVX is offline
 
Join Date: Feb 2010
Location: Netherlands
Posts: 8
LVX is on a distinguished road
Parameter for current active tool!

Hi All,

I'm developing a new macro for our machine, running on a Fanuc 31i controller. In this macro I want to check if the current tool is the touch probe, something like an if/then structure: IF[#xxxx=16]THENGOTO20. Block N19 could be a skip to the end N999 with an error #3000=999(wrong tool).

The trouble is I don't know the parameter position for the current active tool.

Can anyone help me out Or improve me coding

LVX
Reply With Quote

  #2   Ban this user!
Old 02-27-2010, 05:38 AM
guhl's Avatar  
Join Date: Aug 2007
Location: Ukraine, Sevastopol
Age: 29
Posts: 259
guhl is on a distinguished road

I don't know how it's made on 31i, but on 0T series it's current value of some counter in PMC
its content you may see on diagnostic screen
but i'm not sure you can read it out from there
__________________
Soviet ICs are the largest ICs in the world!!! )))
Reply With Quote

  #3   Ban this user!
Old 02-27-2010, 09:00 PM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road

For the 16i #4120 is the last T number called, and #4111 is the last H number called.
The 31i should be the same.

Be aware that if you pre-call tools it picks up the pre call tool number rather than the tool in the spindle.

AKA
T14
M6
G43 H14 ... some code
T15
... more code
#1 = #4120 (will equal 15 even though 14 is in the spindle)
#2 = #4111 (will equal 14)

I use #4120 to automatically activate tool length comp in a M6 macro. When I call Dia. comp, I then use D#4111 If I need to change tool numbers for a program, I just have the T calls one at the M6 and one (pre-call) after the previous tool change. The offset is always for the right tool.
Reply With Quote

  #4   Ban this user!
Old 02-28-2010, 05:57 AM
LVX LVX is offline
 
Join Date: Feb 2010
Location: Netherlands
Posts: 8
LVX is on a distinguished road

thanx dpuch,

That was a good push in the right direction.

I checked the 31i manual for the parameter #4120, there it is explained to be the modal information on blocks that even been specified in the last minute for the T code. That sure sounds good, but a few lines down #4320 is explained to be modal information on blocks currently being executed for the T code. That sounds even better, correct?
Reply With Quote

  #5   Ban this user!
Old 02-28-2010, 09:18 AM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

Some places will take #4120 and write it to a common variable in the Tool Change Macro to use in the program. For example, in the ATC macro, there would be a line added that might say "#599=#4120". Then in your probe program, you can go and check #599 to confirm the tool in the spindle.
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 02-28-2010, 08:29 PM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road

Originally Posted by LVX View Post
#4320 is explained to be modal information on blocks currently being executed for the T code.
Some controls only have the one set #41xx while others have both. Either can usually be made to do what you want, you just have to write the macro code accordingly.

Test your program carefully, and pay attention to block look ahead. Try comparing results with single block on and running normal to make sure you always get the same result.
Reply With Quote

  #7   Ban this user!
Old 03-01-2010, 10:40 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Psyco’s example would be the easiest to check for or incorporate into the macro. #4120 is for the modal T value being used. It sounds like to me that you are looking for a system variable that tracks the current tool in the spindle. Guhl touched on this as it is sometimes tracked in the PMC parameters. However to have a system variable that tracks this is up to the MTB. For example on some of my 15 series fanucs it is #1033 for the current tool in the spindle. Check the MTB manual it should tell you if one is set up to track the tool in the spindle.

If not system variable is used then psyco’s idea should work. Put #599=#4120 in the tool change program probably right before the M99 is going to be the best place. Then in your probe program put the code to alarm or skip the tool.

IF[#599EQ16]GOTO1000


N1000#3000=1(WRONG TOOL)

Stevo
Reply With Quote

  #8   Ban this user!
Old 03-04-2010, 01:23 PM
LVX LVX is offline
 
Join Date: Feb 2010
Location: Netherlands
Posts: 8
LVX is on a distinguished road

thanx guys,

This is really helpful information.
I'm trying to finish my macro and hopefully start the test runs next week.
Reply With Quote

Reply

Tags
31i, macro, tool




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
can we read the current status of a parameter sinha_nsit Fanuc 12 12-07-2009 06:44 AM
Current tool # variable hydrospin01 Fanuc 6 07-15-2008 01:32 PM
Current Tool Status barbter NCPlot G-Code editor / backplotter 5 07-10-2008 09:09 PM
Active high vs. Active low aaronkeit Gecko Drives 0 08-22-2007 02:57 AM
Active High/Active Low Sanghera General Electronics Discussion 21 11-06-2004 08:47 PM




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