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 05-25-2007, 03:27 PM
 
Join Date: Mar 2003
Location: Milford, CT
Posts: 19
dcrace is on a distinguished road
Continuous thread G32 macro

Got this macro to cut a continuous thread in our swiss, can anyone please look it over to see if there are any errors in the code?? It doesn't work correctly when I run it...makes 1 cut to the root diameter and just keeps looping the same pass.
%
O9010
(CONTINUOUS THREAD MACRO)
(SET PARAMETER 6050=132)
#109=[#9*1.](LEADS TAPER IN AND OUT)
#101=[#1*#9]-#109(START POINT)
#102=#2*#9(MID POINT)
#103=#3*#9(END POINT)
#106=#5(FINISH PASS COUNTER)
#108=#11(DOC COUNTER)
#110=[#9*1.2](PULL OUT MARK ADJUSTMENT)
(THIS JACKS UP THE FEED ON THE PULL OUT HOVE)

(ROUGH)
WHILE[#108GT#4] DOl
G0Z#101
X[#21+#108+#11]
G32X[#21+#108]W#109F#9
X[#22+#108]Z#102
X[#22+#108]Z#103
U#11W#109F#110
#108=[#108-#17]
END1

(FINISH)
WHILE[#108GE0]DO2
G0Z#101
X[#21+#108+#11]
G32X[#21+#108]W#109F#9
X[#22+#108]Z#102
X[#22+#108]Z#103
U#11W#109F#110
#108=[#108-#l8]
END2

(SPRING)
WHILE[#106GE0]DO3
G0Z#101
X[#21+#108+#11]
G32X#21W#109F#9
X#22Z#102
X#23Z#103
U#l1W#109F#110
#106=[#106-1]
END3

(G132 CODES)
(G132A_B_C_U_V_W_Q_R_X_J_H_F_)
(A = Z START POINT IN PITCHES)
(B = Z MID POINT IN PITCHES)
(C = Z END POINT IN PITCHES)
(U = X START POINT DIAMETER)
(V = X MID POINT DIAMETER)
(W = X END POINT DIAMETER)
(Q = ROUGH DOC)
(R = FINISH DOC)
(I = FINISH AMOUNT DIAMETER)
(J = SPRING PASSES)
(H = THREAD HEIGHT)
(F = FEED RATE)
M99
%
Also the segment from my program:

T1212(24 TPI FULL PROFILE THREAD)
(THREAD STEP 1)
S2000M3
/M8
G0X.5Z-.1
G132A0B10.C12.U.323V.323W.323Q.01R.001I.002J2.H.0512F.0417
G28U0
T0

Thanks in advance!
Reply With Quote

  #2   Ban this user!
Old 05-27-2007, 12:16 AM
 
Join Date: May 2007
Location: USA
Posts: 913
g-codeguy is on a distinguished road

Sorry I can't help you. I've never programmed a Swiss lathe. I do use macros and arguments in my programming, but you are obviously more knowledgeable than I.

I do have one question for you. I don't understand the reasoning behind the "I" value. I could understand it if "I" was the minor diameter. I do see that U, V, & W are the minor dia. values. If "R" is the finish DOC, why does the control need to know that twice this value is a diameter value? Seems redundant to me. I see that H is also a diameter value.

Thanks for any help you can give me in understanding this. Today was my first day at this forum. I've been programming for years, but only for one company. I am looking forward to learning lots of programming wizardry here. I've already decide to try parametric programming!
Reply With Quote

  #3   Ban this user!
Old 05-27-2007, 08:47 AM
 
Join Date: Mar 2003
Location: Milford, CT
Posts: 19
dcrace is on a distinguished road

Sorry, I didn't write the macro... someone gave it to me and I am trying to get it to work. I don't understand it enough to troubleshoot it. Hopefully someone here will be able to...
Reply With Quote

  #4   Ban this user!
Old 05-29-2007, 02:23 PM
 
Join Date: Apr 2007
Location: US
Posts: 9
Zuma is on a distinguished road

The only thing I see wrong is on the third thread pass on both the rough and finish should probably be "X[#23+#108]Z#103" which will keep your taper consistant. But in your case there is no taper. But this has nothing to do with your problem. Also, the DO1 is actually DOl in your example. I did not run it through but it would probably would give a syntax error instead of ignoring it. What I would do if I were you is to go in single block to call the macro and watch it after it calls. Make sure it goes to the rough pass. Let it position the Z to -.0417, then look at your variable values. If it does not go to the rough pass look at #4 which should be .002 and #108 which should be .0512. If #108 is less than or equal to #4 it will skip the rough pass. If #108 is less than or equal to 0 it will skip the finish pass and just do your two spring passes. You say it keeps looping the same pass, how many times? It should only be twice if you are at finished depth and that would be your (J2.) spring passes which means you are skipping over your rough and finish passes which means #108 is less than or equal to 0. (Or possibly 3 passes if it is picking up the last finish pass which means #108 would be between #18 and 0) Remember not to keep it in single block once it starts to thread, that wouldn't be good. Let us know what you find out.

Last edited by Zuma; 05-29-2007 at 07:19 PM.
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
Amps Peak Stall, Continuous? I'm confused! dfstrasser General Electronics Discussion 4 03-28-2007 04:27 PM
5 Axis indexed vs 5 Axis continuous jwolin General CAM Discussion 44 03-24-2007 02:21 AM
Maxnc10cl continuous nightmare originator Benchtop Machines 11 06-11-2006 02:37 PM
Max. Pulse Current-peak or continuous? Splint General Electronics Discussion 3 03-27-2004 12:26 AM




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