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 > Parametric Programing


Parametric Programing (custom macro b, fadal macro, okuma user task)


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-31-2010, 06:51 AM
 
Join Date: Nov 2005
Location: usa
Posts: 227
camtd is on a distinguished road
How do the F and A variables work?

Can anyone explain how the following work together? Is there something that is programmed at the Fanuc control that is not in this program?

Thank You

N190 G66 P2353 F1.5 A2.9
N560 G65 P2356 F3.9 (DIA. OFFSET IN SUB PROG.)
N700 G65 P2358 F3.9 (DIA. OFFSET IN SUB PROG.)
N840 G65 P2360 F2.0 (DIA. OFFSET IN SUB PROG.)

O2353 (ROUGH)
N10 M10
N20 G0 X-3.768 Y0
N30 G1 Z0.48 F200.
N40 Z0.225 F#9
N50 Z0.48 F200.
N60 X-3.653 Y0
N70 Z0.225 F#9
N80 Z0.49 F200.
N90 X-3.538 Y0
N100 Z0.225 F#9
N110 Z0.54 F200.
N120 X-3.423 Y0
N130 Z0.225 F#9
N140 Z.63 F200.
N150 X-3.308 Y0
N160 Z0.225 F#9
N170 Z.77 F200.
N180 X-3.2275 Y0
N190 Z0.225 F#9
N200 X-3.66 Y0 F#1
N210 G0 Z4.
N220 M11
N230 M99

O2358 (Mill .255 slots)
N10 M10
N20 G0 X-11. Y0.
N30 Z3.
N40 G1 Z1.525 F100.
N50 X-10.5495 F#9
N60 Z2.0 F100.
N70 X-11. Y0.
N80 Z1.520
N90 G41 D4 X-10.912 Y-0.0103 F#9 (DIA. OFFSET)
N100 X-10.88 Y-.0103
N110 X-10.5495
N120 G3 X-10.5495 Y0.0103 I0. J0.0103
N130 G1 X-10.92
N140 G0 Z4.
N150 G40 X-11. Y0.
N160 M11
N170 M99


%
O2351
(PROG.REV.- 10/23/2010)

(**** G54 ****)
(**** Z = 0 SURFACE -A- ****)
(**** COVER ON TOP. ****)

N10 G0 G17 G28 G49 G80 G91 G94 G97 Z0
N20 M303
N30 G91 G40 G28 X0 Y0
N40 M69
N50 G28 B0
N60 M68
N70 M11
N80 G0 G90 G54 C0. (WORK OFFSET)
N90 M10
N100 M1

(T1 .5DIA. ENDMILL - ROUGH)
N110 T1
N120 M6
N130 M69
N140 G0 G90 G54 B0. (WORK OFFSET)
N150 M68
N160 M11
N170 G0 G90 X-3.25 Y0 C0. M3 S460
N180 G43 Z2. H1 M8
N190 G66 P2353 F1.5 A2.9
N200 M98 P2352
N210 G67
N220 G0 G28 G49 Z0. M9
N230 G0 G40 X-5. Y0 M5
N240 M00

(T2 END MILL 0.5 DIA /.035RAD. FINISH )
N250 T2
N260 M6
N270 M69
N280 G0 G90 G54 B0. (WORK OFFSET)
N290 M68
N300 M11
N310 G0 G90 X-4.1 Y0 C0. M3 S500
N320 G43 Z2. H2 M8
N330 G41 D2 X-4.05 Y-.01 (DIA. OFFSET)
N340 G65 P2354 F2.
N350 M98 P2352
N360 G67
N370 G0 Z2.
N380 G0 G40 X-4.1 Y0
N390 Z0.5
N400 G41 D2 X-4.05 Y-.01 (DIA. OFFSET)
N410 G65 P2355 F2.
N420 M98 P2352
N430 G67
N440 G0 G28 G49 Z0. M9
N450 G0 G40 X-5. Y0 M5
N460 M00
N470 M00

(**** G55 ****)
(**** Z = 0 CENTER OF PART****)

(******* CLAMP THRU HOLES & REMOVE COVER *******)

(T3 .3125 DIA End Mill R.055)
N480 T3
N490 M6
N500 M69
N510 G0 G90 G55 B90. (WORK OFFSET)
N520 M68
N530 M11
N540 G0 G90 X-4.1 Y0 C0. M3 S970
N550 G43 Z4. H3 M8
N560 G65 P2356 F3.9 (DIA. OFFSET IN SUB PROG.)
N570 M98 P2357
N580 G67
N590 G0 G28 G49 Z0. M9
N600 G0 G40 X-5. Y0 M5
N610 M00

(T4 .2344 DIA End Mill R.045)
N620 T4
N630 M6
N640 M69
N650 G0 G90 G55 B90. (WORK OFFSET)
N660 M68
N670 M11
N680 G0 G90 X-11. Y0 C0. M3 S1300
N690 G43 Z4. H4 M8
N700 G65 P2358 F3.9 (DIA. OFFSET IN SUB PROG.)
N710 M98 P2359
N720 G67
N730 G0 G28 G49 Z0. M9
N740 G0 G40 X-5. Y0 M5
N750 M00

(T5 .1406 DIA End Mill)
N760 T5
N770 M6
N780 M69
N790 G0 G90 G55 B90. (WORK OFFSET)
N800 M68
N810 M11
N820 G0 G90 X-11. Y0 C0. M3 S1700
N830 G43 Z4. H5 M8
N840 G65 P2360 F2.0 (DIA. OFFSET IN SUB PROG.)
N850 M98 P2357
N860 G67
N870 G0 G28 G49 Z0. M9
N880 G0 G40 X-5. Y0 M5
N890 M00

(T6 .0625 DIA End Mill)
N900 T6
N910 M6
N920 M69
N930 G0 G90 G55 B90. (WORK OFFSET)
N940 M68
N950 M11
N960 G0 G90 X-11. Y0 C0. M3 S1700
N970 G43 Z4. H6 M8
N980 G65 P2361 F4.2 (DIA. OFFSET IN SUB PROG.)
N990 M98 P2357
N1000 G67
N1010 G0 G28 G49 Z0. M9
N1020 G0 G40 X-5. Y0 M5
N1030 M00

(**** G56 ****)
(**** Z = 0 ON SURFACE BEING DRILLED****)

(T7 #4 CENTERDRILL )
N1040 T7
N1050 M6
N1060 M69
N1070 G0 G90 G56 B78. (WORK OFFSET)
N1080 M68
N1090 M11
N1100 G0 G90 X-6.9359 Y0 C0. M3 S1500
N1110 G43 Z1. H7 M8
N1120 G81 G98 Z-.2 R.1 F3.
N1130 M98 P2362
N1140 G80
N1150 G0 G28 G49 Z0. M9
N1160 G0 G40 X-5. Y0 M5
N1170 M00

(T8 .375 DIA. DRILL )
N1180 T8
N1190 M6
N1200 M69
N1210 G0 G90 G56 B78. (WORK OFFSET)
N1220 M68
N1230 M11
N1240 G0 G90 X-6.9359 Y0 C0. M3 S700
N1250 G43 Z1. H8 M8
N1260 G81 G98 Z-.55 R.1 F1.4
N1270 M98 P2362
N1280 G80
N1290 G0 G28 G49 Z0. M9
N1300 G0 G40 X-5. Y0 M5
N1310 M00

(T9 .375 DIA End Mill - SEMI .685)
N1320 T9
N1330 M6
N1340 M69
N1350 G0 G90 G56 B78. (WORK OFFSET)
N1360 M68
N1370 M11
N1380 G0 G90 X-6.9359 Y0 C0. M3 S700
N1390 G43 Z4. H9 M8
N1400 G65 P2363 F1.4
N1410 G0 C0.
N1420 M98 P2362
N1430 G67
N1440 G0 G28 G49 Z0. M9
N1450 G0 G40 X-5. Y0 M5
N1460 M00

(T10 .375 DIA End Mill - FINISH)
N1470 T10
N1480 M6
N1490 M69
N1500 G0 G90 G56 B78. (WORK OFFSET)
N1510 M68
N1520 M11
N1530 G0 G90 X-6.9359 Y0 C0. M3 S700
N1540 G43 Z4. H10 M8
N1550 G65 P2364 F1.4
N1560 G0 C0.
N1570 M98 P2362
N1580 G67
N1590 G0 G91 G28 G49 G80 Z0 M11
N1600 G91 G28 X0. X0.
N1610 G91 G28 C0.
N1620 M10
N1630 M69
N1640 G91 G28 B0
N1650 M68
N1660 G91 G30 X0 Y0
N1670 G30 Z0
N1680 M33
N1690 G0 G91 G28 Z0
N1700 G91 G28 X0. X0.
N1710 M30

( -REV.- - DATED - -CHANGES )
( - 10/23/2010 ORIGNIAL RELEASE )

O2352 (28 COUNTERBORES)
N10 C0.
N20 C12.8571
N30 C25.7143
N40 C38.5714
N50 C51.4286
N60 C64.2857
N70 C77.1429
N80 C90.
N90 C102.8571
N100 C115.7143
N110 C128.5714
N120 C141.4286
N130 C154.2857
N140 C167.1429
N150 C180.
N160 C192.8571
N170 C205.7143
N180 C218.5714
N190 C231.4286
N200 C244.2857
N210 C257.1429
N220 C270.
N230 C282.8571
N240 C295.7143
N250 C308.5714
N260 C321.4286
N270 C334.2857
N280 C347.1429
N290 M99

O2353 (ROUGH)
N10 M10
N20 G0 X-3.768 Y0
N30 G1 Z0.48 F200.
N40 Z0.225 F#9
N50 Z0.48 F200.
N60 X-3.653 Y0
N70 Z0.225 F#9
N80 Z0.49 F200.
N90 X-3.538 Y0
N100 Z0.225 F#9
N110 Z0.54 F200.
N120 X-3.423 Y0
N130 Z0.225 F#9
N140 Z.63 F200.
N150 X-3.308 Y0
N160 Z0.225 F#9
N170 Z.77 F200.
N180 X-3.2275 Y0
N190 Z0.225 F#9
N200 X-3.66 Y0 F#1
N210 G0 Z4.
N220 M11
N230 M99

O2354 (SEMI .010 STOCK)
N10 M10
N20 G1 Z0.2125 F100.
N30 X-4. Y-0.0225 F#9
N40 X-3.25
N50 G3 X-3.25 Y0.0225 I0 J0.0225
N60 G1 X-3.9
N70 G0 Z1.
N80 X-4.05 Y-.01
N90 M11
N100 M99

O2355 (FINISH)
N10 M10
N20 G1 Z0.2125 F100.
N30 X-4. Y-.0325 F#9
N40 X-3.25
N50 G3 X-3.25 Y0.0325 I0 J0.0325
N60 G1 X-3.9
N70 G0 Z1.
N80 X-4.05 Y-.01
N90 M11
N100 M99

O2356 (Mill .380 slots)
N10 M10
N20 G0 X-4.1 Y0.
N30 Z3.
N40 G1 Z2.512 F100.
N50 X-3.6 F#9
N60 Z3.0 F100.
N70 X-4.1 Y0.
N80 Z2.507
N90 G41 D3 X-4.025 Y-0.034 F#9 (DIA. OFFSET)
N100 X-4. Y-.034
N110 X-3.6
N120 G3 X-3.6 Y0.034 I0. J0.034
N130 G1 X-4.05
N140 G0 Z4.
N150 G40 X-4.1 Y0.
N160 M11
N170 M99

O2357 (8 - SLOTS)
N10 C0.
N20 C45.
N30 C90.
N40 C135.
N50 C180.
N60 C225.
N70 C270.
N80 C315.
N90 M99

O2358 (Mill .255 slots)
N10 M10
N20 G0 X-11. Y0.
N30 Z3.
N40 G1 Z1.525 F100.
N50 X-10.5495 F#9
N60 Z2.0 F100.
N70 X-11. Y0.
N80 Z1.520
N90 G41 D4 X-10.912 Y-0.0103 F#9 (DIA. OFFSET)
N100 X-10.88 Y-.0103
N110 X-10.5495
N120 G3 X-10.5495 Y0.0103 I0. J0.0103
N130 G1 X-10.92
N140 G0 Z4.
N150 G40 X-11. Y0.
N160 M11
N170 M99

O2359 (4 - .255 SLOTS)
N10 C0.
N20 C90.
N30 C180.
N40 C270.
N50 M99

O2360 (Mill .1625 SLOTS)
N10 M10
N20 G0 X-12. Y0.
N30 Z2.0
N40 G1 Z1.28 F100.
N50 X-11.687 F#9
N60 Z3.0 F100.
N70 X-12. Y0.
N80 Z1.28
N90 G41 D5 X-11.95 Y-.0109 F#9 (DIA. OFFSET)
N100 G1 X-11.92 Y-.0109
N110 X-11.6773
N120 Y.0109
N130 X-11.9
N140 G0 Z3.
N150 G40 X-12. Y0.
N160 M11
N170 M99

O2361 (Mill .1625 SLOTS)
N10 M10
N20 G0 X-12. Y-.14
N30 Z2.0
N40 G1 Z1.28 F100.
N50 G41 D6 X-11.9 Y-0.1188 (DIA. OFFSET)
N60 X-11.8358 Y-.1188 F#9
N70 X-11.7673 Y-.0502
N80 X-11.642
N90 G3 X-11.638 Y-0.0462 I0. J0.004
N100 G1 Y0.0462
N110 G3 X-11.642 Y0.0502 I-0.004 J0.
N120 G1 X-11.7673
N130 X-11.8358 Y.1188
N140 G0 Z3.
N150 G40 X-12. Y0.
N160 M11
N170 M99

O2362 (8 - HOLES)
N10 C45.
N20 C90.
N30 C135.
N40 C180.
N50 C225.
N60 C270.
N70 C315.
N80 M99

O2363 (Mill .685 HOLES)
N10 M10
N20 G0 G90 Z1.
N30 G1 Z.1 F100
N40 Z-.45 F#9
N50 G1 G91 X.08
N60 G3 X0. Y0. I-.08 J0.
N70 G1 X.07
N80 G3 X0. Y0. I-.15 J0.
N90 G1 X-.15
N100 G0 G90 Z1.
N110 M11
N120 M99

O2364 (Mill .705 HOLES)
N10 M10
N20 G0 G90 Z1.
N30 G1 Z.1 F100
N40 Z-.45 F#9
N50 G1 G91 X.16 Y0.
N60 G3 X0. Y0. I-.16 J0.
N70 G1 X.005
N80 G3 X0. Y0. I-.165 J0.
N90 G3 X0. Y0. I-.165 J0.
N100 G1 X-.165
N110 G0 G90 Z1.
N120 M11
N130 M99
%
Reply With Quote

  #2   Ban this user!
Old 10-31-2010, 11:31 AM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road

The F and A variables assign a value to variable #9 and # 1, respectively. F is the 9th letter in the alphabet, and A is the first. When you have a value passed through on the G65 line, it can be used for ANYTHING in the sub-programs, like X#9 or G#9. In your case F is used to pass a value for feedrate (F#9) and A is used to pass a value for another feedrate (F#1).
Reply With Quote

  #3   Ban this user!
Old 11-01-2010, 12:48 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

And when a macro calls another macro (which is called a nested macro), a new set of local variables (#1, #2 etc) are used for the nested macro.
Reply With Quote

  #4   Ban this user!
Old 11-01-2010, 09:46 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Originally Posted by camtd View Post
Can anyone explain how the following work together?
N190 G66 P2353 F1.5 A2.9
N560 G65 P2356 F3.9 (DIA. OFFSET IN SUB PROG.)
N700 G65 P2358 F3.9 (DIA. OFFSET IN SUB PROG.)
N840 G65 P2360 F2.0 (DIA. OFFSET IN SUB PROG.)

O2353 (ROUGH)
N10 M10
N20 G0 X-3.768 Y0
N30 G1 Z0.48 F200.
N40 Z0.225 F#9
N50 Z0.48 F200.
N60 X-3.653 Y0
N70 Z0.225 F#9
Beege and Sinha hit it on the head. The first line of your program N190 calls program 2353 and when it calls that program #9 is set to 1.5 (F1.5) and #1 is set to 2.9 (A2.9). Now in the program at line N40 your feedrate says F#9, well #9 is set to 1.5 so when the program reads this line it will read F#9 as F1.5

The main reason this is usefull is because if you wanted to change the feed from 1.5 to say 3.5 you only have to change the F1.5 in line N190 instead of having to change it at every feed call in the program.

Stevo
Reply With Quote

  #5   Ban this user!
Old 11-02-2010, 06:56 AM
 
Join Date: Nov 2005
Location: usa
Posts: 227
camtd is on a distinguished road
I think I get it.

So if in the main program I put B5.0 then when I go to my subprogram and put
F#2 that will give my feedrate 5.0

If that is correct? I think I get that part now.

Can anyone recommend a verifier to view and help create parametric code?

I have found this one but did not get a price yet
NCManager.download

Thank You helping past this sticking point.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-02-2010, 08:02 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Since I am a teacher, I always emphasize use of correct terms.
A "subprogram" is not same as a "macro."
A macro is called by G65 (plus some other methods), and data can be passed on for use inside it.
A subprogram is called by M98 (plus some other methods), and data cannot be passed on.
A macro has its own set of local variables.
A subprogram uses the variables of the calling program.

Naturally, I would deduct a few marks for this statement (even though what you have in your mind is absolutely correct):
"So if in the main program I put B5.0 then when I go to my subprogram and put
F#2 that will give my feedrate 5.0"

You have to accept me as I am. Some "stupid" teachers are like me only.
Reply With Quote

  #7   Ban this user!
Old 11-02-2010, 08:33 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Originally Posted by camtd View Post
So if in the main program I put B5.0 then when I go to my subprogram and put
F#2 that will give my feedrate 5.0
Bingo. Absolutely right!!

Originally Posted by sinha_nsit View Post
You have to accept me as I am.
Sinha….I accept you as you are . I actually learn quite a lot from you. I have always been more hands on along with picking things up quickly and retaining it. However I never retained the proper verbiage of things. So I usually sound like an idiot when talking about a topic to say a “teacher” but I always knew what I was talking about (if that makes any sense). Basically I could never tell you why we had to do something a particular way but I knew that we had to.

Stevo
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
Variables kz1000 Mach Wizards, Macros, & Addons 1 12-17-2009 05:04 PM
Need Help!- Short on Variables hydrospin01 Fanuc 2 02-14-2008 07:03 AM
Variables 500 to 531 viorel26 Fanuc 0 09-30-2007 02:30 AM
System variables jorgehrr G-Code Programing 8 02-18-2007 07:26 PM
Variables/Macro uses.... theemudracer Fanuc 12 12-13-2006 01:45 PM




All times are GMT -5. The time now is 01:03 AM.





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