// ---------------------------------------- // // 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 SSA 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 SSA 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/16/89 Machine: Okada VM-500 Machining Center with Fanuc System 6M-Model B Control @START % O#FILE #ONBLK G92 X0 Y0 Z0 G20 G40 G80 T#TOOL M98 P9899 #OFFBLK(T#TOOL #TDESC #TLCMT) #ONBLK #MOV #ABSI X#XPOS Y#YPOS S#SPEED #SPNDL G43 Z#ZPOS H#LOFF #EVAL(#C0=2) @TOOLCHG #EVAL(#C0=0) < #FXD> #C0 M05 #MOV G30 G91 Z0 H00 #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.)#ONBLK T#TOOL M19 M98 P9899 #OFFBLK(T#TOOL #TDESC #TLCMT) #ONBLK #MOV #ABSI X#XPOS Y#YPOS S#SPEED #SPNDL G43 Z#ZPOS H#LOFF #EVAL(#C0=2) @END #EVAL(#C0=0) < #FXD> #C0 M05 G00 G28 G91 Z0 H00 #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 G90 X0 Y0 M30 #OFFBLK% @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>< Y#YPOS>< 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>< X#XPOS>< Y#YPOS>< 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>< 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>< 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>< 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) @