Here is my tapping section I have spent a enormous amount time getting it 
to work the way I want.  It uses the standard tapping cycles from the 
tapping page. I use this to code for two styles of tapping heads and ridged 
tapping.  Cycle 1 is a tapping head, cycle 2 is ridged tapping, cycle 3 is 
another style of tapping head.  Cycle 3 generates a sub program that must 
manually be cut and pasted to the end of the program.

It is programmed for a Fanuc OM control.

Hope this helps.



@DECLARE
#DEC #feed // TAP
#DEC #top // TAP
#INT #u2  //TAP
#INT #u3 //TAP
#INT #u4 //TAP
#INT #count  // counter to adjust tapping sub
#INT #cyc
#INT #type


Forgot to send this with last message.  This check to see whether it is a 
ridged tap and does not out put the spindle on and spindle speed if it is 
ridged tap.  I think this will help.

#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





@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.2)
//
<#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.2)
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)
@


-----Original Message-----
From:   Jon Baker [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, October 12, 2000 5:09 PM
To:     [EMAIL PROTECTED]
Subject:        [mfg-smartcam] TEMPLATE FILES

 << File: ATT00001.html >> I am getting closer all the time on this rigid 
tapping ordeal, but I am running into one problem.  How do I write logic 
based on the #cycle value.  If I use the following statement before t


======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================

Reply via email to