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 06-09-2009, 10:51 AM
 
Join Date: Dec 2006
Location: Canada
Age: 47
Posts: 58
Capt Crunch is on a distinguished road
Family of Similiar Parts Macro

Good Day all

quick qestion for the macro geniuses here. I have Peter Smid's Fanuc custom macros text and it is very good. We have 4 little wheels that are very similiar, nothing sexy. The examples laid out in the text show only one tool being used. I will need 3 tools for the jobs, o/d turn, drill and p/off. Would there be 3 macros used to do this job? The drill would be a P8xxx as would the p/off tool, 8xxx ? I'm kinda thinking they would be, just not really sure. Any help would be a great help. Thanks in advance

Gerry
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 06-09-2009, 11:07 AM
ghyman's Avatar  
Join Date: Feb 2005
Location: USA
Posts: 214
ghyman is on a distinguished road

I'm not familiar with the text you mentioned, but I would do it as follows, changing the values as required for each part...


#500=1.25 (OD)
#501=.625 (PART LENGTH)

(TURN)
G0 X[#500+.1] Z1.0
G1 Z0
(FACE)
G1 X0
W.05
G0 X[#500]
(FINISH TURN)
G1 Z-[#501+.15] <-- the "+.15" allows for the cutoff tool width
U.1

Rapid home, tool change to drill
G0 X0 Z.1
G1 Z-[#501+.25] <-- "+.25" to allow for drill tip length
G0 Z.1

Rapid home, tool change to cutoff
G0 X[#500+.1] Z-[#501+.125] <-- "+.125" assumes 1/8" cutoff blade
G1 X0
G0 X[#500+.1]

Go home, prog stop
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 06-09-2009, 11:23 AM
 
Join Date: Dec 2006
Location: Canada
Age: 47
Posts: 58
Capt Crunch is on a distinguished road

Hi ghyman

here is what i got from the Peter Smid textbook


(PIN-001 TO PIN-004 SERIES - MAIN PROGRAM - MASTER)
(X0Z0 - CENTERLINE AND FRONT FINISHED FACE)
(BAR PROJECTION FROM CHUCK FACE = PART LG + 5 MM)
(-----------------------------------------------------------------------)
N1 #33 = 1 (PART SELECT: 1=001 2=002 3=003 4=004)
(-----------------------------------------------------------------------)
N2 #30 = #4006
N3 IF [#33 GT 4] GOTO991
N4 IF [#33 LT 1] GOTO992
N5 G21 T0100
N6 G96 S100 M03
N7 G00 X53.0 Z0 T0101 M08
N8 G01 X-1.8 F0.1
N9 G00 Z3.0
N10 G42 X51.0
N11 IF [#33 EQ 1] GOTO15 (#33 = 1 SELECTS PIN-001)
N12 IF [#33 EQ 2] GOTO17 (#33 = 2 SELECTS PIN-002)
N13 IF [#33 EQ 3] GOTO19 (#33 = 3 SELECTS PIN-003)
N14 IF [#33 EQ 4] GOTO21 (#33 = 4 SELECTS PIN-004)
N15 G65 P8021 A23.0 B44.0 C24.0 D46.0 R3.0 (PIN-001 MACRO ARGUMENTS)
N16 GOTO22
N17 G65 P8021 A25.0 B46.0 C28.0 D48.0 R2.0 (PIN-002 MACRO ARGUMENTS)
N18 GOTO22
N19 G65 P8021 A19.0 B45.0 C21.0 D47.0 R4.0 (PIN-003 MACRO ARGUMENTS)
N20 GOTO22
N21 G65 P8021 A16.0 B40.0 C25.0 D49.0 R3.0 (PIN-004 MACRO ARGUMENTS)
N22 G00 G40 X100.0 Z50.0 T0100 M09
N23 GOTO998
(-----------------------------------------------------------------------)
N991 #3000 = 991 (PART NUMBER TOO LARGE)
N992 #3000 = 992 (PART NUMBER TOO SMALL)
N998 G#30
N999 M01
...


O8021 (PIN-XXX MACRO PROGRAM)
(*** DO NOT CHANGE SEQUENCE NUMBERS ***)
N101 G71 U2.5 R1.0
N102 G71 P103 Q108 U1.5 W0.125 F0.3
N103 G00 X[#3-2*1-2*3]
N104 G01 X#3 Z-1.0 F0.1
N105 Z-#1 R#18 F0.15
N106 X#7 R-2.0
N107 Z-[#2+3.0]
N108 X54.0 F0.3
N109 G70 P103 Q108 S125
N110 M99
%


your suggestion makes sence too. thanks for your input. have a good day

Gerry
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 06-09-2009, 09:14 PM
 
Join Date: May 2007
Location: USA
Posts: 896
g-codeguy is on a distinguished road

First, I don't program in metric. Second I don't program the way you do. I asked about it when I first started, but was told not to as the programs have to run in a variety of lathes with as little modifying as possible. So I didn't bother to learn that method. Therefore I won't comment on the program itself with 2 exceptions. Third I have no idea what lathe and control you are using.

I do have a few general comments anyway. Who doesn't.

First: G21 should be the default on your lathe. Why do you have to program it? I don't see you switching between inch and metric in your program (and highly discourage doing that).

Second: The only Fanuc book I have at home is for the 16i/18i/160i/180i-TA. Quote. "When a value from 0 to 200 is assigned to variable #3000, the CNC stops with an alarm. After an expression, an alarm message not longer than 26 characters can be described." Your control may be different.

Third: Why not simplify X[#3-2*1-2*3] to X[#3-8]?

Fourth: Are you using macro routines for the drill and part off? The cut-off would be very simple to do. Do the drill sizes vary? I wrote my own macro sub for drilling. I input feedrate, drill diameter, SFM, final c-o position with the option to add a few more variables for using different methods of drilling within the macro sub. The control figures the RPM, final drill depth and the method to be used for drilling.

Guess that's about it for now. Aren't you glad.

EDIT: You could do it with 3 separate programs. Or with one. Depends on how involved you want to get with the macro program.
Tweet this Post!Share on Facebook
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
Searching for family crest DXF. art FVRacer5 CNCzone Club House 11 06-25-2010 02:47 PM
Need Help!- Associative part family sk96_me45 UG NX 5 02-20-2009 06:35 AM
Family crest files FVRacer5 Machine Created Art 6 01-05-2009 10:21 AM
New to the family and question about HAAS dark-dna Haas Mills 10 09-29-2007 05:10 PM
new member in the family praveen224 CNCzone Club House 2 09-27-2006 05:59 PM




All times are GMT -5. The time now is 08:42 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