// ---------------------------------------- // // 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. // ---------------------------------------- Code Generator for OKK Horizontal Machining Center with a Mitsubishi Meldas-M2 control April 11, 1990 Variables used: #V2-Program No. #U1-used for cutter comp 1=already in use, 0=starting new profile. #V1-used for cutter comp incremental distance in x from start of profile. #V3-used for cutter comp incremental distance in y from start of profile. #V0-Angle for B axis #U9-used to find out if a tool was in a fixed cycle, 1=yes,0=no. @START % L#FMT(#V2,T4.0) #ONBLKG91G28X0Y0Z0 G28B0 G92X10.0Y10.0Z10.0 G92B0 M60 T#TOOL M06 G0G90G43X#XPOSY#YPOSZ#ZPOSS#SPEEDH#LOFFT#NTOOL#SPNDL G0G90B0 M08 #RESET(#XPOS,#YPOS) @TOOLCHG #IF(#U9=1)#ELSE<#MOVZ#ZPOSM09> G91G28X0Y0Z0 G92X10.0Y10.0Z10.0 M06 T#TOOL G00G90G43X#XPOSY#YPOSZ#ZPOSS#SPEEDH#LOFF#SPNDL G0G90B0 M08 #RESET(#XPOS,#YPOS) #EVAL(#U9=0) @END #MOVZ#ZPOSM09 M40 G91G28X0Y0Z0 G28B0 M60 M30 #OFFBLK% @STPROF #EVAL(#V1=#XPOS) #EVAL(#V3=#YPOS) <#ABSI><#FXD><#MOV> @ENDPROF <#MOV><#DCOMP> #EVAL(#U1=0) @RAP <#ABSI><#FXD><#MOV> @LINE #EVAL(#V1=#XPOS-#V1) #EVAL(#V3=#YPOS-#V3) #IF(#U1=0)<<#MOV><#DCOMP#EXCI#V1J#V3>> #ELSE<<#MOV>> #EVAL(#U1=1) @ARC <#MOV>I#XCTRJ#YCTR @ZCLRMV <#ABSI><#FXD><<#MOV>Z#ZPOS> @ZCHKMV <#FXD><<#MOV>Z#ZPOS> @ZDPTHMV <<#MOV>Z#ZPOS> @FXD1 #EVAL(#U9=1) <#ABSI><#FXD><#RTNLVL> @FXD2 #EVAL(#U9=1) <#ABSI><#FXD><#RTNLVL> @FXD3 #EVAL(#U9=1) <#ABSI><#FXD><#RTNLVL> @FXD4 #EVAL(#U9=1) <#ABSI><#FXD><#RTNLVL> @FXD5 #EVAL(#U9=1) <#ABSI><#FXD><#RTNLVL> @DWELL G04E#DWELL @