![]() | |
| 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 I'm new to sub routines and Haas mills(VF2SS and VF0) and pretty weak on cnc mills in general, but have somehow become the "program guy" at my new job. I am making a program(at home,no access to mill right now) for a new job, we have 2 double vises(4 spots), the part has work on four sides. The boss want us to put in rough stock and pull out a finished part, so a different operation in each vise and pull out a completed part after each cycle start. The part will progress to completion as it is moved from one vise to the next. I am thinking doing one operation four parts at a time will be more efficient because there will be less tool changes (9 different tools, if my thinking is wrong feel free to let me know). I am making my programs for each tool complete so they can run by themselves as one long program to complete the part but I also want to use them subroutines to try one operation in four vises. So my question is, can I make the main program with no tool or location information and just rely on the subroutines for all of this info? for example: Main Program O0900 G54 M98 P1000 G55 M98 P1000 G56 M98 P1000 G57 M98 P1000 M30 In the manual it shows the main like this: Main Program Subroutine O2000 T1 M06 G00 G90 G54 X0 Y0 S1500 M03 G43 H01 Z.1 M08 M98 P3000 G55 M98 P3000 G56 M98 P3000 G57 M98 P3000 G58 M98 P3000 G59 M98 P3000 G00 Z1.0 M09 G28 G91 Y0 Z0 M30 Are the red sections needed if that info is already in the subroutines? Also is there a simpler way to repeat a program at 4 different offsets? say something like just adding code to the bottom of the program like : O0012 XXXg code XXXXblah blah XXXX program stuff XXX M05 XXXM09 Etc. MXX <<<<and now the unknown code to repeat G54 G55 G56 G57 or a macro type thing like #1=G54 #2=G55 #3=G56 #4=G57 If[ #1 IS #1]THEN GOTO 2 ...?? or what ever, like I said I am new to this so please try to keep it simple . |
|
#2
| |||
| |||
Put all the tool information in a subroutine; for tool #1 we number the subroutine N1000 and it starts with a tool call: N1000 T1 M06 N1002 G43 H01 N1003 M03 S8000 etc etc G49 G53 G00 Z0. (Parks the tool clear of the work before leaving the subroutine) M99 N2000 would be tool #2 These subroutines can also call nested subroutines which would be number N2100, N2200, etc if you need extra subroutines. If you want a tool to work on two operations you can also use different numbers like N1100. The main program only contains position information and it contains all the position information which would be different work zeroes for the different parts. For your job it sounds like you would do the four operations in the four vise locations so these would be G54, G55, G56 and G57. Let us pretend tool 1 needs to do something in all four operations and your main program will have these subroutine calls G54 M97 P1000 (First operation) G55 M97 P1100 (Second op.) G56 M97 P1200 (Third...) G57 M97 P1300 (Fourth...) If tool #2 only does something during the third operation it would be: G56 M97 P2000 Etc. This way you start out with a piece of stock in the G54 vise location and run the program. Then move that partially done part to the G55 location and put a new piece in G54 and run the program, etc, until you have a part finished in the G57 location. From now on a finished part comes out every cycle. Keeping track of what tools are doing what operation at what location means you do have to be organised and I find it is best to draw a flow chart or a diagram to keep track of subroutine numbers, especially when you are using more than one subroutine per tool.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#3
| |||
| |||
| Ok thanks for the help, what are your thoughts on doing 1 step on 4 parts rather than progressively finishing the part for example: One side needs 5 5/16x18 tapped holes so I was thinking of spotting, drilling and tapping this side in the 4 vises so there are only 3 tool changes for 4 parts rather than 3 tool changes for each part if I were to do this step in just the first vise. Another side gets 4 6x32s, 4 1/4x20s, 3 3/4 drilled holes and 3 milled pockets, that would be 7 different tool changes for this one side. The other sides get 3 and 4 tool changes. That is a total 17 tool changes per 1 completed part if I progressively finish the part through 4 vises doing the 4 different sides getting a complete part every time I open the doors. If I do one side at a time in the 4 vises I will be getting 4 parts completed with the 17 tool changes, correct? On 1000 parts that would be 17,000 vs. 4250 tool changes, I save 12,750 tool changes by doing the same step in 4 vises. That has to be a lot of time saved eliminating all those tool changes.....or have I confused myself? |
|
#4
| |||
| |||
| I don't think it makes much difference in total time whether you do all the operations separately on four parts or whether your do it like I described. In fact we use both approaches for different jobs. There is one advantage to doing it sequentially so that a finished part comes out every cycle and that is if you need parts quickly but want to do a large batch you start getting finished parts almost immediately. If you do things in parallel you have to complete the first three operations on all the parts before you get any finished parts.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#5
| |||
| |||
| i am having a problem with a new tm1p tool room mill, my boss doesnt want to buy software and i suck at manual g codes so we figured out that we can put parts into dxf format and load into the mdi editor. well that is fine and dandy but it only holds 10 sequences and i have to save each sequence to mdi seprately. when i do it puts a m99 at the end of every sub routine, i went in and tried to take the m99's out and when i did it gave me a g150 alarm but it didnt have any alarms when i tried it with the m99's in there. im still new at this and it is kicking my butt. CAN SOMEONE HELP ME? |
| Sponsored Links |
|
#6
| |||
| |||
| Post an example of your program before you take out all the M99s and I will have a look at it and might be able to suggest how to compile it into a working program. Also, buckle down and learn G-coding; I did after 40 years as a manual machinist so you figure out what age I must have been.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
![]() |
| 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 |
| I noticed a Free DNC program download on the main page for CNCzone called CNCnet DNC | Rocko1 | Haas Mills | 4 | 03-22-2012 11:56 PM |
| Newbie- can some one show me what a facing program looks like for a Hass Lathe. | bobrob | General CNC (Mill and Lathe) Control Software (NC) | 13 | 03-16-2009 11:03 AM |
| Storing Sub-program within main on 21iT? | Jdavis733 | Fanuc | 10 | 02-12-2008 11:56 AM |
| Hass VF6 how do you stop in middle of program | SpringKing | Haas Mills | 5 | 05-14-2007 10:07 AM |
| Anyone got any basic examples of a program using a subroutine/program? | Darc | CamSoft Products | 11 | 10-08-2005 11:45 PM |