// ---------------------------------------- // // 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 11/6/87 Machine: Citizen Cincom F 25 Lathe (Swiss Type) with a Fanuc 10T Control - Dual Turrets - "C" Axis Notes: 1. Note that this machine does not require XSET and ZSET values for programming, therfore this Custom Code Generator has been designed to ignore these values (except for display purposes). 2. The file name will be used in the first block of any program in the "O" block to specify the part program number. 3. The Code Generator was also designed to accomodate two turrets and both the Up, Right and Down, Right cut directions are legal in the Job and the model display. This allows the model display to accurately represent the machine tool. The - X - axis will be coded correctly in either case. 4. The -X- axis dimensions MUST be entered in RADIUS values and can be entered as negative values for the tools using a Up, Right cut direction. 5. Right Angle tools requiring the -C- axis MUST be specified in the Job as tool "TYPE" -Other- and the variable #V6 MUST be assigned in the Notes section of that tool with the appropriate sub- program number for that tool. 6. The first point of any new tool MUST be inserted at a tool change position clear of the part. 7. The variables #V7 and #V8 MUST be assigned when using the -C- axis. The angular value of the "Dividing Step No. 1" register (acutated by the M28 command) MUST be assigned to the variable #V7. The value of the "Dividing Step #2" register (actuated by the M29 command) MUST be assigned to the varible #V8. 8. When using a right angle tool, first enter a User Command to specify the desired Step and the Index Angle by assigning the varible #INDXA. Example: Text:@STEP1(#INDXA=45) The above example specifies "Dividing Step No. 1" and an ABSOLUTE index angle of 45 degrees. The Code Generator will automatically output the appropriate number of M28 commands required. 9. A special User Command has also been developed called @PULL . This command should be used if the part requires to be pulled out from the chuck for finishing. When using the @PULL user command the varible #ZSET MUST be assigned with the desired reposition value. 10. The following User Commands have also been built into this code generator and can be used at any time and in any order: @DWELL - Be sure to assign #DWELL with the desired dwell value @CLOSE (M06) @OPEN (M07) @ON (M08) @OFF (M09) @FOW (M10) @REV (M11) @LCLOSE (M13) @LOPEN (M14) @CLAMP (M15) @UNCLAMP (M16) @C-ON (M18) @C-OFF (M20) @STOP (M26) @RES (M27) @CSTEP1 (M28) @CSTEP2 (M29) @WFOW (M32) @WREV (M33) @OIL (M52) @NO-OIL (M53) @BARSTOP (M54) @BARSTART (M55) @ @DECLARE //#OUTCND // outputs conditional status //#OUTSEC // outputs @section names //#OUTREF // outputs processing errors //#OUTRPT // outputs an error report file @ @START O#FILE #ONBLK G20 #FDMODE M52 G68 G50 X-.15 Z-.005 M6 #NEXTPT #SPMODE #SPNDL S#SPEED Z#ZPOS #IF(#SPMODE=1)< G50 S3500> #RESET(#ZPOS) T#TOOL00 T#NTOOL00 #IF(#TOOL<16)< G69> #IF(#TOOL>20)< G68> #EVAL(#YSET=0) #EVAL(#INDXA=-1) #IF(#V6>1)< G98 M18 S#SPEED M58 M98 P#FMT(#V6=T4.0)> #IF(#V6>1)<#EXIT> #IF(#TLOP>=4)<#EVAL(#XPOS=#XPOS-2) #MOV X#XPOS Z#ZPOS T#TOOL> #IF(#TLOP>=4)<#EXIT> #MOV X#FMT(#XPOS,D!3.4) Z#ZPOS T#TOOL @ @TOOLCHG #IF(#V5>1)<#EVAL(#V5=#V5-1)> #IF(#V5>1)< P#FMT(#V5,T4.0)> #IF(#V5>1)<#RESET(#V5)> < #MOV>< X#FMT(#XPOS,D!3.4)>< Z#ZPOS> T0 #EVAL(#V9=0) #IF(#TOOL<=15)<#EVAL(#V9=#V9+1)> #IF(#NTOOL>15)<#EVAL(#V9=#V9+1)> #IF(#V9=0)< T#NTOOL00> #IF(#V9=2)< T#NTOOL00> #IF(#TOOL<15)< G69> #IF(#TOOL>=15)< G68> #IF(#V6<1)<#EVAL(#YSET=-1)> #IF(#V6>1)<#EVAL(#V5=#V6)> #IF(#V6>1)< G98 S#SPEED M58 M98 P#FMT(#V6,T4.0)> < #SPMODE> #SPNDL S#SPEED #IF(#SPMODE=1)< G50 S3500> #EVAL(#YPOS=0) #IF(#YSET<1)<#EVAL(#YPOS=#YPOS+1)> #IF(#V6>1)<#EVAL(#YPOS=#YPOS+1)> #IF(#YPOS=2)<#RESET(#YPOS) M18#EVAL(#YSET=0)> #IF(#V6>1)<#EXIT> #NEXTPT @ @END #IF(#V5>1)<#EVAL(#V5=#V5-1)> #IF(#V5>1)< P#FMT(#V5,T4.0)> #IF(#V5>1)<#RESET(#V5)> G00 X#XHOME Z#ZHOME T0 M02 M99 #OFFBLK% @ @STPROF #RESET(#V6) #IF(#TLOP>=4)<#EVAL(#XPOS=#XPOS-2)> #IF(#TLOP>=4)<< #MOV>< X#XPOS>< Z#ZPOS>< F#FEED>> #IF(#TLOP>=4)<#EXIT> < #MOV>< X#FMT(#XPOS,D!3.4)>< Z#ZPOS>< T#TOOL> @ @RAP #RESET(#V6) #IF(#TLOP>=4)<#EVAL(#XPOS=#XPOS-2)> #IF(#TLOP>=4)<< #MOV>< X#XPOS>< Z#ZPOS>< F#FEED>> #IF(#TLOP>=4)<#EXIT> < #MOV>< X#FMT(#XPOS,D!3.4)>< Z#ZPOS>< T#TOOL> @ @LINE #IF(#TLOP>=4)<#EVAL(#XPOS=#XPOS-2)> < #FDMODE> #IF(#TLOP>=4)<< #MOV>< X#XPOS>< Z#ZPOS>< F#FEED>> #IF(#TLOP>=4)<#EXIT> < #FDMODE> < #MOV>< X#FMT(#XPOS,D!3.4)>< Z#ZPOS>< F#FEED> @ @ARC < #FDMODE> #IF(#TOOL<=15)<#EXIT> < #MOV>< X#FMT(#XPOS,D!3.4)>< Z#ZPOS>< R#ARAD>< F#FEED> @ @OP_THD < #FXD>< X#XPASS>< Z#ZPASS>< F#FTHRD> @ @OP_TAP #EVAL(#ZPASS=#ZPASS*.8) #EVAL(#FEED=#FEED*.8) G32 Z#ZPASS F#FEED< T#TOOL> #EVAL(#ZPASS=#ZPASS-4) G00 Z#ZPASS M04 G32 Z#ZPOS F#FEED T00 @ @DWELL G04 U#DWELL#EVAL(#TIXE=#DWELL/60) @ @PULL G0 X#XPOS Z#ZPOS T0 M5 G97 M13 M7 G0 W-#ZSET G50 W#ZSET M6 M14 M8 /M0 @ @CLOSE M06 @ @OPEN M07 @ @ON M08 @ @OFF M09 @ @FOW M10 @ @REV M11 @ @LCLOSE M13 @ @LOPEN M14 @ @CLAMP M15 @ @UNCLAMP M16 @ @C-ON M18 @ @C-OFF M20 @ @STOP M26 @ @RES M27 @ @CSTEP1 M28 @ @CSTEP2 M29 @ @WFOW M32 @ @WREV M33 @ @OIL M52 @ @NO-OIL M53 @ @BARSTOP M54 @ @BARSTART M55 @ @STEP1 #IF(#YSET>#INDXA)< M18 #EVAL(#YSET=0)> #EVAL(#V3=(#INDXA-#YSET)/#V7) #EVAL(#V4=INT(#V3+.01)) #IF(ABS(#V3-#V4)>.01)< M18 #EVAL(#YSET=0) #EVAL(#V3=#INDXA/#V7)> #EVAL(#V4=INT(#V3+.01) #IF(ABS(#V3-#V4)>.01)<(ANGLE DOESN'T MATCH STEP)> #IF(#V3>0)< M28> #IF(#V3>1)< M28> #IF(#V3>2)< M28> #IF(#V3>3)< M28> #IF(#V3>4)< M28> #IF(#V3>5)< M28> #IF(#V3>6)< M28> #IF(#V3>7)< M28> #IF(#V3>8)< M28> #IF(#V3>9)< M28> #IF(#V3>10)< M28> #IF(#V3>11)< M28> #EVAL(#YSET=#INDXA) @ @STEP2 #IF(#YSET>#INDXA)< M18 #EVAL(#YSET=0)> #EVAL(#V3=(#INDXA-#YSET)/#V8) #EVAL(#V4=INT(#V3+.01)) #IF(ABS(#V3-#V4)>.01)< M18 #EVAL(#YSET=0) #EVAL(#V3=#INDXA/#V7)> #EVAL(#V4=INT(#V3+.01) #IF(ABS(#V3-#V4)>.01)<(ANGLE DOESN'T MATCH STEP)> #IF(#V3>0)< M29> #IF(#V3>1)< M29> #IF(#V3>2)< M29> #IF(#V3>3)< M29> #IF(#V3>4)< M29> #IF(#V3>5)< M29> #IF(#V3>6)< M29> #IF(#V3>7)< M29> #IF(#V3>8)< M29> #IF(#V3>9)< M29> #IF(#V3>10)< M29> #IF(#V3>11)< M29> #EVAL(#YSET=#INDXA) @