![]() | |
| 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
| |||
| |||
i would like to know how to set up multiple jig on my table and run them from one gcode using the g45 to g59. can i see an examlpe of one please. this is the beginning and end of one of mine g codes. i'll be setting 4 jigs on the table. thank you G90 G20 G49 G0Z0.5308 M3 S1500 G0 X18.2972 Y-0.4192 Z0.1600 G1 Z0.0000 F20 G1 X18.2972 Y18.2728 F100 X18.0500 X18.0500 Y-0.4192 X18.2972 Y-0.4192 Y18.2728 X-0.4924 G0 Z0.1600 G0 X0.0000 Y0.0000 Z0.5308 G0Z0.5308 G0X0.0000Y0.0000 M5 M30 |
|
#2
| ||||
| ||||
| make 4 separate programs for your 4 parts/jigs call them with M98 i.e....... % O0001 (MAIN PROGRAM) M98 P0010 M98 P0020 M98 P0030 M98 P0040 G54 (SET WORKSHIFT BACK TO G54 FOR SAFETY OTHERWISE AT YOUR JOB END THE MACHINE WILL REMAIN IN G57) M30 % % O0010 G54 (YOUR 1ST PART PROGRAM HERE) M99 % % O0020 G55 (YOUR 2ND PART PROGRAM HERE) M99 % % O0030 G56 (YOUR 3RD PART PROGRAM HERE) M99 % % O0040 G57 (YOUR 4TH PART PROGRAM HERE) M99 % |
|
#5
| |||
| |||
| You do not need four part programs if you are only using one tool. The main program selects the work zero then calls the part program: % O0001 (MAIN PROGRAM) G54 M98 P0010 G55 M98 P0010 G56 M98 P0010 G57 M98 P0010 G54 M30 % % O0010 (PART PROGRAM) etc M3 S1500 G0 X18.2972 Y-0.4192 G0Z0.5308 Z0.1600 etc G53 G00 Z0. M99 % You will notice I added G53 G00 Z0. to the part program. This is so the tool is lifted clear before moving to the next part. Also I changed the order in which the tool approaches the part; it moves first to the X and Y position then down to the Z. This means it is less likely to hit clamps, etc, sticking up higher than the part. If you are using two tools the main program becomes; O0001 (MAIN PROGRAM) G54 M98 P0010 M98 P0020 G55 M98 P0010 M98 P0020 G56 M98 P0010 M98 P0020 G57 M98 P0010 M98 P0020 G54 M30 And you have a Part Program, O0020, for the second tool.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
| Sponsored Links |
|
#6
| ||||
| ||||
| well yeah he didn't say if he was running 4 identical parts or 4 different parts. my example was over-simplified to show just the program calls. Obviously if its the same part x4 then just use one sub program and change the workshift in the main program before calling the same sub again. I assumed he knows to add clears to avoid hitting clamps etc |
|
#7
| |||
| |||
| As for clearances, is that when I would use a G98 or G99? For example, H06 Z[#101+.020] M08 (Rapid to .020" above material, coolant on) G81 G98 X#108 Y#214 Z.8737 R0+1.375 F#121 (Drilling .406 hole at 1/2-14 NPSF ports) In this drilling operation, will the spindle return to the Z value in the line prior to the drill call (or the Z value when the drill cycle is called) in between hole? And if I am thinking right the R0+1.375 would be where the tool would rapid down to when starting each hole. Please correct me if I am wrong. I am also curious about the 0+ attached to the R variable. Is this correct for Fanuc programming or is that a style that is only used in the Fadal format of my controller? |
|
#9
| ||||
| ||||
1. In your example, the tool would return to the Initial Level (the Z level prior to calling the G81 cycle) equating to Z[#101+.020]. Had G99 been used in the G81 cycle, the tool would have returned to the Z level set up by the R address before moving to the next X,Y coordinate. Using G98 can be used to return to a Z level that will clear a feature or clamp that may be encountered between hole XY coordinates. 2. R is the Retract Plane and is the Z level to where the tool rapids prior to commencing to feed to the Z depth specified in the G81 cycle. Depending on the Fanuc control model, the R value can be either an incremental value from the Initial Level, or an absolute Z value. 3. R is not a Macro variable in the Fanuc system. Accordingly, R0+1.375 is incorrect. A variable can be used in conjunction with the R address, for example: R#1+1.375 4. You should have either G43 or G44 in association with the H address to apply the Tool Length offset, for example: G43 H06 Z[#101+.020] M08 0.020" above the material is close to initially rapid to, and makes having an R plane somewhat irrelevant. OK if you want to scare the operator. Regards, Bill |
|
#10
| |||
| |||
| Bill, Thanks for taking the time to answer my question even though it was not related to the original question. I have been following two threads and was confused on where I was. I have been reading Fanuc Custom Macros by Peter Smid and am really interested in programming manually and using macros to simplify my world. But I have only been machining for about four years and have mostly relied on MasterCAM to generate my code which is posting to my Fadal in their Fadal format. Therefore I am not familiar with all the G codes in Fanuc style programming. In the Fadal format I have never had to use a G43. And when I look at the G codes for Fanuc I see there is a G43 (tool length offset - positive) and G44 (tool length offset - negative), which leads to confusion. Does G43 H? call the tool length offset in the tool table and is so why would anyone use a negative offset? You also confuse me when you say that R is not a macro variable when in fact it is used in so many canned cycles and as I read it can also be used as a local variable within a macro. Could you give me an example line of a deep hole drilling cycle as it should be written in Fanuc style? Thanks Geoff |
| Sponsored Links |
|
#11
| |||
| |||
Start up a new thread so you don't steal this one from the OP Does G43 H? call the tool length offset in the tool table and is so why would anyone use a negative offset? Yes. The number associated with the H address is the tool length offset number corresponding to the offset registered under that number in the Tool Offset Table. Generally, G43 will be used to apply the tool length offset, but they can be interchanged depending on the sign of the registered offset. Typically, if the length of the tool from tool tip to Gauge Line, a line corresponding to the face of the spindle nose, is entered as a positive value in the Tool Table, then G43 will be used to apply the offset specified by the H address. You also confuse me when you say that R is not a macro variable when in fact it is used in so many canned cycles and as I read it can also be used as a local variable within a macro. Could you give me an example line of a deep hole drilling cycle as it should be written in Fanuc style? X,Y and Z are also used in canned cycles, but that does not make them Macro variables. The R used as an NC address is just that, an address. With the exclusion of L, N, O, and P, there are local variables associated with all alpha characters. These alpha characters can be use to pass a value to a variable used in a Macro Program, by using them as an Argument in a Macro Call statement. For example: Local variable #1 is associated with the address "A". Accordingly, in the following example, #1 in the called Macro program (O1000) will be passed the value of 100.0 specified by the "A" argument in the Macro Call statement. G65 A100. P1000 G65 R5. P2000 In the last example, local variable #18 is associated with the address "R". Accordingly, #18 in the called Macro program (O2000) will be passed the value of 5. Regards, Bill |
![]() |
| 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 |
| Rhinocam and multiple spindles and or multiple tables? | brett gallmeyer | Rhinocam | 0 | 02-23-2011 01:30 PM |
| Newbie- Multiple set-ups | RP Designs | General Metalwork Discussion | 3 | 05-06-2009 06:18 PM |
| Multiple Set-ups? | Smitty092000 | Mastercam | 1 | 01-17-2009 09:21 AM |
| I have a problem with my gcode or my conversion to gcode , everything is tiny? | NickLatech | G-Code Programing | 0 | 03-10-2005 12:46 PM |
| gcode to gcode converter | july_favre | General CAM Discussion | 4 | 05-24-2004 06:51 PM |