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 > Mazak, Mitsubishi, Mazatrol


Mazak, Mitsubishi, Mazatrol Discuss Mazak, Mitsubishi and Mazatrol systems here!


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 08-19-2011, 06:00 PM
 
Join Date: Jun 2006
Location: usa
Posts: 236
kendo is on a distinguished road
macro variable for mazatrol tool length

I'm using the following code to assign the tool length of the tool currently in the spindle to variable #501:

#500=#51999(-----------------------------CURRENT TOOL #)
#501=#[60000+#500](----------------------CURRENT TOOL LENGTH)

anybody know why this code would not work as expected?

I check the macro variable page after executing the code with T12 in the spindle, but the value in #501 is the length of T15 from the mazatrol tool data page.
Reply With Quote

  #2   Ban this user!
Old 08-19-2011, 09:05 PM
 
Join Date: Jun 2006
Location: usa
Posts: 236
kendo is on a distinguished road

when I check variable #500, it has a value of 12, which it should have, which makes this even weirder.

And even if I change the line to:

#501=#[60000 + 12] or
#501=#60012

the value found in #501 is still the length of T15
weirder still...
Reply With Quote

  #3   Ban this user!
Old 08-20-2011, 02:28 PM
 
Join Date: Jun 2006
Location: usa
Posts: 236
kendo is on a distinguished road

I loaded my macro onto the adjacent machine and it ran perfectly
(they're both VCN mills w/ matrix control)

the 2nd machine is newer than the first, and I'm guessing there's some parameter issue at hand here, even though the older machine seems to do erratic things with this code.

when I proved out the macro on the newer machine today, I switched the tool position around as well as altered the length, and it worked right every time.

The only parameter I've found so far that I thought could affect this behavior is F92, and its set the same on both machines.
Reply With Quote

  #4   Ban this user!
Old 08-22-2011, 10:39 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

How many tool datas are you running for T12? Also, are you using any modifiers? (A, B, C, etc) Just fishing around here.....


Also, if you're checking the macro statement through MDI function, make sure you hit the RESET button after you execute the button and before you check the variable page..... Matrix doesn't update in MDI immediately from a viewing standpoint
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

  #5   Ban this user!
Old 08-23-2011, 02:40 PM
 
Join Date: Jun 2006
Location: usa
Posts: 236
kendo is on a distinguished road

how many tool datas?
please help me understand what you mean by that...

In the meantime, I did figure out how to get the correct tool length for the tool currently in the spindle. Apparently it has to do with the "tool data" you're referring to.

The correct code is as follows:

#500=#3020(----------------------CURRENT TOOL DATA LINE #)
#501=#[60000+#500](-------------CURRENT TOOL LENGTH)

where #3020 is the "sequence number of the tool data line for the tool currently in the spindle" (this is what the manual calls it)

It doesn't make any sense to me, but tool #1 might have a "data line" number of 22, and tool # 2 might have a "data line" number of 7. (tool #5 on the adjacent machine happened to have a matching data line #, as did several other tools)

I don't know the purpose of this so-called "data line #", or how to check what the value is for each tool, unless I call up each tool one at a time and assign #3020 to one of the common variables to check on the variable page.

Last edited by kendo; 08-23-2011 at 05:23 PM.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-23-2011, 07:49 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

Basically, you have the right idea.

"How many Tool Datas" is because of the sequence number... . I didn't think the VCN was tracking like this but I guess any machine using Tool Data would possibly run into this issue.

The sequence number is a number that Mazatrol assigns to track different tools. For the most part, it matches your "Tool number" but as you've found, it may not. This sequence number is generated somewhat randomly.

So, why does it create a sequence number? Because with Mazatrol tool data, you can describe the same tool dozens of ways. When doing this, you simply change the alpha-numeric number of the Tool. For example: I might call a 1/2 endmill tool number 5A and tool number 5C for some reason. Then, 5A and 5C might have different length offsets or even different diameter info for some reason. So in this situation, you can't use #51999 because that variable only sees a number 5. It can't distinguish between the letters A and C. However, #3020 can by reading "tool sequence number" or the number assigned in the background by Mazatrol.

There is a way to 'reset' your sequence numbers .... so to speak. You can copy the Tool Data text file and save it. Then dump all of your Tool data from the control and reload the text file. It should sequence everything as you have them numbered.

HOWEVER!!!!! If your machines are ran stand alone and may go through many different tools and changes in the magazine..... Don't bother doing this. Odds are, the sequence numbers will get flopped around again.

My advice is just keep using #3020.... it works for what you need. Just keep in mind though, if you write a macro that actually needs to reference the Tool number as the program reads or the position page shows.... then you'll need to use #51999 for that (because #3020 might not be what you expect anymore).


NOTE: I've actually complained about this before with the sequence numbers it chooses. I don't mind that it's doing this but the numbers should somewhere higher and not within a generally used tool number range. Better yet, if #3020 or #51999 could actually read it as a decimal range would be better (like it's done with tool calls in a g-code program).
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

  #7   Ban this user!
Old 08-23-2011, 09:13 PM
 
Join Date: Jun 2006
Location: usa
Posts: 236
kendo is on a distinguished road

Thanks a lot for the explanation, I appreciate your help and advice.

I never realized the same physical tool could be called 5A and 5B at the same time. I can think of a lot of ways this would be useful though. I'd like to know how to go about setting it that way. Is it as simple as assigning the same pocket # to the different tool datas?
Reply With Quote

  #8   Ban this user!
Old 08-23-2011, 11:32 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

Yes..... I guess. I say that because I didn't realize a VCN would be able to do this. Must be a Matrix thing. In the past, this was something done on Lathes. I only have Matrix controls on my Integrexes and eMachines. My mills are all Fusion which can only have one tool to one pocket.

Interestingly though, you have variable #3020 available so I guess you can do this?
So, assuming you're able to do this, it should be something like this:

On Matrix, go to the Tool Data and cursor to the tool you want to create new data for. Press EDIT then you should see a button for TOOL ADD. Press this and then you'll see a duplicated pocket created with no data. Simply enter in similar data like your original tool except add a letter to the description (where it says ID CODE). If I create alpha tools, I have all tools in that pocket carry a letter.... no blanks. It's possible to create a number of "blank" tools but then you're just confusing the machine. Actually, the machine won't be confused because it will simply use the first tool it sees on a data scan at tool change..... you sure will be confused though when it crashes.

Typical uses??? On my eMachines I may do this for things like saws/disc mills or maybe form tools that have bottom and top cutting forms.... especially custom grinds or indexables. Doing this, you can set a tool offset for the bottom cut side and another offset for the top cut side. Excellant tool control doing this for blends and such and you can take out any guess work for varying inserts widths or grind widths or even regrinds if you do that. This is no different than the old school method of multiple H values on the Offset page for similar situations.

If you're using Mazatrol, the tool description calls the tool so you should be reasonably safe here. With EIA programs, you need to pay a little more attention. Even with alpha tools, you can still call by the pocket (tool) number like normal. When you this, the control will simply default to the offset it first sees. This is not necessarily the letter A for example. You could have data that shows in this order: C, A, E. If these are letters for T20, when you call T20M6, the machine will load the offset for "C" because it's the first offset it finds on the Data page. This can be a surprise if you're expecting "A".

So, the format for the tool calls is simply this (using pocket 20):
T20.01 (for A)
T20.02 (for B), etc ,etc.

For tools called HEAVY, you add 60 to this like so:
T20.61 (for Heavy A)
T20.62 (for Heavy B), etc ,etc.

Simply call the "new tools" while you're in the machining area by using the M6 command (this updates the control for the new offset or obviously change tools if needed).
Now I always recall the work offset and G43 (if you use this) again so I'm not sure if the machine tracks this live. In Mazatrol programs, this should not be an issue.


Sorry for the lengthy post.... I'm not sure if your machine can do all this but I am curious.... let me know.
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

  #9   Ban this user!
Old 08-24-2011, 06:27 AM
 
Join Date: Jun 2006
Location: usa
Posts: 236
kendo is on a distinguished road

hey, Im glad for you're lengthy post, I'm trying to learn here...

What I learned this morning so far is it looks like I cant assign tools this way. When I press the edit button for the selected tool, theres no "Tool add" I can find anywhere.

Also, when I try to assign the same pocket # to two different tools, it tells me its illegal to do so.
Reply With Quote

  #10   Ban this user!
Old 08-24-2011, 11:13 AM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

OK..... it's just strange that your mill is using #3020 and assigning sequence numbers.

I would talk to someone in Mazak applications. There may be a parameter like an R bit or something that isn't set right for mills. If you can't add tools then there's no purpose for #3020 to be used... you should never have issues with #51999 for this arrangement.

Even with alpha/numeric tools, it shouldn't matter because the Tool Data scan will only find one tool number in the pocket regardless of the added letter.

I don't think anything "bad" will happen but it's worth the question..... especially since the way you program is being affected.
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

Sponsored Links
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
makino automatic tool length presetter macro PETE1968 General Metal Working Machines 0 12-08-2010 02:30 PM
Need Help!- Constant Power W/ Variable Wire Length Arbiter CNC Wire Foam Cutter Machines 10 11-25-2010 01:59 AM
Need Help!- Mazatrol Tool Def length Default value epelchat Mazak, Mitsubishi, Mazatrol 4 10-14-2010 12:17 PM
Macro Variable Lock James L Haas Mills 2 07-23-2009 08:29 AM
Macro variable for current tool diam ? Shizzlemah Fadal 3 10-30-2006 08:47 AM




All times are GMT -5. The time now is 02:51 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