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-30-2010, 07:14 AM
gene rhodes's Avatar  
Join Date: Nov 2008
Location: U.S.A.
Age: 42
Posts: 30
gene rhodes is on a distinguished road
Parametric Programming

Morning Gents,
I am currently trying to learn (on my own, I might add) how to use parametric programming on an Okuma lathe with an OSP 5020L control. This is turning out to be quite a task! I have read and am familiar with the general idea of it all but am hesitant on where to begin. My company recently purchased some info from universalclass.com in hopes of being able to further this approach but my impatience is getting the better of me. I don't think it will benefit me at all for someone to do this for me so just something to get me started in the right direction should be sufficient. Thanks.
Attached Files
File Type: xls CNCzone question-parametric programming.xls‎ (104.0 KB, 96 views)
Reply With Quote

  #2   Ban this user!
Old 06-30-2010, 01:14 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Ok I am not going to be a lot of help here because of the syntax that Okuma uses vs. what I am use to. The concept is the same except instead of using say #100 as a variable I belive Okuma uses something like VC100 or something.

This is the way I would set it up as 1 pass but using variables. Now a few questions to you are if “C” on your drawing changes does it change the radius or the length on diameter “A” change or “B” change or both? What is the angle at the top of diameter “B”. You will have to fill some of this information into the program below.

(main program)
#100=7.----------“A” DIAMETER
#101=6.5---------“B” DIAMETER
#102=1.----------“C” THICKNESS
G0G90X()Z1.------FILL IN X FOR THE START OF YOUR ANGLE
Z.1
G1Z0F.01
X#101Z-()--------FILL IN THE Z LEG OF THE ANGLE
Z-()--------------FILL IN THE LENGTH OF “B” DIAMETER
X()---------------FILL IN X FOR THE DIAMETER AT THE START OF THE RADIUS
G3X#100Z()R()----FILL IN Z FOR THE RADIUS AND R FOR THE RADIUS
G1Z-#102+.1

This will do 1 pass at the shape you provided. Now there are ways of looping this based on the amount of raw stock and pick size you want to use. This would require the proper syntax that Okuma requires. In the example above you would set up a few more variables asking what the extra stock is and the pick size and build a loop using a “IF[#103GE#104]GOTON100 or use a WHILE[#103GE#104]DO1. #103 and #104 being your extra stock and pick size. If this was inserted the code above would keep running until it reached the proper size.

I hope this helps.
Stevo
Reply With Quote

  #3   Ban this user!
Old 06-30-2010, 01:36 PM
gene rhodes's Avatar  
Join Date: Nov 2008
Location: U.S.A.
Age: 42
Posts: 30
gene rhodes is on a distinguished road
Question

This is the way I would set it up as 1 pass but using variables. Now a few questions to you are if “C” on your drawing changes does it change the radius or the length on diameter “A” change or “B” change or both? ans: no. the distance/radius for this purpose do not change. What is the angle at the top of diameter “B”. ans: it is a 118 degree radius with a 12 degree angle off the tangent. There is actually a .035" step (in X) at the beginning of the 118 radial move. This design never changes. The part is received by the operator as a disc so multiple passes will be used to achieve the correct dimension.
That is a great start. Although it still kinda hard for me to see. Sorry, I tend to be a little thick sometimes
Reply With Quote

  #4   Ban this user!
Old 06-30-2010, 02:25 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

That’s no problem. I hate to show you too much as the syntax does not apply fully with your machine but you may be able to use it down the road.

There are also good books out there on parametric programming and macroB programming. Here are a few that should be of good use to you.

http://www.mhprofessional.com/produc...sbn=0071713328
Google-Peter Schmidt
Google-Mike Lynch

Ok so lets do something simple like turn a straight diameter with a bevel on top. The diameter is 8” with a .06x45 deg bevel at the top. The part is 1” thick. For confusion purposes we are going to say that the angle is always 45deg but the Z-leg may change. I do want the angle to change because then I would have to use more calculations with tangents and stuff. This saves confusion.

In the example below after setting all the variables to your part specifications look at the first move line
G0X[#100-[#102*2]]. Plug in the values into the variables. To see the X movement like so G0X[8-[.06*2]] So the calculation is .06*2=.12-->G0X[8.[-.12]]-->G0X7.88. This is the start position of the bevel.

O0001(main program)
#100=8.(part diameter)
#101=1.(part thickness)
#102=.06(z-leg of bevel)
G0G90X[#100-[#102*2]]Z1.
Z.1
G1Z0
X#100Z-#102------remember #100=8 and #102=.06 so the move would be X8.Z-.06
Z-#101+.1-----#101=1. So the move is Z-1.1
G0U.1
G28U0W0
M30

Ok now below we are going to add a twist and make the program loop a bit to keep removing stock.

O0001(main program)
#100=8.(part diameter)
#101=1.(part thickness)
#102=.06(z-leg of bevel)
#103=.25(x-stock on od)
#104=.05(pick size)
#105=0(counter for loop)
N100
G0G90X[#100-[#102*2]]+[#103]Z1.
Z.1
G1Z0
X[#100+#103]Z-#102
Z-#101+.1
G0U.1
Z1.
#103=#103-#104
IF[#103GT0]GOTO100
G28U0W0
M30

Above your X position is going to be the same except it will be larger by .25” (#103). Now after it goes back up to 1” after the cut you see #103=#103-#104 this is saying .25=.25-.05 so now #103=.2 . now the IF statement is say “if #103(.2) is greater then 0 go to N100. Because it is still equal to .2 it will jump to N100 and run the profile again except only .2 larger then diameter instead of .25. It will continue to do so until #103 reaches 0 and at that point it will ignore going to N100 and read the next block G28U0W0.

There are other technacalitis to take into account like your first pass will cut air or that if you change your pick size to something that is not divisable into the x-stock you will undersize the diameter. I just wanted to keep it simple.

Hope this helps,
Stevo

Last edited by stevo1; 07-01-2010 at 11:40 AM. Reason: forgot books
Reply With Quote

  #5   Ban this user!
Old 07-07-2010, 10:59 PM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

It is Peter Smid.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 07-08-2010, 07:55 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Originally Posted by sinha_nsit View Post
It is Peter Smid.
Thank you for the correction. I snuck you in there first

I just got your book yesterday and have not had a chance to crack it open yet but I am looking forward to it. Thank you.

Stevo
Reply With Quote

  #7   Ban this user!
Old 07-08-2010, 10:37 PM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Since you know nearly everything about macro programming, you may not find any new thing in the book. Basically, the book is for a beginner who wants to learn on his own.
Reply With Quote

  #8   Ban this user!
Old 07-09-2010, 01:43 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Originally Posted by sinha_nsit View Post
Since you know nearly everything about macro programming, you may not find any new thing in the book. Basically, the book is for a beginner who wants to learn on his own.
Thanks Sinha,

Can I get you to tell my wife that except stop the sentence right after the “everything” ? I tell that to my 2 girls and they never listen, they just roll their eyes and go about their business .

I am still looking forward to reading it. You will be surprised what you can learn even at the basic level. When you have been doing it for so many years you get set in your ways and sometimes realize tricks you never knew.

Plus as sick as it sounds I would prefer to read this stuff even though I do it every day. We all know here that it takes a particular breed to enjoy this kind of stuff that most people look at us crazy.

Stevo
Reply With Quote

  #9   Ban this user!
Old 07-09-2010, 10:37 PM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

The same story everywhere!
My wife and my two kids consider me some sort of a fool. Now, after publishing this book, which is an international edition of McGraw-Hill, they have some confidence in me. What more could I have expected from this book!!!
Reply With Quote

  #10   Ban this user!
Old 07-23-2010, 11:52 PM
 
Join Date: Jun 2008
Location: USA
Posts: 66
gtrrpa is on a distinguished road
Just wondering

Did you figure out your problem or still waiting for help?
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 07-23-2010, 11:56 PM
 
Join Date: Jun 2008
Location: USA
Posts: 66
gtrrpa is on a distinguished road

did you figure this out or still waiting?
Reply With Quote

  #12   Ban this user!
Old 07-24-2010, 04:54 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Since he already has working programs for several of such pieces, he may simply replace the values for A, B and C with, say, #1, #2 and #3, respectively, in one such program, and, in the beginning of the program he would insert
#1=...;
#2=...;
#3=...;
If a calculation is required for some dimension (I have not analyzed the geometry), it can be done in terms of #1, #2 and #3, as needed.
This approach does not require a thorough knowledge of macro programming.
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
Parametric Programming gene rhodes General CNC (Mill and Lathe) Control Software (NC) 1 06-29-2010 06:34 PM
Parametric Programming Tuz Parametric Programing 7 02-09-2009 08:27 AM
Parametric programming. chrisryn Parametric Programing 32 01-26-2009 05:14 AM
Parametric Programming weaston General CAM Discussion 4 02-20-2007 07:25 AM
Parametric Programming widgitmaster BobCad-Cam 7 05-04-2006 01:04 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