// ---------------------------------------- // // 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. // ---------------------------------------- //Machine: New Britain 66 VNC Lathe with Allen Bradley 8200 Control @DECLARE //#OUTCND // outputs conditional status //#OUTSEC // outputs @section names //#OUTREF // outputs processing errors //#OUTRPT // outputs an error report file @ @START #IF(#SPMODE)<#EVAL(#C2=1)>#ELSE<#EVAL(#C2=0)> ~#FILE #DATE ~ % O5 G70 G76 #ONBLK #FDMODE #ABSI G99 G00 X0 Z0 #NEXTPT #IF(#SPMODE)<#EVAL(#V0=#SPEED*12/(3.1416*#XPOS*2))>#EXLN #ELSE<#EVAL(#V0=#SPEED)> #IF(#SPMODE,AND #V0<=400)< G92 S475>#ELSE< G92 S1232> G92 X#XSET Z#ZSET #EVAL(#V1=#XSET) #EVAL(#V2=#ZSET) T#TOOL #SPNDL G97 S#FMT(#V0,T4.0)#IF(#V0<=400)< M41>#ELSE< M42> < #MOV X#XPOS Z#ZPOS T#TOFF> #IF(#SPMODE)< M58 < G96 R#CSSRAD S#SPEED>> @ @TOOLCHG #IF(#C2=1)< M59#EVAL(#C2=0)> #IF(#SPMODE)<#EVAL(#C2=1)>#ELSE<#EVAL(#C2=0)> #MOV< X#XPOS>< Z#ZPOS> #SAFBLK #FDMODE #ABSI G99 #EVAL(#V3=#XPOS-#V1) #EVAL(#V4=#ZPOS-#V2) G00 X#V3 Z#V4 #EVAL(#V5=#V3+#XSET) #EVAL(#V6=#V4+#ZSET) #NEXTPT #IF(#SPMODE)<#EVAL(#V0=#SPEED*12/(3.1416*#XPOS*2))>#EXLN #ELSE<#EVAL(#V0=#SPEED)> #IF(#SPMODE,AND #V0<=400)< G92 S475>#ELSE< G92 S1232> G92 X#V5 Z#V6 #EVAL(#V1=#XSET) #EVAL(#V2=#ZSET) T#TOOL #SPNDL G97 S#FMT(#V0,T4.0)#IF(#V0<=400)< M41>#ELSE< M42> < #MOV X#XPOS Z#ZPOS T#TOFF> #IF(#SPMODE)< M58 < G96 R#CSSRAD S#SPEED>> @ @END #IF(#C2=1)< M59> G99 G00 X0 Z0 T#LTOOL M05 T#NTOOL M30 #OFFBLK @ @STPROF #RESET(#FXD) < #MOV>< X#XPOS>< Z#ZPOS> @ @RAP #RESET(#FXD) < #MOV>< X#XPOS>< Z#ZPOS> @ @LINE #RESET(#FXD) #IF(#U5=1,#AND#MOV=1)<#EVAL(#C0=1)> #IF(#U5=1)<< #C0>< X#XPOS>< Z#ZPOS>< F#FEED>> #IF(#U6=1,AND#LNANG=180,AND#LNLEN>.2)< #EVAL(#V7=#ZST-.2) #EVAL(#V8=#FEED*.6) #RESET(#V7) #RESET(#V8) < #MOV>< X#XPOS>< Z#V7>< F#FMT(#V8,D1.3)> #UPDATE(#MOV) #RESET(#FEED) < #MOV>< X#XPOS>< Z#ZPOS>< F#FEED>> #IF(#U6=1,AND#LNANG=180,AND#LNLEN<=.2)< #EVAL(#V8=#FEED*.6) #RESET(#V8) < #MOV>< X#XPOS>< Z#ZPOS>< F#FMT(#V8,D1.3)> #UPDATE(#MOV) #RESET(#FEED)> #IF(#U6=1,AND#LNANG<>180)< < #MOV>< X#XPOS>< Z#ZPOS>< F#FEED>> #IF(#U5=0,AND#U6=0)<< #MOV>< X#XPOS>< Z#ZPOS>< F#FEED>> @ @ARC #RESET(#FXD) #IF(#U5=1,#AND#MOV=2)<#EVAL(#C0=2)> #IF(#U5=1,#AND#MOV=2)<< #C0>< X#XPOS>< Z#ZPOS>< I#XCTR>< K#ZCTR>< F#FEED>> #IF(#U5=1,#AND#MOV=2)<#EXIT> #IF(#U5=1,#AND#MOV=3)<#EVAL(#C0=3)> #IF(#U5=1,#AND#MOV=3)<< #C0>< X#XPOS>< Z#ZPOS>< I#XCTR>< K#ZCTR>< F#FEED>> #IF(#U5=1,#AND#MOV=3)<#EXIT> < #MOV>< X#XPOS>< Z#ZPOS>< I#XCTR>< K#ZCTR>< F#FEED> @ @OP_THD G33< X#XPOS> Z#ZPOS K#FTHRD @ @OP_TAP G33 Z#ZPASS K#FEED M14 G33 Z#ZPOS K#FEED @ @DWELL G04 F#DWELL @ @DELAY #EVAL(#U5=1) @ @NODELAY #EVAL(#U5=0) @ @ROUGH #EVAL(#U6=1) @ @FINISH #EVAL(#U6=0) @