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 11-04-2009, 09:06 AM
 
Join Date: Feb 2008
Location: USA
Posts: 15
accramachine is on a distinguished road
help with sub-routine programing

Hi All,

I have a Supermax max5 VMC and I would like to run multiple cycles without the tool being taken out after each M02 or each M30. I assume I need to use a subroutine to do this but do not understand how to do this? I got this machine used and did not get a user manual with it, help please !

regards, John S. Wracher
Accra machine shop, Inc.
Reply With Quote

  #2   Ban this user!
Old 11-04-2009, 10:10 AM
samu's Avatar  
Join Date: Feb 2007
Location: quebec
Posts: 216
samu is on a distinguished road

what is your control? and what do you mean by "the tool being taken out after each M02 or each M30".

Do you want to keep spindle running between each cycle?
Reply With Quote

  #3   Ban this user!
Old 11-04-2009, 10:17 AM
 
Join Date: Aug 2007
Location: USA
Posts: 339
Boots is on a distinguished road

It depends a lot on your control as to the format for calling up and running a sub routine.
On a Fanuc control you would have your subprogram numbered like O2300, and your main program like O230.
In your main program when you want to run your sub routine you call up your sub by inserting an M98P02300, at the end of your sub you need the line M99 instead of the normal M02 or M30 so it knows to jump back into the main program where it left off. That's it in a nutshell. Very simple to impliment so long as you know the format required of your machining center.
__________________
We all live in Tents! Some live in content others live in discontent.
Reply With Quote

  #4   Ban this user!
Old 11-04-2009, 10:21 AM
 
Join Date: Feb 2009
Location: USA
Posts: 64
James L is on a distinguished road
Cycles

What kind of cycles are you running? Trying to get a visual of what you want to do. You don't necessarily have to end a program with an m2 or m30 unless you want it to rewind. You could even use a 'GOTO' line at the bottom of your cycle with a line number reference if your machine supports this feature. I might have something like this:

N5000 M0; (I'd want an opportunity to pause the cycle before restarting it so M0 is used)
......
......
cycle;
.....
GOTO 5000; (you might include a block delete feature here if you want to stop the cycles)

It's a little sloppy, but it would allow you to bypass an end program/rewind statement and you could stop it all by hitting 'Reset' or turning 'Block Delete' on.
Reply With Quote

  #5   Ban this user!
Old 11-04-2009, 04:01 PM
 
Join Date: Feb 2008
Location: USA
Posts: 15
accramachine is on a distinguished road

Thank you all for the quick responses, I can see I forgot to include some pertinant information so here goes. I am running a Fanuc control o-m control on a Supermax max5 VMC. What I meant by not takeing the tool out every time is let's say I have an air vise set on the table, I am going to drill 2 holes and then have the machine returne to a home position and stop while I put another piece in the vise and then hit the cycle start button again. The way this machine works it will not start another cycle with a tool in the spindle, so I am forced to remove the tool at the end of the program cycle. You can see what I wast of time and wear and tear on the machine if you were cycling many thousands of cycles. Thank you for your time, I will look for your reply.

regards, John S. Wracher
Accra Machine Shop, inc.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-04-2009, 05:03 PM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road

A simple way to do this is a M0 at the end of the program followed by GOTO 10 (beginning of the tool)

Be sure to check that you turn off coolant, and the spindle ect. as well as start/set everything back up correctly inside your loop.

On another note, the requirement to have the spindle empty to start seems a bit odd. Perhaps you can talk to the machine tool builder to find out how to change that. There is a pretty good chance the fix is small and relatively painless.
Reply With Quote

  #7   Ban this user!
Old 11-04-2009, 09:14 PM
Superman's Avatar  
Join Date: Dec 2008
Location: Krypton
Age: 51
Posts: 1,555
Superman is on a distinguished road
Buy me a Beer?

Best method is to have the progam operate as you would normally have it run
ie
1-> header
2-> select the tool
3-> body of the program
4-> return the tool

What you want is to continually cycle #3
Code:
...
N19 T2M6
/N20 M0
N21 S-- M3 
M8
....
N200 M9
N201 M5
N202 G91 G28 Z0
/N203 G0T0 N20
N204 T0 M6
N205 M30
%
Block skip ON = program runs thru to the end normally
Block skip OFF = prog. will load tool, stop on M0, run to GOTO command, jump back to M0 and stop. Turn the block skip ON when in the program body, it will then run thru to the end as normal.

If you have more than one tool in the program put the M0 and jump to spot before the first toolchange
Reply With Quote

  #8   Ban this user!
Old 11-04-2009, 09:28 PM
 
Join Date: Jun 2009
Location: U.S.A.
Posts: 21
Jawbreaker38 is on a distinguished road

Wouldn't it just be easier to replace the m30 or m02 with m99 and put an m00 on the line before it? Or have I missed something?
Reply With Quote

  #9   Ban this user!
Old 11-04-2009, 09:59 PM
 
Join Date: May 2007
Location: USA
Posts: 913
g-codeguy is on a distinguished road

Originally Posted by Jawbreaker38 View Post
Wouldn't it just be easier to replace the m30 or m02 with m99 and put an m00 on the line before it? Or have I missed something?

That's exactly how you could do it on a lathe. Of course a lathe wouldn't be causing his problem. An M02 or M30 would work fine. Never programming for a mill, I haven't a clue. My only question about using the M99 would be "How would the machine react when it sees the T2M6 block." I don't know, but wouldn't mind knowing.

Maybe some others could clarify the point for me. Not that I will ever get the opportunity to put that knowledge to work.
Reply With Quote

  #10  
Old 11-04-2009, 11:27 PM
Gold Member
 
Join Date: Oct 2005
Location: USA
Posts: 663
Caprirs is on a distinguished road

I have a mill part I run for a customer with an 11 second cycle time. Code is essentially:

G0 G40 G90
M0
T1
S3500 M8
G0 Xx Yy M3
G0 G43 H1 Z.025
....
M9
G0 Z5.
G28 Y0.
M99
M30

The first part requires pressing the Cycle Start button twice, but then each subsequent part only requires one Cycle Start. Spindle remains spinning while running through all the parts in the job. By eliminating the spindle start/stop, the cycle is much quicker.

This is on a VMC with a Mitsubishi M3 control.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-05-2009, 05:45 PM
 
Join Date: May 2007
Location: USA
Posts: 913
g-codeguy is on a distinguished road

Originally Posted by Caprirs View Post
I have a mill part I run for a customer with an 11 second cycle time. Code is essentially:

G0 G40 G90
M0
T1
S3500 M8
G0 Xx Yy M3
G0 G43 H1 Z.025
....
M9
G0 Z5.
G28 Y0.
M99
M30

The first part requires pressing the Cycle Start button twice, but then each subsequent part only requires one Cycle Start. Spindle remains spinning while running through all the parts in the job. By eliminating the spindle start/stop, the cycle is much quicker.

This is on a VMC with a Mitsubishi M3 control.


I gather from your example that if the OP takes out the M6 then he should have no problem either.
Reply With Quote

  #12   Ban this user!
Old 11-05-2009, 05:50 PM
 
Join Date: Feb 2008
Location: USA
Posts: 15
accramachine is on a distinguished road

Let me try to explain this better. The program cycle will not run if there is a tool in the spindle before it is started. So after the program ends the tool needs to be taken out befor the program will run again. Thank you all who have responded.

regards, John S. Wracher
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
Sub Routine ynnek TurboCAD/CAM 1 09-18-2009 07:01 AM
adding loop sub routine wronggrade Mastercam 3 04-21-2008 01:25 PM
ez track V6. pocket routine guy-b Bridgeport and Hardinge Mills 5 08-02-2006 07:09 PM
Activating HPCC in a sub-routine? Dawson Daewoo/Doosan 0 03-18-2006 02:04 PM
3D surface sub-routine lazza G-Code Programing 2 08-30-2005 08:58 AM




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