# -------------------------------------------------------------------------- #| MASTERCAM MP POST PROCESSOR | Always back up your post-processor | #| CNC Software, Inc. | prior to making any changes. It's easy, | #| Control Model: Basic | just put a floppy in drive a:, at DOS | #| Machine Model: Denford | type "COPY C:\NC\*.PST A:" | #| PST File Name: drouter.PST | | #| Executable : MP.EXE 2.10 | NCCONFIG (AMT RAM/POST) : 140K | # -------------------------------------------------------------------------- # --------------- #| FEATURES: | # ------------------------------------------------------------------------ # This post has extended work offsets and is a standard FANUC Post. # This post features operation code commenting with tool descriptions. # --------------- #| REVISION LOG | # ------------------------------------------------------------------------ # 11/23/98 ckp Increased spindle speed range, removed # at end of program # 1/21/98 msf Initial release # # 1. The # before sextnc must be deleted. # sextnc "fnc" # This extension is for all other Denford machines. # # This will change the .nc file extension to FNC. # Without this extension, the user will have to edit the file in Mastercam # with the following keystrokes. # Main Menu: File: Edit: Other. Select the directory and then select the # filename with the FNC file extension. # -------------------------------------------------------------------------- # Format Statements - i=incr, n=nonmodal, l=leave ldg, t=leave trlg, d=delta # -------------------------------------------------------------------------- fs 1 0.4 fs 2 1.4d fs 3 4 0 fs 4 2 0n fs 5 3.1 fs 6 5 0n fs 7 4 0 fs 8 1.4t # -------------------------------------------------------------------------- # Format Assignments # fmt X 1 x - x, y, z, i, j, k, xh, yh, zh, xr, yr, zr # are init. fs 1, with 'normal' prefix letter # -------------------------------------------------------------------------- fmt 8 tldia # Tool Diameter fmt 8 tcr # Tool Radius fmt 7 year1 # Year Format fmt B 2 baxis # B Axis Output fmt B 2 c # Tool Plane Output fmt B 1 a # Rotary axis - substituted for Y fmt T 4 next_tool # Next tool call fmt N 6 nast # N represented as tool number fmt I 2 i # Arc centers, format with a delta for incremental fmt J 2 j # Arc centers, format with a delta for incremental fmt K 2 k # Arc centers, format with a delta for incremental fmt B 1 c # Rotary axis angle (from tool planes) fmt N 6 n # Line number fmt T 4 t # Tool number fmt D 4 tloffno # Tool diameter offset number fmt H 4 tlngno # Tool length offset number fmt F 5 fr # Feedrate fmt 5 plane # Modal plane code selector fmt M 3 cc # Cutter Comp. fmt S 3 ss # Spindle Speed fmt 6 wcs # Make Work Coord. string 'sgwcs' non-modal fmt 6 drillcyc # Make string 'sgdrlcyc' non-modal fmt M 4 ssrange # Spindle Speed Range (mi2 - M42 = hi, M43 = low) fmt M 4 sscode # Spindle Speed Code (M59 - M77 from tbl 1) fmt 3 gcode # Format linear G-code selector for modality only fmt Z 1 depth # Depth (canned cycles) fmt R 1 refht # Reference height fmt Q 1 dwell # Dwell fmt Z 1 initht # Initial height fmt Q 1 peck1 # First peck increment fmt L 1 tlgth # Tool length fmt 4 dirchg # Initialize fmt C 4 coolant # Coolant Format fmt F 5 frplunge # Plunge rate (canned cycles) fmt 3 ccomp # Modal format for ccomp fmt O 6 progno # Program Number fmt P 6 extofst # Extra Offset for G54 fmt T 6 first_tool # Format for 1st tool fmt 6 day # Initialized Day fmt 6 month # Initialized Month fmt 6 year1 # Initialized Year - 1900 # -------------------------------------------------------------------------- # Formulas - Use ':' instead of '=' to initialize variables # -------------------------------------------------------------------------- rotaxtyp : 0 # Initialize axis rotation baxis = a # B Axis format plane : 0 # Initialize plane code to suppress first G17 spaces : 1 # Spaces in .nc file seqmax : 9999 # Max. sequence no. omitseq : yes # Omit sequence no.? frrapid : 708 # Rapid feedrate? 300.0 frmax : 196 # Maximum feedrate? 300.0 ssmax : 27000 # Maximum spindle speed? 27,000 breakarcs : no # Break arcs into quadrants? yes/no arctype : 2 # Arc center 1=abs, 2=inc, 3=st-cen, 4=unsigned inc. ncldr : 20 # No. of leader characters ldrcode : 65 # Leader character dec. equiv. tooltable : yes # Build next tool table i : 0 # Initialize I for pcir j : 0 # Initialize J for pcir k : 0 # Initialize K for pcir g : -1 # G code initialize drlgsel : -1 # Drill select initialize whatno : yes # Ignore whatline branches to plin1 etc.? wcs = mi1 # Work coord. system ssrange = mi2 # Spindle range extofst = mi3 # Extended Work Offsets sscode = frange(1,ss) # Spindle speed code nast = t # Line number = tool bldnxtool : yes # Tool table on swdate : no # Switch For Date Commenting year1 = year -1900 # Year Format # -------------------------------------------------------------------------- # USE CANNED CYCLES? # -------------------------------------------------------------------------- usecandrill : yes usecanpeck : yes usecanchip : yes usecantap : yes usecanbore1 : yes usecanbore2 : yes usecanmisc1 : no usecanmisc2 : no # -------------------------------------------------------------------------- # DEBUG - Switches for debugging purposes # -------------------------------------------------------------------------- bug1 : 1 # 1=Output post screen - 2=output leader screen bug2 : 0 # Add postline label to each line at column 'bug2' bug3 : 0 # Add whatline to each line? yes/no bug4 : 0 # Add -.nci line no. to each line? yes/no # -------------------------------------------------------------------------- # Strings - String labels must start with 's' - they are not pre-assigned # -------------------------------------------------------------------------- # Linear and circular G codes sg00 G00 # Linear movement at rapid feedrate G code sg01 G01 # Linear movement at feedrate G code sg02 G02 # Circular interpolation CW G code sg03 G03 # Circular interpolation CCW G code sgcode # Target string for linear/circular motion G code fstrsel sg00 gcode sgcode # Select motion G code string # -------------------------------------------------------------------------- # Spindle codes sm04 M04 # Spindle reverse - no coolant "M04" sm05 M05 # Spindle off - no coolant "M05" sm03 M03 # Spindle forward - no coolant "M03" sm04c M04 # Spindle reverse - with coolant "M04" sm05c M05 # Spindle off - with coolant "M05" sm03c M03 # Spindle forward - with coolant "M03" spdlon # Target Spindle-on M-string spdlsel = coolant * 3 + fsg3(ss) # Spindle on selector based on # coolant - 0 = off, 1 = on fstrsel sm04 spdlsel spdlon # -------------------------------------------------------------------------- # Plane codes sg17 G17 # XY plane code sg19 G19 # XZ plane code sg18 G18 # YZ plane code sgplane # Workplane G code fstrsel sg17 plane sgplane # Select work plane G code # -------------------------------------------------------------------------- # Work coordinate system sg53 G53 # Work coordinate system G code #1 sg54 G54 # Work coordinate system G code #2 sg55 G55 # Work coordinate system G code #3 sg56 G56 # Work coordinate system G code #4 sg57 G57 # Work coordinate system G code #5 sg58 G58 # Work coordinate system G code #6 sg59 G59 # Work coordinate system G code #7 sgwcs # Work coordinate system G code fstrsel sg53 wcs sgwcs # -------------------------------------------------------------------------- # Drill cycle G codes # Canned drill cycle G-strings sg81 G81 # drill - no dwell sg82 G82 # drill - with dwell sg83 G83 # peck drill - no dwell sg83d G83 # peck drill - with dwell sg73 G73 # chip break - no dwell sg73d G73 # chip break - with dwell sg84 G84 # tap sg84d G84 # tap # must be here for selector to work sg85 G85 # bore #1 - no dwell sg89 G89 # bore #1 - with dwell sg86 G86 # bore #2 - no dwell sg86d G86 # bore #2 - with dwell sgm1 GGG # misc #1 - no dwell sgm1d GGG # misc #1 - with dwell sgm2 GGG # misc #2 - no dwell sgm2d GGG # misc #2 - with dwell sgdrill # Target drill cycle G code drlgsel = drillcyc*2 + fsg2(dwell) # 16 possible combinations: # drillcyc = 0..7 # dwell = 0 or non-zero (2 states) fstrsel sg81 drlgsel sgdrill # Drill cycle G string select # -------------------------------------------------------------------------- # User-defined Postline labels starting with 'p' # End a line with ',' to continue on the next line # -------------------------------------------------------------------------- pxyz # Plane Change Force X, Y, Z if plane = 0, *x, *y if plane = 1, *y, *z if plane = 2, *x, *z pijk # Plane Change Force I, J, K if plane = 0, *i, *j if plane = 1, *j, *k if plane = 2, *i, *k ptllncomp # Tool length compensation "G43", *zr, *tlngno pcan # Canned text - cantext = 0, 1, 2, 3 if cantext = 1, "M01" #optional stop if cantext = 2, "cantext2" if cantext = 3, "cantext3" psg00 # Output "G00" via String Select Function to maintain modality gcode = 0 *sgcode pfr # Don't output neg. feedrate if fr > 0, fr pcompl # Cutter compensation left "G41", *tloffno pcompr # Cutter compensation right "G42", *tloffno pccomp # Cutter compensation #if ccomp = 0 state is unchanged if ccomp = 1, "G40" #Cancel cutter comp if ccomp = 2, pcompl #Cutter comp left if ccomp = 3, pcompr #Cutter comp right if ccomp = 4, "G40" #Cancel cutter comp (last line) pcoolon # Coolant on if coolant = 1, "M08", !coolant pcooloff # Coolant off if prv_coolant = 1, "M09" # -------------------------------------------------------------------------- # Postline - Names are pre-assigned except for partial lines which are # called from pre-assigned lines (Ex. pt) # -------------------------------------------------------------------------- pheader # File header psof0 # Start of file for tool zero psof psof # Start of file for non-zero tool number # 11-23-98 CKP, increased ss ranges if ss > 27000, ss = 25000 n, "G20" n, "G90" n, "M06", t n, *ss, *spdlon n, "G00", *xr, *yr n, ptllncomp, pcoolon ptlchg0 # Null tool change ptlchg # Tool change # 11-23-98 CKP, increased ss ranges if ss > 27000, ss = 25000 n, "G91 G28 Z0" n, "M00" n, "G90" n, "M06", t n, *ss, *spdlon n, "G00", *xr, *yr n, ptllncomp, pcoolon peof0 # End of file for tool zero peof peof # End of file for non-zero tool n, pcooloff n, "G91 G28 Y0 Z0" n, "G90" n, "M30" prapid # Linear line movement - at rapid feedrate n, sgplane, sgcode, x, y, z, !fr pzrapid # Linear movement in Z axis only - at rapid feedrate n, sgplane, pccomp, sgcode, z, !fr plin # Linear line movement - at feedrate n, pccomp, sgcode, x, y, z, pfr, pcan pz # Linear movement in Z axis only - at feedrate n, ptllncomp, sgcode, z, pfr pcir # Circular interpolation n, sgplane, *sgcode, pxyz, pijk, pfr pdrill # Canned Drill Cycle n, *sgdrill, *x, *y, *depth, *refht, dwell, *frplunge ppeck # Canned Peck Drill Cycle n, *sgdrill, *x, *y, *depth, *refht, *peck1, dwell, *frplunge pchpbrk # Canned Chip Break Cycle n, *sgdrill, *x, *y, *depth, *refht, *peck1, dwell, *frplunge ptap # Canned Tap Cycle n, *sgdrill, *x, *y, *depth, *refht, dwell, *frplunge pbore1 # Canned Bore #1 Cycle ptap pbore2 # Canned Bore #2 Cycle ptap pmisc1 # Canned Misc #1 Cycle pmisc2 # Canned Misc #2 Cycle pdrill_2 # Canned Drill Cycle n, x, y ppeck_2 # Canned Peck Drill Cycle pdrill_2 pchpbrk_2 # Canned Chip Break Cycle pdrill_2 ptap_2 # Canned Tap Cycle pdrill_2 pbore1_2 # Canned Bore #1 Cycle pdrill_2 pbore2_2 # Canned Bore #2 Cycle pdrill_2 pmisc1_2 # Canned Misc #1 Cycle pdrill_2 pmisc2_2 # Canned Misc #2 Cycle pdrill_2 pcanceldc # Cancel canned drill cycle n, "G80" pcancelcc # Cancel cutter comp. ccomp = ccomp # dummy line to quiet 'blank line' message ptooltbl # Tool table line format prot1 # Axis Rotation Format n, "Z10.", pcooloff, e n, c, "( TABLE ROTATION )", e n, sgplane, sgwcs, *xr, *yr, *ss, *spdlon, e n, ptllncomp, pcoolon, e prot0 # Single-axis rotation prot prot # Single-axis rotation if c <> prv_c, prot1 pcomment # Manual Entry scomm # -------------------------------------------------------------------------- # Numbered questions for Mastercam # -------------------------------------------------------------------------- 71. Default X home position? 0.0 72. Default Y home position? 0.0 73. Default Z home position? 0.0 80. Communcations port number for receive and transmit (1 or 2) ? 1 81. Baud rate (110, 150, 300, 600, 1200, 2400, 4800, 9600)? 9600 82. Parity (E/O/N)? E 83. Data bits (7 or 8)? 7 84. Stop bits (1 or 2)? 2 85. Strip line feeds? N 86. Delay after end of line (seconds)? 0.0 87. Ascii, Eia, or Binary (A/E/B)? A 88. Echo keyboard to screen in terminal emulation? N 89. Strip carriage returns? N 90. Drive and subdirectory for Material file? c:\mill6\ 91. Name of executable post processor? MP 92. Name of reverse post processor? RPOST 97. Number of places after decimal for analyze (2-6)? 5 98. Number of places after decimal for NCI files (3-7)? 7 103. Maximum spindle speed? 27,000 104. Default starting sequence number? 1 105. Default sequence number increment? 1 107. Average time for tool change (seconds)?12.0 210. Miscellaneous real variable 10 (mr10)? 0.0 301. Default Work Coordinate System (0=G54, 1=G55 to 5=G59)? 0 302. Default Use automatic indexing (1=Yes, 0=No)? 0 303. Default number of index repetitions? 1 306. Default check for axis change of direction (0=No, 1=Yes)? 0 310. Default value of miscellaneous integer 10? 0 # --------------------------------------------------------------------------