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 12-29-2011, 09:28 PM
 
Join Date: Nov 2006
Location: USA Texas
Posts: 310
John_B is on a distinguished road
Toolsetting macro on 0m-C

Can anyone help me understand why my old machine (1990) with the 0m-C control is balking at the T code shown below?

:9010(SINGLE TOOLSETTING)
G00G30G91Z0
IF[#20EQ#0]GOTO3000
T#20 <<< THROWS ALARM 043 HERE<<<
M6
...
...

Or also in the one:

:9011(MULTI TOOLSETTING)
G00G30G91Z0
WHILE[#19LE#9]DO1
T#19<<< THROWS ALARM 043 HERE<<<
M6
IF[#19EQ#9]GOTO5
T[#19+1.](PRE-CALL NEXT TOOL UP IN T/C)
N5 ...
...

I am trying to use the Renishaw tool probing macros on this old dog, but it's not going well. I've found the alarm description in the manual, but can't find anything else to steer me straight.

Thanks,
John B
Reply With Quote

  #2   Ban this user!
Old 12-29-2011, 09:32 PM
fordav11's Avatar  
Join Date: Aug 2011
Location: Fordaville
Posts: 939
fordav11 is on a distinguished road

043 is illegal T-code command
check your macro variables page. what are #19 and #20 set to?
it needs to be set to a non-null, non-negative number within the range of your tool rack
Reply With Quote

  #3   Ban this user!
Old 12-30-2011, 02:06 AM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

Originally Posted by John_B View Post
Can anyone help me understand why my old machine (1990) with the 0m-C control is balking at the T code shown below?

:9010(SINGLE TOOLSETTING)
G00G30G91Z0
IF[#20EQ#0]GOTO3000
T#20 <<< THROWS ALARM 043 HERE<<<
M6
...
...

Or also in the one:

:9011(MULTI TOOLSETTING)
G00G30G91Z0
WHILE[#19LE#9]DO1
T#19<<< THROWS ALARM 043 HERE<<<
M6
IF[#19EQ#9]GOTO5
T[#19+1.](PRE-CALL NEXT TOOL UP IN T/C)
N5 ...
...

I am trying to use the Renishaw tool probing macros on this old dog, but it's not going well. I've found the alarm description in the manual, but can't find anything else to steer me straight.

Thanks,
John B
How are you calling the tool setting macro?

G65 P9010 T11

G65 P9011 S01 T06

or something like that?
Reply With Quote

  #4   Ban this user!
Old 12-30-2011, 09:05 AM
 
Join Date: Nov 2006
Location: USA Texas
Posts: 310
John_B is on a distinguished road

Originally Posted by dcoupar View Post
How are you calling the tool setting macro?
I call 9011 like this:

G65P9011S4E4

The S pulls over the starting tool #, and E the ending tool #.

And I call 9010 like this:

G65P9010T16D1.5

The T pulls in the only tool to be set, and the D is the diameter.

These exact macros works great on my machine with an 18im-B control. I'm sure it's something that the older 0m-C doesn't like about using the variable reference with the T code. I suppose I could use #4120 and set it at #19, then just call the M6 to load the tool.


:9011(MULTI TOOLSETTING)
G00G30G91Z0
WHILE[#19LE#9]DO1
#4120=#19
M6
IF[#19EQ#9]GOTO5
T[#19+1.](PRE-CALL NEXT TOOL UP IN T/C)
N5
...
...

Do you think that'll work? I can't tell if the #4120 system variable is the tool in the spindle, or the tool called up next by T code for toolchange...?

I can't test it just now as I'm in the middle of running some hot parts that have to ship today. I will be able to monkey with it some more after about 5:00 p.m.

Thanks for the feedback!

Rgds,
John B

Last edited by John_B; 12-30-2011 at 10:08 AM.
Reply With Quote

  #5   Ban this user!
Old 12-30-2011, 10:45 AM
fordav11's Avatar  
Join Date: Aug 2011
Location: Fordaville
Posts: 939
fordav11 is on a distinguished road

#4001 to #4120 are for reading modal information. the manual states they can be read but
does not specifically say they can be written. so #4120 = #19 won't work since its assumed
to be read only. #4120 is the T number of whatever tool was called last.... i.e. the T in
memory on your model page. try it anyway you never know it may work.
also try using a common variable that stays in memory. for example.....
#500=#19
T#500

also check this thread, post#29
http://www.cnczone.com/forums/fanuc/137761-fanuc_om_lost_tool_change.html

it uses Macro A but has a T#149 and it's an 0-series like yours.
#149 is a common variable but is cleared when the control is powered off.
from #500 upwards they are not cleared at power-off.

another possibility is maybe it needs T#19 M06 on the same line?

Last edited by fordav11; 12-30-2011 at 11:34 AM.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 12-31-2011, 03:49 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by John_B View Post
I call 9011 like this:

G65P9011S4E4

The S pulls over the starting tool #, and E the ending tool #.

And I call 9010 like this:

G65P9010T16D1.5

The T pulls in the only tool to be set, and the D is the diameter.

These exact macros works great on my machine with an 18im-B control. I'm sure it's something that the older 0m-C doesn't like about using the variable reference with the T code. I suppose I could use #4120 and set it at #19, then just call the M6 to load the tool.


:9011(MULTI TOOLSETTING)
G00G30G91Z0
WHILE[#19LE#9]DO1
#4120=#19
M6
IF[#19EQ#9]GOTO5
T[#19+1.](PRE-CALL NEXT TOOL UP IN T/C)
N5
...
...

Do you think that'll work? I can't tell if the #4120 system variable is the tool in the spindle, or the tool called up next by T code for toolchange...?

I can't test it just now as I'm in the middle of running some hot parts that have to ship today. I will be able to monkey with it some more after about 5:00 p.m.

Thanks for the feedback!

Rgds,
John B
John,
The system variable is not your problem. Typically the modal system variable for the Tool number is used so that the current spindle tool, if its the number being called, is not shifted out of the spindle, or to avoid an error being raised. However, this is somewhat dependent on the PMC program.

Its use would be something like the following, but would normally be in the Tool Change Macro if the machine uses one (also PMC program dependent)

IF[#4120EQ#19]GOTO100 (IF THE CALLED TOOL IS CURRENT, BYPASS TOOL CHANGE)
T#19
M6
N100
.....
.....

I would do as Ford suggested in an earlier post, and check the value of #19 and #20 after the Macro program has been called to see if thy're in the range of the Tool Magazine capacity. However, the use of arguments in your Macro Call to pass values to #19 and #20 should ensure that these variables are set, and therefore, the only way these variables may be out of legal range would be to pass incorrect values. Run the program in Single Block mode, though you will have to set a parameter (#0011.5) so that the program stops after each Macro Statements. If the values are legal, temporarily use a real number, one that is not the current spindle tool, instead of the variable, ie T1 instead of T#19, to see if you get the same error. If you still get the error, it may have something to do with how the Tool Change is executed as suggested by Ford.

Regards,

Bill

Last edited by angelw; 01-01-2012 at 08:58 AM.
Reply With Quote

  #7   Ban this user!
Old 01-02-2012, 02:03 PM
 
Join Date: Nov 2006
Location: USA Texas
Posts: 310
John_B is on a distinguished road

Got it, it was the T call and the M6 being on seperate lines for part of it (machine has an umbrella toolchanger).

Worse yet though was that the main setting macro was using the same variable # that the G65 macro was passing the tool number over with, and that was the REAL problem. It was causing all sorts of calculation problems. Once I listed all the variables being used and caught the conflict, all it required was renumbering.

Thanks for the help!

Rgds,
John B
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
Need Help!- Macro A or Macro B On fanuc o-md macrosat Fanuc 1 07-29-2009 06:49 AM
Testing program for Macro (Fanuc Macro B) NickDP Fanuc 2 03-27-2009 03:15 PM
new inexpensive automatic toolsetting device product henry_phd General Metal Working Machines 0 07-13-2008 11:34 PM
need help with toolsetting macro parksteel General CNC (Mill and Lathe) Control Software (NC) 3 06-06-2008 09:15 AM
Convert Fanuc Macro to Fadal Macro bfoster59 Fadal 1 11-08-2007 11:41 PM




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