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 01-02-2012, 09:19 PM
 
Join Date: Aug 2009
Location: USA Michigan
Posts: 134
electric2u is on a distinguished road
G54 to G59 multiple jig set up, one gcode?

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
Reply With Quote

  #2   Ban this user!
Old 01-02-2012, 09:32 PM
fordav11's Avatar  
Join Date: Aug 2011
Location: Fordaville
Posts: 939
fordav11 is on a distinguished road

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
%
Reply With Quote

  #3   Ban this user!
Old 01-03-2012, 09:18 AM
 
Join Date: Aug 2009
Location: USA Michigan
Posts: 134
electric2u is on a distinguished road

so do i leave the M5 code and M30? do i put the

thank you for your help
Reply With Quote

  #4   Ban this user!
Old 01-03-2012, 09:38 AM
 
Join Date: May 2008
Location: US
Posts: 28
keystone76 is on a distinguished road

no need to have the M5 until you are ready to turn off the spindle and the M30 only goes at the end of the main program.
Reply With Quote

  #5   Ban this user!
Old 01-03-2012, 09:47 AM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

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.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-03-2012, 11:45 AM
fordav11's Avatar  
Join Date: Aug 2011
Location: Fordaville
Posts: 939
fordav11 is on a distinguished road

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
Reply With Quote

  #7   Ban this user!
Old 01-03-2012, 12:23 PM
 
Join Date: May 2008
Location: US
Posts: 28
keystone76 is on a distinguished road

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?
Reply With Quote

  #8   Ban this user!
Old 01-03-2012, 12:25 PM
 
Join Date: May 2008
Location: US
Posts: 28
keystone76 is on a distinguished road

That must seem weird. Sorry I posted a question in the wrong thread. But am I right, anyone know?
Reply With Quote

  #9   Ban this user!
Old 01-03-2012, 02:05 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by keystone76 View Post
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?
That must seem weird. Sorry I posted a question in the wrong thread. But am I right, anyone know?
It would have been better to have moved your question to another Thread, however, to answer your question:

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
Reply With Quote

  #10   Ban this user!
Old 01-03-2012, 03:41 PM
 
Join Date: May 2008
Location: US
Posts: 28
keystone76 is on a distinguished road

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
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 01-03-2012, 04:14 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by keystone76 View Post
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
Geoff,
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
Reply With Quote

  #12   Ban this user!
Old 01-03-2012, 06:07 PM
 
Join Date: Aug 2009
Location: USA Michigan
Posts: 134
electric2u is on a distinguished road

just so you know i have 4 differint parts at this time, but cutting 4 of the same part would be nice thinking about it.

kevin
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
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




All times are GMT -5. The time now is 08:03 PM.





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