I figured out how to test if the ridged tapping cycle was called and whether to omit or output the M03 and the S codes. Thought I 'd share my work.
@DECLARE #INT #cyc #INT #type #EVAL(#cyc=jos(cycle)) #EVAL(#type=jos(op_type)) #IF(#cyc=1,#AND#type=206)< G90 G54 #MOV< #DCOMP#EXC D#DOFF> X#XPOS Y#YPOS T#NTOOL >#ELSE< G90 G54< #MOV>< #DCOMP#EXC D#DOFF> X#XPOS Y#YPOS #SPNDL S#SPEED T#NTOOL > Thanks to everyone that responded John -----Original Message----- From: Lauzus, Frederick [SMTP:[EMAIL PROTECTED]] Sent: Friday, April 28, 2000 6:17 PM To: [EMAIL PROTECTED]; 'SmartCam' Subject: RE: [mfg-smartcam] Code with no edits? John, I don't know if you can achieve the results with subprograms you want without using manual edits. Some alternatives would be: 1. Let the code generator write out the code longhand for each of the tapped holes. 2. Define the tapped hole as a sub (not a drill sub) in SmartCAM then create a sub call for each tapped hole. 3. Create a post processor of some kind (VB?) that basically automates your manual edits. What I would do depends on what make and model of control do you have and if it has macro capabilities (most do). You may want to consider a machine macro to be called by SmartCAM with parameters rather than writing dedicated subprograms. I used to write my own deep hole drilling cycles for thermoplastics on Fanuc lathes. Worked like charm and they were transparent to the operator. % O9010(SAMPLE FANUC TAPPING MACRO) (Z=FINAL DEPTH) (R=RETRACT PLANE) (F=FEED RATE) G00 Z#18 #9=#9*0.98 G01 Z#26 F#9 #9=#9*1.02 G01 Z#18 F#9 G00 M99 % This macro could be called with by G69 P9010 Z-0.1 R0.2 F102.0 or you could assign the macro a "G" code that isn't used by your control (i.e. G75) by setting a machine parameter. i.e. for a Fanuc 6 it would be parameter 0323. The call would then appear as a regular G code. G75 Z-0.1 R0.2 F102.0 There are a lot of other bells and whistles you can add such as hiding the macro during it's execution, prevent single block execution while the macro executes, include the X and Y coordinate positions, retain modal values, etc... sample code... N29 G90 G54 X0.0 Y2.0 M03 S1000 T1 N30 G43 H3 Z0.2 M08 N31 G69 P9010 Z-0.1 R0.2 F102.0 N32 G00 X1.0 Y2.0 N33 G69 P9010 Z-0.1 R0.2 F102.0 A lot of controls have macro capabilities that lay dormant. Most programmers/operators don't even know they exist. ============================================= Fred Lauzus, CAM Programming Coordinator High Steel Structures, Incorporated mailto:[EMAIL PROTECTED] http://www.highsteel.com ============================================= -----Original Message----- From: John Coulston [mailto:[EMAIL PROTECTED]] Sent: Friday, April 28, 2000 5:23 AM To: 'SmartCam' Subject: [mfg-smartcam] Code with no edits? I'm glad to see the forum as busy as it has been the last few days. One area that I always have to make minor edits is tapping. I use three different methods of tapping, ridged and two different styles of tapping heads. I use cycle 1, 2, 3 on the tapping operation page. Cycle 1 standard tapping head 95% of feed. This cycle works properly. N6 G90 G54 X0.0 Y0.0 M03 S1000 T2 N7 G43 H1 Z0.1 M08 N8 G85 X0.0 Y0.0 Z-0.1 R0.2 F95.0 Cycle 2 ridged tapping, I have to delete the M03 S1000 . If the spindle is turned on before the M29 the Z axis won't synchronize with the spindle . N17 G90 G54 X0.0 Y1.0 M03 S1000 T3 N18 G43 H2 Z0.1 M08 N19 M29 S1000 N20 G84 X0.0 Y1.0 Z-0.1 R0.2 F100.0 G90 G54< #MOV> X#XPOS Y#YPOS #SPNDL S#SPEED T#NTOOL I there any logic to check if tapping cycle 2 is active, don't out put #SPNDL S#SPEED? Cycle 3 tapping head 98% feed in 102% feed out. The only difficulty here is that I have to cut the sub and paste it to the end of the program. This sub is generated from with in the OP_TAP section. N29 G90 G54 X0.0 Y2.0 M03 S1000 T1 N30 G43 H3 Z0.2 M08 O1234(Taptest123.txt) (T3 = 0.125 DIA. TAP 3) G00 Z0.2 G01 Z-0.1 F98.0 G01 Z0.2 F102.0 G00 M99 N31 M98 P1234 N32 X1.0 Y2.0 N33 M98 P1234 Any thoughts of direction would be appreciated. Thank you, John Coulston // tap @OP_TAP // Use G74 (M04=left hand tapping) or G84 (M03=tapping cycle) #IF(#U1)<#RESET(#CYCLE,#XPOS,#YPOS,#ZDPTH,#CLEAR,#FEED,#top)#EVAL(#U1=0) #EVAL(#U2=1)#EVAL(#U3=0)#EVAL(#U4=0)#EVAL(#count=0)> #IFCHG(#CYCLE)<#RESET(#XPOS,#YPOS,#FEED,#CYCLE)> #IFCHG(#ZDPTH)<#RESET(#CYCLE,#ZDPTH,#CLEAR,#FEED)>/// recodes cycle feed and R if depth of hole changes #IFCHG(#ZDPTH)<#EVAL(#U3=1)>//checking zdpth to see if new sub is needed #IF(#CYCLE=0)<#EVAL(#FEED=jos(outfeed1)*.95)> #IF(#CYCLE=1)<#EVAL(#FEED=jos(outfeed1))> #IF(#CYCLE=1,AND #U4=0)<#CALL(RIDGED)> #IF(#CYCLE=2)<#CALL(NCR15)> #IF(#CYCLE=2)<#UPDATE(#CYCLE)>//added 2/27/99 Greg olson SDRC #EVAL(#top=#ZCHK+0.15) // <#ABSI>< #CYCLE>< X#XPOS>< Y#YPOS>< Z#ZDPTH R#top>< F#FEED>//<a#RTNLVL> probably wont need #rtnvvl G98 set by SMF q173-175 #ONBLK // // // 0= NCR25 #U2=0 NO XY OUTPUT AFTER G54 #U2=1 OUTPUT XY // 1= RIDGED TAPPING #U3=0 NO SUB #U3=1 NEED NEW SUB ZDEPTH // 2= NCR 15 // @@CYCLE 0,G85 1,G84 2, @ @RIDGED M29 S#SPEED #EVAL(#U4=1) @ @NCR15 #IF(#U2=1)<#UPDATE(#XPOS,#YPOS)> #ONBLK < X#XPOS Y#YPOS> #IF (#U3=1)<#EVAL(#count=#count+1)> M98 P#FMT(#TOOL,F2.0,2)#FMT(#count,F2.0,2) #IF(#U2=1)#OFFBLK #IF(#U2=1)<#CALL(TAP15)> #IF(#U3=1)<#CALL(TAP15)> @ @TAP15 O#FMT(#TOOL,F2.0,2)#FMT(#count,F2.0,2) (#FILE) (T#TOOL = #TDESC) #EVAL(#top=#ZCHK+0.15) G00 Z#top #EVAL(#FEED=jos(outfeed1)*.98) G01 Z#ZDPTH F#FEED #EVAL(#FEED=jos(outfeed1)*1.02) G01 Z#top F#FEED G00 #IF(#top<>#CLEAR)< Z#CLEAR> M99 #ONBLK #EVAL(#U2=2) #EVAL(#U3=0) @ ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ====================================================================== ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ======================================================================
