![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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! |
|
#2
| |||
| |||
| 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! |
|
#4
| |||
| |||
| 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. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
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 |