// ---------------------------------------- // // The following SmartCAM code generator has been // created to generate NC code for the respective // machine and control combinations listed below. // // Due to differences in programming styles, // controller versions, and optional equipment, // SmartCAMcnc DOES NOT and CANNOT guarantee // that the NC code generated is correct for any // specific machine. Some modification to the code // generator to match your setup and output // requirements is likely necessary. // // Modifications to code generators do not TYPICALLY // require a significant amount of time. SmartCAM // customers with active SMA contracts are entitled // to support for their code generators from the // SmartCAMcnc Support Group. To contact them for // support, please send an email to: // Support@SmartCAMcnc.com. If you would like // information on purchasing SMA for your SmartCAM // products, please contact: Sales@SmartCAMcnc.com // // DISCLAIMER: It is the responsibility of the end // user to confirm and verify that the NC code // created by any code generator is accurate and // will not cause a machine malfunction which // could result in stock, tooling, machine, and/or // personal injury. // // SmartCAMcnc assumes no responsibility or // liability for any damage caused or alleged to // have been caused by the use of any of the code // generators it provides. // ---------------------------------------- @COMMENTS 10/19/89 Machine: Hitachi Seiki Seikimatic 630 Horizontal Machining Center with Fanuc Model 6M CNC Control Notes: 1. This machine and template file have been set up to support the following fixed cycles: G80 - Fixed Cycle Cancel G81 - Drill Cycle G82 - Spot Drill Cycle G83 - Peck Drill Cycle G84 - Tapping Cycle G85 - Boring Cycle 2. Speeds in the Job Plan should be specified in revolutions per minute (RPM). Feeds should be in inches per minute (IPM). In order to produce code which will turn the spindle in a reverse direction, type the spindle speed in Job Plan as a minus number. 3. SmartCAM will automatically calculate the peck increment for each tool to a value of 1/2 the diameter of the tool for all peck drilling operations. If you want to peck drill, remember to turn on the peck drill hole operation ( Hole_Op - Peck_Drill) before creating the Hole element and remember to specify the tool as a drill in Job Plan. 4. SmartCAM will output all the necessary moves to turn cutter diameter compensation on and off correctly (G40/G41/G42). Any Profile in Shape with an Offset of None needs no Lead_In or Lead_Out moves and will produce code for the centerline of the toolpath. No cutter compen- sation codes will be output. Any profile in Shape with either Offset Right or Left will output code for the part profile rather than the centerline of the toolpath and will output proper cutter compensation commands. If no Lead_In Lines are specified, SmartCam automatically will add a perpendicular Lead_In Line equal to .050 greater than the tool radius and start cutter compensation with this move. In some cases, this .050 movement may cause the tool to undercut another area of the part. This can easily be avoided using SmartCAM's Tool_Path Lead_In and Lead_Out features, by creating a Lead_In Line of a smaller amount. If no Lead_Out Lines are specified, SmartCAM will retract the tool in Z axis to the Z check plane or Z clearance plane (whichever is greater) and then output a G40 in a block by itself to cancel cutter compensation. The operator may, at his option, specify Lead_In and Lead_Out Lines to control the exact amount of movement used to turn on and off cutter compensation. Lead_In and Lead_Out Arcs may be used as well. The following procedure is recommended highly: 5. If you wish to use Lead_In and Lead_Out Lines only, it is best to use an Angle of 90 degrees and a Length greater than the tool radius. If you wish to use Lead_In and Lead_Out Arcs, it is best to use a Radius equal to the same amount and an Angle of 45 degrees, then Lead_In and Lead_Out Lines to those Arcs at an Angle of 90 degrees and a length equal to the same amount. Any time Lead_In and Lead_Out Arcs are used, Lead_In and Lead_Out Lines are also recommended. 6. If you wish to call for a Pallet Transfer, simply type in a User_Cmd assigned to the tool in use with the text "@PALLET". This will cause a M60 code to be output. 7. SmartCAM system variables used by this Custom Code Generator are: #C0=0 M09 #C0=1 M07 #C0=2 M08 #C1=1 M19 #C2=0 M42 High Speed Range #C2=1 M43 Low Speed Range #C3=0 G54 #C3=1 G55 #C4=0 G56 #C4=1 G57 #C5=0 G58 #C5=1 G59 #U0 Tool Time in Seconds #U1 Tool Time in Minutes #U2 Original Tool Time (Decimal Minutes) #U3 Stores 2nd Tool in Program for @End @START #IF(#SPEED>555)<#EVAL(#C2=0)> #ELSE<#EVAL(#C2=1)> % O#FILE #ONBLK M60 B#INDXC G00 G40 G80 G90 M19 G92 X#XPOS Y#YPOS Z#ZPOS #NEXTPT T#TOOL T#NTOOL #EVAL(#U3=#NTOOL) #OFFBLK (T#TOOL #TDESC #TLCMT) #ONBLK #C2 S#SPEED #SPNDL #MOV #ABSI X#XPOS Y#YPOS G43 Z#ZPOS H#LOFF #EVAL(#C0=2) @TOOLCHG #IF(#SPEED>555)<#EVAL(#C2=0)> #ELSE<#EVAL(#C2=1)> #EVAL(#C0=0) < #FXD> #C0 G00 G28 G91 Z0 M19 M05 T#NTOOL M06 #EVAL(#U1=INT(#TLTIME)) #EVAL(#U2=#TLTIME-#U1) #EVAL(#U0=#U2*60) #OFFBLK(T#LTOOL EST.TIME:#EXLN #IF(#U1>0)< #FMT(#U1,T3.0) MIN.> #FMT(#U0,T2.0) SEC.) (T#TOOL #TDESC #TLCMT) #ONBLK #C2 S#SPEED #SPNDL #ONBLK #MOV #ABSI X#XPOS Y#YPOS G43 Z#ZPOS H#LOFF #EVAL(#C0=2) @END #EVAL(#C0=0) < #FXD> #C0 M05 T#NTOOL M06 T#FMT(#U3,F2.0) M06 G00 G28 G91 X0.0 Y0.0 B0.0 M60 #EVAL(#U1=INT(#TLTIME)) #EVAL(#U2=#TLTIME-#U1) #EVAL(#U0=#U2*60) #OFFBLK(T#LTOOL EST.TIME:#EXLN #IF(#U1>0)< #FMT(#U1,T3.0) MIN.> #FMT(#U0,T2.0) SEC.) #EVAL(#U1=INT(#CYTIME)) #EVAL(#U2=#CYTIME-#U1) #EVAL(#U0=#U2*60) (TOTAL EST.TIME:#EXLN #IF(#U1>0)< #FMT(#U1,T3.0) MIN.> #FMT(#U0,T2.0) SEC.)#ONBLK M30 #OFFBLK% @TPINDX B#INDXC #OFFBLK #ONBLK G92 X#XPOS Y#YPOS Z#ZPOS M19 @SUBDEF % O#SNAME #ONBLK #ABSI @ENDDEF M99 #OFFBLK% @GOSUB M98 P#SNAME L#SREPT @STPROF < #MOV>< #FXD>< #ABSI>< X#XPOS>< Y#YPOS>< Z#ZPOS> #RESET(#DOFF) @ENDPROF < #MOV>< Z#ZPOS> < #DCOMP> @RAP < #MOV>< #FXD>< #ABSI>< X#XPOS>< Y#YPOS>< Z#ZPOS> @LINE < #MOV>< #PLANE>< #DCOMP#EXC< D#DOFF>>< X#XPOS>< Y#YPOS>< Z#ZPOS>< F#FEED> @ARC #IF(#TANG=360,OR#TANG=-360) << #MOV>< #PLANE>< X#XPOS>< Y#YPOS>< I#XCTR>< J#YCTR>< F#FEED>> #ELSE << #MOV>< #PLANE>< X#XPOS>< Y#YPOS> R#ARAD< F#FEED>> @XZARC #IF(#TANG=360,OR#TANG=-360) << #MOV>< #PLANE>< X#XPOS>< Z#ZPOS>< I#XCTR>< K#ZCTR>< F#FEED>> #ELSE << #MOV>< #PLANE>< X#XPOS>< Z#ZPOS> R#ARAD< F#FEED>> @YZARC #IF(#TANG=360,OR#TANG=-360) << #MOV>< #PLANE>< Y#YPOS>< Z#ZPOS>< J#YCTR>< K#ZCTR>< F#FEED>> #ELSE << #MOV>< #PLANE>< Y#YPOS>< Z#ZPOS> R#ARAD< F#FEED>> @HELIX #IF(#TANG=360,OR#TANG=-360) << #MOV>< #PLANE>< X#XPOS>< Y#YPOS>< Z#ZPOS>< I#XCTR>< J#YCTR>< F#FEED>> #ELSE << #MOV>< #PLANE>< X#XPOS>< Y#YPOS>< Z#ZPOS> R#ARAD< F#FEED>> @XZHELIX #IF(#TANG=360,OR#TANG=-360) << #MOV>< #PLANE>< X#XPOS>< Y#YPOS>< Z#ZPOS>< I#XCTR>< K#ZCTR>< F#FEED>> #ELSE << #MOV>< #PLANE>< X#XPOS>< Y#YPOS>< Z#ZPOS> R#ARAD< F#FEED>> @YZHELIX #IF(#TANG=360,OR#TANG=-360) << #MOV>< #PLANE>< X#XPOS>< Y#YPOS>< Z#ZPOS>< J#YCTR>< K#ZCTR>< F#FEED>> #ELSE << #MOV>< #PLANE>< X#XPOS>< Y#YPOS>< Z#ZPOS> R#ARAD< F#FEED>> @ZCLRMV < #ABSI>< #FXD><< #MOV> Z#ZPOS> @ZCHKMV < #FXD><< #MOV> Z#ZPOS>< #C0> @ZDPTHMV << #MOV> Z#ZPOS F30.0#RESET(#FEED)> @FXD1 < #ABSI>< #RTNLVL>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH R#ZCHK>< F#FEED>< #C0> @FXD2 < #ABSI>< #RTNLVL>< #FXD>< X#XPOS>< Y#YPOS>#EXLN < Z#ZDPTH R#ZCHK P#DWELL>< F#FEED>< #C0> @FXD3 #EVAL(#V0=#ZCHK+.1) < #ABSI>< #RTNLVL>< #FXD>< X#XPOS>< Y#YPOS>#EXLN < Z#ZDPTH R#V0>< F#FEED>< #C0> @FXD4 < #ABSI>< #RTNLVL>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH R#ZCHK>< F#FEED>< #C0> @FXD5 #EVAL(#PECK=#TLDIA/2) < #ABSI>< #RTNLVL>< #FXD>< X#XPOS>< Y#YPOS>#EXLN < Z#ZDPTH R#ZCHK Q#PECK>< F#FEED>< #C0> @DWELL G04 P#DWELL #EVAL(#CYTIME=#DWELL/60) @PALLET M60