| |||||||
| Home | Recent Posts | HELP-FORUMS (ask/answer) | Classifieds-ads | File Sharing / Documents | Photo Galleries | Polls | Newsletter | Machinetoolhelp.com. |
| Programming / Applications All CNC programming, CNC applications, milling, turning, tooling, macro programming, and other CNC machine tool related questions. |
![]() |
| | Bookmark or Share | Thread Tools | Display Modes |
| |||
|
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.05 12F.0417 G28U0 T0 Thanks in advance! |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |