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 03-22-2011, 06:27 PM
 
Join Date: Jun 2009
Location: United States
Posts: 17
CHampshire is on a distinguished road
M25 on Fanuc OM Control

Hello everyone. I have an issue on my Bridgeport Mill. In order to pop the tool out of the spindle, you must send the machine to the home position. I accomplish this via M25. Normally this is ok, unless tool length has been called up. If tool length is active the machine tries to rapid down into the vice.

I have machine zero set on the vice ways so that all my tool lengths and w.s. are positive numbers. I assume that when the macro is called to return to my reference point it tries to return to my part zero. Here is the macro called up when I enter M25

O9002;
G91 G28 Z0.0.;
M25;
G90;
M30;
%

Seems like its a pretty simple macro and I tried entering a G49 in before the return to reference point line. Still it wants to rapid back to z zero.

Any ideas on how to keep this from happening. Thanks in advance.
Reply With Quote

  #2  
Old 03-22-2011, 06:35 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,538
Al_The_Man is on a distinguished road
Buy me a Beer?

AFIAK, G28 should send the axis to the Machine zero point.
This should ignore any part zero, as long as your machine zero is in the right place for tool change?
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

  #3   Ban this user!
Old 03-22-2011, 07:13 PM
 
Join Date: Jun 2009
Location: United States
Posts: 17
CHampshire is on a distinguished road

Glad to know that I'm not the only one puzzled by this. I was hoping that this wasn't a dumb question.
Reply With Quote

  #4   Ban this user!
Old 03-22-2011, 07:20 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by CHampshire View Post
Hello everyone. I have an issue on my Bridgeport Mill. In order to pop the tool out of the spindle, you must send the machine to the home position. I accomplish this via M25. Normally this is ok, unless tool length has been called up. If tool length is active the machine tries to rapid down into the vice.

I have machine zero set on the vice ways so that all my tool lengths and w.s. are positive numbers. I assume that when the macro is called to return to my reference point it tries to return to my part zero. Here is the macro called up when I enter M25

O9002;
G91 G28 Z0.0.;
M25;
G90;
M30;
%

Seems like its a pretty simple macro and I tried entering a G49 in before the return to reference point line. Still it wants to rapid back to z zero.

Any ideas on how to keep this from happening. Thanks in advance.
If O9002 is your Macro program, and its called using M25, you're calling it again within the Macro, and the Macro program is being terminated with M30 rather than returning to the program from where the Macro program was originally called.

Unless there is another program that is called by M25, you will achieve the same result by just programming G91 G28 Z0.0 in your main program and not call the Macro program.

If you can find another program that is called by M25, post it so that every one can take a look. Look at parameter numbers 0240 to 0242, corresponding to program numbers O9001 to O9003 respectively, and see which one holds the setting "25"

Regards,

Bill

Last edited by angelw; 03-23-2011 at 07:49 AM.
Reply With Quote

  #5   Ban this user!
Old 03-22-2011, 07:54 PM
 
Join Date: Feb 2009
Location: usa
Posts: 2,914
underthetire is on a distinguished road

I agree with the double m25. I've seen this morenthan once if the g91 is not called before the g28, but your macro has it in it. How about being safe and just cancel tool length offset in the beginning of the macro?
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-22-2011, 08:17 PM
 
Join Date: Jun 2009
Location: United States
Posts: 17
CHampshire is on a distinguished road

Originally Posted by underthetire View Post
I agree with the double m25. I've seen this morenthan once if the g91 is not called before the g28, but your macro has it in it. How about being safe and just cancel tool length offset in the beginning of the macro?
Thanks for the reply.

I tried editing it like this earlier today and it did the same thing. Here's what I did:

O9002;
G49; (tool length cancel)
G91 G28 Z0.0.;
M25;
G90;
M30;
%

I put it here so it would cancel tool length first before any Z moves.

Perhaps I am missing something with the G49?

Also I should be a little more specific. I only use the M25 In the MDI page. It's not posted out in any programs. Tool length is the only thing that I can come up with that screws with it.
Reply With Quote

  #7   Ban this user!
Old 03-22-2011, 08:25 PM
 
Join Date: Feb 2009
Location: usa
Posts: 2,914
underthetire is on a distinguished road

Think I see the problem, not positive though. All our return macros and programs must have a g0. Should be
G0g91g28z0. I'll bet you still have a g1 active.
Reply With Quote

  #8   Ban this user!
Old 03-22-2011, 08:28 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by CHampshire View Post
Thanks for the reply.

I tried editing it like this earlier today and it did the same thing. Here's what I did:

O9002;
G49; (tool length cancel)
G91 G28 Z0.0.;
M25;
G90;
M30;
%

I put it here so it would cancel tool length first before any Z moves.

Perhaps I am missing something with the G49?

Also I should be a little more specific. I only use the M25 In the MDI page. It's not posted out in any programs. Tool length is the only thing that I can come up with that screws with it.
So what does M25 do? From your OP it seemed like it was used to call a Macro program.

As Al stated, if the Z Zero Return position is correct for your tool change, all you need to do is program G91 G28 Z0.0; the tool offset and part Zero will be irrelevant. The Tool Offset for the next tool will be applied when you call it's offset.

Regards,

Bill
Reply With Quote

  #9   Ban this user!
Old 03-22-2011, 08:37 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by underthetire View Post
Think I see the problem, not positive though. All our return macros and programs must have a g0. Should be
G0g91g28z0. I'll bet you still have a g1 active.
G28 is a non modal, two shot command, Reference Return through an intermediate point, and requires no priming with G0. It moves at rapid traverse speed.

Regards,

Bill
Reply With Quote

  #10   Ban this user!
Old 03-23-2011, 12:22 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Try to find out whether M25 calls a sub/macro, or it is MTB-defined code.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 03-23-2011, 06:22 AM
 
Join Date: Jun 2009
Location: United States
Posts: 17
CHampshire is on a distinguished road

When I use M25 In MDI it calls up program 9002. That's why I posted that program. Here is 9001 which is what it uses to do an actual tool change.

%
:9001
N1G80G91G30Z0.0M65
N2IF[#1012EQ1]GOTO6
N3M66
N4G91G28Z0.0M67
N5G91G30Z0.0M68
N6G90M99
%

Bill, Parameter #241 has a value of 25 in it.
Reply With Quote

  #12   Ban this user!
Old 03-23-2011, 08:45 AM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by CHampshire View Post
When I use M25 In MDI it calls up program 9002. That's why I posted that program. Here is 9001 which is what it uses to do an actual tool change.

%
:9001
N1G80G91G30Z0.0M65
N2IF[#1012EQ1]GOTO6
N3M66
N4G91G28Z0.0M67
N5G91G30Z0.0M68
N6G90M99
%

Bill, Parameter #241 has a value of 25 in it.
The 25 set in #0241 means that O9002 is call by M25, accordingly you're correct with the first program you posted. However, when an M code that is defined in the parameters #0240 to #0242 is specified in a subprogram that is called by an M or T code, the defined M code is treated as an ordinary M code. Accordingly, M25 must have a function defined by the machine builder. Is there an M code list in any of your manuals that defines the function of M25? It would be helpful to know what M25 does when treated as an ordinary M code.

Is there a number in parameter #0240, perhaps the number 6?

There is nothing in either of the 2 programs that you've posted that would normally cause the Z axis to behave as you've described when a tool length offset is active. The only thing I'm not familiar with in O9002 is the function of M25.

The way you're using G49 is correct, and should cancel the active offset. H0 can also be used to cancel an offset.

Regards,

Bill
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
Fanuc 21i MB control partsmkr Surfcam 0 12-13-2010 07:13 PM
Need Help!- Velocity Control Drives and Fanuc 2000C control redialtone Fanuc 3 06-21-2010 09:26 PM
Fanuc O-T control Antonio Arguijo Fanuc 7 06-20-2010 04:46 PM
Fanuc T6 Control adamant G-Code Programing 5 12-19-2007 11:09 AM
INT 412 with Fanuc control Jurek Bridgeport and Hardinge Mills 0 12-16-2007 04:34 PM




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