MasterCAM--9.1-命令解说一览表
- 格式:doc
- 大小:418.00 KB
- 文档页数:20
MasterCAM9.1的刀具清单功能MasterCAM9.1后处理自动生成刀具清单,使用方法:将下面的容复制到记事本,并将其更名为Mpfan.pst,pst为后缀,再将该文件拷贝至MasterCAM9.1的安装目录C:\Mcam9\Mill\Posts,覆盖原文件,然后启动软件,可以在NC程序开头生成刀具清单。
经典版本,绝对好用!# Post Name : MPFAN# Product : MILL# Machine Name : FANUC# Control Name : 6M# Description : GENERIC FANUC 6M STYLE POST# Associated Post :# Mill/Turn : NO# 4-axis/Axis subs. : NO# 5-axis : NO# Executable : MP 4.03##******************************************************************* *****# *----------------------------------------------------------------------*# * POST PROCESSOR INTENDED FOR VERSION 6 BETA TESTING * # * *# * D O N O T D I S T R I B U T E ! ! ! *# *----------------------------------------------------------------------*#******************************************************************* *****## ---------------#| REVISION LOG |# ------------------------------------------------------------------------# Programmers Note:# CNC 8/15/2005 - grt - Updated for Mill Version 6## ---------------#| FEATURES: |# ------------------------------------------------------------------------# Users Note:## Following Misc_Reals & Misc_Integers are used:## mi1 - Work coordinate system# 0 = Reference return is generated and G92 with the# X, Y and Z home positions at file head.# 1 thru 3 = Reference return is generated and G92 with the # X, Y and Z home positions at each tool.# 4 thru 9 = The WCS of G54 thru G59 respectively at each tool.## Options / Usage:# It is recommended to start and end cutter compensation on a linear move.# Rotary axis assumes a "Z" plunge at feed into part, positionof the# substituted axis at absolute zero position and the retraction from path# by the post call to the G28 machine Z home position.# -------------------------------------------------------------------------- # DEBUG/PROGRAM SWITCHES, debugging and program switches# -------------------------------------------------------------------------- bug1 : 1 # 1 = Output post to screen, 2 = output leader to screenbug2 : 0 # Append postline labels, non-zero is column position?bug3 : 0 # Append whatline no. to each NC line?bug4 : 0 # Append NCI line no. to each NC line?whatno : yes # Do not perform whatline branches?strtool_v7 : 2 #Use Version 7 toolname, 1= path components, 2=stringget_1004 : 1 #Find gcode 1004 with getnextop?rpd_typ_v7 : 1 #Use Version 7 style contour flags?arcoutput : 2 # 0 = IJK, 1 = R no sign, 2 = R signed neg. over 180breakarcs : 0 #Break arcs, 0 = no, 1 = quadrants, 2 = 180deg. max arcsstagetool : 0 # 0 = Do not pre-stage tools, 1 = Stage tools use_gear : no # Set to yes to output gear range codes# -------------------------------------------------------------------------- # FORMAT STATEMENTS - n=nonmodal, l=leading, t=trailing, i=inc, d=delta# -------------------------------------------------------------------------- fs 1 0.3 #Decimal, absolute, 4 placefs 2 0.4d #Decimal, deltafs 3 1 0 #Integer, not leadingfs 4 2 0l #Integer, two leadingfs 5 3 0l #Integer, three leadingfs 6 4 0l #Integer, four leadingfs 7 0.1 #Decimal, absolute, 1 placefs 8 0.2 #Decimal, absolute, 2 placefs 9 0.3 #Decimal, absolute, 3 placefs 10 0 4t #No decimal, absolute, four trailingfs 11 0.4t #Decimal, absolute, four trailing# -------------------------------------------------------------------------- # FORMAT ASSIGNMENTS# -------------------------------------------------------------------------- # Axis output formats - Linear# -------------------------------------------------------------------------- fmt X 1 x # X axis positionfmt Y 1 y # Y axis positionfmt Z 1 z # Z axis positionfmt X 1 xr # X rapid position from tool changefmt Y 1 yr # Y rapid position from tool changefmt Z 1 zr # Z rapid position from tool changefmt X 1 xh # X home positionfmt Y 1 yh # Y home positionfmt Z 1 zh # Z home position# -------------------------------------------------------------------------- # Axis output formats - Circular# -------------------------------------------------------------------------- fmt I 2 i # Arc center description in Xfmt J 2 j # Arc center description in Yfmt K 2 k # Arc center description in Zfmt R 1 arcrad # Arc Radiusfmt R- 1 arcradm # Arc Radius over 180 degree sweep# -------------------------------------------------------------------------- # Axis output formats - Rotary substitution # -------------------------------------------------------------------------- fmt A 9 xs # Linear to rotary calculation of X fmt B 9 ys # Linear to rotary calculation of Y# -------------------------------------------------------------------------- # Program & Sequence number format# -------------------------------------------------------------------------- fmt O 6 progno # Program numberfmt N 3 n # Sequence nos.# -------------------------------------------------------------------------- # Tool format# -------------------------------------------------------------------------- fmt T 3 t # Tool Nofmt T 3 first_tool# First Tool Used (bldnxtool: yes)fmt T 3 next_tool # Next Tool Used (bldnxtool: yes)fmt D 3 tloffno # Diameter Offset Nofmt H 3 tlngno # Length Offset Nofmt "T" 1 tnote # Note formatfmt "D-" 1 toffnote # Note formatfmt "H-" 1 tlngnote # Note formatfmt "Dia-" 2 tldia # Note format# -------------------------------------------------------------------------- # Spindle Speeds & Feedrate output formats # -------------------------------------------------------------------------- fmt S 6 speed # Spindle Speedfmt F 8 fr # Feedratefmt F 7 frdeg # Feedrate for rotaryfmt M 3 gear # Gear range# -------------------------------------------------------------------------- # Drill variable formats# -------------------------------------------------------------------------- fmt G 3 drillref # Initial / Reference Toggle (G98/G99) fmt P 10 dwell # Dwellfmt Z 1 initht # Initial Heightfmt R 1 refht # Reference Heightfmt Z 1 depth # Depthfmt Q 2 peck1 # First peck increment (positive)fmt 1 peck2 # Second or last peck (positive)fmt 1 peckclr # Safety distancefmt 1 retr # Retract heightfmt F 8 frplunge # Plunge feedrate in drill cycles# -------------------------------------------------------------------------- # Miscellaneous output formats# -------------------------------------------------------------------------- fmt M 5 ssrange # Spindle Speed Rangefmt C 4 coolant # Coolant# -------------------------------------------------------------------------- # INITIALIZE - initialize system variables and define user variables# -------------------------------------------------------------------------- qtoolpln : no # MP386 - Enable tool plane option qtoolopt : no # MP386 - Enable tool optimizationarctype : 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=yeshelix_arc : 0 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only bldnxtool : yes # Build next tool tableldrcode : 65 # Leader character dec. equiv. (fleader outputs code)ncldr : 20 # No. of leader characters (fleader outputs code) nobrk : no # Omit breakup of x/y & z rapid movesomitcrlf : no # Omit CR/LFomitrefht : no # Don't use reference height on first non-canned Z moveomitseq : yes # Omit sequence no.omitz : no # Omit first Z movement for non-canned-cycles progname : 1 # Use uppercase for program namescalex : 1.0 # Scaling of .NCI at input - x,y,z,i,j,kscaley : 1.0 # Scaling of .NCI at input - x,y,z,i,j,kscalez : 1.0 # Scaling of .NCI at input - x,y,z,i,j,kseqmax : 9999 # Max. sequence no.skipmotest: no # Skip motion test in linearspaces : 1 # No. of spaces to add between fieldstooltable : 1 # Read for tool table and pwrttabsswp : 0 # Absolute sweepdrlgsel : -1 # Drill Select Initializemaxfrdeg : 9999 # Limit for feed in deg/minabsinc : 0 # Absolute/Incremental toggle for modalitytcnt : 0 # Count the number of tool changesadelta : 0 # Calculation for deg/minldelta : 0 # Calculation for deg/minzdelta : 0 # Calculation for deg/minalzdelta : 0 # Calculation for deg/minfrdelta : 0 # Calculation for deg/minfrdegcalc : 0 # Calculation for deg/mincircum : 0 # Calculation for deg/minrotstrt : 1 # Flag for first rotary positionnewglobal : 1 # Error Check (Leave this variable set to 1)# -------------------------------------------------------------------------- # FORMULAS - global formulas# -------------------------------------------------------------------------- ssrange = mi3 # Gear Range Selectspeed = abs ( ss ) # Absolute spindle speedarcradm = arcrad # Negative arcradspdlsel = fsg3(ss) # Spindle on selector based on pos. or neg. ss# -------------------------------------------------------------------------- # CANNED CYCLES - select long or short code # -------------------------------------------------------------------------- usecandrill : yes # Use canned cycle for drill usecanpeck : yes # Use canned cycle for Peckusecanchip : yes # Use canned cycle for Chip Breakusecantap : yes # Use canned cycle for Tapusecanbore1 : yes # Use canned cycle for Bore1usecanbore2 : yes # Use canned cycle for Bore2usecanmisc1 : yes # Use canned cycle for Misc1usecanmisc2 : yes # Use canned cycle for Misc2# -------------------------------------------------------------------------- # Lookup table definitions - for math functions FLOOK and FRANGE# -------------------------------------------------------------------------- flktbl 1 3 # Lookup table definitions - table no. - no. entries40 1000 # Low gear range41 2500 # Med gear range42 5000 # Hi gear range# -------------------------------------------------------------------------- # Strings - String labels must start with 's' - they are not pre-assigned# -------------------------------------------------------------------------- #Select operation notesop00 NULL # String definitionsop01 END-MIll # " "sop02 END-MIll # " "sop03 DRIll # " "sop04 END-MIll # " "sop05 S-MILL # " "sop06 2D-SWEPT.. # " "sop07 3D-SWEPT.. # " "sop08 REVOLVED.. # " "sop09 LOFT...... # " "sop10 COONS..... # " "sop11 TRIM ..... # " "sop12 FILLET.... # " "sop13 ROUGH..... # " "sop14 OP14...... # " "sop15 OP15...... # " "sopnote # Target stringfstrsel sop00 opcode sopnote# -------------------------------------------------------------------------- # Select motion G codesg00 G0 # Linear movement at rapid feedratesg01 G1 # Linear movement at feedratesg02 G2 # Circular interpolation CWsg03 G3 # Circular interpolation CCWsgcode # Target stringfstrsel sg00 gcode sgcode# -------------------------------------------------------------------------- # Select incremental or absolute G codesg90 G90 # Absolute G codesg91 G91 # Incremental G codesgabsinc # Target stringfstrsel sg90 absinc sgabsinc# -------------------------------------------------------------------------- # Select spindle startsm04 M4 # Spindle reversesm05 M5 # Spindle offsm03 M3 # Spindle forwardspdlon # Target stringfstrsel sm04 spdlsel spdlon# -------------------------------------------------------------------------- # Cutter compensation codescc0 "" # Cutter compensation state not changedsg40 G40 # Cancel cutter compensationsg41 G41 # Cutter compensation leftsg42 G42 # Cutter compensation rightsg140 G40 # 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 stringfstrsel scc0 ccomp sccomp# -------------------------------------------------------------------------- # Select work plane G codesg17 G17 # XY plane codesg19 G19 # XZ plane codesg18 G18 # YZ plane codesgplane # Target stringfstrsel sg17 plane sgplane# -------------------------------------------------------------------------- # Work coordinate systemsg50 G92 # Work coordinate system G codesg51 G92 # " " " " "sg52 G92 # " " " " "sg53 G92 # " " " " "sg54 G54 # " " " " "sg55 G55 # " " " " "sg56 G56 # " " " " "sg57 G57 # " " " " "sg58 G58 # " " " " "sg59 G59 # " " " " "sgwcs # Target stringfstrsel sg50 mi1 sgwcs# -------------------------------------------------------------------------- # Canned drill cycle string selectsg81 G81 # drill - no dwellsg81d G82 # drill - with dwellsg83 G83 # peck drill - no dwellsg83d G83 # peck drill - with dwellsg73 G73 # chip break - no dwellsg73d G73 # chip break - with dwellsg84 G84 # tap - no dwellsg84d G74 # tap - with dwell (selects left hand)sg85 G85 # bore #1 - no dwellsg85d G89 # bore #1 - with dwellsg86 G86 # bore #2 - no dwellsg86d G86 # bore #2 - with dwellsgm1 G81 # misc #1 - no dwellsgm1d G82 # misc #1 - with dwellsgm2 G81 # misc #2 - no dwellsgm2d G82 # misc #2 - with dwellsgdrill # Target stringdrlgsel = drillcyc * 2 + fsg2 ( dwell ) # 16 possible combinations:# drillcyc = 0..7# dwell = 0 or non-zero (2 states) fstrsel sg81 drlgsel sgdrill # -------------------------------------------------------------------------- # Generate 'sgear' stringsgear0 M** # auto gear rangesgear1 M41 # Low gear rangesgear2 M42 # Med gear rangesgear3 M43 # High gear range - selected in parameters by mi3sgearfstrsel sgear0 gear sgear# -------------------------------------------------------------------------- # 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.# -------------------------------------------------------------------------- # Program general output control, user defined # -------------------------------------------------------------------------- pinit # Initialize Varsprv_fr = 999.999prv_frdeg = 999.999prv_frplunge = 999.999linarc = 0rotstrt = 1pabs # Absolute G code outputabsinc = 0sgabsincpinc # Incremental G code outputabsinc = 1sgabsincpcooloff # Coolant off "M" code outputif prv_coolant > 0, "M09"pcoolon # Coolant off "M" code outputif coolant = 1, "M08" # Floodif coolant = 2, "M07" # Mistpcoolnl # Coolant off "M" code outputif coolant = 0, "M09" # Offif coolant = 1, "M08" # Floodif coolant = 2, "M07" # Mistpfr # Feedrate W/O Negative Feedratesif fr > 0, frpcan # Canned text - cantext = 0, 1, 2, 3if cantext = 1, "M01" #optional stopif cantext = 2, " " #user optionif cantext = 3, " " #user option# -------------------------------------------------------------------------- # Work coordinate output, user defined# -------------------------------------------------------------------------- pg92_sof # G92 coordinate setting at start "/", n, pinc, "G28", "Z0.", e"/", n, "G28", "X0.", "Y0.", e"/", n, *sgwcs, *xh, *yh, *zh, epg92_out # G92 coordinate setting at tool change"/", n, "G28", "X0.", "Y0.", eif gcode <> 1003, "/", n, *sgwcs, *xh, *yh, *zh, epwcs # G54+ coordinate settingif mi1 >= 4, *sgwcs# -------------------------------------------------------------------------- # Gear selection control, user defined# -------------------------------------------------------------------------- pgear # Find spindle rangegear = frange ( 1, speed )*gearprange # Find spindle rangeif use_gear = 1, pgear# -------------------------------------------------------------------------- # Cutter comp. output control, user defined # -------------------------------------------------------------------------- pccdia2 # Cutter Compensation2if ccomp <> 4, tloffnopccdia # Cutter Compensationif ccomp <> 0, pccdia2# -------------------------------------------------------------------------- # Axis substitution motion, user defined# -------------------------------------------------------------------------- pdrlxyrot # Substitute Axis X/Y with Rotary axis w/ drillingif rotaxis = 0, x, yif rotaxis = 1, y, xsif rotaxis = 2, x, yspfrd # Feedrate W/O Negative Feedrates (deg/min)if frdeg > maxfrdeg, frdeg = maxfrdegif frdelta > .5, *frdeg #Value to exceed to output frdegprotaxis1a # Substitute Axis X/Y with Rotary axisif rotstrt = 0, n, sgcode, y, z, *xs, pfrd, pcan, eif rotstrt = 1, n, xs, eif rotstrt = 1, n, sgcode, y, z, pfrd, pcan, eprotaxis1 # Substitute Axis X/Y with Rotary axisif gcode = 0, n, sgcode, y, z, *xs, pcan, eif gcode = 1, protaxis1aprotaxis2a # Substitute Axis X/Y with Rotary axisif rotstrt = 0, n, sgcode, x, z, *ys, pfrd, pcan, eif rotstrt = 1, n, ys, eif rotstrt = 1, n, sgcode, x, z, pfrd, pcan, eprotaxis2 # Substitute Axis X/Y with Rotary axisif gcode = 0, n, sgcode, x, z, *ys, pcan, eif gcode = 1, protaxis2aprotaxis # Substitute Axis X/Y with Rotary axisif rotstrt = 1, !frif fr < 0, fr = prv_fr!frif 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 ( xs - prv_xs ) ) / 360 ) * circum if rotaxis = 2, adelta = ( ( abs ( ys - prv_ys ) ) / 360 ) * circum alzdelta = sqrt ( adelta^2 + ldelta^2 + zdelta^2 ) frdegcalc = fr * ( 360 / circum )if alzdelta <> 0, frdeg = ( adelta / alzdelta ) * frdegcalcif adelta = 0, frdeg = frfrdelta = abs ( frdeg - prv_frdeg )if rotaxis = 1, protaxis1if rotaxis = 2, protaxis2if gcode = 1, rotstrt = 0!x, !y, !zprotary # Rotary Moveif rotaxis = 1, xr = 0 #Force X to zeroif rotaxis = 2, yr = 0 #Force Y to zeroif rotaxis > 0, linarc = 1circum = rotdia * pi# -------------------------------------------------------------------------- # Axis linear/circular motion, user defined# -------------------------------------------------------------------------- parctyp2 # Arc output for R w/ sign over 180 degree sweepabsswp = abs ( sweep )!absswpif absswp <= 180, *arcradif absswp > 180, *arcradmparctyp1 # Arc output for R w/ no sign*arcradparctyp0 # Arc output for IJKif plane = 0, *i, *j, kif plane = 1, i, *j, *kif plane = 2, *i, j, *kparctyp # Select the arc outputif arcoutput = 0, parctyp0if arcoutput = 1, parctyp1if arcoutput = 2, parctyp2prapidm # Linear line movement - at rapid feedraten, sgplane, sccomp, pccdia, sgcode, x, y, z, pcanplinm # Linear line movement - at feedraten, sccomp, pccdia, sgcode, x, y, z, pfr, pcanpcirm # Circular interpolationn, sgplane, sccomp, pccdia, sgcode, x, y, z, parctyp, pfr, pcan # -------------------------------------------------------------------------- # Drilling, user defined# --------------------------------------------------------------------------pdrillref # Determine G98 or G99if initht <> refht, drillref = 98if initht = refht, drillref = 99pdwell # Determine whether to output dwellif dwell <> 0, *dwellptlchg0dr2 # Null tool change for drillinggcode = 0if zr < prv_zr, n, sgcode, *xr, *yr, en, sgcode, *zr, eptlchg0drl # Null tool change for drillingif prv_opcode = 3 & zr <> prv_zr, ptlchg0dr2# -------------------------------------------------------------------------- # POSTLINES, PRE-DEFINED - Postline names are pre-assigned.# Lines do not need to end with ', e' for carriage return and linefeed.# -------------------------------------------------------------------------- pcomment # Manual Entry - COMMENTS (on a block by itself) 1005,1006"(", scomm, ")"pheader # File header"%""(", progname,".NC)""(20",year,"-",month,"-",day,",", time, ")"psof0 # Start of file for tool zeropsofpsof # Start of file for non-zero tool number pinit!opcode, !coolantif tcnt = 1, stagetool = 2prognocommentn, "G40 G49 G80 G17 G21"n, "GO G91 G28 Z0."# if stagetool = 0, n, *t, "M6"protaryn, *t, "M6"if stagetool = 0, n, *next_tooln, *sg00,*sg90,*sg54,pabs, *xr, *yrn, *speed, *spdlon, prangen, "G43", tlngno, *zr, pcoolonptlchg0 # Null tool changeif opcode = 3, ptlchg0drlif prv_speed <> speed, n, speedif coolant <> prv_coolant, n, pcoolnl!opcode, !coolantptlchg # Tool changepinit!opcoden, pcooloffn,*sm05n, pinc, "G28", "Z0."if stagetool = 0, n, *t, "M6"if stagetool = 0, n, *next_tooln, "M01"commentprotaryn, *sg00,pabs,*sg54, *xr, *yrn, *speed, *spdlon, prangen, "G43", tlngno, *zr, pcoolon!coolantpeof0 # End of file for tool zeropeofpeof # End of file for non-zero tooln, pcooloffn, *sm05# n, pinc, "G30", "Z0."n, "G91 G28 Z0."n, "G91 G28 Y0."if stagetool = 0, n, *first_tool, "M6""%"# -------------------------------------------------------------------------- # Axis motion# -------------------------------------------------------------------------- prot0 # T oolplane postline - Custom post required prot # Toolplane postline - Custom post requiredprapid # Linear line movement - at rapid feedrateif rotaxis <> 0, protaxiselse, prapidmpzrapid # Linear movement in Z axis only - at rapid feedrate n, sgcode, zplin1 # First linear movement after SOF, whatno must be set plin2 # Second linear movement after SOF, whatno must be setplin # Linear line movement - at feedrateif rotaxis <> 0, protaxiselse, plinmpz # Linear movement in Z axis only - at feedraten, sgcode, z, pfrpcir1 # First circular movement after SOF, whatno must be setpcir2 # Second circular movement after SOF, whatno must be setpcir # Circular interpolationif rotaxis <> 0, protaxiselse, pcirm# -------------------------------------------------------------------------- # Drilling# -------------------------------------------------------------------------- pdrill # Canned Drill Cyclepdrillrefn, *drillref, *sgdrill, pdrlxyrot, *depth, *refht, pdwell, *frplunge ppeck # Canned Peck Drill Cyclen, *drillref, *sgdrill, pdrlxyrot, *depth, *refht, *peck1, *frplungepchpbrk # Canned Chip Break Cyclepdrillrefn, *drillref, *sgdrill, pdrlxyrot, *depth, *refht, *peck1, *frplungeptap # Canned Tap Cyclepdrillrefn, *drillref, *sgdrill, pdrlxyrot, *depth, *refht, *frplungepbore1 # Canned Bore #1 Cyclepdrillrefn, *drillref, *sgdrill, pdrlxyrot, *depth, *refht, pdwell, *frplunge pbore2 # Canned Bore #2 Cyclepdrillrefn, *drillref, *sgdrill, pdrlxyrot, *depth, *refht, *frplunge pmisc1 # Canned Misc #1 Cycle (User Option)pdrillpmisc2 # Canned Misc #2 Cycle (User Option)pdrillpdrill_2 # Canned Drill Cyclen, pdrlxyrot, refht, depthppeck_2 # Canned Peck Drill Cyclepdrill_2pchpbrk_2 # Canned Chip Break Cyclepdrill_2ptap_2 # Canned T ap Cyclepdrill_2pbore1_2 # Canned Bore #1 Cyclepdrill_2pbore2_2 # Canned Bore #2 Cyclepdrill_2pmisc1_2 # Canned Misc #1 Cyclepdrill_2pmisc2_2 # Canned Misc #2 Cyclepdrill_2pcanceldc # Cancel canned drill cycle!gcoden, "G80"prv_z = inithtpcancelcc # Cancel cutter comp.#n, "G40"pwrtt # Write tool table, scans entire file, null tools are negativetnote = ttoffnote = tloffnotlngnote = tlngnoif t >= 0, "(", *tnote, " ", *toffnote, " ", *tlngnote, " ", *tldia, " ",*sopnote, ")"if t >= 0, tcnt = tcnt + 1# -------------------------------------------------------------------------- # Numbered questions for Mastercam -- Used by Mill 5# -------------------------------------------------------------------------- 38. Rapid feedrate? 10000.76. Name of associated CFG file? T400. Name of associated CFG file? T1538. Rapid feedrate (metric)? 20000.080. Communications port number for receive and transmit (1 or 2) ? 281. Data rate (110,150,300,600,1200,2400,4800,9600,14400,19200,38400)? 960082. Parity (E/O/N)? E83. Data bits (7 or 8)? 784. Stop bits (1 or 2)? 285. Strip line feeds? N86. Delay after end of line (seconds)? 087. Ascii, Eia, or Binary (A/E/B)? A88. Echo keyboard to screen in terminal emulation? n89. Strip carriage returns? N90. Drive and subdirectory for NC files?91. Name of executable post processor? MP92. Name of reverse post processor? RP93. Reverse post PST file name? RPABS100. Number of places BEFORE the decimal point for sequence numbers? 3101. Number of places AFTER the decimal point for sequence numbers? 0103. Maximum spindle speed? 8000107. Average time for tool change (seconds)? 1#110. Default tool library? TOOLS-MM.TL9# -------------------------------------------------------------------------- # Switches to Enable OR Disable toolpath parameter screen buttons# -------------------------------------------------------------------------- 161. Enable Home Position button? Y162. Enable Reference Point button? y163. Enable Misc. Values button? y164. Enable Rotary Axis button? N165. Enable Tool Plane button? y166. Enable Construction Plane button? y167. Enable Tool Display button? y168. Check tplane during automatic work origin creation? y # -------------------------------------------------------------------------- # Default Miscellaneous Real Values# -------------------------------------------------------------------------- 201. Default miscellaneous real variable 1 (mr1)? 0.0 202. Default miscellaneous real variable 2 (mr2)? 0.0203. Default miscellaneous real variable 3 (mr3)? 0.0204. Default miscellaneous real variable 4 (mr4)? 0.0205. Default miscellaneous real variable 5 (mr5)? 0.0206. Default miscellaneous real variable 6 (mr6)? 0.0207. Default miscellaneous real variable 7 (mr7)? 0.0208. Default miscellaneous real variable 8 (mr8)? 0.0209. Default miscellaneous real variable 9 (mr9)? 0.0210. Default miscellaneous real variable 10 (mr10)? 0.0# -------------------------------------------------------------------------- # Default Miscellaneous Real Values (METRIC) # -------------------------------------------------------------------------- 1601. Default miscellaneous real variable 1 (mr1) (metric)? 0.01602. Default miscellaneous real variable 2 (mr2) (metric)?0.01603. Default miscellaneous real variable 3 (mr3) (metric)?0.01604. Default miscellaneous real variable 4 (mr4) (metric)?0.01605. Default miscellaneous real variable 5 (mr5) (metric)?0.01606. Default miscellaneous real variable 6 (mr6) (metric)?0.01607. Default miscellaneous real variable 7 (mr7) (metric)?0.01608. Default miscellaneous real variable 8 (mr8) (metric)?0.01609. Default miscellaneous real variable 9 (mr9) (metric)?0.01610. Default miscellaneous real variable 10 (mr10) (metric)?0.0# ----------------------------------------------------------------。
mastercam9.1快捷键指令格式:G00 X(U) Z(W) ;(2)直线插补(G01或G1)指令格式:G01 X(U) Z(W) F ;G02 顺时针圆弧插补G03 逆时针圆弧插补G04 停顿G17 选择XY平面G18 选择XZ平面G19 选择YZ平面G20 英制G21 公制G28 返回参考点G29 返回第二参考点G30 跳步功能G40 取消刀具半径补偿G41 刀具半径左补偿G42 刀具半径右补偿G43 刀具长度补偿G49 取消刀具长度补偿G50 取消比例缩放功能G51 比例缩放功能G51.1 镜像G50.1 取消镜像G53 选择机床坐标系G54 选择第一工件坐标系G55 选择第二工件坐标系G56 选择第三工件坐标系G57 选择第四工件坐标系G58 选择第五工件坐标系G59 选择第六工件坐标系G65 宏程序及宏程序调用G68 坐标旋转指令G69 坐标旋转指令取消G70 精加工循环(车)G71 外圆粗车固定循环(车)G72 端面车削固定循环G73 深孔钻削循环(铣床)G73 成型加工复式循环(车)G74 攻螺纹循环(铣床)G74 端面深孔加工循环(车)G75 外圆、内圆切槽循环(车)G80 取消钻孔模式G81 钻孔G83 啄钻G84 攻丝G90 绝对坐标(铣床)G90 车端面循环(车)G91 相对坐标G92 设定工件坐标系(铣床)G92 车螺纹(车)M00 暂停M01 选择性暂停M02 程序结束M30 程序结束并返回程序头M03 启动主轴转速M04 主轴停止M05 主轴停转M06 换刀M08 切削液开M09 切削液关M19 主轴定位M98 调子程序M99 子程序结束#1=30 毛坯外形#2=6 刀具直径#4=20 加工深度#5=[#1+#2]/2 首次下刀位置G21G40 G17 G80T01 M06N10G00 G90 G54 X#5 Y0 M03 S3200G43 H1 Z50 M8Z1#3=0 变量G1 Z0 F1000 上面就不用介绍了WHILE [#3 LT #4] DO1 这句话应该这么翻译【如果#3小于#4循环1继续】#3=#3+1 每次变量加1G2 I-#5 Z-#3 F800 螺旋下刀END1 循环结束G2 I-#5 铣圆G0 G91 X2.G0 G90 Z10 退刀#5=#5-5 每次变量减5IF [#5 GE 8] GOTO 10 这句话应该这么翻译【如果#5大于等于8跳至N10】G91G28Z0M5G28Y0M9M30。
MasterCAM9.1教程第1章Mastercam基本操作1.1Mastercam简介Mastercam是美国CNC Software公司研制开发的CAD/CAM系统。
Mastercam包括4⼤模块,即DESIGN、LATHE、WIRE和MILL,它是⼀套兼有CAD和CAM功能的套装软件。
Mastercam作为基于PC平台开发的CAD/CAM软件,虽然不如⼯作站软件功能全、模块多,但就其性能价格⽐来说更具灵活性。
Mastercam对硬件要求较低,且具有操作灵活、易学易⽤的特点,能使企业很快见到效益。
可以在Windows 98、Windows 2000和Windows XT等操作环境下运⾏,Mastercam由于其价格相对较低,⼜是在PC平台下应⽤,硬件投⼊⼩,所以有着巨⼤的发展潜⼒。
Mastercam的当前最新版本是x版,⽬前较为常⽤的是9.0版本,在操作上有较⼤区别。
提⽰:本书将以Mastercam 9中⽂版为蓝本进⾏讲述。
DESIGN模块中不仅可以设计编辑复杂的⼆维、三维空间曲线,还能⽣成⽅程曲线,同时其尺⼨标注、注释等也较为⽅便。
在其曲⾯造型功能中,采⽤NURBS、PARAMETRICS等数学模型,有⼗多种⽣成曲⾯的⽅法,还具有曲⾯修剪、曲⾯倒圆⾓、曲⾯偏移、延伸等编辑功能,还可以进⾏实体造型,同时提供了可靠的数据交换功能。
在Mastercam中可以直接输⼊中⽂,并⽀持Turetype字体。
MILL模块主要⽤于⽣成铣削加⼯⼑具路径。
Mastercam⽀持2轴、3轴、4轴和5轴加⼯程序的编制。
可以直接加⼯曲⾯及实体,提供多种⼑具路径形式和⾛⼑⽅式。
同时还提供了⼑具路径的管理和编辑、路径模拟、实体加⼯模拟和后处理等功能,Mastercam可以直接与机床控制器进⾏通信。
LATHE模块主要⽤于⽣成车削加⼯⼑具路径。
可以进⾏精车、粗车、车螺纹、径向切槽、钻孔、镗孔等加⼯功能。
在最新的9.0版本中,还有WIRE线切割加⼯模块与ROUTER冲床加⼯模块。