Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

harry320

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

harry320's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Millman, Jimmy I have included a sample of the code that I’m trying to produce and the complete post. Jimmy I couldn’t find any pzout/pfzout any where in the post. Thanks again for your help! G0 Z1.0000 M5 G0 X4.5000 Y2.7900 F20.000G1 Z0.0000 M3 F20.000G1 X4.5000 Y2.8000 G1 X4.5000 Y2.8100 G1 X4.4900 Y2.8100 G1 X5.1200 Y4.8100 M5 G0 Z0.5000 G0 X5.4100 Y5.1100 F20.000G1 Z0.0000 M3 F20.000G1 X5.4100 Y5.1200 G1 X5.4200 Y5.1200 G1 X5.4200 Y5.1300 M5 G0 Z1.0000 M5M30 #------------------------------------------------------------------------------- # MASTERCAM POST PROCESSOR | Executable: MP.EXE 7.07 # Machine type: 4 axis verticle spindle mill # Control type: Fanuc / generic # Revised by Ron Becker for Mach2 CNC # ------------------------------------------------------------------------------ # INDEX Line search = search, L + index line no. # ------------------------------------------------------------------------------ # 1_OPTIONS & ASSIGNMENTS of mr & mi values # 2_DEBUG & PROGRAM SWITCHES # 3_FORMAT STATEMENTS - n=nonmodal, l=leading, t=trailing, i=inc, d=delta # 4_AXIS OUTPUT FORMAT - linear # 5_AXIS OUTPUT FORMATS - circular # 6_Axis output formats - Rotary substitution # 7_PROGRAM & SEQUENCE number format # 8_TOOL FORMAT # 9_SPINDLE SPEEDS & FEEDRATE output formats # 10_DRILL VARIABLE FORMATS # 11_MISCELLANEOUS OUTPUT FORMATS # 12_INITIALIZE - initialize system variables and define user variables # 13_FORMULAS - global formulas # 14_CANNED CYCLES - select long or short code # 15_STRINGS - string labels must start with 's' - they are not pre-assigned # 16_SELECT MOTION G codes # 17_SELECT INCREMENTAL OR ABSOLUTE MODE # 18_SELECT SPINDLE START & DIRECTION # 19_CUTTER COMPENSATION G codes # 20_SELECT WORK PLANE G codes # 21_WORK COORDINATE SYSTEM # 22_CANNED DRILL CYCLE string select - G code formats # 23_Date, Time, & Year / postlines user defined # 24_Program general output control / postlines user defined # 25_Gear selection prompt / postlines user defined # 26_WORK COORDINATE OUTPUT / postlines user defined # 27_CUTTER COMP. output control / postlines user defined # 28_Axis substitution motion, user defined # 29_AXIS LINEAR/CIRCULAR MOTION / postlines user defined # 30_DRILLING / postlines user defined # 31_START OF NC FILE / postlines system defined # 32_AXIS MOTION / postlines system defined # 33_DRILLING / postlines system defined # 34_NUMBERED QUESTIONS FOR MASTERCAM # 35_CONFIGURATION FILE ASSOCIATION PARAMETERS # 36_MACH2 G CODE LIST # ------------------------------------------------------------------------------ # L1 - OPTIONS & ASSIGNMENTS # ------------------------------------------------------------------------------ # WORK COORDINATE SYSTEM # mi1 set 4 to 9 # Output: G54 THRU G59 respectively at tool change & WCS change # G59P0 output with G28 Z0. command. # ------------------------------------------------------------------------------ # LOOP & REPEAT # mi2 set to ? # Output: Loop & Rep. command with reference to the program no. for address. # Note: program no. has been forced to a value of 10000 times of the given # program no. This is to avoid program line number being selected for an # address. # ------------------------------------------------------------------------------ # ASSIGNMENT of MISC_REAL & MISC_INTEGERS # ------------------------------------------------------------------------------ # mr1 - | mi1 - WORK COORDINATE SYSTEM # mr2 - | mi2 - LOOP & REP. no. of times # mr3 - | mi3 - Manual cutter comp select # mr4 - | # mr5 - | # mr6 - | # mr7 - | # mr8 - | # mr9 - | # mrX - | # ------------------------------------------------------------------------------ # L2 - DEBUG/PROGRAM SWITCHES, debugging and program switches # ------------------------------------------------------------------------------ fastmode : 1 #Posting speed optimizition bug1 : 2 #0=No display, 1=Generic list box, 2=Editor bug2 : 30 #Append postline labels, non-zero is column position? bug3 : 0 #Append whatline no. to each NC line? bug4 : 1 #Append NCI line no. to each NC line? whatno : yes #Do not perform whatline branches? leave as yes get_1004 : 1 #Find gcode 1004 with getnextop? skp_lead_flgs : 1 #Do not use v9 style contour flags rpd_typ_v7 : 1 #Use Version 7 style contour flags? strtool_v7 : 2 #Use Version 7 toolname? arcoutput : 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180 arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc. do_full_arc : 0 #Allow full circle output? 0=no, 1=yes helix_arc : 0 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only stagetool : 0 #0 = Do not pre-stage tools, 1 = Stage tools use_gear : 0 #Output gear selection code, 0=no, 1=yes max_speed : 5000 #Maximum spindle speed min_speed : 50 #Minimum spindle speed # ------------------------------------------------------------------------------ # L3 - FORMAT STATEMENTS - n=nonmodal, l=leading, t=trailing, i=inc, d=delta # ------------------------------------------------------------------------------ fs 1 0.4 #Decimal, absolute, 4 place fs 2 0.4d #Decimal, delta fs 3 1 0 #Integer, not leading fs 4 2 0l #Integer, two leading fs 5 3 0l #Integer, three leading fs 6 4 0l #Integer, four leading fs 7 0.1 #Decimal, absolute, 1 place fs 8 0.2 #Decimal, absolute, 2 place fs 9 0.3 #Decimal, absolute, 3 place fs 10 0 4t #No decimal, absolute, four trailing fs 11 0.4t #Decimal, absolute, four trailing # ------------------------------------------------------------------------------ # FORMAT ASSIGNMENTS # ------------------------------------------------------------------------------ # L4 - Axis output formats - Linear # ------------------------------------------------------------------------------ fmt X 1 x # X axis position fmt X 1 xh # X home position fmt X 1 xr # X rapid position from tool change fmt Y 1 y # Y axis position fmt Y 1 yh # Y home position fmt Y 1 yr # Y rapid position from tool change fmt Z 1 z # Z axis position fmt Z 1 zh # Z home position fmt Z 1 zr # Z rapid position from tool change # ------------------------------------------------------------------------------ # L5 - Axis output formats - Circular # ------------------------------------------------------------------------------ fmt I 2 i # Arc center description in X fmt J 2 j # Arc center description in Y fmt K 2 k # Arc center description in Z fmt R 1 arcrad # Arc Radius fmt R- 1 arcradm # Arc Radius over 180 degree sweep # -------------------------------------------------------------------------- # L6 - Axis output formats - Rotary substitution # -------------------------------------------------------------------------- fmt A 9 xangle # Linear to rotary calculation of X fmt B 9 yangle # Linear to rotary calculation of Y # ------------------------------------------------------------------------------ # L7 - Program & Sequence number format # ------------------------------------------------------------------------------ fmt O 3 progno # Program number fmt N 5 n # Sequence nos. # ------------------------------------------------------------------------------ # L8 - Tool format # ------------------------------------------------------------------------------ fmt T 3 t # Tool No fmt T 3 first_tool # First Tool Used bldnxtool: yes fmt T 3 next_tool # Next Tool Used bldnxtool: yes fmt "" 3 tloffno_1 # Diameter Offset No fmt H 3 tlngno # Length Offset No fmt "" 4 tnote # Note format fmt H 4 tlngnote # Note format fmt "" 11 tldia # Note format # ------------------------------------------------------------------------------ # L9 - Spindle Speeds & Feedrate output formats # ------------------------------------------------------------------------------ fmt F 8 fr # Feedrate fmt S 6 speed # Spindle Speed fmt F 7 frdeg # Feedrate for rotary # ------------------------------------------------------------------------------ # L10 - Drill variable formats # ------------------------------------------------------------------------------ fmt F 8 frplunge # Plunge feedrate in drill cycles fmt G 3 drillref # Initial / Reference Toggle G98/G99 fmt Z 1 initht # Initial Height fmt R 1 refht # Reference Height fmt Z 1 depth # Depth fmt Q 1 peck1 # First peck increment fmt 1 peck2 # fmt 1 peckclr # fmt 8 retr # fmt P 1 dwell # Dwell # ------------------------------------------------------------------------------ # L11 - Miscellaneous output formats # ------------------------------------------------------------------------------ fmt 8 regtime # Sets time to nonmilitary fmt 3 day # Day fmt 3 month # Month fmt 3 year # Year fmt C 4 coolant # Coolant fmt G 3 g41 # Cutter comp manual select fmt O 3 progn # Program no. fmt P 3 go2no # Loop and repeat address fmt L 3 loop # Loop and repeat no. of times fmt M 5 ssrange # Spindle on/off call # ------------------------------------------------------------------------------ # L12 - INITIALIZE - initialize system variables and define user variables # ------------------------------------------------------------------------------ qtoolpln : no # MP386 - Enable tool plane option qtoolopt : no # MP386 - Enable tool optimization arctype : 2 # Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc. bldnxtool : yes # Build next tool table ldrcode : 65 # Leader character dec. equiv. leader outputs code ncldr : 20 # No. of leader characters fleader outputs code nobrk : no # Omit breakup of x/y & z rapid moves omitcrlf : no # Omit CR/LF omitrefht : no # Don't use reference height on first non-canned Z move omitseq : no # Omit sequence no. omitz : no # Omit first Z movement for non-canned-cycles progname : 1 # Use uppercase for program name scalex : 1.0 # Scaling of .NCI at input - x,y,z,i,j,k scaley : 1.0 # Scaling of .NCI at input - x,y,z,i,j,k scalez : 1.0 # Scaling of .NCI at input - x,y,z,i,j,k seqmax : 50000 # Max. sequence no. skipmotest: no # Skip motion test in linear spaces : 1 # No. of spaces to add between fields tooltable : 1 # Read for tool table and pwrtt absswp : 0 # Absolute sweep drlgsel : -1 # Drill Select Initialize maxfrdeg : 50000 # Limit for feed in deg/min absinc : 0 # Absolute/Incremental toggle for modality tcnt : 0 # Count the number of tool changes adelta : 0 # Calculation for deg/min ldelta : 0 # Calculation for deg/min zdelta : 0 # Calculation for deg/min alzdelta : 0 # Calculation for deg/min frdelta : 0 # Calculation for deg/min frdegcalc : 0 # Calculation for deg/min circum : 0 # Calculation for deg/min rotstrt : 1 # Flag for first rotary position # ------------------------------------------------------------------------------ # L13 - FORMULAS - global formulas # ------------------------------------------------------------------------------ g41 = mi3 # Select manual cutter comp go2no = progno # Loop and repeat address loop = mi2 # Loop and repeat no. of times speed = abs ss # Absolute spindle speed spdlsel = fsg3ss # Spindle on selector based on pos. or neg. ss regtime = time-12 # Sets time to nonmilitary tloffno_1 = tloffno-40 # Corrects tool offset no. D41 to D01 # ------------------------------------------------------------------------------ # L14 - CANNED CYCLES - select long or short code # ------------------------------------------------------------------------------ usecandrill : yes # Use canned cycle for Drill usecanpeck : yes # Use canned cycle for Peck usecanchip : yes # Use canned cycle for Chip Break usecantap : yes # Use canned cycle for Tap usecanbore1 : yes # Use canned cycle for Bore1 usecanbore2 : yes # Use canned cycle for Bore2 usecanmisc1 : yes # Use canned cycle for Misc1 usecanmisc2 : yes # Use canned cycle for Misc2 # ------------------------------------------------------------------------------ # L15 - Strings - String labels must start with 's' - not pre-assigned # ------------------------------------------------------------------------------ #Select operation note sop00 NULL # String definition sop01 2D/CONTOUR # " " sop02 3D/CONTOUR # " " sop03 DRILL/ETC. # " " sop04 POCKET.... # " " sop05 RULED..... # " " sop06 2D/SWEPT.. # " " sop07 3D/SWEPT.. # " " sop08 REVOLVED.. # " " sop09 LOFT...... # " " sop10 COONS..... # " " sop11 TRIM ..... # " " sop12 FILLET.... # " " sop13 MULTI/SURF # " " sop14 OP14...... # " " sop15 OP15...... # " " sopnote # Target string fstrsel sop00 opcode sopnote # ------------------------------------------------------------------------------ # L16 - Select motion G code # ------------------------------------------------------------------------------ sg00 G0 # Linear movement at rapid feedrate sg01 G1 # Linear movement at feedrate sg02 G2 # Circular interpolation CW sg03 G3 # Circular interpolation CCW sgcode # Target string fstrsel sg00 gcode sgcode # ------------------------------------------------------------------------------ # L17 - Select incremental or absolute G code # ------------------------------------------------------------------------------ sg90 G90 # Absolute G code sg91 G91 # Incremental G code sgabsinc # Target string fstrsel sg90 absinc sgabsinc # ------------------------------------------------------------------------------ # L18 - Select spindle start & direction # ------------------------------------------------------------------------------ sm04 M4 # Spindle reverse sm05 M5 # Spindle off sm03 M3 # Spindle forward spdlon # Target string fstrsel sm04 spdlsel spdlon # ------------------------------------------------------------------------------ # L19 - Cutter compensation code # ------------------------------------------------------------------------------ scc0 "" # Cutter compensation state not changed sg40 G40 # Cancel cutter compensation sg41 G41 # Cutter compensation left sg42 G42 # Cutter compensation right sg140 # Last linear move cancel cutter comp see note # Note: to cancel comp after last move, remove G40 string # with sg140 and remove "#" at the postline call "pcancelcc" sccomp # Target string fstrsel scc0 ccomp sccomp # ------------------------------------------------------------------------------ # L20 - Select work plane G code # ------------------------------------------------------------------------------ sg17 G17 # XY plane code sg19 G19 # YZ plane code sg18 G18 # XZ plane code sgplane # Target string fstrsel sg17 plane sgplane # ------------------------------------------------------------------------------ # L21 - Work coordinate system # ------------------------------------------------------------------------------ sg50 sg51 sg52 sg53 G53 # Machine Coordinates G Code sg54 G54 # Work Coordinates System G Code sg55 G55 # " " " " " sg56 G56 # " " " " " sg57 G57 # " " " " " sg58 G58 # " " " " " sg59 G59 # " " " " " sgwcs # Target string fstrsel sg50 mi1 sgwcs # ------------------------------------------------------------------------------ # L22 - Canned drill cycle string select # ------------------------------------------------------------------------------ sg81 G81 # drill - no dwell sg81d 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 - no spindle reverse sg84d G74 # tap - auto spindle reverse at final depth sg85 G85 # bore #1 - no dwell sg85d G89 # bore #1 - with dwell sg86 G86 # bore #2 - no dwell & dead spindle retract sg86d G86 # bore #2 - with dwell & dead spindle retract sgm1 G81 # misc #1 - no dwell sgm1d G82 # misc #1 - with dwell sgm2 G81 # misc #2 - no dwell sgm2d G82 # misc #2 - with dwell sgdrill # Target string drlgsel = drillcyc * 2 + fsg2 dwell # 16 possible combinations: # drillcyc = 0..7 # dwell = 0 or non-zero 2 states fstrsel sg81 drlgsel sgdrill # ------------------------------------------------------------------------------ # POSTLINES, USER-DEFINED - Postline labels start with 'p'. # End a line with ',' to continue on the next line. # End a line with ', e' to generate carriage return and linefeed. # ------------------------------------------------------------------------------ # L23 - Date, Time, & Year # ------------------------------------------------------------------------------ ptime # Set time to non military if time < 13.00, time if time >= 13.00, regtime pyear_1 # Selects year output if year < 10, "0", year if year > 9, year pyear # Selects year output if year < 1, "00" if year >= 1, pyear_1 # ------------------------------------------------------------------------------ # L24 - Program general output control, user defined # ------------------------------------------------------------------------------ pcoolon # Coolant on "M" code output if coolant = 1, "M08" # Flood if coolant = 2, "M07" # Mist pcooloff # Coolant off "M" code output if prv_coolant > 0, "M09" pcoolnl # Coolant on/off "M" code output if coolant = 0, "M09" # Off if coolant = 1, "M08" # Flood if coolant = 2, "M08" # Mist pfr # Feedrate W/O Negative Feedrates if fr > 0, fr pcan # Canned text - cantext = 0, 1, 2, 3 if cantext = 1, "M01" #optional stop if cantext = 2, " " #user option if cantext = 3, " " #user option pabs # Absolute G code output absinc = 0 sgabsinc pinc # Incremental G code output absinc = 1 sgabsinc pinit # Initialize Vars prv_fr = 999.999 prv_frplunge = 999.999 prv_loop = 0 ploop # Loop & repeat " ", n, " M98 ", go2no, "0000 ", *loop, e preturn # Return to main " ", n, "M99", e # ------------------------------------------------------------------------------ # L25 - Gear selection prompt # ------------------------------------------------------------------------------ pchkgr # Monitors required gear if speed < 500, " Gear Lo " if speed >= 500, " Gear Hi " # ------------------------------------------------------------------------------ # L26 - Work coordinate output, user defined # ------------------------------------------------------------------------------ pwcs # G54+ coordinate setting if mi1 >= 4, *sgwcs pG59P0_open # Opening of file for WCS " ", n, "G59P0 G28 Z0.", e " ", n, "G28 X0. Y0." p_open # Opening of file " ", n, "G28 Z0.", e " ", n, "G28 X0. Y0." pG59P0_end # Return to Machine coordinate at end of file " ", n, "G59P0 G28 Z0.", e " ", n, "G28 X0. Y0.", e p_end # End of file " ", n, "G28 Z0.", e " ", n, "G28 X0. Y0.", e ptlchg0wcs_4 # Null tool change, work coordinates changed if prv_coolant > 0, n, "M09", e " ", n, "G59P0 G28 Z0.", e " ", n, "G40 G49 G80 G90", e spaces = 0 if mi2 >= 2, ploop, e if progno <> 0, progno, "0000 Program no.", e n, *t, " ",*speed," ", pchkgr,"", e n, " ",*strtool," ", e spaces = 1 n, "G00", pwcs, *xr, *yr, *spdlon, e n, "G43", *tlngno, *zr, pcoolon, e ptlchg0wcs # Null tool change, work coordinate setting if mi1 >= 4, ptlchg0wcs_4 # ------------------------------------------------------------------------------ # L27 - Cutter comp. output control, user defined # ------------------------------------------------------------------------------ pccdia # Cutter Compensation if ccomp >= 1, tloffno_1 pmancomp_2 # Manual cutter comp select if fr <> -1, *g41, tloffno_1 pmancomp_1 # Manual cutter comp select if prv_z <> zr, pmancomp_2 pmancomp # Manual cutter comp select if mi3 <> 0, pmancomp_1 # -------------------------------------------------------------------------- # L28 - Axis substitution motion, user defined # -------------------------------------------------------------------------- pdrlxyrot # Substitute Axis X/Y with Rotary axis w/ drilling xangle = xs yangle = ys if rotaxis = 0, x, y if rotaxis = 1, y, xangle if rotaxis = 2, x, yangle pfrd # Feedrate W/O Negative Feedrates deg/min if frdeg > maxfrdeg, frdeg = maxfrdeg if frdelta > .5, *frdeg #Value to exceed to output frdeg protaxis1a # Substitute Axis X/Y with Rotary axis if rotstrt = 0, n, sgcode, y, z, *xangle, pfrd, pcan, e if rotstrt = 1, n, xangle, e if rotstrt = 1, n, sgcode, y, z, pfrd, pcan, e protaxis1 # Substitute Axis X/Y with Rotary axis if gcode = 0, n, sgcode, y, z, *xangle, pcan, e if gcode = 1, protaxis1a protaxis2a # Substitute Axis X/Y with Rotary axis if rotstrt = 0, n, sgcode, x, z, *yangle, pfrd, pcan, e if rotstrt = 1, n, yangle, e if rotstrt = 1, n, sgcode, x, z, pfrd, pcan, e protaxis2 # Substitute Axis X/Y with Rotary axis if gcode = 0, n, sgcode, x, z, *yangle, pcan, e if gcode = 1, protaxis2a protaxis # Substitute Axis X/Y with Rotary axis xangle = xs yangle = ys if rotstrt = 1, !fr if fr < 0, fr = prv_fr !fr if rotaxis = 1, ldelta = abs y - prv_y if rotaxis = 2, ldelta = abs x - prv_x zdelta = abs z - prv_z if rotaxis = 1, adelta = abs xangle - prv_xangle / 360 * circum if rotaxis = 2, adelta = abs yangle - prv_yangle / 360 * circum alzdelta = sqrt adelta^2 + ldelta ^2 + zdelta^2 frdegcalc = fr * 360 / circum if alzdelta <> 0, frdeg = adelta / alzdelta * frdegcalc if adelta = 0, frdeg = fr frdelta = abs frdeg - prv_frdeg if rotaxis = 1, protaxis1 if rotaxis = 2, protaxis2 if gcode = 1, rotstrt = 0 !x, !y, !z protary # Rotary Move if rotaxis = 1, xr = 0 #Force X to zero if rotaxis = 2, yr = 0 #Force Y to zero if rotaxis > 0, linarc = 1 circum = rotdia * pi # ------------------------------------------------------------------------------ # L29 - Axis linear/circular motion, user defined # ------------------------------------------------------------------------------ parctyp2 # Arc output for R w/ sign over 180 degree sweep absswp = abs sweep if absswp <= 180, *arcrad if absswp > 180, *arcradm parctyp1 # Arc output for R w/ no sign *arcrad parctyp0 # Arc output for IJK if plane = 0, *i, *j, k if plane = 1, i, *j, *k if plane = 2, *i, j, *k parctyp # Select the arc output if arcoutput = 0, parctyp0 if arcoutput = 1, parctyp1 if arcoutput = 2, parctyp2 prapidm # Linear line movement - at rapid feedrate n, sgplane, sccomp, pccdia, sgcode, x, y, z, pcan plinm # Linear line movement - at feedrate n, sccomp, pccdia, sgcode, x, y, z, pfr, pcan pcirm # Circular interpolation n, sgplane, sccomp, pccdia, sgcode, x, y, z, parctyp, pfr, pcan # ------------------------------------------------------------------------------ # L30 - Drilling, user defined # ------------------------------------------------------------------------------ pdrillref # Determine G98 or G99 if initht > refht, drillref = 98 if initht <= refht, drillref = 99 ptlchg0dr3 # Null tool change for drilling gcode = 0 if zr < prv_zr, n, sgcode, *xr, *yr, e n, sgcode, *zr, e ptlchg0dr2 # Null tool change for drilling if zr <> prv_zr, ptlchg0dr3 ptlchg0drl # Null tool change for drilling if prv_opcode = 3, ptlchg0dr2 pdwell # Determine whether to output dwell if dwell > 0, *dwell pdwell_1 # Determine whether to output dwell or pause if dwell > 0, "G04", *dwell if dwell = 0, "M01" # ------------------------------------------------------------------------------ # L31 - START OF NC FILE # ------------------------------------------------------------------------------ # POSTLINES, PRE-DEFINED - Postline names are pre-assigned. # Lines do not need to end with ', e' for carriage return and linefeed. # ------------------------------------------------------------------------------ pheader # File header "%" spaces = 0 " Time: ",ptime," " " Date: ",mon," ",day,", 20",pyear," " " ", e " Program name: ", progname,".nc " spaces = 1 " Programer: [email protected] " " ", e " TOOL OFFSETS DIA TYPE " psof # Start of file for non-zero tool number pinit !opcode, !coolant " ", e comment if mi1 < 4, p_open if mi1 >= 4, pG59P0_open spaces = 0 if mi2 <> 0, " ", n, " M01" if mi2 <> 0, ploop if progno <> 0, " ", progno, "0000 Program no. " if mi2 <> 0, " ", n, " M01" " ", n, " G40 G49 G80 G90" n," ", *t," ",*speed," ",pchkgr," " n, " ",*strtool," " spaces = 1 n, "G00", pwcs, *xr, *yr, *spdlon n, "G43", *tlngno, *zr, pcoolon ptlchg0 # Null tool change pinit if mi1 <> prv_mi1, ptlchg0wcs if opcode = 3, ptlchg0drl if speed <> prv_speed, n, *speed if coolant <> prv_coolant, n, pcoolnl !opcode, !zr, !coolant ptlchg # Tool change if prv_opcode <> 3,n, "M05", pcooloff if mi1 < 4, p_open if mi1 >= 4, pG59P0_open if prv_loop <> 0, preturn pinit spaces = 0 if mi2 <> 0, " ", n, " M01" if mi2 <> 0, ploop if progno <> 0, " ", progno, "0000 Program no. " if mi2 <> 0, " ", n, " M01" " ", n, " G40 G49 G80 G90" n," ",*t," ", *speed," ", pchkgr, " " n, " M06 ",*strtool," " spaces = 1 comment n, "G00", pwcs, *xr, *yr, *spdlon n, "G43", *tlngno, *zr, pcoolon !coolant peof # End of file for non-zero tool if prv_opcode <> 3, n, "M05", pcooloff if mi1 < 4, p_end if mi1 >= 4, pG59P0_end if prv_loop <> 0, preturn " ",n, "M30" # ------------------------------------------------------------------------------ # L32 - Axis motion # ------------------------------------------------------------------------------ prot0 # Toolplane postline - Custom post required prot # Toolplane postline - Custom post required prapid # Linear line movement - at rapid feedrate if rotaxis <> 0, protaxis if rotaxis = 0, prapidm pzrapid # Linear movement in Z axis only - at rapid feedrate n, sgcode, z plin1 # First linear movement after SOF, whatno must be set plin2 # Second linear movement after SOF, whatno must be set plin # Linear line movement - at feedrate if rotaxis <> 0, protaxis if rotaxis = 0, plinm pz # Linear movement in Z axis only - at feedrate n, sgcode, z, pfr pcir1 # First circular movement after SOF, whatno must be set pcir2 # Second circular movement after SOF, whatno must be set pcir # Circular interpolation if rotaxis <> 0, protaxis if rotaxis = 0, pcirm # ------------------------------------------------------------------------------ # L33 - Drilling # ------------------------------------------------------------------------------ # G80/Drlgsel 0: Standard drill cycle # G81/Drlgsel 1: Standard drill cycle w/dwell # G83/Drlgsel 2: Peck drill cycle # G83/Drlgsel 3: Peck drill w/dwell # G73/Drlgsel 4: Chip breaker drill cycle # G73/Drlgsel 5: Chip breaker drill cycle w/dwell # G84/Drlgsel 6: Tap cycle # G74/Drlgsel 7: Tap cycle w/dwell Reverse spindle out # G85/Drlgsel 8: #1 Bore cycle # G89/Drlgsel 9: #1 Bore cycle w/dwell # G86/Drlgsel 10: #2 Bore cycle & dead spindle retract # G86/Drlgsel 11: #2 Bore cycle w/dwell & dead spindle retract pdrill # Canned Drill Cycle pdrillref, !tldia, !drlgsel, !opcode n, *drillref, *sgdrill, *depth, *refht, pdwell, *frplunge ppeck # Canned Peck Drill Cycle pdrillref, !tldia, !drlgsel, !opcode n, *drillref, *sgdrill, *depth, *refht, pdwell, *peck1, *frplunge pchpbrk # Canned Chip Break Drill Cycle pdrillref, !tldia, !drlgsel, !opcode n, *drillref, *sgdrill, *depth, *refht, pdwell, *peck1, *frplunge ptap # Canned TAP Cycle pdrillref, !tldia, !drlgsel, !opcode n, "M49" n, *drillref, *sgdrill, *depth, *refht, *frplunge pbore1 # Canned Bore Cycle #1 pdrillref, !tldia, !drlgsel, !opcode n, *drillref, *sgdrill, *depth, *refht, *frplunge pbore2 # Canned bore cycle #2 pdrillref, !tldia, !drlgsel, !opcode n, *drillref, *sgdrill, *depth, *refht, pdwell_1, *frplunge pmisc1 # Not in use pmisc2 # Not in use pdrill_2 # Canned Drill Cycle n, *x, *y, depth, refht ppeck_2 # Canned Peck Drill Cycle pdrill_2 pchpbrk_2 # Canned Chip Breaker Drill Cycle pdrill_2 ptap_2 # Canned Tap Cycle pdrill_2 pbore1_2 # Canned Bore Cycle #1 pdrill_2 pbore2_2 # Canned Bore Cycle #2 pdrill_2 pmisc1_2 # Not in use pmisc2_2 # Not in use pcanceldc # Cancel canned drill cycle !drlgsel, !gcode, !opcode if prv_drlgsel < 6, n, "G80", e if prv_drlgsel < 6, n, "M05", pcooloff if prv_drlgsel = 6, n, "G80", e if prv_drlgsel = 6, n, "M48", pcooloff if prv_drlgsel > 6, n, "G80", e if prv_drlgsel > 6, n, "M05", pcooloff pcancelcc # Cancel cutter compensation n, "G40" ptloffno # Tool Diameter Offset Note !tloffno_1 if tloffno_1 < 10, "D0", *tloffno_1 if tloffno_1 > = 10, "D", *tloffno_1 pwrtt # Write tool table, scans entire file, null tools are negative tnote = t tlngnote = tlngno spaces = 0 if t >= 1, " T",*tnote," ",*tlngnote," ",ptloffno," ",*strtool," " spaces = 1 # ------------------------------------------------------------------------------ # L34 - Numbered questions for Mastercam # ------------------------------------------------------------------------------ 38. Rapid feedrate? 300.0 1538. Rapid feedrate metric ? 10000.0 80. Communications port number for receive and transmit 1 or 2 ? 2 81. Data rate 110,150,300,600,1200,2400,4800,9600,14400,19200,38400 ? 300 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 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 NC files? 91. Name of executable post processor? MP 92. Name of reverse post processor? RP 93. Reverse post PST file name? RPFAN 100. Number of places BEFORE the decimal point for sequence numbers? 3 101. Number of places AFTER the decimal point for sequence numbers? 0 103. Maximum spindle speed? 3600 107. Average time for tool change seconds ? 2.0 159. Show first and last position as fully compensated in simulation? n 161. Enable Home Position button? y 162. Enable Reference Point button? n 163. Enable Misc. Values button? y 164. Enable Rotary Axis button? n 165. Enable Tool Plane button? y 166. Enable Construction Plane button? y 167. Enable Tool Display button? y 168. Check tplane during automatic work origin creation? n # ------------------------------------------------------------------------------ # L35 - Configuration File association parameters default is "y" # ------------------------------------------------------------------------------ #400. Name of associated cfg file? Mill7.cfg 401. Read SYSTEM COLORS section? y 402. Read ALLOCATIONS section? y 403. Read TOLERANCES section? y 404. Read DATA PATHS section? y 405. Read COMMUNICATIONS section? y 406. Read DRAFT SETTINGS section? y 407. Read MISCELLANEOUS section? y 408. Read NC SETTINGS section? y 409. Read DIALOG SCRIPTS section? y 410. Read DESIGN SETTINGS section? y 411. Read PLOTTER SETTINGS section? y 412. Read ALT-KEY ASSIGNMENTS section? y 413. Read CAD section? y 414. Read START/EXIT section? y 415. Read SCREEN section? y 416. Read FILE NAMES section? y 1500. Chook to execute from 'Misc. values' button? 1501. Insert parameter information in the ascii NCI? n 1502. Write operation information to binary file .ops ? n 1503. Write transform operations 0=transform ops, 1=source ops, 2=both ? 1 1520. Display a warning when cutter compensation in control simulation finds an error? n 1521. Number of controller look-ahead blocks for CDC in control? 2 1530. Ignore work offset numbers when processing subprograms? y 1531. Ignore contour flags when processing subprograms? y # Do NOT manually change the answer for Q.1999 ! 1999. Product major version number that post supports? 9 3001. Machine acceleration? 2 3002. timing size? .1 # ------------------------------------------------------------------------------ # L36 - Mach2 G Code list # ------------------------------------------------------------------------------ # G1 FeedRate move # G2 Interpolated Arc CW # G3 Interpolated Arc CCW # G4 Dwell Delay # G8 Set exact Stop Mode # G9 Set Consatnt Velocity Mode # G10 Set Fixture Offsets Origins # G17 X-Y Plane Selection # G18 X-Z Plane Selection # G19 Y-Z Plane Selection # G20 INCH coordinates # G21 MM coordinates # G28 Go to machine coordinate reference point home switches # G30 Same as G28 at present # G31 Probe Command # G40 Cancel Radius Offset Mode # G41 Radius Offset Left Mode # G42 Radius Offset Right Mode # G43 Tool Length Offset # G49 Cancel Tool Length Offset # G53 Force Machine Coordinate move. # G54 Use Fixture Offset # 1 # G55 Use Fixture Offset # 2 # G56 Use Fixture Offset # 3 # G57 Use Fixture Offset # 4 # G58 Use Fixture Offset # 5 # G59 Use Fixture Offset # 6 # G59.1 Use Fixture Offset # 7 # G59.2 Use Fixture Offset # 8 # G59.3 Use Fixture Offset # 9 # G61 Exact Stop Mode # G61.1 Exact Stop Mode # G64 Constant Velocity Mode # G80 Cancel Motion Mode Cancels Canned Cycles as well # G81 Drilling Canned Cycle # G82 Drilling with Dwell # G83 Drilling with Chip Breaking # G84 Right Hand Tapping Cycle # G85 Boring Cycle #1 # G86 Boring Cycle #2 # G87 Boring Cycle #3 # G88 Boring Cycle #4 # G89 Boring Cycle #5 # G90 Absolute Distance Mode # G91 Incremental Distance Mode # G92 Offset Coordinate system # G92.1 Cancel Origin Offset # G92.2 Set Axis Offsets to zero, keep parameters. # G92.3 Set Axis Offsets to zero, zero the paramters # G93 Inverse Time Feed Mode # G94 Feed Per Minute Mode # G95 Feed Per Revolution # G98 Call Subroutine # G99 Return from Subroutine
  2. Hi Millman, This is section L31 of my post which is where I understand I need to place these commands to force the M3/M5s to produce the splndon.Do you need to see all of the post? Harry
  3. ---- Hi All, I’m trying to get my post setup to do plasma cutting. I’m using spdlon and off to control torch on and off. What I need the post to do is “*spdlon “when the Z goes down and off on retract. I don’t have any experience with this level of programming so if any of you could help out with the proper command and location for the post I would really appreciation it. Thanks Harry -------------------------------------------------------------------------- # L31 - START OF NC FILE # ------------------------------------------------------------------------------ # POSTLINES, PRE-DEFINED - Postline names are pre-assigned. # Lines do not need to end with ', e' for carriage return and linefeed. # ------------------------------------------------------------------------------ pheader # File header "%" spaces = 0 "( Time: ",ptime," )" "( Date: ",mon," ",day,", 20",pyear," )" " ", e "( Program name: ", progname,".nc )" spaces = 1 "( Programer: Your Name goes here )" " ", e "( TOOL OFFSETS DIA TYPE )" psof # Start of file for non-zero tool number pinit !opcode, !coolant " ", e comment if mi1 < 4, p_open if mi1 >= 4, pG59P0_open spaces = 0 if mi2 <> 0, " ", n, " M01" if mi2 <> 0, ploop if progno <> 0, " ", progno, "0000 (Program no.)" if mi2 <> 0, " ", n, " M01" " ", n, " G40 G49 G80 G90" n," ", *t," ",*speed," (",pchkgr,")" n, " (",*strtool," )" spaces = 1 n, "G00", pwcs, *xr, *yr, *spdlon n, "G43", *tlngno, *zr, pcoolon ptlchg0 # Null tool change pinit if mi1 <> prv_mi1, ptlchg0wcs if opcode = 3, ptlchg0drl if speed <> prv_speed, n, *speed if coolant <> prv_coolant, n, pcoolnl ptlchg # Tool change if prv_opcode <> 3,n, "M05", pcooloff if mi1 < 4, p_open if mi1 >= 4, pG59P0_open if prv_loop <> 0, preturn pinit spaces = 0 if mi2 <> 0, " ", n, " M01" if mi2 <> 0, ploop if progno <> 0, " ", progno, "0000 (Program no.)" if mi2 <> 0, " ", n, " M01" " ", n, " G40 G49 G80 G90" n," ",*t," ", *speed," (", pchkgr, ")" n, " M06 (",*strtool," )" spaces = 1 comment n, "G00", pwcs, *xr, *yr, *spdlon n, "G43", *tlngno, *zr, pcoolon !coolant peof # End of file for non-zero tool if prv_opcode <> 3, n, "M05", pcooloff if mi1 < 4, p_end if mi1 >= 4, pG59P0_end if prv_loop <> 0, preturn " ",n, "M30"
  4. Thanks for all the help! I'll give it a try when I get back home. It's a sony model v505bx. Harry
  5. > Does anyone in the group that uses Mastercam 9.1 have it installed > on a laptop? I put a copy on my new Sony and every time I try to > open Mastercam the computer crashes. > I'm thinking it may be the video card and or lack of video memory > only 16mb. 2.0 gig Pentium and 512 ram. > Harry >

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...