![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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. |
|
#3
| |||
| |||
| 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. |
|
#4
| |||
| |||
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. |
|
#5
| |||
| |||
| 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. |
| Sponsored Links |
|
#6
| |||
| |||
| 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. |
|
#7
| ||||
| ||||
| 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 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 |
|
#9
| |||
| |||
| 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. |
|
#10
| |||
| |||
| 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. |
| Sponsored Links |
|
#11
| |||
| |||
I gather from your example that if the OP takes out the M6 then he should have no problem either. |
|
#12
| |||
| |||
| 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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
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 |