// // ----------------------------------------------------------- // // !! P L E A S E R E A D T H I S !! // // This is a sample code generator built to // generate code for the Machine/Control combination // named below. Due to differences in programming // style, controller versions, and optional equipment // McKenzie River Software can not guarantee that the // code generated is correct for your machine. // // It is YOUR responsibility to verify that the code // created by this Code Generator will not cause a // machine malfunction which could result in scrap // and/or personal injury. // // McKenzie River Software assumes no responsibility // or liability for any damage caused or alleged to be // caused by the use of this Code Generator. // // ----------------------------------------------------------- // // // Machine: Generic vertical mill // Control: Bridgeport DX32 // @DECLARE //#OUTCND //outputs conditional status //#OUTSEC //outputs @section names //#OUTERR //outputs processing errors //#OUTRPT //outputs an error report file @ @START #EVAL(#V1=1) #EVAL(#V4=0) #RESET(#TLID) #EVAL(#S1=JOS(tl_desc)) 'T#TOOL:#S1' #ONBLK #ABSI G0 T#TOOL M26 S#SPEED #IF(#TLID=0) #MOV< X#XPOS>< Y#YPOS>< Z#ZPOS> M07 @ @TOOLCHG #EVAL(#V4=0) <#FXD >G0 Z1. M09 G00 T#TOOL M26 #RESET(#MOV,#FXD,#PECK,#TLID) #RESET(#V9,#V8,#V7,#PLANE) #EVAL(#V1=1) #OFFBLK'T#TOOL:#TDESC' #IF(#TLID=0) #ONBLK #ABSI G0 X#XPOS Y#YPOS T#TOOL S#SPEED #MOV< X#XPOS>< Y#YPOS>< Z#ZPOS> M07 #RESET(#PECK,#FEED,#FXD) @ @END G80 G00 Z1. M09 G90 G00 M22 @ @STPROF #EVAL(#V4=1) #EVAL(#V1=1) #EVAL(#V3=0) #RESET(#FEED) < #FXD> < #ABS1>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS> @ @ENDPROF #EVAL(#V4=0) #IF(#V2=1)<#EXIT> < #DCOMP>< X#XPOS#OR Y#YPOS> #EVAL(#V1=0) #RESET(#DCOMP,#XST,#YST,#ZPOS,#FEED) @ @RAP < #FXD> < #ABSI>< #MOV>< X#XPOS>< Y#YPOS>< Z#ZPOS> #RESET(#FEED) @ @LINE #IF(#DCOMP>=1,AND#V1=1)<< #DCOMP #MOV #EXCX#XST #EXCY#YST F#FEED#EVAL(#V1=0)>> #IF(#V4=1)<< #MOV>< X#XPOS>< Y#YPOS>< F#FEED>> @ @ARC < #PLANE> #MOV X#XPOS Y#YPOS I#XCTR J#YCTR< F#FEED> @ @XZARC < #PLANE> #MOV X#XPOS Z#ZPOS I#XCTR K#ZCTR< F#FEED> @ @YZARC < #PLANE> #MOV Y#YPOS Z#ZPOS J#YCTR K#ZCTR< F#FEED> @ @HELIX < #PLANE> G01< R#ARAD>< I#XCTR>< J#YCTR>< A#STANG> #EVAL(#ARAD=ABS(SQR((#XPOS*#XPOS+#YPOS*#YPOS)))) #MOV< #PLANE>< R#ARAD>< I#XCTR>< J#YCTR>< A#TANG>< Z#ZPOS>< F#FEED> @ @XZHELIX #MOV< #PLANE>< X#XPOS> Y#YPOS < Z#ZPOS> I#XCTR K#ZCTR< F#FEED> @ @YZHELIX #MOV< #PLANE> X#XPOS< Y#YPOS>< Z#ZPOS> J#YCTR K#ZCTR< F#FEED> @ @ZCLRMV < #FXD>< #MOV>< Z#ZPOS> #RESET(#MOV) #RESET(#DWELL) @ @ZCHKMV #EVAL(#V1=1) < #FXD>< #MOV>< Z#ZPOS> #RESET(#MOV) #RESET(#DWELL) @ @ZDPTHMV #EVAL(#V1=1) < #MOV>< Z#ZPOS>< F#FEED> #RESET(#MOV) @ @OP_DRL #IF(#V1=1)< #CYCLE#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #CYCLE>< X#XPOS>< Y#YPOS>< Z#ZDPTH#OR F#FEED> #EVAL(#V1=0) @@CYCLE 0,G81 @ @OP_SPDRL < G4 Q#DWELL> #IF(#V1=1)< #CYCLE#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #CYCLE>< X#XPOS>< Y#YPOS>< Z#ZDPTH#OR F#FEED> #EVAL(#V1=0) @@CYCLE 0,G82 @ @OP_TAP #IF(#V1=1)< #CYCLE#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #CYCLE>< X#XPOS>< Y#YPOS>< Z#ZDPTH#OR F#FEED> #EVAL(#V1=0) @@CYCLE 0,G84 @ @OP_BORE #IF(#V1=1)< #CYCLE#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #CYCLE>< X#XPOS>< Y#YPOS>< Z#ZDPTH#OR F#FEED> #EVAL(#V1=0) @@CYCLE 0,G86 @ @OP_PDRL #EVAL(#V9=JOS(pekdpth1)) #EVAL(#V7=JOS(pekdpth2)) #IF(#V1=1)< #FXD#EXC X#XPOS#EXC Y#YPOS>#EXLN < #ABSI>< #FXD>< X#XPOS>< Y#YPOS>< Z#ZDPTH Z#V9 Z#V7>< F#FEED> #EVAL(#V1=0) @@CYCLE 0,G83 @