![]() | |
| 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
| |||
| |||
OK I just started a new job after I have been programming for the past few years and there is a lot a debate going on right now on the proper use of starting a program, the end of a tool op and calling up a new tool. I have two example I believe they are doing the same exact thing however the other programmers say no. We are running these programs on HAAS VMC's. Hince the major changes are G90 and G91 So this is how I start a program minus the % and O0000 Code: G0 G17 G40 G49 G80 G90 T2 M6 G0 G54 X1. Y1. S3600 M3 G43 H2 Z.1 /M8 Code: G0 Z1. M9 G28 Z0 M1 Code: T3 M6 G0 G54 X2.7277 Y6.0404 S500 M3 G43 H3 Z0.1 /M8 Now this is how they think it should be done, however I believe it is the same thing just adding more code!!! Code: G0 G17 G40 G49 G80 G90 T2 M6 G0 G90 G54 X1. Y1. S3600 M3 G43 H2 Z.1 /M8 Code: G0 Z1. M9 G28 G91 Z0 M1 Code: T3 M6 G0 G54 G90 X2.7277 Y6.0404 S500 M3 G43 H3 Z0.1 /M8 |
|
#2
| ||||
| ||||
| Hi, Tazzer, I work in a shop with 7 different CNC mills and the one rule that holds true in programing is that the lead guy sets the standard. What you have are both valid on the HAAS, but to limit confusion in our shop we follow the style of our lead. This cuts down on confusion for us and lets us known what to look for in a program. Vin007 Machine it like you stole it! |
|
#4
| |||
| |||
| We use primarily Fanuc controls. The G91 G28 Z0 command is the norm. Read post #1 of this link for an explanation: Using Fanuc's G28
__________________ Diplomacy is the art of saying "Nice doggie" until you can find a rock. - Will Rogers |
|
#5
| ||||
| ||||
| Redundant code is safer than non-existent code. G90 on every line is not harmful, nor is G17 (unless you need something else). I don't program on HAAS, but won't "G28 Z0" rapid to fixture Z0 before going to the reference point, since you are still in G90? G28 G91 Z0 shouldn't move anywhere before going to the reference point. If you have machines with different controls, it makes sense to keep the rules as consistent as possible. |
| Sponsored Links |
|
#6
| |||
| |||
| 080327-2036 EST USA Tazzer: The extra G90 is not needed at the start. What about a D to go along with H? If I am not changing the tool I would go to an adequate Z clearance relative to G54, and then proceed. The tool change function knows where the tool change Z location is and it does not do any X Y move. No need for G28 G91 Z0. At program end I do something like M09 M05 G53 G0 Z0 (non-modal) (to tool change position to be vertically out of the way) G53 X-30. Y0 (move table to a desired unload position - do not care what G5x was used) M30 I have a whole different method for tool change that uses an external subroutine and tool diameters are controlled within the program. The subroutine is: O6901 G10 G90 L12 P#7 R#18 G80 M09 G90 M06 T#20 G#8 M08 S#19 M03 G43 H#20 D#7 M99 The tool change calling line is like this: G65 P6901 E54 R0.625 S5000 T02 D02 The 0.625 could be replaced by #500 for example and at the start of the program #500 = 0.625 or whatever for this tool. I can easily read the tool change calling line in comparison with all the garbage in the subroutine. How you would modify this approach would depend upon on how you want to structure a program. . |
|
#7
| |||
| |||
__________________ It is the poor craftsman that blames the tool |
|
#8
| |||
| |||
| On a Fanuc controlled machine it is a good practise to put the m6 in a macro progam like this and create a home postion on to M6--Calls--set up in the parameters--6071 i believe O9001 G00G90G40G80G49 G00G91G30Z0.0M19 G00G91G30X0.0Y0.0M9 G90 M6 M99 O0001 (MAIN IS LIKE THIS) M200---(Home Position macro) N1----M98 p101(sub first tool) N2----M98 P102(sub second tool) and so on --now you can move your tool operation around easy O101(First sub) T1M6 G00G54P1X0.0Y0.0G43Z0.0H1Z100.0M03 S1000 G00Z1.0T2M8 () () G200 M99 |
|
#9
| ||||
| ||||
| Tazzer, Everyone has some idea how this and that should be done... but the ultimate right way is the machine except the code and doesn't make any fun move/rapide crack move, part all come out good..... who care what is the code look like or should be like.
__________________ The best way to learn is trial error. |
|
#10
| |||
| |||
| Tazzer, Here's the way I program parts (Fanuc controllers). Just remember that there are numerous ways to program the same part. You will be more successful if you do everything the same every time. If you do everything the same every time, it will be easier to spot mistakes and easier for the operators to know what they're looking at. It sounds like you are in the postition to set the direction so be consistent and people will follow suit. This was the same position I was in when I started at my current company two years ago. I just made sure that I was consistent with every program and eventually everybody jumped on board with my way of doing things. I've been told that no programmer will like the way another programmer programs machines. N3 T14 M06 (*T14=<D0266C>=17/64 DRILL .266 CARB 8) (MIN LENGTH=STD.) G0 G40 G80 G90 M08 G54.1 P9 X.31 Y-.5 S1500 M03 G43 Z.5 H14 T15 G80 M09 G91 G28 Z.0 M01 Last edited by Jason812; 04-04-2008 at 09:58 AM. Reason: grammer |
| Sponsored Links |
|
#11
| ||||
| ||||
|
One thing as far as form goes is that too much programming and redundancy leads to "bottlenecking" in the controller. The more you push in the longer the controller takes to "read" it. In a high demand job shop, espc. high speed shops, every milli second counts. We use the least amount of programming inputs as possible, use the lead man's basic form and find ways to "prefetch", tools etc., when it permits. If it's Modal and you can leave it on then don't repeat it. At our shop the saying is "Better (quality) and Faster (time is money)" |
|
#12
| |||
| |||
| I don't believe in hard and fast rules. There will always be the exception. As far as redundancy goes, I try to avoid it. I like my programs to be as clean as possible. Unfortunately the occasional one is unavoidable given the quality of our operators. Have to do my best to protect the operators from themselves ya know. ![]() I like operations that get used on almost every job, such as barstop and cut-off, to be in subprograms. I've put these, and a few other subs, in the G or M-call 9000 series programs. Can't be accidentally deleted. Maybe one other guy in the shop, beside the programmers, know how to edit one. Plus it means less typing for me. ![]() If I programmmed mills, I believe I would be doing something along the line of how "lshingleton" programs. We are a small shop. Mills and lathes are done by different people. Lathe guy never works on a mill. And vice versa, tho I have given speed and feed recommendations on occasion to the mill foreman (who also does some programming). If you have several programmers, and they all work interchangeably on the lathes and/or mills, then I can see why it is necessary to set a format for all to follow. Even tho it may not affect any of you as programmers, I can pretty much guarantee that the people on the floor will be confused if you don't. Going back to Jason's quote. We have 2 lathe programmers. One programs using Mastercam only. Other doesn't. First one doesn't like to touch the second one's programs because he uses macros, variables, and subs in almost every program. This has led to the plant manager ruling that Mastercam will be used for all new programs, and that any repeat job not done in Mastercam be re-done in Mastercam also. Why? Consistency. |
![]() |
| 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 |
| Basic pocketing question | MachineManiac | Mastercam | 32 | 12-22-2007 03:23 PM |
| Very Basic Question | H2ODiver | General CAM Discussion | 4 | 07-27-2007 08:51 AM |
| visual basic question | keebler303 | Visual Basic | 5 | 09-05-2006 02:11 PM |
| Basic Machining Question | asperjack | General Metalwork Discussion | 1 | 05-25-2006 10:19 AM |
| REALLY basic Question | Dongle | Mechanical Calculations/Engineering Design | 25 | 03-14-2006 03:47 PM |