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 02-27-2005, 01:59 PM
 
Join Date: Feb 2005
Location: USA
Posts: 48
CAMCRASH is on a distinguished road
M97 Internal Subprograms?????

When I was a tool maker I programed several Haas machines
They have a real nice feature on them
The M97 code for intenal sub programs
This code is just like the M98 on the standard funuc controls but you are able to program the subs at the end of the program instead of on a different page

Is it possible to add this code to a standard fanuc control
6M, 18M, 0M, & 10M

Many of the above controls do not have custom Macros enabled on them
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 03-11-2005, 06:10 PM
 
Join Date: Sep 2004
Location: Australia
Posts: 196
Darc is on a distinguished road

Hi CAMCRASH, sorry to get your hopes up by replying, I also would love this feature in a fanuc, the fact that you need a seperate program for a sub is quite painful when altering the sub, because your jumping backwards and forward between main program and sub program it would also make it easier when backing up the programs.
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 03-15-2005, 06:13 PM
 
Join Date: Jan 2005
Location: USA
Posts: 7
Alf012 is on a distinguished road

I use a Fanuc 0M and have used Fanuc 6M's in the past without any knowledge of an M97 command or anything similar. You can accomplish this task using the GOTO command as in:

:1
G54 M24
Goto 100
N101
Goto 200
N201
...
...
G91 G0 G30 Z0 M19
G90 X#500 Y#501 Z#502 M25
M30

N100 G54 M24
M1
...
Goto 101

N200 G54 M24
M1
...
Goto 201

I understand that this is more cryptic than you would like, but I don't believe there is an M97 solution.
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 03-15-2005, 06:32 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 976
psychomill is on a distinguished road

Several controllers out there have internal sub routines but I haven't seen Fanuc with one either. GOTO's are about the only way. Cumbersome though. I'd rather use subs. Also, depending on the control and version, this could actually increase your cycle, especially with really large programs, because the control is constantly searching for the 'N' block. Newer ones are barely noticeable if at all.
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 03-16-2005, 04:19 PM
 
Join Date: Feb 2005
Location: USA
Posts: 48
CAMCRASH is on a distinguished road

This is something of what I was lookig for but I do see some problems for repetative cycles like spot dill , drill , tap & also repetative mill cycles

Is ther any way for drilling to advane the end number of the so called sub
so the first tool would Call
N100 as a sub and then at then returns N101
then the Next tool calls N100 again but returns to N102 for forward program progression from the 2nd tool?

Also is there any way to call a loop for mill cycles?
right now it looks like I would need to call a N99 at the line prior to the GOTO 100 line then at the end of the sub call a N99 for repetative loops which looks like this would cause it to go into a infinte loop that never stops

Thanks for the help
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-16-2005, 07:01 PM
 
Join Date: Jan 2005
Location: USA
Posts: 7
Alf012 is on a distinguished road

CAMCRASH - I'm getting a little confused, but here goes:

:1
N1 G54 M24
M6 T1
G90 G0 X0. Y0.
G43 Z.1 H1 S3500 M13
#100 = 101
Goto 100
N101

N2 G54 M24
M6 T2
G90 G0 X0. Y0.
G43 Z.1 H2 S900 M13
#100 = 102
Goto 100
N102

M30

N100
G99 G81 X0. Y0. Z-.5 R.1 F12.
X... Y...
X... Y...
G80
Goto #100

And yes there is a loop call:

While [#101 LE 10] Do1
...
...
...
End1

But it sounds like you should set up a G65 simple call passing parameters. If you're not familiar with macro programming read the Fanuc Operators Manual and understand the difference between local, common & system variables. Also, find out what happens to your common variables when the machine is reset and/or powered down (can be conrolled with parameters).

Again, everything here is based on the Fanuc11M control. Well I'm not sure if I've helped or made things more confusing.
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 03-24-2005, 01:10 PM
 
Join Date: Apr 2004
Location: Memphis, TN USA
Posts: 18
dcook is on a distinguished road

G97 is HAAS specific. Some FANUCs will read an M99Pxxxx as an internal sub call but it is looking for a line number and must be before the M30/M2. As for leaving a sub and going back to a different spot in the main, yes you can with any FANUC. From the sub program the format is like this:

M99P100 where P100 is a line number in the main, be very careful with this. This is a one shot technique and will not build the instance of the return point like you desire. The only way to enter at the same point and leave at a different one is with the use of counters and macro programming.

I don't really follow you loop counting question but the number of loops is set in the sub call. Depending on the control, one of two formats will most likely be used:

1) M98 P1000 L10 would loop program 1000 10 times.
2) M98 P100010 would do the same.
The control will not accept both, one or the other should work.

There are numerous other ways to accomplish this with Macro programming.
__________________
Experience is what you get when you don't get what you want.
Tweet this Post!Share on Facebook
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
Lathe - internal facing tools? kong General Metal Working Machines 3 03-09-2009 02:26 PM
Internal Addressing Error BobL Bridgeport and Hardinge Mills 11 06-06-2005 06:11 PM
Internal addressing error BobL General CNC (Mill and Lathe) Control Software (NC) 1 05-26-2005 12:55 PM
Internal Gears??? itsme General Metalwork Discussion 11 02-11-2005 03:21 PM




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