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 03-08-2011, 02:05 PM
 
Join Date: Apr 2008
Location: USA
Posts: 20
soonervols is on a distinguished road
G2\G3 help

After much searching and unable to find what I am looking for. I leave it in somebody elses hands.

First off I am running a HAAS HL-2 and Victor TNS-3 w/Fanuc 10T lathes. My main point is finding a very simple way of calculating I & K. I have found nothing that is clicking in my head to better understand.

Second, I have a part with two radius running into each other. A outside radius of 9/16" going into an inside 1/2" radius. I have it programmed using "R" but it leaves a step where the two radius meet. My thinking is using I & K will blend them together more smoothly. Is this a correct thinking?

The part is made from 2" round, length of part is 1.0935, Z will move a total of .7815. I am just looking for the final pass my tool will make. Using DMNG432 insert.

Thanks in advance for any and all help.
Reply With Quote

  #2   Ban this user!
Old 03-08-2011, 03:17 PM
 
Join Date: Mar 2006
Location: US
Posts: 97
sld4121 is on a distinguished road

Using I and K for G2 and G3 moves will always be more accurate and in some cases there is a potential of two different tool paths. Since I never like the machine to choose for me, I never use R values. Now the question becomes how good is your Trig?
In any case, it appears to be a simple request, so send me a copy of your print and I will punch a couple of numbers for you.
However, bear in mind that you are dealing with old machines, so you may find that you have more of a mecahnical issue than a programming issue.
Reply With Quote

  #3   Ban this user!
Old 03-08-2011, 04:13 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by soonervols View Post
After much searching and unable to find what I am looking for. I leave it in somebody elses hands.

First off I am running a HAAS HL-2 and Victor TNS-3 w/Fanuc 10T lathes. My main point is finding a very simple way of calculating I & K. I have found nothing that is clicking in my head to better understand.

Second, I have a part with two radius running into each other. A outside radius of 9/16" going into an inside 1/2" radius. I have it programmed using "R" but it leaves a step where the two radius meet. My thinking is using I & K will blend them together more smoothly. Is this a correct thinking?

The part is made from 2" round, length of part is 1.0935, Z will move a total of .7815. I am just looking for the final pass my tool will make. Using DMNG432 insert.

Thanks in advance for any and all help.
In all cases, there will be some known features that can be gained from the part drawing or the previous tool location. Whether the arc involved is tangent to, or intersecting another line or circle, the I & K values can always be determined by using trig functions or Pythagorean Theorem.

Make a sketch of the arc detail and whatever element its tangent to or intersecting with, and draw in the Tool Nose Radius in its correct location relative to the two elements. Construct a triangle with the hypotenuse being equal to the arc plus the TNR and fill in any known values. From here its a relatively simple exercise in trigonometry to find the I & K.

The attached picture shows a simple example where, because two sides of the triangle are known, the side that will be the K value can be determined using Pythagorean Theorem.

Wit regards your other question, make a sketch of the part you want help with the code for and post it.

Best regards,

Bill
Attached Thumbnails
Click image for larger version

Name:	G3_1.JPG‎
Views:	109
Size:	14.5 KB
ID:	128468  
Reply With Quote

  #4   Ban this user!
Old 03-08-2011, 04:15 PM
 
Join Date: Nov 2005
Location: usa
Posts: 227
camtd is on a distinguished road
calculating I, J and K

There is a nc editor called NcPlot it will convert R values which are easy to program to I, J or K's depending on your plane. The website is NCPlot.com - Tools for CNC Programmers
Reply With Quote

  #5   Ban this user!
Old 03-08-2011, 05:21 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by camtd View Post
There is a nc editor called NcPlot it will convert R values which are easy to program to I, J or K's depending on your plane. The website is NCPlot.com - Tools for CNC Programmers
The thing is with programming using R in circular interpolation commands, is that if the end point is not correct, the control will shift the arc center to make it work. Now this may be OK if you just want a blend radius, but if its an accurate profile that you're after, then programming with R won't detect an error if your end point in not on the proposed arc trajectory based on a fixed arc center, it just shifts the arc center to make it fit. Accordingly, if your end point calculations is not correct, and R is used in the command line, then software to convert to I & K will calculate a best fit I & K, based not necessarily on where the center of the circle should be.

The mathematics for calculating the center of a circle given two points and a radius is quite straight forward, and something like the following would be used by the control, or software to calculate I J and K values from programs using R values.

For every two points and radius, there are two arc centers that will satisfy the arc passing through the two points with the given radius. That's why Fanuc, and probably other controls, use -R when the arc is greater than 180degs. Once the center coordinates are know, the I, J, or K values are easily obtained by comparing the center coordinates to those of the arc start point.

Regards,

Bill

In the following math:
r = the arc radius
X1,Y1 = the start point
X2,Y2 = the end point

If the arc is 180 deg, only Step 2 is required.


Step 1
Get distance between 1st and 2nd points
q = Sqr((X2 - X1) ^ 2 + (Y2 - Y1) ^ 2)

Step 2
Find mid point of q (X3,Y3)
X3 = (X1 + X2) / 2
Y3 = (Y1 + Y2) / 2

Step 3
Find center point of arc
X = X3 + Sqr(r ^ 2 - (q / 2) ^ 2) * (Y1 - Y2) / q
Y = Y3 + Sqr(r ^ 2 - (q / 2) ^ 2) * (X2 - X1) / q

X = X3 - Sqr(r ^ 2 - (q / 2) ^ 2) * (Y1 - Y2) / q
Y = Y3 - Sqr(r ^ 2 - (q / 2) ^ 2) * (X2 - X1) / q
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-08-2011, 06:53 PM
 
Join Date: Apr 2008
Location: USA
Posts: 20
soonervols is on a distinguished road

I will try to get the engineer to make me a copy of the print I can post tomorrow.
Reply With Quote

  #7   Ban this user!
Old 03-08-2011, 07:12 PM
 
Join Date: Apr 2008
Location: USA
Posts: 20
soonervols is on a distinguished road

Excuse my crude attempt at a drawing. Just in case someone didn't want to wait on actual print.
Attached Thumbnails
Click image for larger version

Name:	part.jpg‎
Views:	84
Size:	13.6 KB
ID:	128484  
Reply With Quote

  #8   Ban this user!
Old 03-08-2011, 10:28 PM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Originally Posted by soonervols View Post
... Second, I have a part with two radius running into each other. A outside radius of 9/16" going into an inside 1/2" radius. I have it programmed using "R" but it leaves a step where the two radius meet. My thinking is using I & K will blend them together more smoothly. Is this a correct thinking?
...
Make an accurate scaled drawing. If you see a kink in the drawing, it would appear after machining also. Center method, or any other method, does not "blend" the arcs. However, center method has to be used for 180 deg arcs. Radius method is not accurate for half circles.
Reply With Quote

  #9   Ban this user!
Old 03-08-2011, 11:29 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by soonervols View Post
Excuse my crude attempt at a drawing. Just in case someone didn't want to wait on actual print.
Quite a few assumptions here, as there is not enough information on the sketch to do any calcs without some assumptions:
1. The X center of the 1/2 rad circle is on the 0.312" line
2. That the 0.312 line is at diameter 2.0"

Given the above, all of the coordinates to create a tool path can be calculated using trig. In all of these manual calculations, it helps to sketch in the triangles relative to the points you need to obtain.

The green circle represents the TNR of your tool, and once Angle A is obtained, all dimensions of any other triangle can be obtained if the dimension of one side only is known. In this case the hypotenuse of two of the triangles are the radii of the respective arcs. The hypotenuse for the triangle required to obtain the center of the TRN is the 9/16" radius + the TNR when calculating for the I and K for it, and 1/2" radius - TNR when doing the calcs for its I and K values. You need to do it this way if not using cutter rad comp (G42), as the true center of the TNR has to be calculated. If the X and Z edge of the TNR is used to set the coordinate system, then you can calculate these points for your program by applying TNR value to the calculated TNR center coordinates.

You should make a drawing closer to scale than the sketch you've posted. Your sketch shows two radii that are quite dissimilar, yet in fact they only vary by 1/16". The attached picture shows a correctly scaled drawing, but is based on the 1/2" radius having its center on the X2" diameter line, and the 9/16" radius being tangent with the 1/2" radius and the face of the work, ie, Z Zero. The scale doesn't have to be perfect, just reasonable so you can better visualize the part.

If your quest is to learn how to calculate a tool path manually, then the attached picture will give you some insight in how to go about it. Alternatively, if you're only interested in the resulting program, post a sketch with a bit more detail and I'll send you an accurate tool path.

Regards,

Bill

Click image for larger version

Name:	RR1.JPG
Views:	79
Size:	26.8 KB
ID:	128490

Last edited by angelw; 03-08-2011 at 11:51 PM.
Reply With Quote

  #10   Ban this user!
Old 03-09-2011, 07:56 AM
 
Join Date: Apr 2008
Location: USA
Posts: 20
soonervols is on a distinguished road

Ok fellas here you go. Thanks for all the input so far.
Attached Thumbnails
Click image for larger version

Name:	WR-1345 MACH.jpg‎
Views:	75
Size:	25.1 KB
ID:	128519  
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 03-09-2011, 09:11 AM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by soonervols View Post
Ok fellas here you go. Thanks for all the input so far.
Finish tool path.

Regards,

Bill

Click image for larger version

Name:	RR_Part2.JPG
Views:	71
Size:	14.7 KB
ID:	128525

(0.031 T/N RADIUS)
G00 X2.188 Z0.169
G00 X0.338
G01 Z0.000 F0.050
G01 X-0.062 F0.008
G03 X1.081 Z-0.436 I0.000 K-0.593
G02 X1.841 Z-0.774 I0.452 K0.125
G03 X2.000 Z-0.867 I-0.015 K-0.093
G01 X2.188 F0.050
G00 Z0.169
Reply With Quote

  #12   Ban this user!
Old 03-09-2011, 01:33 PM
 
Join Date: Apr 2008
Location: USA
Posts: 20
soonervols is on a distinguished road

Thanks Bill,

That worked great. Now if I just understood how you did that or how you got your I & K numbers, I would be in business. The only trig I know is what has been self taught over the years. So no real understanding of it, lol.
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





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