From a41d6887577fd9e3e6b8a50886e4a5151c2b0d61 Mon Sep 17 00:00:00 2001 From: babayaga Date: Thu, 13 Mar 2025 08:55:14 +0100 Subject: [PATCH] 530 init --- post/530.PST | 2826 +++++++++++++++++ post/GENERIC HEIDENHAIN_TNC530 3X MILL MM.MMD | Bin 0 -> 70118 bytes post/GENERIC HEIDENHAIN_TNC530 3X MILL.MMD | Bin 0 -> 68718 bytes post/GENERIC HEIDENHAIN_TNC530 3X MILL.PST | 2826 +++++++++++++++++ .../GENERIC HEIDENHAIN_TNC530 3X MILL.control | Bin 0 -> 131120 bytes ...RIC HEIDENHAIN_TNC530 3X MILL.mcam-control | Bin 0 -> 216900 bytes 6 files changed, 5652 insertions(+) create mode 100644 post/530.PST create mode 100644 post/GENERIC HEIDENHAIN_TNC530 3X MILL MM.MMD create mode 100644 post/GENERIC HEIDENHAIN_TNC530 3X MILL.MMD create mode 100644 post/GENERIC HEIDENHAIN_TNC530 3X MILL.PST create mode 100644 post/GENERIC HEIDENHAIN_TNC530 3X MILL.control create mode 100644 post/GENERIC HEIDENHAIN_TNC530 3X MILL.mcam-control diff --git a/post/530.PST b/post/530.PST new file mode 100644 index 0000000..2b36b3e --- /dev/null +++ b/post/530.PST @@ -0,0 +1,2826 @@ +[POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V10.00 E1 P0 T1123876832 M10.00 I0 +# Post Name : Generic Heidenhain_TNC530 3X Mill.pst +# Product : Mill +# Machine Name : Generic +# Control Name : Heidenhain TNC-426/430/530 +# Description : Heidenhain Conversational Mill Post +# 4-axis/Axis subs. : Yes (NOT configured yet!) +# 5-axis : No +# Subprograms : Yes +# Executable : MP 10.0 +# +# WARNING: THIS POST IS GENERIC AND IS INTENDED FOR MODIFICATION TO +# THE MACHINE TOOL REQUIREMENTS AND PERSONAL PREFERENCE. +# +# Associated File List$ +# +# GENERIC HEIDENHAIN_TNC530 3X.control +# GENERIC HEIDENHAIN_TNC530 3X.MMD +# GENERIC HEIDENHAIN_TNC530 3X MM.MMD +# +# Associated File List$ +# +# -------------------------------------------------------------------------- +# Revision log: +# -------------------------------------------------------------------------- +# CNC 08/12/05 - Initial post setup for Mastercam X +# +# -------------------------------------------------------------------------- +# Features: +# -------------------------------------------------------------------------- +# This post supports Generic Heidenhain 426/430/530 code for 3 axis milling. +# It is designed to support the features of Mastercam X Mill. +# +# This post has several Heidenhain specific output option switches. +# Search for "Output Configuration Settings" to locate the post section. +# +# NEW FEATURES FOR X: +# - Variable initialization with CD_VAR are read directly from CD. Changing these initial values +# in the post will not effect output. These values are only processed during the update post routine. +# - Supports X comments including machine name, group name and group comment output (see pcomment2) +# - Additional date, time and data path output options (see pheader) +# - Support for 10 additional canned text options for X +# +# Drilling (canned) cycles supported in this post: +# - 200 DRILLING +# - 201 REAMING +# - 202 BORING - !!MACHINE MUST BE SETUP FOR THIS CYCLE!! +# - 203 UNIVERSAL DRILLING +# - 1.0 PECKING +# - 205 UNIVERSAL PECKING +# - 2.0 TAPPING +# - 206 TAPPING NEW +# - 17.0 RIGID TAPPING GS - !!MACHINE MUST BE SETUP FOR THIS CYCLE!! +# - 207 RIGID TAPPING NEW - !!MACHINE MUST BE SETUP FOR THIS CYCLE!! +# - 209 TAPPING W/ CHIP BRKG - !!MACHINE MUST BE SETUP FOR THIS CYCLE!! +# +# -------------------------------------------------------------------------- +# Misc. Values: +# -------------------------------------------------------------------------- +# Integers: +# +# mi1 - (NOT USED) +# +# mi2 - Absolute or Incremental positioning at top level +# 0 = absolute +# 1 = incremental +# +# mi3 - mi10 (NOT USED) +# +# Reals: +# +# mr1 - mr10 (NOT USED) +# +# -------------------------------------------------------------------------- +#Canned text: +# Not Supported +# +# -------------------------------------------------------------------------- +#Additional Notes: +# 1) Metric is applied from the NCI met_tool variable. +# 2) Incremental mode calculates motion from home position at toolchanges. +# The home position is used to define the last position of the tool +# for all toolchanges. +# 3) The variable 'absinc' is now pre-defined, set mi2 (Misc. Integer) for +# the 'top level' absolute/incremental program output. Subprograms are +# updated through the Mastercam dialog settings for sub-programs. +# +# END_HEADER$ +# +# -------------------------------------------------------------------------- +# Debugging and Factory Set Program Switches +# -------------------------------------------------------------------------- +#Define Constants +m_one := -1 +zero := 0 +one := 1 +two := 2 +three := 3 +four := 4 +five := 5 +c9k := 9999 + +fastmode$ : yes$ #CD_VAR Enable Quick Post Processing, (set to no for debug) +bug1$ : 2 #0=No display, 1=Generic list box, 2=Editor +bug2$ : 40 #Append postline labels, non-zero is column position? +bug3$ : 0 #Append whatline number to each NC line? +bug4$ : 1 #Append NCI line number to each NC line? +whatno$ : yes$ #Do not perform whatline branches? (leave as yes) +linktolvar$ : 1 #Associate X tolerance variables to V9- variable? +linkplnvar$ : 1 #Associate X plane specific variables to V9- variable? +skp_lead_flgs$ : 0 #Do NOT use v9 style contour flags +get_1004$ : 1 #Find gcode 1004 with getnextop? +rpd_typ_v7$ : 0 #Use Version 7 style contour flags/processing? +strtool_v7$ : 2 #Use Version 7+ toolname? +tlchng_aft$ : 2 #Delay call to toolchange until move line +cant_tlchng$ : 1 #Ignore cantext entry on move with tlchng_aft +newglobal$ : 1 #Error checking for global variables +getnextop$ : 1 #Build the next variable table +tooltable$ : 3 #Pre-read, call the pwrtt postblock + +# -------------------------------------------------------------------------- +# Output Configuration Settings +# -------------------------------------------------------------------------- +modal_XY : yes$ #Are X & Y axis positions modal ? +modal_feed : yes$ #Is 'F'eedrate modal? +modal_cdc : no$ #Are 'RR' and 'RL' comp codes modal? +force_n0 : no$ #Force sequence numbering to START at '0' +blk_form : yes$ #Output the 'BLK FORM" statements at start of program? +tdef_table : yes$ #Put all the TOOL DEF blocks at the top of the program? +use_scode : no$ #Use Spindle Code lookup table? + #If = no, output the programmed RPM + +setup_sign : 2 #0 = Do not change the sign of SETUP + #1 = Always make SETUP a NEGATIVE value + #2 = Always make SETUP a POSITIVE value + +peckg_sign : 2 #0 = Do not change the sign of PECKG + #1 = Always make PECKG a NEGATIVE value + #2 = Always make PECKG a POSITIVE value + +sextnc$ ".H" #CD_VAR Set extension on output file + +output_M6 : no$ #Set to yes if M6 is required for tool change + +output_M30 : yes$ #Yes = output M30, no = output END PGM block - + #Depends on setting in parameter 7300 on machine control. + +# -------------------------------------------------------------------------- +# General Output Settings +# -------------------------------------------------------------------------- +sub_level$ : 1 #CD_VAR Enable automatic subprogram support +breakarcs$ : 0 #CD_VAR Break arcs, 0 = no, 1 = quadrants, 2 = 180deg. max arcs +arcoutput : 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180 +arctype$ : 1 #CD_VAR Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc., + #5 = R no sign, 6 = R signed neg. over 180 +do_full_arc$ : 0 #CD_VAR Allow full circle output? 0=no, 1=yes +helix_arc$ : 2 #CD_VAR Support helix arc output, 0=no, 1=all planes, 2=XY plane only +arccheck$ : 1 #CD_VAR Check for small arcs, convert to linear +atol$ : 0.01 #CD_VAR Angularity tolerance for arccheck +ltol$ : 0.002 #CD_VAR Length tolerance for arccheck +vtol$ : 0.0001#System tolerance +maxfeedpm : 500 #Limit for feed in inch/min +ltol_m : 0.05 #Length tolerance for arccheck, metric +vtol_m : 0.0025#System tolerance, metric +maxfeedpm_m : 10000 #Limit for feed in mm/min +spaces$ : 1 #CD_VAR Number of spaces to add between fields +omitseq$ : no$ #CD_VAR Omit sequence numbers? +seqmax$ : 9999 #CD_VAR Max. sequence number +stagetool : 0 #SET_BY_CD 0 = Do not pre-stage tools, 1 = Stage tools +max_speed : 18000 #Maximum spindle speed +min_speed : 50 #Minimum spindle speed +nobrk$ : no$ #Omit breakup of x, y & z rapid moves +progname$ : 1 #Use uppercase for program name (sprogname) + +# -------------------------------------------------------------------------- +# Rotary Axis Settings +# -------------------------------------------------------------------------- +vmc : 1 #0 = Horizontal Machine, 1 = Vertical Mill +rot_on_x : 0 #Default Rotary Axis Orientation, See ques. 164. + #0 = Off, 1 = About X, 2 = About Y, 3 = About Z +rot_ccw_pos : 1 #Axis signed dir, 0 = CW positive, 1 = CCW positive +index : 1 #Use index positioning, 0 = Full Rotary, 1 = Index only +ctable : 5 #Degrees for each index step with indexing spindle +use_frinv : no$ #Use Inverse Time Feedrates in 4 Axis, (0 = no, 1 = yes) +maxfrdeg : 2000 #Limit for feed in deg/min +maxfrinv : 999.99#Limit for feed inverse time +frc_cinit : yes$ #Force C axis reset at toolchange +ctol : 225 #Tolerance in deg. before rev flag changes +ixtol : 0.01 #Tolerance in deg. for index error +frdegstp : 10 #Step limit for rotary feed in deg/min + +# -------------------------------------------------------------------------- +# Enable Canned Drill Cycle Switches +# -------------------------------------------------------------------------- +usecandrill$ : yes$ #CD_VAR Use canned cycle for drill +usecanpeck$ : yes$ #CD_VAR Use canned cycle for Peck +usecanchip$ : yes$ #CD_VAR Use canned cycle for Chip Break +usecantap$ : yes$ #CD_VAR Use canned cycle for Tap +usecanbore1$ : yes$ #CD_VAR Use canned cycle for Bore1 +usecanbore2$ : yes$ #CD_VAR Use canned cycle for Bore2 +usecanmisc1$ : yes$ #CD_VAR Use canned cycle for Misc1 +usecanmisc2$ : yes$ #CD_VAR Use canned cycle for Misc2 + +# -------------------------------------------------------------------------- +# Common User-defined Variable Initializations (not switches!) +# -------------------------------------------------------------------------- +xia : 0 #Formatted absolute value for X incremental calculations +yia : 0 #Formatted absolute value for Y incremental calculations +zia : 0 #Formatted absolute value for Z incremental calculations +cia : 0 #Formatted absolute value for C incremental calculations + +cuttype : 0 #Cut type flag + #0 = Tool Plane, 1 = Axis Subs, 2 = Polar, 3 = 4/5 axis +bld : 0 #Block delete active +result : 0 #Return value for functions +sav_spc : 0 #Save spaces +sav_gcode : 0 #Gcode saved +sav_absinc : 0 #Absolute/Incremental Saved Value +sav_coolant : 0 #Coolant saved +toolchng : 1 #On a toolchange flag +spdir2 : 1 #Copy for safe spindle direction calculation +thd_ttpr : 0 #Flag for tapered thread + +#Drill variables +drlgsel : -1 #Drill Select Initialize +drillref : 0 #Select drill reference +peckacel$ : 0 #CD_VAR Fractional percent to reduce peck2 when usecan.. : no +drlgcode : 0 #Save Gcode in drill +sav_dgcode : 0 #Drill gcode saved + +#Subprogram variables +mr_rt_actv : 0 #Flag to indicate if G51/G68 is active + #0=Off, 1=Toolchange, 2=Subprogram call/start, G68 + #3=Absolute start, both +rt_csav : 0 #C saved value +end_sub_mny : 0 #Many tool setting captured at transform sub end + +#Rotary/Index variables +csav : 0 #C saved value +prvcabs : 0 #Saved cabs from pe_inc_calc, + #Used for rotary feed and direction calculations +cdelta : 0 #Calculation for angle change +rev : 0 #Calculation for deg/min +sav_rev : 0 #Saved revolution counter +indx_out : c9k #Rotation direction calculation +fmt 16 indx_mc #Rotation direction calculation + +#Vector Constants for Rotatary Calculations +aaxisx : 1 #A axis rotation vector constant +aaxisy : 0 #A axis rotation vector constant +aaxisz : 0 #A axis rotation vector constant +baxisx : 0 #B axis rotation vector constant +baxisy : 1 #B axis rotation vector constant +baxisz : 0 #B axis rotation vector constant +caxisx : 0 #C axis rotation vector constant +caxisy : 0 #C axis rotation vector constant +caxisz : 1 #C axis rotation vector constant + +#Feedrate calculation variables +frdelta : 0 #Calculation for deg/min +frinv : 0 #Feedrate inverse time +frdeg : 0 #Feedrate deg/min actual +prvfrdeg : 0 #Feedrate deg/min actual +ldelta : 0 #Calculation for deg/min, linear +cldelta : 0 #Calculation for deg/min, linear and rotary +circum : 0 #Calculation for deg/min +ipr_type : 0 #Feedrate for Rotary, 0 = UPM, 1 = DPM, 2 = Inverse + +xmove : no$ #Is this axis moving ? +ymove : no$ #Is this axis moving ? +zmove : no$ #Is this axis moving ? + +# -------------------------------------------------------------------------- +# Format statements - n=nonmodal, l=leading, t=trailing, i=inc, d=delta +# -------------------------------------------------------------------------- +#Default english/metric position format statements +fs2 1 0.7 0.6 #Decimal, absolute, 7 place, default for initialize (:) +fs2 2 +1.4 1.3lt #Decimal, absolute, 4/3 place (Forced +/- sign output) +fs2 3 +1.4 1.3lt #Decimal, absolute, 4/3 place (Forced +/- sign output) +#Common format statements +fs2 4 1 0 1 0 #Integer, not leading +fs2 5 2 0 2 0l #Integer, force two leading +fs2 6 3 0 3 0l #Integer, force three leading +fs2 7 4 0 4 0 #Integer, four leading +fs2 8 1.3 1.2ltn #Decimal, absolute, 3/2 place, leading&trailing, non-modal +fs2 9 1.1 1.1ltn #Decimal, absolute, 1/1 place, leading&trailing, non-modal +fs2 10 0.2 0.2 #Decimal, absolute, 2 place +fs2 11 0.3 0.3 #Decimal, absolute, 3 place +fs2 12 0.4 0.4 #Decimal, absolute, 4 place +fs2 13 0.5 0.5 #Decimal, absolute, 5 place +fs2 14 0.3 0.3d #Decimal, delta, 3 place +fs2 15 1 1 1 0lt #Decimal, absolute, 1/0 place (feedrate) +fs2 16 1 0 1 0n #Integer, forced output +fs2 17 0.3 0.2 #Decimal, absolute, 3/2 place (tapping feedrate) +fs2 18 1.4 1.3lt #Decimal, absolute, 4/3 place, leading&trailing +fs2 19 +1^4 1^4l #Decimal, absolute, 4 place, force leading, omit decimal for whole numbers +fs2 20 +1^4 1^4 #Decimal, absolute, 4 place. Omit decimal for whole numbers +fs2 21 4 1 4 1t #Decimal, absolute, 1place trailing - Omit decimal + +# These formats used for 'Date' & 'Time' +fs2 22 2.2 2.2lt #Decimal, force two leading & two trailing (time2) +fs2 23 2 0 2 0t #Integer, force trailing (hour) +fs2 24 0 2 0 2lt #Integer, force leading & trailing (min) + +# -------------------------------------------------------------------------- +#String and string selector definitions for NC output +# -------------------------------------------------------------------------- +#Numbered question 164. string to detect Rotary axis y/n +sq164 + +#Misc. string definitions +sopen_prn " ; " #String for open parenthesis "(" +sclose_prn #String for close parenthesis ")" +sdelimiter "|" #String for delimiter + +# String constants +sdef "CYCL DEF" +scyclcall "CYCL CALL" +stooldef "TOOL DEF " +stoolcall "TOOL CALL " +ssetup "SET UP " +sdepth "DEPTH " +speckg "PECKG " +spitch "PITCH " +sdwell "DWELL " +sbeginpgm "BEGIN PGM" +sendpgm "END PGM" +smax "MAX" +sstop "M05" +strc "C" +strcc "CC" +strcr "CR" +strcp "CP" + +#------------------------------------------------------------------------- +strf0 "" +strf "F" +strl "L" +strr "R" +strr0 "R0" +strm99 "M99" +strix "IX" +striy "IY" +striz "IZ" +strx "X" +stry "Y" +strz "Z" +smaxrate "FMAX" #"Rapid" positioning feedrate + +#Drilling strings +s200q "Q200=" +s200 " ;SET-UP CLEARANCE ~" +s201 " ;DEPTH ~" +s202 " ;PLUNGING DEPTH ~" +s203 " ;SURFACE COORDINATE ~" +s204 " ;2ND SET-UP CLEARANCE ~" +s205 " ;MINIMUM PLUNGING DEPTH ~" +s206 " ;FEED RATE FOR PLUNGING ~" +s208 " ;RETRACTION FEEDRATE ~" +s210 " ;DWELL TIME AT TOP ~" +s211 " ;DWELL TIME AT BOTTOM ~" +s212 " ;DECREMENT ~" +s213 " ;BREAKS ~" +s214 " ;DISENGAGING DIRECTION (0/1/2/3/4) AT BOTTOM OF HOLE ~" +s239 " ;THREAD PITCH ~" +s256 " ;DISTANCE FOR CHIP BREAK ~" +s257 " ;INFEED DEPTH FOR CHIP BREAKING ~" +s258 " ;UPPER ADVANCED STOP DISTANCE ~" +s259 " ;LOWER ADVANCED STOP DISTANCE ~" +s336 " ;ANGLE FOR ORIENTED SPINDLE STOP ~" + +#Address string definitions +strm0 "" +strm "M" +strn "N" +stro "O" +strp "P" +srad "R" +srminus "R-" +sblank + +#Cantext string definitions (spaces must be padded here) +sm00 "M00" +sm01 "M01" +strtextno +strcantext + +#Transform mirror and rotate codes +strns_mir_on "G51.1" #Programmable mirror image code +strns_mir_off "G50.1" #Programmable mirror image cancel code +strns_rot_on "G68" #Coordinate System Rotation +strns_rot_off "G69" #Coordinate System Rotation Cancel + +# -------------------------------------------------------------------------- +# Error messages +# -------------------------------------------------------------------------- +saxiswarn "WARNING-POST ROTARY AXIS ASSIGNMENT ('rot_on_x') OVERWRITTEN BY OPERATION" +saxisoff "ERROR-POST ROTARY AXIS ASSIGNMENT ('rot_on_x') IS DISABLED" +saxiserror "ERROR-INVALID ROTARY AXIS ASSIGNMENT ('rot_on_x') FOR CURRENT OPERATION" +sindxerror "WARNING-INDEX ANGLE DOES NOT MATCH POST SETTING ('ctable')" +stlorgerr "ERROR-TOOL ORIGIN DOES NOT MATCH CENTER OF ROTATION IN POLAR MILLING" +shomeserror "ERROR-G92 WORK OFFSET ('mi1') DOES NOT SUPPORT TRANSFORM SUBPROGRAM" +sprgnerror "ERROR-SUBPROGRAM NUMBER MATCHES THE MAIN PROGRAM NUMBER" +splnerror "ERROR-DETERMINING THE TOOL AXIS WORK PLANE" + +# -------------------------------------------------------------------------- +# General G and M Code String select tables +# -------------------------------------------------------------------------- +# Motion G code selection +sg00 L #Rapid +sg01 L #Linear feed +sg02 DR- #Circular interpolation CW +sg03 DR+ #Circular interpolation CCW +sg04 DWELL #Dwell +sgcode #Target for string + +fstrsel sg00 gcode$ sgcode 5 -1 +# -------------------------------------------------------------------------- +# Select tool axis work plane code +sg17 Z #XY plane code +sg19 X #YZ plane code +sg18 Y #XZ plane code +sgplane #Target string + +fstrsel sg17 plane$ sgplane 3 -1 +# -------------------------------------------------------------------------- +#Select english/metric code +sg20 INCH #Inch code +sg21 MM #Metric code +smetric #Target string + +fstrsel sg20 met_tool$ smetric 2 -1 +# -------------------------------------------------------------------------- +# Cutter compensation G code selection +scc0 R0 #Cancel cutter compensation +scc1 RL #Cutter compensation left +scc2 RR #Cutter compensation right +sccomp #Target for string + +fstrsel scc0 cc_pos$ sccomp 3 -1 +# -------------------------------------------------------------------------- +# Feed mode G code selection +sg94 G94 #UPM +sg94d G94 #DPM, See pfcalc_deg if you use another gcode +sg93 G93 #Inverse +sgfeed #Target for string + +fstrsel sg94 ipr_type sgfeed 3 -1 +# -------------------------------------------------------------------------- +# Generate string for spindle +sm04 M04 #Spindle reverse +sm05 M05 #Spindle off +sm03 M03 #Spindle forward +spindle #Target for string + +fstrsel sm04 spdir2 spindle 3 -1 +# -------------------------------------------------------------------------- +# Coolant M code selection for V9 style coolant +sm09 M9 #Coolant Off +sm08 M8 #Coolant Flood +sm08_1 M8 #Coolant Mist +sm08_2 M8 #Coolant Tool +scoolant #Target for string + +fstrsel sm09 coolant$ scoolant 4 -1 +# -------------------------------------------------------------------------- +# Table rotation direction, index +sindx_cw #Rotate CW code (was 'M22') +sindx_ccw #Rotate CCW code (was 'M21') +sindx_mc #Target for string + +fstrsel sindx_cw indx_mc sindx_mc 2 -1 +# -------------------------------------------------------------------------- +# Canned drill cycle string select +sg81 "200 DRILLING ~" #pdrill +sg81d "200 DRILLING ~" #pdrill +sg83 "201 REAMING ~" #ppeck drill +sg83d "201 REAMING ~" #ppeck drill +sg73 "202 BORING ~" #pchpbrk break +sg73d "202 BORING ~" #pchpbrk break +sg84 "203 UNIVERSAL DRILLING ~" #ptap +sg84d "203 UNIVERSAL DRILLING ~" #ptap +sg85 "1.0 PECKING" #pbore1 +sg85d "1.0 PECKING" #pbore1 +sg86 "205 UNIVERSAL PECKING ~" #pbore2 +sg86d "205 UNIVERSAL PECKING ~" #pbore2 +sgm1 "2.0 TAPPING" #pmisc1 -right hand +sgm1d "2.0 TAPPING" #pmisc1 -left hand +sgm2 "206 TAPPING NEW ~" #pmisc2 -right hand +sgm2d "206 TAPPING NEW ~" #pmisc2 -left hand +sgcst8 "17.0 RIGID TAPPING GS" #pdrlcst8 -right hand +sgcst8d "17.0 RIGID TAPPING GS" #pdrlcst8 -left hand +sgcst9 "207 RIGID TAPPING NEW ~" #pdrlcst9 -right hand +sgcst9d "207 RIGID TAPPING NEW ~" #pdrlcst9 -left hand +sgcst10 "209 TAPPING W/ CHIP BRKG. ~" #pdrlcst10 -right hand +sgcst10d "209 TAPPING W/ CHIP BRKG. ~" #pdrlcst10 -left hand +sgdrill #Target for string + +fstrsel sg81 drlgsel sgdrill 22 -1 +# -------------------------------------------------------------------------- +# Select incremental or absolute G code +sg90 A #Absolute code +sg91 I #Incremental code +sgabsinc #Target string + +fstrsel sg90 absinc$ sgabsinc 2 -1 +# -------------------------------------------------------------------------- +# Month selector +smon0 "" +smon1 "JAN." +smon2 "FEB." +smon3 "MAR." +smon4 "APR." +smon5 "MAY." +smon6 "JUN." +smon7 "JUL." +smon8 "AUG." +smon9 "SEP." +smon10 "OCT." +smon11 "NOV." +smon12 "DEC." +smonth + +fstrsel smon0 month$ smonth 13 -1 +# -------------------------------------------------------------------------- +# Buffer file definitions +temp_t : -1 #Tool Number (saved in Buffer1) +plane_t : 0 #Work plane (saved in Buffer1) +size1 : 0 #To hold the 'size' of Buffer1 +rc1 : 1 #Buffer1 'read index' +wc1 : 1 #Buffer1 'write index' + +fbuf 1 0 2 0 0#Declare Buffer1 (holds 2 values) +# -------------------------------------------------------------------------- +# Lookup table definitions - for Math Functions FLOOK, FRANGE, and FINC +# -------------------------------------------------------------------------- +# Spindle code lookup table +flktbl 1 45 # Lookup table no. No. of entry pairs + 224 19 + 250 21 # Code 1 (output) Match 1 + 280 24 # Code 2 Match 2 + 315 27 # . . + 355 28 # . . + 400 34 # . . + 450 38 + 500 43 + 560 48 + 630 54 + 710 60 + 800 68 + 900 77 + 1000 85 + 1120 95 + 1250 106 + 1400 119 + 1600 136 + 1800 153 + 2000 170 + 2240 190 + 2500 212 + 2800 238 + 1250 242 + 3150 268 + 1400 270 + 3550 302 + 1600 310 + 1800 348 + 2000 387 + 2240 434 + 2500 484 + 2800 542 + 1250 550 + 3150 610 + 1250 616 + 3550 687 + 1600 704 + 1800 792 + 2000 880 + 2240 985 + 2500 1100 + 2800 1232 + 3150 1386 + 3350 1562 + +# -------------------------------------------------------------------------- +# Toolchange / NC output Variable Formats +# -------------------------------------------------------------------------- +fmt 4 t$ #Tool number +fmt D 4 tloffno$ #Diameter offset number +fmt L 4 tlngno$ #Length offset number +fmt R 8 tlrad$ #Tool Radius +fmt L 9 tlength # Output either "L0,0" or "L+0,0" +fmt S 4 speed #Spindle speed +fmt S 4 sscode #Spindle speed code (from tbl 1) +# -------------------------------------------------------------------------- +fmt 4 n$ #Sequence number +fmt X 2 xabs #X position output +fmt Y 2 yabs #Y position output +fmt Z 2 zabs #Z position output +fmt IX 3 xinc #X position output +fmt IY 3 yinc #Y position output +fmt IZ 3 zinc #Z position output +fmt Z 2 zretract #Z retract level at the end of each (drilling) tool +fmt A 11 cabs #C axis position +fmt A 14 cinc #C axis position +fmt A 4 indx_out #Index position +fmt R 14 rt_cinc #C axis position, G68 +fmt X 2 i$ #Arc center description in X +fmt Y 2 j$ #Arc center description in Y +fmt Z 2 k$ #Arc center description in Z +fmt R 2 arcrad$ #Arc Radius +fmt IPA 11 sweep$ #Arc sweep angle +fmt F 15 feed #Feedrate +fmt 11 dwell$ #Dwell +fmt M 5 cantext$ #Canned text +# -------------------------------------------------------------------------- +fmt 7 progno$ #Program number +fmt "LBL" 7 main_prg_no$ #Program number +fmt "LBL" 7 sub_prg_no$ #Program number +fmt X 2 sub_trnsx$ #Rotation point +fmt Y 2 sub_trnsy$ #Rotation point +fmt Z 2 sub_trnsz$ #Rotation point +# -------------------------------------------------------------------------- +fmt 18 shftdrl$ #Fine bore tool shift +fmt 18 setup #Safety Distance (initht) +fmt 18 peckg #Feed Depth (peck1) +fmt 18 drldepth #Drill depth +# -------------------------------------------------------------------------- +#Drilling variables +fmt Z 2 initht$ #Initial Z height for drilling +fmt " Q200=" 20 refht$ #Retract height +fmt " Q201=" 20 depth$ #Drill depth +fmt " Q202=" 20 peck1$ #Peck depth +fmt " Q203=" 20 surf_coord +fmt " Q204=" 20 clearht #Clearance height +fmt " Q205=" 20 min_plunge #Minimum plunge depth +fmt " Q206=" 15 drill_feed #Drilling feedrate +fmt " Q208=" 21 ret_feed #Retraction feedrate +fmt " Q210=" 19 top_dwell #Dwell time at top of hole +fmt " Q211=" 19 bot_dwell #Dwell time at bottom of hole +fmt " Q212=" 20 decrement #Decreasing value for pecking cycle +fmt " Q213=" 20 breaks #?? +fmt " Q214=" 4 shft_dir #Disengaging direction (0/1/2/3/4) at bottom of hole +fmt " Q239=" 20 pitch #Thread pitch - New style +fmt 20 pitch2 #Thread Pitch - Old Style +fmt " Q256=" 20 chp_brk #Chip break retraction amount +fmt " Q257=" 20 infeed #Infeed depth for chip breaking +fmt " Q258=" 20 up_stop #Upper advanced stop distance +fmt " Q259=" 20 low_stop #Lower advanced stop distance +fmt " Q336=" 20 stop_ang #Angle for oriented spindle stop +# -------------------------------------------------------------------------- +fmt "TOOL - " 4 tnote #Note format +fmt " DIA. OFF. - " 4 toffnote #Note format +fmt " LEN. - " 4 tlngnote #Note format +fmt " DIA. - " 1 tldia$ #Note format +# -------------------------------------------------------------------------- +fmt 4 stck_crnr$ #Origin corner of stock (0 - 8) +fmt X 2 stck_x$ #X origin of block +fmt Y 2 stck_y$ #Y origin of block +fmt Z 2 stck_z$ #Z origin of block +fmt X 2 stck_ht$ #X - Stock Height +fmt Y 2 stck_wdth$ #Y - Stock Width +fmt Z 2 stck_thck$ #Z - Stock Thickness +fmt X 2 stck_x_min #Minimum stock block position (X) +fmt Y 2 stck_y_min #Minimum stock block position (Y) +fmt Z 2 stck_z_min #Minimum stock block position (Z) +fmt X 2 stck_x_max #Maximum stock block position (X) +fmt Y 2 stck_y_max #Maximum stock block position (Y) +fmt Z 2 stck_z_max #Maximum stock block position (Z) +# -------------------------------------------------------------------------- +fmt 4 year2 #Calculated year value +fmt 22 time2 #Capture 24-hour time value into 'time2' variable +fmt 23 hour #Hour +fmt 24 min #Minutes +year2 = year$ + 2000 + +# -------------------------------------------------------------------------- +# Tool Comment / Manual Entry Section +# -------------------------------------------------------------------------- +ptoolcomment #Comment for tool + tnote = t$ + toffnote = tloffno$ + tlngnote = tlngno$ + sopen_prn, pstrtool, *tnote, *toffnote, *tlngnote, *tldia$, sclose_prn, e$ + +pstrtool #Comment for tool + if strtool$ <> sblank, + [ + strtool$ = ucase(strtool$) + *strtool$, " " + ] + +pcomment$ #Comment from manual entry (must call pcomment2 if booleans) + pcomment2 + +pcomment2 #Comment from manual entry + scomm$ = ucase (scomm$) + if gcode$ = 1005, sopen_prn, scomm$, sclose_prn, e$ #Manual entry - as comment + if gcode$ = 1006, scomm$, e$ #Manual entry - as code + if gcode$ = 1007, sopen_prn, scomm$, sclose_prn #Manual entry - as comment with move NO e$ + if gcode$ = 1026, scomm$ #Manual entry - as code with move NO e$ + if gcode$ = 1008, sopen_prn, scomm$, sclose_prn, e$ #Operation comment + if gcode$ = 1051, sopen_prn, scomm$, sclose_prn, e$ #Machine name + if gcode$ = 1052, sopen_prn, scomm$, sclose_prn, e$ #Group comment + if gcode$ = 1053, sopen_prn, scomm$, sclose_prn, e$ #Group name + if gcode$ = 1054, sopen_prn, scomm$, sclose_prn, e$ #File Descriptor + +pblkform #Output the 'BLK FORM' statements at start of program + if blk_form, + [ + if stck_crnr$ = 0, #Top - Center + [ + stck_x_min = stck_x$ - stck_ht$/2 + stck_y_min = stck_y$ - stck_wdth$/2 + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_ht$/2 + stck_y_max = stck_y$ + stck_wdth$/2 + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 1, #Top - Upper Left + [ + stck_x_min = stck_x$ + stck_y_min = stck_y$ - stck_wdth$ + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_ht$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 2, #Top - Upper Right + [ + stck_x_min = stck_x$ - stck_ht$ + stck_y_min = stck_y$ - stck_wdth$ + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 3, #Top - Lower Right + [ + stck_x_min = stck_x$ - stck_ht$ + stck_y_min = stck_y$ + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_wdth$ + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 4, #Top - Lower Left + [ + stck_x_min = stck_x$ + stck_y_min = stck_y$ + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_ht$ + stck_y_max = stck_y$ + stck_wdth$ + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 5, #Bottom - Upper Left + [ + stck_x_min = stck_x$ + stck_y_min = stck_y$ - stck_wdth$ + stck_z_min = stck_z$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + stck_thck$ + ] + + if stck_crnr$ = 6, #Bottom - Upper Right + [ + stck_x_min = stck_x$ - stck_ht$ + stck_y_min = stck_y$ - stck_wdth$ + stck_z_min = stck_z$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + stck_thck$ + ] + + if stck_crnr$ = 7, #Bottom Lower Right + [ + stck_x_min = stck_x$ - stck_ht$ + stck_y_min = stck_y$ + stck_z_min = stck_z$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + stck_thck$ + ] + + if stck_crnr$ = 8, #Bottom - Lower Left + [ + stck_x_min = stck_x$ + stck_y_min = stck_y$ + stck_z_min = stck_z$ + stck_x_max = stck_x$ + stck_ht$ + stck_y_max = stck_y$ + stck_wdth$ + stck_z_max = stck_z$ + stck_thck$ + ] + + n$, "BLK FORM 0.1 Z", *stck_x_min, *stck_y_min, *stck_z_min, e$ + n$, "BLK FORM 0.2 ", *stck_x_max, *stck_y_max, *stck_z_max, e$ + ] + +pwrtt$ #Tool Table Output + if tdef_table, # Put all the TOOL DEF blocks at the top of the program? + [ + if t$ > 0 & gcode$ <> 1003, #If a "real" toolchange + #"/", n$, *stooldef, *t$, *tlength, *tlrad$, e$ + n$, *stooldef, *t$, e$ + ] + +pparameter$ #Operation parameters postblock + if prmcode$ = 12385, + [ + result = rpar(sparameter$, 1) + if result <> 0, thd_ttpr = 1 #Thread milling taper angle + ] + +pplane #State the Tool Axis working plane + if plane$ = zero | plane$ = one | plane$ = two, *sgplane + else, result = mprint(splnerror) + +# -------------------------------------------------------------------------- +# Start of File and Toolchange Setup +# -------------------------------------------------------------------------- +ptime #Convert 24-hour time format into 12-hour AM/PM format + if time$ >= 13, time2 = (time$ - 12) + else, time2 = time$ + hour = int(time2), min = frac(time2) + *hour, ":", *min, + if time$ > 12, " PM" + else, " AM" +pheader$ #Call before start of file + if force_n0, # Force sequence numbering to START at '0' and increment by '1' + [ + seqno$ = 0 + n$ = seqno$ + seqinc$ = 1 + ] + n$, *sbeginpgm, *sprogname$, *smetric, e$ + sav_spc = spaces$ + spaces$ = 0 + #*progno$, sopen_prn, sprogname$, sclose_prn, e$ + *progno$, e$ + #sopen_prn, "PROGRAM NAME - ", sprogname$, sclose_prn, e$ + sopen_prn, "DATE - ", date$, e$ + sopen_prn, "TIME - ", time$, e$ + #sopen_prn, "DATE=DD-MM-YY - ", date$, " TIME=HH:MM - ", time$, sclose_prn, e$ #Date and time output Ex. 12-02-05 15:52 + #sopen_prn, "DATE - ", month$, "-", day$, "-", year$, sclose_prn, e$ #Date output as month,day,year - Ex. 02-12-05 + #sopen_prn, "DATE - ", *smonth, " ", day$, " ", *year2, sclose_prn, e$ #Date output as month,day,year - Ex. Feb. 12 2005 + #sopen_prn, "TIME - ", time$, sclose_prn, e$ #24 hour time output - Ex. 15:52 + #sopen_prn, "TIME - ", ptime sclose_prn, e$ #12 hour time output 3:52 PM + spathnc$ = ucase(spathnc$) + smcname$ = ucase(smcname$) + stck_matl$ = ucase(stck_matl$) + snamenc$ = ucase(snamenc$) + #sopen_prn, "MCX FILE - ", *smcpath$, *smcname$, *smcext$, sclose_prn, e$ + #sopen_prn, "NC FILE - ", *spathnc$, *snamenc$, *sextnc$, sclose_prn, e$ + #sopen_prn, "MATERIAL - ", *stck_matl$, sclose_prn, e$ + spaces$ = sav_spc + pblkform # Output the 'BLK FORM' statements at start of program +psof0$ #Start of file for tool zero + psof$ + +psof$ #Start of file for non-zero tool number + pcuttype + toolchng = one + sav_absinc = absinc$ + pcom_moveb + c_mmlt$ #Multiple tool subprogram call + comment$ + pcan + if tdef_table = no$, #Put all the TOOL DEF blocks at the top of the program? + #"/", n$, *stooldef, *t$, *tlength, *tlrad$, e$ + n$, *stooldef, *t$, e$ + if use_scode = yes$, #Use Spindle code lookup table? + sscode = frange(1, speed) #Get spindle code for RPM + else, + sscode = speed #Use programmed RPM + n$, *stoolcall, *t$, pplane, *sscode, e$ + if output_M6, n$, "M6", e$ + #ptoolcomment + !opcode$ + #pindex + if mi1$ > one, absinc$ = zero + pcan1, n$, *sgcode, pfxout, pfyout, strr0, smaxrate, *spindle, e$ + n$, *sgcode, pfzout, strr0, smaxrate, *scoolant, e$ + zretract = zabs + prv_feed = c9k + absinc$ = sav_absinc + pcom_movea + toolchng = zero + c_msng$ #Single tool subprogram call + +ptlchg0$ #Call from NCI null tool change (tool number repeats) + pcuttype + pcom_moveb + c_mmlt$ #Multiple tool subprogram call + comment$ + pcan + result = newfs(15, feed) #Reset the output format for 'feed' + pspindchng + #n, scoolant, e + if cuttype = zero, ppos_cax_lin + if gcode$ = one, plinout + else, prapidout + pcom_movea + c_msng$ #Single tool subprogram call + +ptlchg$ #Tool change + pcuttype + toolchng = one + pcom_moveb + c_mmlt$ #Multiple tool subprogram call + comment$ + pcan + result = newfs(15, feed) #Reset the output format for 'feed' + if tdef_table = no$, # Put all the TOOL DEF blocks at the top of the program? + #"/", n$, *stooldef, *t$, *tlength, *tlrad$, e$ + n$, *stooldef, *t$, e$ + if use_scode = yes$, # Use Spindle code lookup table? + sscode = frange(1, speed) # Get spindle code for RPM + else, + sscode = speed #Use programmed RPM + n$, *stoolcall, *t$, pplane, *sscode, e$ + if output_M6, n$, "M6", e$ + #ptoolcomment + !opcode$ + #pindex + sav_absinc = absinc$ + if mi1$ > one, absinc$ = zero + pcan1, n$, *sgcode, pfxout, pfyout, strr0, smaxrate, *spindle, e$ + n$, *sgcode, pfzout, strr0, smaxrate, *scoolant, e$ + zretract = zabs + prv_feed = c9k + absinc$ = sav_absinc + pcom_movea + toolchng = zero + c_msng$ #Single tool subprogram call + +pretract #End of tool path, toolchange + sav_absinc = absinc$ + absinc$ = one + sav_coolant = coolant$ + coolant$ = zero + #cc_pos is reset in the toolchange here + cc_pos$ = zero + gcode$ = zero + pcan + n$, sccomp, psub_end_mny, e$ + if prv_opcode$ = three, # Ending a (drill) canned cycle operation + n$, *strl, *zretract, strr0, smaxrate, strm, e$ + n$, *scoolant, e$ #Force coolant off + #if not(toolchng = 1003), n, *sstop, e + n$, *sstop, e$ + prv_feed = c9k + pcan2 + absinc$ = sav_absinc + coolant$ = sav_coolant + +protretinc #Reset the C axis revolution counter + if frc_cinit & rot_on_x, + [ + rev = zero + sav_rev = zero + cabs = zero + csav = zero + indx_out = zero + if index, e$, pindxcalc, pindex + else, *cabs + prvcabs = zero + !csav, !cabs + ] + +peof0$ #End of file for tool zero + peof$ + +peof$ #End of file for non-zero tool + toolchng = 1003 + pretract + comment$ + #n$, "TOOL CALL 0", e$ + if output_M6, n$, "M6", e$ + #n$, "L X+0 Y+0 Z+0 R0 FMAX M92", e$ + n$, "L Z+0 R0 FMAX M92", e$ + if output_M30, n$, "M30", e$ + else, n$, *sendpgm, *sprogname$, *smetric, e$ + mergesub$ + clearsub$ + mergeaux$ + clearaux$ + +#Toolchange setup +pspindchng #Spindle speed change + if prv_spdir2 <> spdir2 & prv_speed <> zero, n$, *sm05, e$ + if prv_speed <> speed | prv_spdir2 <> spdir2, + [ + if use_scode = yes$, #Use Spindle code lookup table? + sscode = frange(1, speed) #Get spindle code for RPM + else, + sscode = speed #Use programmed RPM + n$, *stoolcall, *t$, *sscode, e$ + n$, *sgcode, "M3", e$ + #if speed, n$, *speed, *spindle, e$ + ] + !speed, !spdir2 + +pspindle #Spindle speed calculations for RPM + speed = abs(ss$) + if maxss$ = zero | maxss$ > max_speed, maxss$ = max_speed + #zero indicates spindle off (not a mistake) + if speed, + [ + if speed > max_speed, speed = maxss$ + if speed < min_speed, speed = min_speed + ] + spdir2 = fsg3(spdir$) + +pq$ #Setup post based on switch settings + if stagetool = one, bldnxtool$ = one + #Rotaxtyp = 1 sets initial matrix to top + #Rotaxtyp = -2 sets initial matrix to front + if vmc, rotaxtyp$ = one + else, rotaxtyp$ = -2 + #Shut off rotary axis if, Q164. Enable Rotary Axis button? n + if ucase(sq164) = strn, rot_on_x = zero + if spaces$ < one, spaces$ = one + !arctype$ # Save current setting + +ptoolend$ #End of tool path, before reading new tool data + !speed, !spdir2 + thd_ttpr = 0 #Reset thread milling taper angle flag + +ptlchg1002$ #Call at actual toolchange, end last path here + if cuttype <> one, sav_rev = rev #Axis Sub does not update to rev + pspindle + whatline$ = four #Required for vector toolpaths + if gcode$ = 1000, + [ + #Null toolchange + ] + else, + [ + #Toolchange and Start of file + if gcode$ = 1002, + [ + #Actual toolchange + pretract + ] + prv_xia = vequ(xh$) + prv_feed = c9k + ] + +# -------------------------------------------------------------------------- +# Motion NC output +# -------------------------------------------------------------------------- +#The variables for absolute output are xabs, yabs, zabs. +#The variables for incremental output are xinc, yinc, zinc. +# -------------------------------------------------------------------------- +pchk_xyz # Which axis are moving ? + if fmtrnd(xabs) <> prv_xabs, xmove = yes$ + else, xmove = no$ + if fmtrnd(yabs) <> prv_yabs, ymove = yes$ + else, ymove = no$ + if fmtrnd(zabs) <> prv_zabs, zmove = yes$ + else, zmove = no$ + +prapidout #Output to NC of linear movement - rapid + pchk_xyz # Which axis are moving ? + if not(modal_XY) & (xmove | ymove), result = force(xabs, yabs) + if zmove = yes$, + [ + if zabs > prv_zabs, # Z is coming UP + [ + # Do the Z move before any X and/or Y move + pcan1, n$, *sgcode, pfzout, pcout, pccdia, + smaxrate, pspdl, e$ + if xmove | ymove, + pcan1, n$, *sgcode, pxout, pyout, pcout, + pccdia, smaxrate, pspdl, e$ + ] + else, # Z is going DOWN + [ + # Do the X and/or Y move before the Z move + if xmove | ymove, + pcan1, n$, *sgcode, pxout, pyout, pcout, + pccdia, smaxrate, pspdl, e$ + pcan1, n$, *sgcode, pfzout, pcout, pccdia, + smaxrate, pspdl, e$ + ] + ] + else, # Do the X and/or Y axis motion + [ + if xmove | ymove, + [ + pcan1, n$, *sgcode, pxout, pyout, pzout, + pcout, pccdia, smaxrate, pspdl, e$ + ] + ] + +plinout #Output to NC of linear movement - feed + pchk_xyz # Which axis are moving ? + if not(modal_XY) & (xmove | ymove), result = force(xabs, yabs) + if xmove | ymove | zmove, + pcan1, n$, sgfeed, *sgcode, pxout, pyout, pzout, pcout, + pccdia, pfeed, pspdl, e$ + +parc_cntr #Select the arc center output axis + if plane$ = zero, *i$, *j$, !k$ #XY plane + if plane$ = one , !i$, *j$, *k$ #YZ plane + if plane$ = two , *i$, !j$, *k$ #XZ plane + +parc_endpt #The arc endpoint axis outputs + if plane$ = zero, pxout, pyout #XY plane + if plane$ = one , pyout, pzout #YZ plane + if plane$ = two , pxout, pzout #XZ plane + +parc_helix_endpt #Helix endpoint outputs + if plane$ = zero, pzout #XY plane + if plane$ = one , pxout #YZ plane + if plane$ = two , pyout #XZ plane + +pcirout #Output to NC of circular interpolation + pchk_xyz # Which axis are moving ? + if not(modal_XY) & (xmove | ymove | zmove), result = force(xabs, zabs) + if arc_pitch$, #Helical interpolation + [ + n$, strcc, parc_cntr, e$ + if plane$ = one, sweep$ = -(sweep$) + pcan1, n$, strcp, *sweep$, parc_helix_endpt, *sgcode, pccdia, pfeed, pspdl, e$ + ] + else, + [ + if arcoutput$ = zero | full_arc_flg$, + [ + n$, strcc, parc_cntr, e$ + pcan1, n$, strc, parc_endpt, *sgcode, pccdia, pfeed, pspdl, e$ + ] + else, + [ + #Arc output for R + pcan1, n$, strcr, parc_endpt, *arcrad$, *sgcode, pccdia, + pfeed, pspdl, e$ + ] + ] + +pcom_moveb #Common motion preparation routines, before + pxyzcout + ps_inc_calc + +pncoutput #Movement output + pcom_moveb + comment$ + pcan + if cuttype = zero, ppos_cax_lin #Toolplane rotary positioning + if gcode$ = zero, prapidout + if gcode$ = one, plinout + if gcode$ > one & gcode$ < four, pcirout + if mr_rt_actv, #Restore absolute/incremental for G51/G68 + [ + absinc$ = sav_absinc + mr_rt_actv = zero + ] + pcom_movea + +pcom_movea #Common motion preparation routines, after + pcan2 + pe_inc_calc + +pdwl_spd$ #Call from NCI gcode 4 + pspindle + comment$ + pspindchng + pcan + if fmtrnd(dwell$), pcan1, n$, *sgcode, *dwell$, strcantext, e$ + else, pcan1, n$, strcantext, e$ + pcan2 + +prapid$ #Output to NC of linear movement - rapid + pncoutput + +pzrapid$ #Output to NC of linear movement - rapid Z only + pncoutput + +plin$ #Output to NC of linear movement - feed + pncoutput + +pz$ #Output to NC of linear movement - feed Z only + pncoutput + +pmx$ #Output to NC of vector NCI + pncoutput + +pcir$ #Output to NC of circular interpolation + pncoutput + +#Pre-process rotary motion control flags +pmx0$ #5 axis gcode setup + if drillcur$ = zero, + [ + if fr$ = -2, gcode$ = zero + else, gcode$ = one + ] + +plin0$ #Linear movement, mill motion test + pmotion_su + +pcir0$ #Circular interpolation, mill arc motion test + pmotion_su + # Check the arc output format + # If user has selected 'CR' output format, make sure that we never + # output an arc move that exceeds 180 degrees in a single block. + # *Also, if the user has set for 'full arcs', make sure that we do + # NOT output in the 'CR' format mode. + # *Also, if 'acrc_pitch' is not zero (means doing helix motion) + # make sure that we are NOT in 'CR' format mode. + if arcoutput$ > zero & not(full_arc_flg$) | abs(arc_pitch$) > vtol$, + [ + if abs(sweep$) > 180 & breakarcs$ <> 2, breakarcs$ = 2 + ] + if absinc$ = one, #Set for INCREMENTAL arc center positions + [ + !absinc$ + !arctype$ # Save current setting + arctype$ = 1 # Set for INCREMENTAL (Start->Center) arc centers + result = nwadrs(strix, i$) + result = nwadrs(striy, j$) + result = nwadrs(striz, k$) + ] + else, + [ + arctype$ = prv_arctype$ # Restore previous setting + if arctype$ = one, + [ #Set for ABSOLUTE arc center positions + result = nwadrs(strx, i$) + result = nwadrs(stry, j$) + result = nwadrs(strz, k$) + ] + else, + [ #Set for INCREMENTAL arc center positions + result = nwadrs(strix, i$) + result = nwadrs(striy, j$) + result = nwadrs(striz, k$) + ] + ] + +# -------------------------------------------------------------------------- +# Motion output components +# -------------------------------------------------------------------------- +pfeed # Feedrate output + if modal_feed = no$, *feed + else, + [ + if fmtrnd(feed) <> prv_feed, feed # Has Feedrate changed? + else, strf0 # No, just output an 'F' + ] + +pccdia #Cutter Compensation + if cc_pos$ <> prv_cc_pos$, *sccomp, !cc_pos$ # CDC status changed? + else, + [ + if modal_cdc = no$, *sccomp # Are 'RR' and 'RL' comp codes modal? + else, strr0 # Just output an 'R' + ] + +pspdl # Spindle state + if spdir2 <> prv_spdir2, spindle, !spdir2 + else, strm0 # Just output an 'M' + +pfxout #Force X axis output + if absinc$ = zero, *xabs, !xinc + else, *xinc, !xabs + +pxout #X output + if absinc$ = zero, xabs, !xinc + else, xinc, !xabs + +pfyout #Force Y axis output + if absinc$ = zero, *yabs, !yinc + else, *yinc, !yabs + +pyout #Y output + if absinc$ = zero, yabs, !yinc + else, yinc, !yabs + +pfzout #Force Z axis output + if absinc$ = zero, *zabs, !zinc + else, *zinc, !zabs + +pzout #Z output + if absinc$ = zero, zabs, !zinc + else, + [ + if fmtrnd(zinc) <> zero, zinc + !zabs + ] + +pfcout #Force C axis output + if index = zero & rot_on_x, + [ + if absinc$ = zero, *cabs, !cinc + else, *cinc, !cabs + ] + +pcout #C axis output + if index = zero & rot_on_x, + [ + if absinc$ = zero, cabs, !cinc + else, cinc, !cabs + ] + +pindex #Index output + if index & rot_on_x, + [ + n$, `sindx_mc, indx_out, e$ + !cabs, !cinc + ] + +ppos_cax_lin #Position the rotary axis before move - rapid + if index, pindex + else, + [ + if fmtrnd(prv_cabs) <> fmtrnd(cabs) & rot_on_x, + [ + sav_gcode = gcode$ + gcode$ = zero + n$, sgcode, pcout, e$ + !cia + ps_cinc_calc + gcode$ = sav_gcode + ] + ] + +# -------------------------------------------------------------------------- +# Drilling +# -------------------------------------------------------------------------- +pdrill0$ #Pre-process before drill call + sav_dgcode = gcode$ #Capture gcode for 5 axis drill + +pdrlcommonb #Canned Drill Cycle common call, before + if sav_dgcode = 81, + [ + if drillcyc$ > 6 & drillcyc$ < 12, drlgsel = fsg1(-ss$) + drillcyc$ * two + else, drlgsel = fsg2(dwell$) + drillcyc$ * two + if initht$ <> refht$, drillref = zero + else, drillref = one + prv_dwell$ = zero + ] + if cuttype = three, sav_dgcode = gcode$ + else, z$ = depth$ + if cuttype = one, prv_zia = initht$ + (rotdia$/two) + else, prv_zia = initht$ + pcom_moveb + feed = fr_pos$ + comment$ + pcan + #5 axis must map the true Z, correct Z calculation here + if cuttype = three, + [ + prv_zia = zabs + (-depth$) + initht$ + zia = fmtrnd(zabs) + zinc = zia - prv_zia + ] + pchk_xyz # Which axis are moving ? + if not(modal_XY) & (xmove | ymove), result = force(xabs, yabs) + + # Drilling Calculations (for SETUP and PECKG parameters) + # 'setup_sign' setting -> + # 0 = Do not change the sign of SETUP + # 1 = Always make SETUP a NEGATIVE value + # 2 = Always make SETUP a POSITIVE value + if setup_sign, + [ + if setup_sign = one, setup = abs(refht$) * m_one + else, setup = abs(refht$) + ] + + # 'peckg_sign' setting -> + # 0 = Do not change the sign of PECKG + # 1 = Always make PECKG a NEGATIVE value + # 2 = Always make PECKG a POSITIVE value + if peckg_sign, + [ + if peckg_sign = one, peckg = abs(peck1$) * m_one + else, peckg = abs(peck1$) + ] + + #Get Z axis (drill depth) + if absinc$ = zero, drldepth = zabs #Drill depth (absolute) + else, drldepth = zinc #Drill depth (incremental) + +pdrill$ #Cycle 200 Drilling + pdrlcommonb + top_dwell = dwell$ + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + if peck1$ = 0, peck1$ = abs(depth$) + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *peck1$, *s202, e$ #PLUNGING DEPTH + *top_dwell, *s210, e$ #DWELL TIME AT TOP + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +ppeck$ #Cycle 201 Reaming + pdrlcommonb + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + ret_feed = dwell$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + *ret_feed, *s208, e$ #RETRACTION FEEDRATE + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pchpbrk$ #Cycle 202 Boring + pdrlcommonb + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + ret_feed = dwell$ + shft_dir = peck1$ + stop_ang = peck2$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + *ret_feed, *s208, e$ #RETRACTION FEEDRATE + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *shft_dir, *s214, e$ #DISENGAGING DIRECTION (0/1/2/3/4) AT BOTTOM OF HOLE + *stop_ang, *s336, e$ #ANGLE FOR ORIENTED SPINDLE STOP + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +ptap$ #Cycle 203 Universal Drilling + pdrlcommonb + top_dwell = dwell$ + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + decrement = drl_prm1$ + breaks = drl_prm2$ + min_plunge = drl_prm3$ + ret_feed = drl_prm4$ + chp_brk = drl_prm5$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *peck1$, *s202, e$ #PLUNGING DEPTH + *top_dwell, *s210, e$ #DWELL TIME AT TOP + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *decrement, *s212, e$ #DECREMENT + *breaks, *s213, e$ #BREAKS + *min_plunge, *s205, e$ #MINIMUM PLUNGING DEPTH + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + *ret_feed, *s208, e$ #RETRACTION FEEDRATE + *chp_brk, *s256, e$ #DISTANCE FOR CHIP BREAK + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pbore1$ #Cycle 1 Pecking/Drilling + pdrlcommonb + n$, sdef, *sgdrill, e$ + n$, sdef, "1.1", ssetup, *setup, e$ + n$, sdef, "1.2", sdepth, *drldepth, e$ + n$, sdef, "1.3", speckg, *peckg, e$ + n$, sdef, "1.4", sdwell, *dwell$, e$ + n$, sdef, "1.5", *feed, e$ + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pbore2$ #Cycle 205 Universal Pecking + pdrlcommonb + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + decrement = drl_prm1$ + min_plunge = drl_prm3$ + chp_brk = drl_prm5$ + up_stop = drl_prm6$ + low_stop = drl_prm7$ + infeed = drl_prm8$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *peck1$, *s202, e$ #PLUNGING DEPTH + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *decrement, *s212, e$ #DECREMENT + *min_plunge, *s205, e$ #MINIMUM PLUNGING DEPTH + *up_stop, *s258, e$ #UPPER ADVANCED STOP DISTANCE + *low_stop, *s259, e$ #LOWER ADVANCED STOP DISTANCE + *infeed, *s257, e$ #INFEED DEPTH FOR CHIP BREAKING + *chp_brk, *s256, e$ #DISTANCE FOR CHIP BREAK + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pmisc1$ #Cycle 2 Tapping - with floating holder #TODO + pdrlcommonb + n$, sdef, *sgdrill, e$ + n$, sdef, "2.1", ssetup, *setup, e$ + n$, sdef, "2.2", sdepth, *drldepth, e$ + n$, sdef, "2.3", sdwell, *dwell$, e$ + n$, sdef, "2.4", *feed, e$ + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pmisc2$ #Cycle 206 Tapping New - with floating holder + pdrlcommonb + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pdrlcst8 #Cycle 17 Rigid Tapping - without floating holder + pdrlcommonb + if met_tool$, pitch2 = n_tap_thds$ # Tap pitch (mm per thread) + else, pitch2 = 1/n_tap_thds$ # Tap pitch (inches per thread) + if drlgsel = 17, pitch2 = -(pitch) + n$, sdef, *sgdrill, e$ + n$, sdef, "17.1", ssetup, *setup, e$ + n$, sdef, "17.2", sdepth, *drldepth, e$ + n$, sdef, "17.3", spitch, *pitch2, e$ + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pdrlcst9 #Cycle 207 Rigid Tapping New - without floating holder + pdrlcommonb + if met_tool$, pitch = n_tap_thds$ # Tap pitch (mm per thread) + else, pitch = 1/n_tap_thds$ # Tap pitch (inches per thread) + if drlgsel = 19, pitch = -(pitch) + surf_coord = tosz$ + clearht = initht$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *pitch, *s239, e$ #THREAD PITCH + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pdrlcst10 #Cycle 209 Tapping - with chip breaking #TODO + pdrlcommonb + if met_tool$, pitch = n_tap_thds$ # Tap pitch (mm per thread) + else, pitch = 1/n_tap_thds$ # Tap pitch (inches per thread) + if drlgsel = 19, pitch = -(pitch) + surf_coord = tosz$ + clearht = initht$ + infeed = peck1$ + chp_brk = peck2$ + stop_ang = peckclr$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *pitch, *s239, e$ #THREAD PITCH + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *infeed, *s257, e$ #INFEED DEPTH FOR CHIP BREAKING + *chp_brk, *s256, e$ #DISTANCE FOR CHIP BREAK + *stop_ang, *s336, e$ #ANGLE FOR ORIENTED SPINDLE STOP + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pdrlcst$ #Custom drill cycles 8 - 19 (user option) + if drillcyc$ = 8, pdrlcst8 + if drillcyc$ = 9, pdrlcst9 + if drillcyc$ = 10, pdrlcst10 + if drillcyc$ > 10, + [ + pdrlcommonb + "*-> CUSTOM CYCLE IS NOT SUPPORTED BY THIS POST <-*", e$ + pcom_movea + ] + +#Additional Holes +pdrill_2$ #Canned Drill Cycle, additional points + pdrlcommonb + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +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$ + +pdrlcst8_2 #Custom drill cycle 8 + pdrill_2$ + +pdrlcst9_2 #Custom drill cycle 9 + pdrill_2$ + +pdrlcst10_2 #Custom drill cycle 10 + pdrill_2$ + +pdrlcst_2$ #Custom drill cycles 8 - 19, additional points (user option) + if drillcyc$ = 8, pdrlcst8_2 + if drillcyc$ = 9, pdrlcst9_2 + if drillcyc$ = 10, pdrlcst10_2 + if drillcyc$ > 10, + [ + pdrlcommonb + "*-> CUSTOM CYCLE IS NOT SUPPORTED BY THIS POST <-*", e$ + pcom_movea + ] + +pcanceldc$ #Cancel canned drill cycle + z$ = initht$ + if cuttype = one, prv_zia = initht$ + (rotdia$/two) + else, prv_zia = initht$ + pxyzcout + !zabs, !zinc + prv_gcode$ = zero + +# -------------------------------------------------------------------------- +#Subprogram postblocks +#sub_trnstyp - 0=mirror, 1=rotate, 2=scale, 3=translate +#sub_trnmthd (mirror) - 0=X axis, 1=Y axis, 2=line +#sub_trnmthd (rotate) - 0=tplane, 1=tplane origin only, 2=coordinates +# -------------------------------------------------------------------------- +psub_call_m$ #Call to main level, single tool + psub_call_trans + +psub_call_mm$ #Call to main level, multiple tools + psub_call_trans + +psub_call_trans #Translate level calls from toolchange, user + if mi1$ <= one, result = mprint(shomeserror) + sav_absinc = absinc$ + #pindex + #Mirror or Rotate Coord's + if sub_trnstyp$ = zero | (sub_trnstyp$ = one & mr_rt_actv), + [ + #The original pattern is not mirrored or rotated + if sub_sec_no$, + [ + absinc$ = zero + if sub_trnstyp$, psub_rotate + else, psub_mirror + ] + mr_rt_actv = three + ] + else, #Translate + [ + if sub_mny_t$, + [ + if mi1$ > one, absinc$ = zero + n$, *sgcode, pfxout, pfyout, pfzout, pfcout, e$ + pe_inc_calc + ps_inc_calc + ] + ] + absinc$ = sav_absinc + if progno$ = main_prg_no$, result = mprint(sprgnerror) + n$, "CALL", *main_prg_no$, e$ + prv_feed = c9k #Force feed in sub + +psub_mirror #Mirror start code, user + #Mirror Y axis + if sub_trnmthd$, n$, strns_mir_on, *sub_trnsx$, e$ + #Mirror X axis + else, n$, strns_mir_on, *sub_trnsy$, e$ + +psub_rotate #Rotate start code, user + n$, *sgcode, strns_rot_on, *sub_trnsx$, *sub_trnsy$, + [absinc$ = one], *rt_cinc, e$ + +psub_st_m$ #Header in main level + " ", e$ + n$, *main_prg_no$, e$ + #G51/G68 requires absolute position on first move + if mr_rt_actv & absinc$ = one, + [ + sav_absinc = absinc$ + absinc$ = zero + prv_absinc$ = m_one + prv_xabs = m_one + prv_yabs = m_one + ] + +psub_end_m$ #End in main level + n$, "LBL 0", e$ + prv_absinc$ = m_one + #Reset update variables for subs at main level + #Mirror or Rotate cancel, output is forced + if (sub_trnstyp$ = zero & esub_sec_no$ > zero) + | (sub_trnstyp$ = one & esub_sec_no$ = esub_totl_no$-one + & sub_trnmthd$ = two), + [ + subout$ = zero + no_nc_out$ = m_one + sav_absinc = absinc$ + #Mirror cancel + if sub_trnstyp$ = zero, + [ + absinc$ = zero + n$, strns_mir_off, *sub_trnsx$, *sub_trnsy$, e$ + ] + else, #Rotate cancel + [ + n$, strns_rot_off, e$ + ] + absinc$ = sav_absinc + no_nc_out$ = zero + ] + end_sub_mny = sub_mny_t$ + +psub_end_mny #End in main level for many tools sub, user + #Check for coming out of xform with stage tool. + if end_sub_mny & stagetool = one, + [ + *t$ + end_sub_mny = zero + ] + +psub_call_s$ #Call to sub level + sub_prg_no$ = sub_prg_no$ #+ 1000 #Add sub number offset + if progno$ = sub_prg_no$, result = mprint(sprgnerror) + n$, "CALL ", *sub_prg_no$, e$ + +psub_st_s$ #Header in sub leveln + " ", e$ + n$, *sub_prg_no$, e$ + +psub_end_s$ #End in sub level + n$, "LBL 0", e$ + prv_absinc$ = m_one + +# -------------------------------------------------------------------------- +# Canned Text +# -------------------------------------------------------------------------- +pcan #Canned text - before output call + strcantext = sblank + if cant_no$ > zero, + [ + if cant_pos1$ = zero | cant_pos1$ = three, pcant_1 + if cant_pos2$ = zero | cant_pos2$ = three, pcant_2 + if cant_pos3$ = zero | cant_pos3$ = three, pcant_3 + if cant_pos4$ = zero | cant_pos4$ = three, pcant_4 + if cant_pos5$ = zero | cant_pos5$ = three, pcant_5 + if cant_pos6$ = zero | cant_pos6$ = three, pcant_6 + if cant_pos7$ = zero | cant_pos7$ = three, pcant_7 + if cant_pos8$ = zero | cant_pos8$ = three, pcant_8 + if cant_pos9$ = zero | cant_pos9$ = three, pcant_9 + if cant_pos10$ = zero | cant_pos10$ = three, pcant_10 + if cant_pos11$ = zero | cant_pos11$ = three, pcant_11 + if cant_pos12$ = zero | cant_pos12$ = three, pcant_12 + if cant_pos13$ = zero | cant_pos13$ = three, pcant_13 + if cant_pos14$ = zero | cant_pos14$ = three, pcant_14 + if cant_pos15$ = zero | cant_pos15$ = three, pcant_15 + if cant_pos16$ = zero | cant_pos16$ = three, pcant_16 + if cant_pos17$ = zero | cant_pos17$ = three, pcant_17 + if cant_pos18$ = zero | cant_pos18$ = three, pcant_18 + if cant_pos19$ = zero | cant_pos19$ = three, pcant_19 + if cant_pos20$ = zero | cant_pos20$ = three, pcant_20 + n$, strcantext, e$ + strcantext = sblank + ] + +pcan1 #Canned text - with move + strcantext = sblank + if cant_no$ > zero, + [ + if cant_pos1$ = one | cant_pos1$ = four, pcant_1 + if cant_pos2$ = one | cant_pos2$ = four, pcant_2 + if cant_pos3$ = one | cant_pos3$ = four, pcant_3 + if cant_pos4$ = one | cant_pos4$ = four, pcant_4 + if cant_pos5$ = one | cant_pos5$ = four, pcant_5 + if cant_pos6$ = one | cant_pos6$ = four, pcant_6 + if cant_pos7$ = one | cant_pos7$ = four, pcant_7 + if cant_pos8$ = one | cant_pos8$ = four, pcant_8 + if cant_pos9$ = one | cant_pos9$ = four, pcant_9 + if cant_pos10$ = one | cant_pos10$ = four, pcant_10 + if cant_pos11$ = one | cant_pos11$ = four, pcant_11 + if cant_pos12$ = one | cant_pos12$ = four, pcant_12 + if cant_pos13$ = one | cant_pos13$ = four, pcant_13 + if cant_pos14$ = one | cant_pos14$ = four, pcant_14 + if cant_pos15$ = one | cant_pos15$ = four, pcant_15 + if cant_pos16$ = one | cant_pos16$ = four, pcant_16 + if cant_pos17$ = one | cant_pos17$ = four, pcant_17 + if cant_pos18$ = one | cant_pos18$ = four, pcant_18 + if cant_pos19$ = one | cant_pos19$ = four, pcant_19 + if cant_pos20$ = one | cant_pos20$ = four, pcant_20 + ] + if cstop$, strcantext = strcantext + sm00 + if cgstop$, strcantext = strcantext + sm01 + #Output of strcantext occurs at the end of the output line + +pcan2 #Canned text - after output call + strcantext = sblank + if cant_no$ > zero, + [ + if cant_pos1$ = two | cant_pos1$ = five, pcant_1 + if cant_pos2$ = two | cant_pos2$ = five, pcant_2 + if cant_pos3$ = two | cant_pos3$ = five, pcant_3 + if cant_pos4$ = two | cant_pos4$ = five, pcant_4 + if cant_pos5$ = two | cant_pos5$ = five, pcant_5 + if cant_pos6$ = two | cant_pos6$ = five, pcant_6 + if cant_pos7$ = two | cant_pos7$ = five, pcant_7 + if cant_pos8$ = two | cant_pos8$ = five, pcant_8 + if cant_pos9$ = two | cant_pos9$ = five, pcant_9 + if cant_pos10$ = two | cant_pos10$ = five, pcant_10 + if cant_pos11$ = two | cant_pos11$ = five, pcant_11 + if cant_pos12$ = two | cant_pos12$ = five, pcant_12 + if cant_pos13$ = two | cant_pos13$ = five, pcant_13 + if cant_pos14$ = two | cant_pos14$ = five, pcant_14 + if cant_pos15$ = two | cant_pos15$ = five, pcant_15 + if cant_pos16$ = two | cant_pos16$ = five, pcant_16 + if cant_pos17$ = two | cant_pos17$ = five, pcant_17 + if cant_pos18$ = two | cant_pos18$ = five, pcant_18 + if cant_pos19$ = two | cant_pos19$ = five, pcant_19 + if cant_pos20$ = two | cant_pos20$ = five, pcant_20 + n$, strcantext, e$ + strcantext = sblank + ] + +pcant_1 #Canned text - output call + cantext$ = cant_val1$ + pcant_out + +pcant_2 #Canned text - output call + cantext$ = cant_val2$ + pcant_out + +pcant_3 #Canned text - output call + cantext$ = cant_val3$ + pcant_out + +pcant_4 #Canned text - output call + cantext$ = cant_val4$ + pcant_out + +pcant_5 #Canned text - output call + cantext$ = cant_val5$ + pcant_out + +pcant_6 #Canned text - output call + cantext$ = cant_val6$ + pcant_out + +pcant_7 #Canned text - output call + cantext$ = cant_val7$ + pcant_out + +pcant_8 #Canned text - output call + cantext$ = cant_val8$ + pcant_out + +pcant_9 #Canned text - output call + cantext$ = cant_val9$ + pcant_out + +pcant_10 #Canned text - output call + cantext$ = cant_val10$ + pcant_out + +pcant_11 #Canned text - output call + cantext$ = cant_val11$ + pcant_out + +pcant_12 #Canned text - output call + cantext$ = cant_val12$ + pcant_out + +pcant_13 #Canned text - output call + cantext$ = cant_val13$ + pcant_out + +pcant_14 #Canned text - output call + cantext$ = cant_val14$ + pcant_out + +pcant_15 #Canned text - output call + cantext$ = cant_val15$ + pcant_out + +pcant_16 #Canned text - output call + cantext$ = cant_val16$ + pcant_out + +pcant_17 #Canned text - output call + cantext$ = cant_val17$ + pcant_out + +pcant_18 #Canned text - output call + cantext$ = cant_val18$ + pcant_out + +pcant_19 #Canned text - output call + cantext$ = cant_val19$ + pcant_out + +pcant_20 #Canned text - output call + cantext$ = cant_val20$ + pcant_out + +pcant_out #Canned text - build the string for output + #Assign string select type outputs + if cantext$ = three, bld = one + if cantext$ = four, bld = zero + #Build the cantext string + if cantext$ = one, strcantext = strcantext + sm00 + if cantext$ = two, strcantext = strcantext + sm01 + if cantext$ > four, + [ + strtextno = no2str(cantext$) + strcantext = strcantext + strm + strtextno + ] + +# -------------------------------------------------------------------------- +# Position calculations, generally these do not need to be modified +# -------------------------------------------------------------------------- +pmiscint$ #Capture the top level absinc for subprograms + if sub_level$ <= zero, absinc$ = mi2$ + #Disable cutpos2 if not 4 axis, saves time + if rot_on_x = zero, cutpos2$ = m_one + +pmotion_su #Motion Setup (Set brklinestype & linarc) + brklinestype$ = zero + linarc$ = zero + if rot_on_x, + [ + if cuttype = one, linarc$ = one #Axis subs + if cuttype = two, #Polar + [ + brklinestype$ = rotary_axis$ + three + linarc$ = one + ] + ] + if tool_op$ = 100, #Threadmill operation + [ + if thd_ttpr = 1, linarc$ = 1 #If tapered thread, linearize output + ] + +pcuttype #Determine the cut type + #cuttype (0 = Tool Plane, 1 = Axis Subs, 2 = Polar, 3 = 4/5 axis) + cuttype = rotary_type$ + if cuttype = three, cuttype = zero + if mill5$, + [ + if rot_on_x = zero, result = mprint(saxisoff) + cuttype = three + ] + if rotary_axis$, + [ + if rotary_axis$ <> rot_on_x, result = mprint(saxiswarn) + rot_on_x = rotary_axis$ + ] + #Check for Tool Origin in Polar Milling + if cuttype = two & (tox$ | toy$ | toz$), result = mprint(stlorgerr) + #Transform Rotate, set mr_rt_actv if user selected 'coordinates' + if sub_trnstyp$ = one & sub_trnmthd$ = two, + [ + #Calculate the rotation incremental angle for G68 + rt_csav = atan2(sub_m2$, sub_m1$) + rt_cinc = prv_rt_csav - rt_csav + while rt_cinc > 180, rt_cinc = rt_cinc - 360 + while rt_cinc < -180,rt_cinc = rt_cinc + 360 + if rot_ccw_pos = one, rt_cinc = -rt_cinc + !rt_csav + if sub_sec_no$, mr_rt_actv = two + else, mr_rt_actv = one + ] + else, mr_rt_actv = zero + pfcalc_u_min + pmotion_su + +pxyzcout #Map coordinates + if rot_on_x, + [ + if cuttype = zero, pxyzcout0 #Toolplane Positioning + if cuttype = one, pxyzcout1 #Axis Substitution + if cuttype = two, pxyzcout2 #Polar Conversion + if cuttype = three, pxyzcout3 #Simulatneous 4 axis (Multi-axis) + if rot_ccw_pos = one, csav = -csav + if mr_rt_actv <> two, + [ + pcoutrev + if index, pindxcalc + pfcalc + ] + else, feed = fr_pos$ + ] + else, + [ + xabs = vequ (x$) + feed = fr_pos$ + ] + +pxyzcout0 #Toolplane Positioning + xabs = vequ (x$) + if rot_on_x = two, csav = -c$ + else, csav = c$ + +pxyzcout1 #Axis substitution + if rot_on_x = one, #X axis substitution + [ + xabs = x$ + yabs = zero + zabs = z$ + (rotdia$ / two) + csav = y$ * (360 / (pi$ * rotdia$)) + ] + else, #Y axis substitution + [ + xabs = zero + yabs = y$ + zabs = z$ + (rotdia$ / two) + csav = x$ * (360 / (pi$ * rotdia$)) + ] + +pxyzcout2 #polar interpolation + #Drill polar is toolplane drilling toward center + #if not a coincident axis + #Also, Capture initial index position for Polar Milling + if (opcode$ = three & rot_on_x <> three), pxyzcout0 + else, + [ + if rot_on_x = one, #X axis rotation + [ + csav = atan2(y$, z$) #Z+ zero + axisx$ = vequ(aaxisx) + xabs = rotp(csav, x$) + ] + if rot_on_x = two, #Y axis rotation + [ + csav = atan2(-x$, z$) #Z+ zero + axisx$ = vequ(baxisx) + xabs = rotp(csav, x$) + ] + if rot_on_x = three, #Z axis rotation + [ + csav = atan2(-y$, x$) #X+ zero + axisx$ = vequ(caxisx) + xabs = rotp(csav, x$) + ] + csav = csav + c$ + ] + +pxyzcout3 #Multisurf rotary axis motion + if rot_on_x = one, #Multisurf Rotary about X + [ + csav = atan2 (vtooly$, vtoolz$) + axisx$ = vequ (aaxisx) + ] + if rot_on_x = two, #Multisurf Rotary about Y + [ + csav = atan2 (-vtoolx$, vtoolz$) + axisx$ = vequ (baxisx) + ] + xabs = rotp (csav, x$) + u$ = rotp (csav, u$) + csav = csav + c$ + +pcoutrev #Rotary axis revolution calculation (Modify for wind-up) + cdelta = csav - prv_csav + while abs(cdelta) > ctol, #If motion exceeds ctol, add wind-up + [ + if cdelta > zero, + [ + rev = rev - one + cdelta = cdelta - 360 + ] + else, + [ + rev = rev + one + cdelta = cdelta + 360 + ] + ] + if cuttype <> one, cabs = rev * 360 + csav + else, cabs = sav_rev * 360 + csav + !csav + +pindxcalc #Index move calculations, direction is shortest + #Check if in tolerance + cdelta = frac(abs(csav)/ctable) + if cdelta > ixtol & cdelta < 1-ixtol, + result = mprint(sindxerror) + cdelta = prvcabs - cabs + #Phase shift delta 10 revolutions, check odd/even + if frac(int((cdelta + 3600)/180)/two), indx_mc = one + else, indx_mc = zero + #Set range 0-360 + indx_out = csav + while indx_out < 0, indx_out = indx_out + 360 + while indx_out > 360, indx_out = indx_out - 360 + +#Feedrate calculations +pfcalc #Feedrate calculations, gcode 0 does not evaluate + if gcode$ <> zero, + [ + if fmtrnd(cabs) = prvcabs | index, pfcalc_u_min + else, + [ + if cuttype = one & (cutpos2$ <= one | cutpos2$ = four), + pfcalc_u_min + else, pfclc_deg_inv + ] + if ipr_type <> prv_ipr_type, prv_feed = c9k + ] + +pfcalc_u_min #Feedrate unit/min + ipr_type = zero + feed = fr_pos$ + if feed > maxfeedpm, feed = maxfeedpm + prvfrdeg = feed + +pfclc_deg_inv #Feedrate deg/min + circum = zabs * two * pi$ + if circum = zero, circum = c9k #Don't allow Zero + ldelta = sqrt((xabs-prv_xabs)^2+(yabs-prv_yabs)^2+(zabs-prv_zabs)^2) + cdelta = ((abs(cabs - prvcabs))/360)*circum + if ldelta = zero, cldelta = cdelta + else, cldelta = sqrt(cdelta^two + ldelta^two) + if cldelta = zero, cldelta = c9k + if use_frinv, + [ + #Feedrate inverse calculation + ipr_type = two + prv_feed = c9k #Always force feed + if cuttype = three, cldelta = sqrt((x$-prv_x$)^2+(y$-prv_y$)^2+(z$-prv_z$)^2) + frinv = fr_pos$/cldelta + if frinv > maxfrinv, frinv = maxfrinv + feed = frinv + ] + else, + [ + #Feedrate deg/min control and calculation + ipr_type = zero #Change to ipr_type = one to force new DPM + frdeg = abs(cdelta/cldelta) * abs(fr_pos$ * (360/circum)) + if abs(frdeg - prvfrdeg) > frdegstp | ipr_type <> prv_ipr_type, + [ + #Control output of frdeg + prvfrdeg = frdeg + feed = frdeg + ] + if frdeg > maxfrdeg, feed = maxfrdeg + ] + +#Incremental calculations +ps_inc_calc #Incremental calculations, start + xia = fmtrnd(xabs) + yia = fmtrnd(yabs) + zia = fmtrnd(zabs) + xinc = vsub (xia, prv_xia) + ps_cinc_calc + +ps_cinc_calc #Incremental calculations, start rotary + cia = fmtrnd(cabs) + cinc = cia - prv_cia + +pe_inc_calc #Incremental calculations, end + prvcabs = fmtrnd(cabs) #Avoid updating until called explicitly + !xia, !yia, !zia, !cia + !x$, !y$, !z$ + +# -------------------------------------------------------------------------- +# Numbered questions for Mastercam Mill - Read during post update only +# -------------------------------------------------------------------------- +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)? 1200 +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? 18000 +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? y +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? y + +# -------------------------------------------------------------------------- +# Default Miscellaneous Real Values - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +201. Default miscellaneous real variable 1 (mr1)? 0.0 +202. Default miscellaneous real variable 2 (mr2)? 0.0 +203. Default miscellaneous real variable 3 (mr3)? 0.0 +204. Default miscellaneous real variable 4 (mr4)? 0.0 +205. Default miscellaneous real variable 5 (mr5)? 0.0 +206. Default miscellaneous real variable 6 (mr6)? 0.0 +207. Default miscellaneous real variable 7 (mr7)? 0.0 +208. Default miscellaneous real variable 8 (mr8)? 0.0 +209. Default miscellaneous real variable 9 (mr9)? 0.0 +210. Default miscellaneous real variable 10 (mr10)? 0.0 + +# -------------------------------------------------------------------------- +# Default Miscellaneous Real Values (METRIC) - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +1601. Default miscellaneous real variable 1 (mr1) (metric)? 0.0 +1602. Default miscellaneous real variable 2 (mr2) (metric)? 0.0 +1603. Default miscellaneous real variable 3 (mr3) (metric)? 0.0 +1604. Default miscellaneous real variable 4 (mr4) (metric)? 0.0 +1605. Default miscellaneous real variable 5 (mr5) (metric)? 0.0 +1606. Default miscellaneous real variable 6 (mr6) (metric)? 0.0 +1607. Default miscellaneous real variable 7 (mr7) (metric)? 0.0 +1608. Default miscellaneous real variable 8 (mr8) (metric)? 0.0 +1609. Default miscellaneous real variable 9 (mr9) (metric)? 0.0 +1610. Default miscellaneous real variable 10 (mr10) (metric)? 0.0 + +# -------------------------------------------------------------------------- +# Enable/Disable Miscellaneous Real Variable switches - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +1611. Enable miscellaneous real variable 1? y +1612. Enable miscellaneous real variable 2? y +1613. Enable miscellaneous real variable 3? y +1614. Enable miscellaneous real variable 4? y +1615. Enable miscellaneous real variable 5? y +1616. Enable miscellaneous real variable 6? y +1617. Enable miscellaneous real variable 7? y +1618. Enable miscellaneous real variable 8? y +1619. Enable miscellaneous real variable 9? y +1620. Enable miscellaneous real variable 10? y + +# -------------------------------------------------------------------------- +# Default Miscellaneous Integer Values - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +301. Default miscellaneous integer variable 1 (mi1)? 0 +302. Absolute or Incremental [0=ABS, 1=INC] (mi2)? 0 +303. Default miscellaneous integer variable 3 (mi3)? 0 +304. Default miscellaneous integer variable 4 (mi4)? 0 +305. Default miscellaneous integer variable 5 (mi5)? 0 +306. Default miscellaneous integer variable 6 (mi6)? 0 +307. Default miscellaneous integer variable 7 (mi7)? 0 +308. Default miscellaneous integer variable 8 (mi8)? 0 +309. Default miscellaneous integer variable 9 (mi9)? 0 +310. Default miscellaneous integer variable 10 (mi10)? 0 + +# -------------------------------------------------------------------------- +# Enable/Disable Miscellaneous Integer Variable switches - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +1621. Enable miscellaneous integer variable 1? y +1622. Enable miscellaneous integer variable 2? y +1623. Enable miscellaneous integer variable 3? y +1624. Enable miscellaneous integer variable 4? y +1625. Enable miscellaneous integer variable 5? y +1626. Enable miscellaneous integer variable 6? y +1627. Enable miscellaneous integer variable 7? y +1628. Enable miscellaneous integer variable 8? y +1629. Enable miscellaneous integer variable 9? y +1630. Enable miscellaneous integer variable 10? y + +# -------------------------------------------------------------------------- +# Configuration File association parameters (default is "y") - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +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)? y +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 + +# -------------------------------------------------------------------------- +# POST TEXT +# -------------------------------------------------------------------------- +[CTRL_MILL|DEFAULT] +[misc integers] +2. "Absolute or Incremental [0=ABS, 1=INC]" +[simple drill] +1. "Cycle 200 - Drilling" +3. "Dwell - Top" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[peck drill] +1. "Cycle 201 - Reaming" +3. "Dwell - Top" +7. "" +8. "" +9. "" +10. "Retract Rate" +11. "Dwell - Bottom" +[chip break] +1. "Cycle 202 - Boring" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Disengage Dir." +8. "Angle - spdl stop" +9. "" +10. "" +11. "Dwell - Bottom" +[tap] +1. "Cycle 203 - Universal Drilling" +3. "Dwell - Top" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[bore1] +1. "Cycle 1 - Pecking/Drilling" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Peck" +8. "" +9. "" +10. "" +11. "" +[bore2] +1. "Cycle 205 - Universal Pecking" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[misc1] +1. "Cycle 2 - Tapping" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[misc2] +1. "Cycle 206 - Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[drill cycle 9] +1. "Cycle 17 - Rigid Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[drill cycle 10] +1. "Cycle 207 - Rigid Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[drill cycle 11] +1. "Cycle 209 - Tapping with chip breaking" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Infeed Depth" +8. "Retract Dist." +9. "Spindle Angle" +10. "" +11. "" +[drill cycle 12] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 13] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 14] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 15] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 16] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 17] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 18] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 19] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 20] +4. "Clearance" +5. "Retract" +6. "Depth" +[simple drill custom parameters] +1. "Custom Drill Parameters 1" +[peck drill custom parameters] +1. "Custom Drill Parameters 2" +[chip break drill custom parameters] +1. "Custom Drill Parameters 3" +[tap custom parameters] +1. "Universal Drilling Parameters" +2. "Decrement Value" +3. "Number of Breaks" +4. "Minimum Plunging Depth" +5. "Retraction Feed Rate" +6. "Distance for Chip Breaking" +7. "" +8. "" +9. "" +10. "" +11. "" +[bore1 custom parameters] +1. "Custom Drill Parameters 5" +[bore2 custom parameters] +1. "Universal Pecking Parameters" +2. "Decrement Value" +3. "" +4. "Minimum Plunging Depth" +5. "" +6. "Distance for Chip Breaking" +7. "Upper Advanced Stop Distance" +8. "Lower Avanced Stop Distance" +9. "Infeed Depth for Chip Breaking" +10. "" +11. "" +[misc1 custom parameters] +1. "Custom Drill Parameters 7" +[misc2 custom parameters] +1. "Custom Drill Parameters 8" +[drill cycle 9 custom parameters] +1. "Custom Drill Parameters 9" +[drill cycle 10 custom parameters] +1. "Custom Drill Parameters 10" +[drill cycle 11 custom parameters] +1. "Custom Drill Parameters 11" +[drill cycle 12 custom parameters] +1. "Custom Drill Parameters 12" +[drill cycle 13 custom parameters] +1. "Custom Drill Parameters 13" +[drill cycle 14 custom parameters] +1. "Custom Drill Parameters 14" +[drill cycle 15 custom parameters] +1. "Custom Drill Parameters 15" +[drill cycle 16 custom parameters] +1. "Custom Drill Parameters 16" +[drill cycle 17 custom parameters] +1. "Custom Drill Parameters 17" +[drill cycle 18 custom parameters] +1. "Custom Drill Parameters 18" +[drill cycle 19 custom parameters] +1. "Custom Drill Parameters 19" +[drill cycle 20 custom parameters] +1. "Custom Drill Parameters 20" +[drill cycle descriptions] +1. "Cycle 200 - Drilling/Pecking" +2. "Cycle 201 - Reaming" +3. "Cycle 202 - Boring" +4. "Cycle 203 - Universal Drilling" +5. "Cycle 1 - Pecking/Drilling" +6. "Cycle 205 - Universal Pecking" +7. "Cycle 2 - Tapping with floating holder" +8. "Cycle 206 - Tapping NEW with floating holder" +9. "Cycle 17 - Rigid Tapping w/o floating holder" +10. "Cycle 207 - Rigid Tapping NEW w/o floating holder" +11. "Cycle 209 - Tapping with chip breaking" +[canned text] +1. "Stop" +2. "Ostop" +3. "" +4. "" +5. "M5" +6. "M6" +7. "M7" +8. "M8" +9. "M9" +10. "M10" +[CTRL_MILL|GENERIC HEIDENHAIN_TNC530 3X MILL] +[misc integers] +2. "Absolute or Incremental [0=ABS, 1=INC]" +[simple drill] +1. "Cycle 200 - Drilling" +3. "Dwell - Top" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[peck drill] +1. "Cycle 201 - Reaming" +3. "Dwell - Top" +7. "" +8. "" +9. "" +10. "Retract Rate" +11. "Dwell - Bottom" +[chip break] +1. "Cycle 202 - Boring" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Disengage Dir." +8. "Angle - spdl stop" +9. "" +10. "" +11. "Dwell - Bottom" +[tap] +1. "Cycle 203 - Universal Drilling" +3. "Dwell - Top" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[bore1] +1. "Cycle 1 - Pecking/Drilling" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Peck" +8. "" +9. "" +10. "" +11. "" +[bore2] +1. "Cycle 205 - Universal Pecking" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[misc1] +1. "Cycle 2 - Tapping" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[misc2] +1. "Cycle 206 - Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[drill cycle 9] +1. "Cycle 17 - Rigid Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[drill cycle 10] +1. "Cycle 207 - Rigid Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[drill cycle 11] +1. "Cycle 209 - Tapping with chip breaking" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Infeed Depth" +8. "Retract Dist." +9. "Spindle Angle" +10. "" +11. "" +[drill cycle 12] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 13] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 14] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 15] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 16] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 17] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 18] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 19] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 20] +4. "Clearance" +5. "Retract" +6. "Depth" +[simple drill custom parameters] +1. "Custom Drill Parameters 1" +[peck drill custom parameters] +1. "Custom Drill Parameters 2" +[chip break drill custom parameters] +1. "Custom Drill Parameters 3" +[tap custom parameters] +1. "Universal Drilling Parameters" +2. "Decrement Value" +3. "Number of Breaks" +4. "Minimum Plunging Depth" +5. "Retraction Feed Rate" +6. "Distance for Chip Breaking" +7. "" +8. "" +9. "" +10. "" +11. "" +[bore1 custom parameters] +1. "Custom Drill Parameters 5" +[bore2 custom parameters] +1. "Universal Pecking Parameters" +2. "Decrement Value" +3. "" +4. "Minimum Plunging Depth" +5. "" +6. "Distance for Chip Breaking" +7. "Upper Advanced Stop Distance" +8. "Lower Avanced Stop Distance" +9. "Infeed Depth for Chip Breaking" +10. "" +11. "" +[misc1 custom parameters] +1. "Custom Drill Parameters 7" +[misc2 custom parameters] +1. "Custom Drill Parameters 8" +[drill cycle 9 custom parameters] +1. "Custom Drill Parameters 9" +[drill cycle 10 custom parameters] +1. "Custom Drill Parameters 10" +[drill cycle 11 custom parameters] +1. "Custom Drill Parameters 11" +[drill cycle 12 custom parameters] +1. "Custom Drill Parameters 12" +[drill cycle 13 custom parameters] +1. "Custom Drill Parameters 13" +[drill cycle 14 custom parameters] +1. "Custom Drill Parameters 14" +[drill cycle 15 custom parameters] +1. "Custom Drill Parameters 15" +[drill cycle 16 custom parameters] +1. "Custom Drill Parameters 16" +[drill cycle 17 custom parameters] +1. "Custom Drill Parameters 17" +[drill cycle 18 custom parameters] +1. "Custom Drill Parameters 18" +[drill cycle 19 custom parameters] +1. "Custom Drill Parameters 19" +[drill cycle 20 custom parameters] +1. "Custom Drill Parameters 20" +[drill cycle descriptions] +1. "Cycle 200 - Drilling/Pecking" +2. "Cycle 201 - Reaming" +3. "Cycle 202 - Boring" +4. "Cycle 203 - Universal Drilling" +5. "Cycle 1 - Pecking/Drilling" +6. "Cycle 205 - Universal Pecking" +7. "Cycle 2 - Tapping with floating holder" +8. "Cycle 206 - Tapping NEW with floating holder" +9. "Cycle 17 - Rigid Tapping w/o floating holder" +10. "Cycle 207 - Rigid Tapping NEW w/o floating holder" +11. "Cycle 209 - Tapping with chip breaking" +[canned text] +1. "Stop" +2. "Ostop" +3. "" +4. "" +5. "M5" +6. "M6" +7. "M7" +8. "M8" +9. "M9" +10. "M10" +[CTRL_TEXT_END] diff --git a/post/GENERIC HEIDENHAIN_TNC530 3X MILL MM.MMD b/post/GENERIC HEIDENHAIN_TNC530 3X MILL MM.MMD new file mode 100644 index 0000000000000000000000000000000000000000..e567d011ea5e94d405b86f1ee4064d119a41b2b1 GIT binary patch literal 70118 zcmeHQeQX>@6<^m)Ka!NVG$~b}bX%pUNR8ztqzyE}dp@7-6TT1GSCmu{(Z#vc2hN?b z&mv8cnwB6^sk9dKANT_W3PSur6bXf@pvr|-QKTv*AOUHT29mU)P=OpORZt;?dAIlO zW@l$^XYY2ecg|aDy*o4SW9GMS=H9&Bojqu$TY5Wx${QCe{V(^-)d)U$0i^zM0c)pW3xLej`g&+v+0nm7zlV7AEE6 zY+vz|tqRn2v;8`@zfObH_6$26%ih|A+HNRF;4FJ4Wkcgj}E1M(s+Y-sP1#VH%HoU3nTPUrIFC&U)=?R~oDr9AVoD|3bE* zkAM!>wi%|P7PAcAG+b16#`TJP%vOyQSWZVmfDj-A2mwNX5Fi8y0YZQfAOr{jLVyq; z1Ue0YLvXv;(uZ5+p3Wk>YDD_c4 zmPCEj4_d*{c3K}TKS)$rmH2}Qca1uVJ77#d3@Gnk~K2LjYbJpc-!xYPP5gpO-l zt*_PcWM{5ET8#&H8v~K(7i2t?Cqsbxs0@{G^E$1MUh9CvtB;C()4|LViwoBp1F1|V zl@LoPEk}U*s2rCtb33h%E|Y@c*%vFnn{K*g##nrKBx8=p2V+vvl<7c#`lthrmLxi@ zkIJ8Y(EUAi(_Lqb#)hbiYTFw1QEjLKBkZ(3itlz^eDLwzKR9%$ACCyg4fn2`e#tz& zP&xM7$A9#{vtd5=(?>7haRJlU8}acJGSkr$0qUck5Cu*UWFMV|+F9@{;0niEwtS^~ z{`p)v?89EvHjc3sb>wek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1*9E_A<3m=Nw7Ob_Di!voalPlFCiQ!!niho>#i7E%VOOy`eu>X z@Q<;F+OaN+>;ETFAd7WbY=SZJ^#_9W<=Xll1X7HxZ+4}RX>BtvK5t0GbXmNsEiVuI zGign`kr4!0^^0Rz58I6qt9~{0()M4DUp)DG>PJ7s^c(n3oDTdaGmiH_8ZQg)e{{bW z((&HMA6zsZ`RN}Ye(Rkh)_?5YS$5{%{h8Gsc)uj$V|%k*z&|ixVdiLu?EREhXFPu$ za;5L5^kg*)$7Y*Nd@n{^sZgIcmy+U=SFX)1>~6t>_Av>}EX>10ReJNdxmfUcWT{Sh zPsA*5Z_M((5VO1|W0v<+%<{e%Szf83CW7d^af%(6qes0J38f{X6A-boapRJKskzc< z4G#}{s_PWCFL#|hfACl#lP-+rryk1`GY1RlOfFx{PS1>Ii`l7sM$cvQquF9Eoi83N z7c)=p-J|c_uNU$Y6T_KOu{>3p;6?TCaR&tK+RS8Wx~u}h^BeUW1Ok54ds;${EMa3n(A5ZXF#R9Az3El} literal 0 HcmV?d00001 diff --git a/post/GENERIC HEIDENHAIN_TNC530 3X MILL.PST b/post/GENERIC HEIDENHAIN_TNC530 3X MILL.PST new file mode 100644 index 0000000..2b36b3e --- /dev/null +++ b/post/GENERIC HEIDENHAIN_TNC530 3X MILL.PST @@ -0,0 +1,2826 @@ +[POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V10.00 E1 P0 T1123876832 M10.00 I0 +# Post Name : Generic Heidenhain_TNC530 3X Mill.pst +# Product : Mill +# Machine Name : Generic +# Control Name : Heidenhain TNC-426/430/530 +# Description : Heidenhain Conversational Mill Post +# 4-axis/Axis subs. : Yes (NOT configured yet!) +# 5-axis : No +# Subprograms : Yes +# Executable : MP 10.0 +# +# WARNING: THIS POST IS GENERIC AND IS INTENDED FOR MODIFICATION TO +# THE MACHINE TOOL REQUIREMENTS AND PERSONAL PREFERENCE. +# +# Associated File List$ +# +# GENERIC HEIDENHAIN_TNC530 3X.control +# GENERIC HEIDENHAIN_TNC530 3X.MMD +# GENERIC HEIDENHAIN_TNC530 3X MM.MMD +# +# Associated File List$ +# +# -------------------------------------------------------------------------- +# Revision log: +# -------------------------------------------------------------------------- +# CNC 08/12/05 - Initial post setup for Mastercam X +# +# -------------------------------------------------------------------------- +# Features: +# -------------------------------------------------------------------------- +# This post supports Generic Heidenhain 426/430/530 code for 3 axis milling. +# It is designed to support the features of Mastercam X Mill. +# +# This post has several Heidenhain specific output option switches. +# Search for "Output Configuration Settings" to locate the post section. +# +# NEW FEATURES FOR X: +# - Variable initialization with CD_VAR are read directly from CD. Changing these initial values +# in the post will not effect output. These values are only processed during the update post routine. +# - Supports X comments including machine name, group name and group comment output (see pcomment2) +# - Additional date, time and data path output options (see pheader) +# - Support for 10 additional canned text options for X +# +# Drilling (canned) cycles supported in this post: +# - 200 DRILLING +# - 201 REAMING +# - 202 BORING - !!MACHINE MUST BE SETUP FOR THIS CYCLE!! +# - 203 UNIVERSAL DRILLING +# - 1.0 PECKING +# - 205 UNIVERSAL PECKING +# - 2.0 TAPPING +# - 206 TAPPING NEW +# - 17.0 RIGID TAPPING GS - !!MACHINE MUST BE SETUP FOR THIS CYCLE!! +# - 207 RIGID TAPPING NEW - !!MACHINE MUST BE SETUP FOR THIS CYCLE!! +# - 209 TAPPING W/ CHIP BRKG - !!MACHINE MUST BE SETUP FOR THIS CYCLE!! +# +# -------------------------------------------------------------------------- +# Misc. Values: +# -------------------------------------------------------------------------- +# Integers: +# +# mi1 - (NOT USED) +# +# mi2 - Absolute or Incremental positioning at top level +# 0 = absolute +# 1 = incremental +# +# mi3 - mi10 (NOT USED) +# +# Reals: +# +# mr1 - mr10 (NOT USED) +# +# -------------------------------------------------------------------------- +#Canned text: +# Not Supported +# +# -------------------------------------------------------------------------- +#Additional Notes: +# 1) Metric is applied from the NCI met_tool variable. +# 2) Incremental mode calculates motion from home position at toolchanges. +# The home position is used to define the last position of the tool +# for all toolchanges. +# 3) The variable 'absinc' is now pre-defined, set mi2 (Misc. Integer) for +# the 'top level' absolute/incremental program output. Subprograms are +# updated through the Mastercam dialog settings for sub-programs. +# +# END_HEADER$ +# +# -------------------------------------------------------------------------- +# Debugging and Factory Set Program Switches +# -------------------------------------------------------------------------- +#Define Constants +m_one := -1 +zero := 0 +one := 1 +two := 2 +three := 3 +four := 4 +five := 5 +c9k := 9999 + +fastmode$ : yes$ #CD_VAR Enable Quick Post Processing, (set to no for debug) +bug1$ : 2 #0=No display, 1=Generic list box, 2=Editor +bug2$ : 40 #Append postline labels, non-zero is column position? +bug3$ : 0 #Append whatline number to each NC line? +bug4$ : 1 #Append NCI line number to each NC line? +whatno$ : yes$ #Do not perform whatline branches? (leave as yes) +linktolvar$ : 1 #Associate X tolerance variables to V9- variable? +linkplnvar$ : 1 #Associate X plane specific variables to V9- variable? +skp_lead_flgs$ : 0 #Do NOT use v9 style contour flags +get_1004$ : 1 #Find gcode 1004 with getnextop? +rpd_typ_v7$ : 0 #Use Version 7 style contour flags/processing? +strtool_v7$ : 2 #Use Version 7+ toolname? +tlchng_aft$ : 2 #Delay call to toolchange until move line +cant_tlchng$ : 1 #Ignore cantext entry on move with tlchng_aft +newglobal$ : 1 #Error checking for global variables +getnextop$ : 1 #Build the next variable table +tooltable$ : 3 #Pre-read, call the pwrtt postblock + +# -------------------------------------------------------------------------- +# Output Configuration Settings +# -------------------------------------------------------------------------- +modal_XY : yes$ #Are X & Y axis positions modal ? +modal_feed : yes$ #Is 'F'eedrate modal? +modal_cdc : no$ #Are 'RR' and 'RL' comp codes modal? +force_n0 : no$ #Force sequence numbering to START at '0' +blk_form : yes$ #Output the 'BLK FORM" statements at start of program? +tdef_table : yes$ #Put all the TOOL DEF blocks at the top of the program? +use_scode : no$ #Use Spindle Code lookup table? + #If = no, output the programmed RPM + +setup_sign : 2 #0 = Do not change the sign of SETUP + #1 = Always make SETUP a NEGATIVE value + #2 = Always make SETUP a POSITIVE value + +peckg_sign : 2 #0 = Do not change the sign of PECKG + #1 = Always make PECKG a NEGATIVE value + #2 = Always make PECKG a POSITIVE value + +sextnc$ ".H" #CD_VAR Set extension on output file + +output_M6 : no$ #Set to yes if M6 is required for tool change + +output_M30 : yes$ #Yes = output M30, no = output END PGM block - + #Depends on setting in parameter 7300 on machine control. + +# -------------------------------------------------------------------------- +# General Output Settings +# -------------------------------------------------------------------------- +sub_level$ : 1 #CD_VAR Enable automatic subprogram support +breakarcs$ : 0 #CD_VAR Break arcs, 0 = no, 1 = quadrants, 2 = 180deg. max arcs +arcoutput : 0 #0 = IJK, 1 = R no sign, 2 = R signed neg. over 180 +arctype$ : 1 #CD_VAR Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc., + #5 = R no sign, 6 = R signed neg. over 180 +do_full_arc$ : 0 #CD_VAR Allow full circle output? 0=no, 1=yes +helix_arc$ : 2 #CD_VAR Support helix arc output, 0=no, 1=all planes, 2=XY plane only +arccheck$ : 1 #CD_VAR Check for small arcs, convert to linear +atol$ : 0.01 #CD_VAR Angularity tolerance for arccheck +ltol$ : 0.002 #CD_VAR Length tolerance for arccheck +vtol$ : 0.0001#System tolerance +maxfeedpm : 500 #Limit for feed in inch/min +ltol_m : 0.05 #Length tolerance for arccheck, metric +vtol_m : 0.0025#System tolerance, metric +maxfeedpm_m : 10000 #Limit for feed in mm/min +spaces$ : 1 #CD_VAR Number of spaces to add between fields +omitseq$ : no$ #CD_VAR Omit sequence numbers? +seqmax$ : 9999 #CD_VAR Max. sequence number +stagetool : 0 #SET_BY_CD 0 = Do not pre-stage tools, 1 = Stage tools +max_speed : 18000 #Maximum spindle speed +min_speed : 50 #Minimum spindle speed +nobrk$ : no$ #Omit breakup of x, y & z rapid moves +progname$ : 1 #Use uppercase for program name (sprogname) + +# -------------------------------------------------------------------------- +# Rotary Axis Settings +# -------------------------------------------------------------------------- +vmc : 1 #0 = Horizontal Machine, 1 = Vertical Mill +rot_on_x : 0 #Default Rotary Axis Orientation, See ques. 164. + #0 = Off, 1 = About X, 2 = About Y, 3 = About Z +rot_ccw_pos : 1 #Axis signed dir, 0 = CW positive, 1 = CCW positive +index : 1 #Use index positioning, 0 = Full Rotary, 1 = Index only +ctable : 5 #Degrees for each index step with indexing spindle +use_frinv : no$ #Use Inverse Time Feedrates in 4 Axis, (0 = no, 1 = yes) +maxfrdeg : 2000 #Limit for feed in deg/min +maxfrinv : 999.99#Limit for feed inverse time +frc_cinit : yes$ #Force C axis reset at toolchange +ctol : 225 #Tolerance in deg. before rev flag changes +ixtol : 0.01 #Tolerance in deg. for index error +frdegstp : 10 #Step limit for rotary feed in deg/min + +# -------------------------------------------------------------------------- +# Enable Canned Drill Cycle Switches +# -------------------------------------------------------------------------- +usecandrill$ : yes$ #CD_VAR Use canned cycle for drill +usecanpeck$ : yes$ #CD_VAR Use canned cycle for Peck +usecanchip$ : yes$ #CD_VAR Use canned cycle for Chip Break +usecantap$ : yes$ #CD_VAR Use canned cycle for Tap +usecanbore1$ : yes$ #CD_VAR Use canned cycle for Bore1 +usecanbore2$ : yes$ #CD_VAR Use canned cycle for Bore2 +usecanmisc1$ : yes$ #CD_VAR Use canned cycle for Misc1 +usecanmisc2$ : yes$ #CD_VAR Use canned cycle for Misc2 + +# -------------------------------------------------------------------------- +# Common User-defined Variable Initializations (not switches!) +# -------------------------------------------------------------------------- +xia : 0 #Formatted absolute value for X incremental calculations +yia : 0 #Formatted absolute value for Y incremental calculations +zia : 0 #Formatted absolute value for Z incremental calculations +cia : 0 #Formatted absolute value for C incremental calculations + +cuttype : 0 #Cut type flag + #0 = Tool Plane, 1 = Axis Subs, 2 = Polar, 3 = 4/5 axis +bld : 0 #Block delete active +result : 0 #Return value for functions +sav_spc : 0 #Save spaces +sav_gcode : 0 #Gcode saved +sav_absinc : 0 #Absolute/Incremental Saved Value +sav_coolant : 0 #Coolant saved +toolchng : 1 #On a toolchange flag +spdir2 : 1 #Copy for safe spindle direction calculation +thd_ttpr : 0 #Flag for tapered thread + +#Drill variables +drlgsel : -1 #Drill Select Initialize +drillref : 0 #Select drill reference +peckacel$ : 0 #CD_VAR Fractional percent to reduce peck2 when usecan.. : no +drlgcode : 0 #Save Gcode in drill +sav_dgcode : 0 #Drill gcode saved + +#Subprogram variables +mr_rt_actv : 0 #Flag to indicate if G51/G68 is active + #0=Off, 1=Toolchange, 2=Subprogram call/start, G68 + #3=Absolute start, both +rt_csav : 0 #C saved value +end_sub_mny : 0 #Many tool setting captured at transform sub end + +#Rotary/Index variables +csav : 0 #C saved value +prvcabs : 0 #Saved cabs from pe_inc_calc, + #Used for rotary feed and direction calculations +cdelta : 0 #Calculation for angle change +rev : 0 #Calculation for deg/min +sav_rev : 0 #Saved revolution counter +indx_out : c9k #Rotation direction calculation +fmt 16 indx_mc #Rotation direction calculation + +#Vector Constants for Rotatary Calculations +aaxisx : 1 #A axis rotation vector constant +aaxisy : 0 #A axis rotation vector constant +aaxisz : 0 #A axis rotation vector constant +baxisx : 0 #B axis rotation vector constant +baxisy : 1 #B axis rotation vector constant +baxisz : 0 #B axis rotation vector constant +caxisx : 0 #C axis rotation vector constant +caxisy : 0 #C axis rotation vector constant +caxisz : 1 #C axis rotation vector constant + +#Feedrate calculation variables +frdelta : 0 #Calculation for deg/min +frinv : 0 #Feedrate inverse time +frdeg : 0 #Feedrate deg/min actual +prvfrdeg : 0 #Feedrate deg/min actual +ldelta : 0 #Calculation for deg/min, linear +cldelta : 0 #Calculation for deg/min, linear and rotary +circum : 0 #Calculation for deg/min +ipr_type : 0 #Feedrate for Rotary, 0 = UPM, 1 = DPM, 2 = Inverse + +xmove : no$ #Is this axis moving ? +ymove : no$ #Is this axis moving ? +zmove : no$ #Is this axis moving ? + +# -------------------------------------------------------------------------- +# Format statements - n=nonmodal, l=leading, t=trailing, i=inc, d=delta +# -------------------------------------------------------------------------- +#Default english/metric position format statements +fs2 1 0.7 0.6 #Decimal, absolute, 7 place, default for initialize (:) +fs2 2 +1.4 1.3lt #Decimal, absolute, 4/3 place (Forced +/- sign output) +fs2 3 +1.4 1.3lt #Decimal, absolute, 4/3 place (Forced +/- sign output) +#Common format statements +fs2 4 1 0 1 0 #Integer, not leading +fs2 5 2 0 2 0l #Integer, force two leading +fs2 6 3 0 3 0l #Integer, force three leading +fs2 7 4 0 4 0 #Integer, four leading +fs2 8 1.3 1.2ltn #Decimal, absolute, 3/2 place, leading&trailing, non-modal +fs2 9 1.1 1.1ltn #Decimal, absolute, 1/1 place, leading&trailing, non-modal +fs2 10 0.2 0.2 #Decimal, absolute, 2 place +fs2 11 0.3 0.3 #Decimal, absolute, 3 place +fs2 12 0.4 0.4 #Decimal, absolute, 4 place +fs2 13 0.5 0.5 #Decimal, absolute, 5 place +fs2 14 0.3 0.3d #Decimal, delta, 3 place +fs2 15 1 1 1 0lt #Decimal, absolute, 1/0 place (feedrate) +fs2 16 1 0 1 0n #Integer, forced output +fs2 17 0.3 0.2 #Decimal, absolute, 3/2 place (tapping feedrate) +fs2 18 1.4 1.3lt #Decimal, absolute, 4/3 place, leading&trailing +fs2 19 +1^4 1^4l #Decimal, absolute, 4 place, force leading, omit decimal for whole numbers +fs2 20 +1^4 1^4 #Decimal, absolute, 4 place. Omit decimal for whole numbers +fs2 21 4 1 4 1t #Decimal, absolute, 1place trailing - Omit decimal + +# These formats used for 'Date' & 'Time' +fs2 22 2.2 2.2lt #Decimal, force two leading & two trailing (time2) +fs2 23 2 0 2 0t #Integer, force trailing (hour) +fs2 24 0 2 0 2lt #Integer, force leading & trailing (min) + +# -------------------------------------------------------------------------- +#String and string selector definitions for NC output +# -------------------------------------------------------------------------- +#Numbered question 164. string to detect Rotary axis y/n +sq164 + +#Misc. string definitions +sopen_prn " ; " #String for open parenthesis "(" +sclose_prn #String for close parenthesis ")" +sdelimiter "|" #String for delimiter + +# String constants +sdef "CYCL DEF" +scyclcall "CYCL CALL" +stooldef "TOOL DEF " +stoolcall "TOOL CALL " +ssetup "SET UP " +sdepth "DEPTH " +speckg "PECKG " +spitch "PITCH " +sdwell "DWELL " +sbeginpgm "BEGIN PGM" +sendpgm "END PGM" +smax "MAX" +sstop "M05" +strc "C" +strcc "CC" +strcr "CR" +strcp "CP" + +#------------------------------------------------------------------------- +strf0 "" +strf "F" +strl "L" +strr "R" +strr0 "R0" +strm99 "M99" +strix "IX" +striy "IY" +striz "IZ" +strx "X" +stry "Y" +strz "Z" +smaxrate "FMAX" #"Rapid" positioning feedrate + +#Drilling strings +s200q "Q200=" +s200 " ;SET-UP CLEARANCE ~" +s201 " ;DEPTH ~" +s202 " ;PLUNGING DEPTH ~" +s203 " ;SURFACE COORDINATE ~" +s204 " ;2ND SET-UP CLEARANCE ~" +s205 " ;MINIMUM PLUNGING DEPTH ~" +s206 " ;FEED RATE FOR PLUNGING ~" +s208 " ;RETRACTION FEEDRATE ~" +s210 " ;DWELL TIME AT TOP ~" +s211 " ;DWELL TIME AT BOTTOM ~" +s212 " ;DECREMENT ~" +s213 " ;BREAKS ~" +s214 " ;DISENGAGING DIRECTION (0/1/2/3/4) AT BOTTOM OF HOLE ~" +s239 " ;THREAD PITCH ~" +s256 " ;DISTANCE FOR CHIP BREAK ~" +s257 " ;INFEED DEPTH FOR CHIP BREAKING ~" +s258 " ;UPPER ADVANCED STOP DISTANCE ~" +s259 " ;LOWER ADVANCED STOP DISTANCE ~" +s336 " ;ANGLE FOR ORIENTED SPINDLE STOP ~" + +#Address string definitions +strm0 "" +strm "M" +strn "N" +stro "O" +strp "P" +srad "R" +srminus "R-" +sblank + +#Cantext string definitions (spaces must be padded here) +sm00 "M00" +sm01 "M01" +strtextno +strcantext + +#Transform mirror and rotate codes +strns_mir_on "G51.1" #Programmable mirror image code +strns_mir_off "G50.1" #Programmable mirror image cancel code +strns_rot_on "G68" #Coordinate System Rotation +strns_rot_off "G69" #Coordinate System Rotation Cancel + +# -------------------------------------------------------------------------- +# Error messages +# -------------------------------------------------------------------------- +saxiswarn "WARNING-POST ROTARY AXIS ASSIGNMENT ('rot_on_x') OVERWRITTEN BY OPERATION" +saxisoff "ERROR-POST ROTARY AXIS ASSIGNMENT ('rot_on_x') IS DISABLED" +saxiserror "ERROR-INVALID ROTARY AXIS ASSIGNMENT ('rot_on_x') FOR CURRENT OPERATION" +sindxerror "WARNING-INDEX ANGLE DOES NOT MATCH POST SETTING ('ctable')" +stlorgerr "ERROR-TOOL ORIGIN DOES NOT MATCH CENTER OF ROTATION IN POLAR MILLING" +shomeserror "ERROR-G92 WORK OFFSET ('mi1') DOES NOT SUPPORT TRANSFORM SUBPROGRAM" +sprgnerror "ERROR-SUBPROGRAM NUMBER MATCHES THE MAIN PROGRAM NUMBER" +splnerror "ERROR-DETERMINING THE TOOL AXIS WORK PLANE" + +# -------------------------------------------------------------------------- +# General G and M Code String select tables +# -------------------------------------------------------------------------- +# Motion G code selection +sg00 L #Rapid +sg01 L #Linear feed +sg02 DR- #Circular interpolation CW +sg03 DR+ #Circular interpolation CCW +sg04 DWELL #Dwell +sgcode #Target for string + +fstrsel sg00 gcode$ sgcode 5 -1 +# -------------------------------------------------------------------------- +# Select tool axis work plane code +sg17 Z #XY plane code +sg19 X #YZ plane code +sg18 Y #XZ plane code +sgplane #Target string + +fstrsel sg17 plane$ sgplane 3 -1 +# -------------------------------------------------------------------------- +#Select english/metric code +sg20 INCH #Inch code +sg21 MM #Metric code +smetric #Target string + +fstrsel sg20 met_tool$ smetric 2 -1 +# -------------------------------------------------------------------------- +# Cutter compensation G code selection +scc0 R0 #Cancel cutter compensation +scc1 RL #Cutter compensation left +scc2 RR #Cutter compensation right +sccomp #Target for string + +fstrsel scc0 cc_pos$ sccomp 3 -1 +# -------------------------------------------------------------------------- +# Feed mode G code selection +sg94 G94 #UPM +sg94d G94 #DPM, See pfcalc_deg if you use another gcode +sg93 G93 #Inverse +sgfeed #Target for string + +fstrsel sg94 ipr_type sgfeed 3 -1 +# -------------------------------------------------------------------------- +# Generate string for spindle +sm04 M04 #Spindle reverse +sm05 M05 #Spindle off +sm03 M03 #Spindle forward +spindle #Target for string + +fstrsel sm04 spdir2 spindle 3 -1 +# -------------------------------------------------------------------------- +# Coolant M code selection for V9 style coolant +sm09 M9 #Coolant Off +sm08 M8 #Coolant Flood +sm08_1 M8 #Coolant Mist +sm08_2 M8 #Coolant Tool +scoolant #Target for string + +fstrsel sm09 coolant$ scoolant 4 -1 +# -------------------------------------------------------------------------- +# Table rotation direction, index +sindx_cw #Rotate CW code (was 'M22') +sindx_ccw #Rotate CCW code (was 'M21') +sindx_mc #Target for string + +fstrsel sindx_cw indx_mc sindx_mc 2 -1 +# -------------------------------------------------------------------------- +# Canned drill cycle string select +sg81 "200 DRILLING ~" #pdrill +sg81d "200 DRILLING ~" #pdrill +sg83 "201 REAMING ~" #ppeck drill +sg83d "201 REAMING ~" #ppeck drill +sg73 "202 BORING ~" #pchpbrk break +sg73d "202 BORING ~" #pchpbrk break +sg84 "203 UNIVERSAL DRILLING ~" #ptap +sg84d "203 UNIVERSAL DRILLING ~" #ptap +sg85 "1.0 PECKING" #pbore1 +sg85d "1.0 PECKING" #pbore1 +sg86 "205 UNIVERSAL PECKING ~" #pbore2 +sg86d "205 UNIVERSAL PECKING ~" #pbore2 +sgm1 "2.0 TAPPING" #pmisc1 -right hand +sgm1d "2.0 TAPPING" #pmisc1 -left hand +sgm2 "206 TAPPING NEW ~" #pmisc2 -right hand +sgm2d "206 TAPPING NEW ~" #pmisc2 -left hand +sgcst8 "17.0 RIGID TAPPING GS" #pdrlcst8 -right hand +sgcst8d "17.0 RIGID TAPPING GS" #pdrlcst8 -left hand +sgcst9 "207 RIGID TAPPING NEW ~" #pdrlcst9 -right hand +sgcst9d "207 RIGID TAPPING NEW ~" #pdrlcst9 -left hand +sgcst10 "209 TAPPING W/ CHIP BRKG. ~" #pdrlcst10 -right hand +sgcst10d "209 TAPPING W/ CHIP BRKG. ~" #pdrlcst10 -left hand +sgdrill #Target for string + +fstrsel sg81 drlgsel sgdrill 22 -1 +# -------------------------------------------------------------------------- +# Select incremental or absolute G code +sg90 A #Absolute code +sg91 I #Incremental code +sgabsinc #Target string + +fstrsel sg90 absinc$ sgabsinc 2 -1 +# -------------------------------------------------------------------------- +# Month selector +smon0 "" +smon1 "JAN." +smon2 "FEB." +smon3 "MAR." +smon4 "APR." +smon5 "MAY." +smon6 "JUN." +smon7 "JUL." +smon8 "AUG." +smon9 "SEP." +smon10 "OCT." +smon11 "NOV." +smon12 "DEC." +smonth + +fstrsel smon0 month$ smonth 13 -1 +# -------------------------------------------------------------------------- +# Buffer file definitions +temp_t : -1 #Tool Number (saved in Buffer1) +plane_t : 0 #Work plane (saved in Buffer1) +size1 : 0 #To hold the 'size' of Buffer1 +rc1 : 1 #Buffer1 'read index' +wc1 : 1 #Buffer1 'write index' + +fbuf 1 0 2 0 0#Declare Buffer1 (holds 2 values) +# -------------------------------------------------------------------------- +# Lookup table definitions - for Math Functions FLOOK, FRANGE, and FINC +# -------------------------------------------------------------------------- +# Spindle code lookup table +flktbl 1 45 # Lookup table no. No. of entry pairs + 224 19 + 250 21 # Code 1 (output) Match 1 + 280 24 # Code 2 Match 2 + 315 27 # . . + 355 28 # . . + 400 34 # . . + 450 38 + 500 43 + 560 48 + 630 54 + 710 60 + 800 68 + 900 77 + 1000 85 + 1120 95 + 1250 106 + 1400 119 + 1600 136 + 1800 153 + 2000 170 + 2240 190 + 2500 212 + 2800 238 + 1250 242 + 3150 268 + 1400 270 + 3550 302 + 1600 310 + 1800 348 + 2000 387 + 2240 434 + 2500 484 + 2800 542 + 1250 550 + 3150 610 + 1250 616 + 3550 687 + 1600 704 + 1800 792 + 2000 880 + 2240 985 + 2500 1100 + 2800 1232 + 3150 1386 + 3350 1562 + +# -------------------------------------------------------------------------- +# Toolchange / NC output Variable Formats +# -------------------------------------------------------------------------- +fmt 4 t$ #Tool number +fmt D 4 tloffno$ #Diameter offset number +fmt L 4 tlngno$ #Length offset number +fmt R 8 tlrad$ #Tool Radius +fmt L 9 tlength # Output either "L0,0" or "L+0,0" +fmt S 4 speed #Spindle speed +fmt S 4 sscode #Spindle speed code (from tbl 1) +# -------------------------------------------------------------------------- +fmt 4 n$ #Sequence number +fmt X 2 xabs #X position output +fmt Y 2 yabs #Y position output +fmt Z 2 zabs #Z position output +fmt IX 3 xinc #X position output +fmt IY 3 yinc #Y position output +fmt IZ 3 zinc #Z position output +fmt Z 2 zretract #Z retract level at the end of each (drilling) tool +fmt A 11 cabs #C axis position +fmt A 14 cinc #C axis position +fmt A 4 indx_out #Index position +fmt R 14 rt_cinc #C axis position, G68 +fmt X 2 i$ #Arc center description in X +fmt Y 2 j$ #Arc center description in Y +fmt Z 2 k$ #Arc center description in Z +fmt R 2 arcrad$ #Arc Radius +fmt IPA 11 sweep$ #Arc sweep angle +fmt F 15 feed #Feedrate +fmt 11 dwell$ #Dwell +fmt M 5 cantext$ #Canned text +# -------------------------------------------------------------------------- +fmt 7 progno$ #Program number +fmt "LBL" 7 main_prg_no$ #Program number +fmt "LBL" 7 sub_prg_no$ #Program number +fmt X 2 sub_trnsx$ #Rotation point +fmt Y 2 sub_trnsy$ #Rotation point +fmt Z 2 sub_trnsz$ #Rotation point +# -------------------------------------------------------------------------- +fmt 18 shftdrl$ #Fine bore tool shift +fmt 18 setup #Safety Distance (initht) +fmt 18 peckg #Feed Depth (peck1) +fmt 18 drldepth #Drill depth +# -------------------------------------------------------------------------- +#Drilling variables +fmt Z 2 initht$ #Initial Z height for drilling +fmt " Q200=" 20 refht$ #Retract height +fmt " Q201=" 20 depth$ #Drill depth +fmt " Q202=" 20 peck1$ #Peck depth +fmt " Q203=" 20 surf_coord +fmt " Q204=" 20 clearht #Clearance height +fmt " Q205=" 20 min_plunge #Minimum plunge depth +fmt " Q206=" 15 drill_feed #Drilling feedrate +fmt " Q208=" 21 ret_feed #Retraction feedrate +fmt " Q210=" 19 top_dwell #Dwell time at top of hole +fmt " Q211=" 19 bot_dwell #Dwell time at bottom of hole +fmt " Q212=" 20 decrement #Decreasing value for pecking cycle +fmt " Q213=" 20 breaks #?? +fmt " Q214=" 4 shft_dir #Disengaging direction (0/1/2/3/4) at bottom of hole +fmt " Q239=" 20 pitch #Thread pitch - New style +fmt 20 pitch2 #Thread Pitch - Old Style +fmt " Q256=" 20 chp_brk #Chip break retraction amount +fmt " Q257=" 20 infeed #Infeed depth for chip breaking +fmt " Q258=" 20 up_stop #Upper advanced stop distance +fmt " Q259=" 20 low_stop #Lower advanced stop distance +fmt " Q336=" 20 stop_ang #Angle for oriented spindle stop +# -------------------------------------------------------------------------- +fmt "TOOL - " 4 tnote #Note format +fmt " DIA. OFF. - " 4 toffnote #Note format +fmt " LEN. - " 4 tlngnote #Note format +fmt " DIA. - " 1 tldia$ #Note format +# -------------------------------------------------------------------------- +fmt 4 stck_crnr$ #Origin corner of stock (0 - 8) +fmt X 2 stck_x$ #X origin of block +fmt Y 2 stck_y$ #Y origin of block +fmt Z 2 stck_z$ #Z origin of block +fmt X 2 stck_ht$ #X - Stock Height +fmt Y 2 stck_wdth$ #Y - Stock Width +fmt Z 2 stck_thck$ #Z - Stock Thickness +fmt X 2 stck_x_min #Minimum stock block position (X) +fmt Y 2 stck_y_min #Minimum stock block position (Y) +fmt Z 2 stck_z_min #Minimum stock block position (Z) +fmt X 2 stck_x_max #Maximum stock block position (X) +fmt Y 2 stck_y_max #Maximum stock block position (Y) +fmt Z 2 stck_z_max #Maximum stock block position (Z) +# -------------------------------------------------------------------------- +fmt 4 year2 #Calculated year value +fmt 22 time2 #Capture 24-hour time value into 'time2' variable +fmt 23 hour #Hour +fmt 24 min #Minutes +year2 = year$ + 2000 + +# -------------------------------------------------------------------------- +# Tool Comment / Manual Entry Section +# -------------------------------------------------------------------------- +ptoolcomment #Comment for tool + tnote = t$ + toffnote = tloffno$ + tlngnote = tlngno$ + sopen_prn, pstrtool, *tnote, *toffnote, *tlngnote, *tldia$, sclose_prn, e$ + +pstrtool #Comment for tool + if strtool$ <> sblank, + [ + strtool$ = ucase(strtool$) + *strtool$, " " + ] + +pcomment$ #Comment from manual entry (must call pcomment2 if booleans) + pcomment2 + +pcomment2 #Comment from manual entry + scomm$ = ucase (scomm$) + if gcode$ = 1005, sopen_prn, scomm$, sclose_prn, e$ #Manual entry - as comment + if gcode$ = 1006, scomm$, e$ #Manual entry - as code + if gcode$ = 1007, sopen_prn, scomm$, sclose_prn #Manual entry - as comment with move NO e$ + if gcode$ = 1026, scomm$ #Manual entry - as code with move NO e$ + if gcode$ = 1008, sopen_prn, scomm$, sclose_prn, e$ #Operation comment + if gcode$ = 1051, sopen_prn, scomm$, sclose_prn, e$ #Machine name + if gcode$ = 1052, sopen_prn, scomm$, sclose_prn, e$ #Group comment + if gcode$ = 1053, sopen_prn, scomm$, sclose_prn, e$ #Group name + if gcode$ = 1054, sopen_prn, scomm$, sclose_prn, e$ #File Descriptor + +pblkform #Output the 'BLK FORM' statements at start of program + if blk_form, + [ + if stck_crnr$ = 0, #Top - Center + [ + stck_x_min = stck_x$ - stck_ht$/2 + stck_y_min = stck_y$ - stck_wdth$/2 + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_ht$/2 + stck_y_max = stck_y$ + stck_wdth$/2 + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 1, #Top - Upper Left + [ + stck_x_min = stck_x$ + stck_y_min = stck_y$ - stck_wdth$ + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_ht$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 2, #Top - Upper Right + [ + stck_x_min = stck_x$ - stck_ht$ + stck_y_min = stck_y$ - stck_wdth$ + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 3, #Top - Lower Right + [ + stck_x_min = stck_x$ - stck_ht$ + stck_y_min = stck_y$ + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_wdth$ + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 4, #Top - Lower Left + [ + stck_x_min = stck_x$ + stck_y_min = stck_y$ + stck_z_min = stck_z$ - stck_thck$ + stck_x_max = stck_x$ + stck_ht$ + stck_y_max = stck_y$ + stck_wdth$ + stck_z_max = stck_z$ + ] + + if stck_crnr$ = 5, #Bottom - Upper Left + [ + stck_x_min = stck_x$ + stck_y_min = stck_y$ - stck_wdth$ + stck_z_min = stck_z$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + stck_thck$ + ] + + if stck_crnr$ = 6, #Bottom - Upper Right + [ + stck_x_min = stck_x$ - stck_ht$ + stck_y_min = stck_y$ - stck_wdth$ + stck_z_min = stck_z$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + stck_thck$ + ] + + if stck_crnr$ = 7, #Bottom Lower Right + [ + stck_x_min = stck_x$ - stck_ht$ + stck_y_min = stck_y$ + stck_z_min = stck_z$ + stck_x_max = stck_x$ + stck_y_max = stck_y$ + stck_z_max = stck_z$ + stck_thck$ + ] + + if stck_crnr$ = 8, #Bottom - Lower Left + [ + stck_x_min = stck_x$ + stck_y_min = stck_y$ + stck_z_min = stck_z$ + stck_x_max = stck_x$ + stck_ht$ + stck_y_max = stck_y$ + stck_wdth$ + stck_z_max = stck_z$ + stck_thck$ + ] + + n$, "BLK FORM 0.1 Z", *stck_x_min, *stck_y_min, *stck_z_min, e$ + n$, "BLK FORM 0.2 ", *stck_x_max, *stck_y_max, *stck_z_max, e$ + ] + +pwrtt$ #Tool Table Output + if tdef_table, # Put all the TOOL DEF blocks at the top of the program? + [ + if t$ > 0 & gcode$ <> 1003, #If a "real" toolchange + #"/", n$, *stooldef, *t$, *tlength, *tlrad$, e$ + n$, *stooldef, *t$, e$ + ] + +pparameter$ #Operation parameters postblock + if prmcode$ = 12385, + [ + result = rpar(sparameter$, 1) + if result <> 0, thd_ttpr = 1 #Thread milling taper angle + ] + +pplane #State the Tool Axis working plane + if plane$ = zero | plane$ = one | plane$ = two, *sgplane + else, result = mprint(splnerror) + +# -------------------------------------------------------------------------- +# Start of File and Toolchange Setup +# -------------------------------------------------------------------------- +ptime #Convert 24-hour time format into 12-hour AM/PM format + if time$ >= 13, time2 = (time$ - 12) + else, time2 = time$ + hour = int(time2), min = frac(time2) + *hour, ":", *min, + if time$ > 12, " PM" + else, " AM" +pheader$ #Call before start of file + if force_n0, # Force sequence numbering to START at '0' and increment by '1' + [ + seqno$ = 0 + n$ = seqno$ + seqinc$ = 1 + ] + n$, *sbeginpgm, *sprogname$, *smetric, e$ + sav_spc = spaces$ + spaces$ = 0 + #*progno$, sopen_prn, sprogname$, sclose_prn, e$ + *progno$, e$ + #sopen_prn, "PROGRAM NAME - ", sprogname$, sclose_prn, e$ + sopen_prn, "DATE - ", date$, e$ + sopen_prn, "TIME - ", time$, e$ + #sopen_prn, "DATE=DD-MM-YY - ", date$, " TIME=HH:MM - ", time$, sclose_prn, e$ #Date and time output Ex. 12-02-05 15:52 + #sopen_prn, "DATE - ", month$, "-", day$, "-", year$, sclose_prn, e$ #Date output as month,day,year - Ex. 02-12-05 + #sopen_prn, "DATE - ", *smonth, " ", day$, " ", *year2, sclose_prn, e$ #Date output as month,day,year - Ex. Feb. 12 2005 + #sopen_prn, "TIME - ", time$, sclose_prn, e$ #24 hour time output - Ex. 15:52 + #sopen_prn, "TIME - ", ptime sclose_prn, e$ #12 hour time output 3:52 PM + spathnc$ = ucase(spathnc$) + smcname$ = ucase(smcname$) + stck_matl$ = ucase(stck_matl$) + snamenc$ = ucase(snamenc$) + #sopen_prn, "MCX FILE - ", *smcpath$, *smcname$, *smcext$, sclose_prn, e$ + #sopen_prn, "NC FILE - ", *spathnc$, *snamenc$, *sextnc$, sclose_prn, e$ + #sopen_prn, "MATERIAL - ", *stck_matl$, sclose_prn, e$ + spaces$ = sav_spc + pblkform # Output the 'BLK FORM' statements at start of program +psof0$ #Start of file for tool zero + psof$ + +psof$ #Start of file for non-zero tool number + pcuttype + toolchng = one + sav_absinc = absinc$ + pcom_moveb + c_mmlt$ #Multiple tool subprogram call + comment$ + pcan + if tdef_table = no$, #Put all the TOOL DEF blocks at the top of the program? + #"/", n$, *stooldef, *t$, *tlength, *tlrad$, e$ + n$, *stooldef, *t$, e$ + if use_scode = yes$, #Use Spindle code lookup table? + sscode = frange(1, speed) #Get spindle code for RPM + else, + sscode = speed #Use programmed RPM + n$, *stoolcall, *t$, pplane, *sscode, e$ + if output_M6, n$, "M6", e$ + #ptoolcomment + !opcode$ + #pindex + if mi1$ > one, absinc$ = zero + pcan1, n$, *sgcode, pfxout, pfyout, strr0, smaxrate, *spindle, e$ + n$, *sgcode, pfzout, strr0, smaxrate, *scoolant, e$ + zretract = zabs + prv_feed = c9k + absinc$ = sav_absinc + pcom_movea + toolchng = zero + c_msng$ #Single tool subprogram call + +ptlchg0$ #Call from NCI null tool change (tool number repeats) + pcuttype + pcom_moveb + c_mmlt$ #Multiple tool subprogram call + comment$ + pcan + result = newfs(15, feed) #Reset the output format for 'feed' + pspindchng + #n, scoolant, e + if cuttype = zero, ppos_cax_lin + if gcode$ = one, plinout + else, prapidout + pcom_movea + c_msng$ #Single tool subprogram call + +ptlchg$ #Tool change + pcuttype + toolchng = one + pcom_moveb + c_mmlt$ #Multiple tool subprogram call + comment$ + pcan + result = newfs(15, feed) #Reset the output format for 'feed' + if tdef_table = no$, # Put all the TOOL DEF blocks at the top of the program? + #"/", n$, *stooldef, *t$, *tlength, *tlrad$, e$ + n$, *stooldef, *t$, e$ + if use_scode = yes$, # Use Spindle code lookup table? + sscode = frange(1, speed) # Get spindle code for RPM + else, + sscode = speed #Use programmed RPM + n$, *stoolcall, *t$, pplane, *sscode, e$ + if output_M6, n$, "M6", e$ + #ptoolcomment + !opcode$ + #pindex + sav_absinc = absinc$ + if mi1$ > one, absinc$ = zero + pcan1, n$, *sgcode, pfxout, pfyout, strr0, smaxrate, *spindle, e$ + n$, *sgcode, pfzout, strr0, smaxrate, *scoolant, e$ + zretract = zabs + prv_feed = c9k + absinc$ = sav_absinc + pcom_movea + toolchng = zero + c_msng$ #Single tool subprogram call + +pretract #End of tool path, toolchange + sav_absinc = absinc$ + absinc$ = one + sav_coolant = coolant$ + coolant$ = zero + #cc_pos is reset in the toolchange here + cc_pos$ = zero + gcode$ = zero + pcan + n$, sccomp, psub_end_mny, e$ + if prv_opcode$ = three, # Ending a (drill) canned cycle operation + n$, *strl, *zretract, strr0, smaxrate, strm, e$ + n$, *scoolant, e$ #Force coolant off + #if not(toolchng = 1003), n, *sstop, e + n$, *sstop, e$ + prv_feed = c9k + pcan2 + absinc$ = sav_absinc + coolant$ = sav_coolant + +protretinc #Reset the C axis revolution counter + if frc_cinit & rot_on_x, + [ + rev = zero + sav_rev = zero + cabs = zero + csav = zero + indx_out = zero + if index, e$, pindxcalc, pindex + else, *cabs + prvcabs = zero + !csav, !cabs + ] + +peof0$ #End of file for tool zero + peof$ + +peof$ #End of file for non-zero tool + toolchng = 1003 + pretract + comment$ + #n$, "TOOL CALL 0", e$ + if output_M6, n$, "M6", e$ + #n$, "L X+0 Y+0 Z+0 R0 FMAX M92", e$ + n$, "L Z+0 R0 FMAX M92", e$ + if output_M30, n$, "M30", e$ + else, n$, *sendpgm, *sprogname$, *smetric, e$ + mergesub$ + clearsub$ + mergeaux$ + clearaux$ + +#Toolchange setup +pspindchng #Spindle speed change + if prv_spdir2 <> spdir2 & prv_speed <> zero, n$, *sm05, e$ + if prv_speed <> speed | prv_spdir2 <> spdir2, + [ + if use_scode = yes$, #Use Spindle code lookup table? + sscode = frange(1, speed) #Get spindle code for RPM + else, + sscode = speed #Use programmed RPM + n$, *stoolcall, *t$, *sscode, e$ + n$, *sgcode, "M3", e$ + #if speed, n$, *speed, *spindle, e$ + ] + !speed, !spdir2 + +pspindle #Spindle speed calculations for RPM + speed = abs(ss$) + if maxss$ = zero | maxss$ > max_speed, maxss$ = max_speed + #zero indicates spindle off (not a mistake) + if speed, + [ + if speed > max_speed, speed = maxss$ + if speed < min_speed, speed = min_speed + ] + spdir2 = fsg3(spdir$) + +pq$ #Setup post based on switch settings + if stagetool = one, bldnxtool$ = one + #Rotaxtyp = 1 sets initial matrix to top + #Rotaxtyp = -2 sets initial matrix to front + if vmc, rotaxtyp$ = one + else, rotaxtyp$ = -2 + #Shut off rotary axis if, Q164. Enable Rotary Axis button? n + if ucase(sq164) = strn, rot_on_x = zero + if spaces$ < one, spaces$ = one + !arctype$ # Save current setting + +ptoolend$ #End of tool path, before reading new tool data + !speed, !spdir2 + thd_ttpr = 0 #Reset thread milling taper angle flag + +ptlchg1002$ #Call at actual toolchange, end last path here + if cuttype <> one, sav_rev = rev #Axis Sub does not update to rev + pspindle + whatline$ = four #Required for vector toolpaths + if gcode$ = 1000, + [ + #Null toolchange + ] + else, + [ + #Toolchange and Start of file + if gcode$ = 1002, + [ + #Actual toolchange + pretract + ] + prv_xia = vequ(xh$) + prv_feed = c9k + ] + +# -------------------------------------------------------------------------- +# Motion NC output +# -------------------------------------------------------------------------- +#The variables for absolute output are xabs, yabs, zabs. +#The variables for incremental output are xinc, yinc, zinc. +# -------------------------------------------------------------------------- +pchk_xyz # Which axis are moving ? + if fmtrnd(xabs) <> prv_xabs, xmove = yes$ + else, xmove = no$ + if fmtrnd(yabs) <> prv_yabs, ymove = yes$ + else, ymove = no$ + if fmtrnd(zabs) <> prv_zabs, zmove = yes$ + else, zmove = no$ + +prapidout #Output to NC of linear movement - rapid + pchk_xyz # Which axis are moving ? + if not(modal_XY) & (xmove | ymove), result = force(xabs, yabs) + if zmove = yes$, + [ + if zabs > prv_zabs, # Z is coming UP + [ + # Do the Z move before any X and/or Y move + pcan1, n$, *sgcode, pfzout, pcout, pccdia, + smaxrate, pspdl, e$ + if xmove | ymove, + pcan1, n$, *sgcode, pxout, pyout, pcout, + pccdia, smaxrate, pspdl, e$ + ] + else, # Z is going DOWN + [ + # Do the X and/or Y move before the Z move + if xmove | ymove, + pcan1, n$, *sgcode, pxout, pyout, pcout, + pccdia, smaxrate, pspdl, e$ + pcan1, n$, *sgcode, pfzout, pcout, pccdia, + smaxrate, pspdl, e$ + ] + ] + else, # Do the X and/or Y axis motion + [ + if xmove | ymove, + [ + pcan1, n$, *sgcode, pxout, pyout, pzout, + pcout, pccdia, smaxrate, pspdl, e$ + ] + ] + +plinout #Output to NC of linear movement - feed + pchk_xyz # Which axis are moving ? + if not(modal_XY) & (xmove | ymove), result = force(xabs, yabs) + if xmove | ymove | zmove, + pcan1, n$, sgfeed, *sgcode, pxout, pyout, pzout, pcout, + pccdia, pfeed, pspdl, e$ + +parc_cntr #Select the arc center output axis + if plane$ = zero, *i$, *j$, !k$ #XY plane + if plane$ = one , !i$, *j$, *k$ #YZ plane + if plane$ = two , *i$, !j$, *k$ #XZ plane + +parc_endpt #The arc endpoint axis outputs + if plane$ = zero, pxout, pyout #XY plane + if plane$ = one , pyout, pzout #YZ plane + if plane$ = two , pxout, pzout #XZ plane + +parc_helix_endpt #Helix endpoint outputs + if plane$ = zero, pzout #XY plane + if plane$ = one , pxout #YZ plane + if plane$ = two , pyout #XZ plane + +pcirout #Output to NC of circular interpolation + pchk_xyz # Which axis are moving ? + if not(modal_XY) & (xmove | ymove | zmove), result = force(xabs, zabs) + if arc_pitch$, #Helical interpolation + [ + n$, strcc, parc_cntr, e$ + if plane$ = one, sweep$ = -(sweep$) + pcan1, n$, strcp, *sweep$, parc_helix_endpt, *sgcode, pccdia, pfeed, pspdl, e$ + ] + else, + [ + if arcoutput$ = zero | full_arc_flg$, + [ + n$, strcc, parc_cntr, e$ + pcan1, n$, strc, parc_endpt, *sgcode, pccdia, pfeed, pspdl, e$ + ] + else, + [ + #Arc output for R + pcan1, n$, strcr, parc_endpt, *arcrad$, *sgcode, pccdia, + pfeed, pspdl, e$ + ] + ] + +pcom_moveb #Common motion preparation routines, before + pxyzcout + ps_inc_calc + +pncoutput #Movement output + pcom_moveb + comment$ + pcan + if cuttype = zero, ppos_cax_lin #Toolplane rotary positioning + if gcode$ = zero, prapidout + if gcode$ = one, plinout + if gcode$ > one & gcode$ < four, pcirout + if mr_rt_actv, #Restore absolute/incremental for G51/G68 + [ + absinc$ = sav_absinc + mr_rt_actv = zero + ] + pcom_movea + +pcom_movea #Common motion preparation routines, after + pcan2 + pe_inc_calc + +pdwl_spd$ #Call from NCI gcode 4 + pspindle + comment$ + pspindchng + pcan + if fmtrnd(dwell$), pcan1, n$, *sgcode, *dwell$, strcantext, e$ + else, pcan1, n$, strcantext, e$ + pcan2 + +prapid$ #Output to NC of linear movement - rapid + pncoutput + +pzrapid$ #Output to NC of linear movement - rapid Z only + pncoutput + +plin$ #Output to NC of linear movement - feed + pncoutput + +pz$ #Output to NC of linear movement - feed Z only + pncoutput + +pmx$ #Output to NC of vector NCI + pncoutput + +pcir$ #Output to NC of circular interpolation + pncoutput + +#Pre-process rotary motion control flags +pmx0$ #5 axis gcode setup + if drillcur$ = zero, + [ + if fr$ = -2, gcode$ = zero + else, gcode$ = one + ] + +plin0$ #Linear movement, mill motion test + pmotion_su + +pcir0$ #Circular interpolation, mill arc motion test + pmotion_su + # Check the arc output format + # If user has selected 'CR' output format, make sure that we never + # output an arc move that exceeds 180 degrees in a single block. + # *Also, if the user has set for 'full arcs', make sure that we do + # NOT output in the 'CR' format mode. + # *Also, if 'acrc_pitch' is not zero (means doing helix motion) + # make sure that we are NOT in 'CR' format mode. + if arcoutput$ > zero & not(full_arc_flg$) | abs(arc_pitch$) > vtol$, + [ + if abs(sweep$) > 180 & breakarcs$ <> 2, breakarcs$ = 2 + ] + if absinc$ = one, #Set for INCREMENTAL arc center positions + [ + !absinc$ + !arctype$ # Save current setting + arctype$ = 1 # Set for INCREMENTAL (Start->Center) arc centers + result = nwadrs(strix, i$) + result = nwadrs(striy, j$) + result = nwadrs(striz, k$) + ] + else, + [ + arctype$ = prv_arctype$ # Restore previous setting + if arctype$ = one, + [ #Set for ABSOLUTE arc center positions + result = nwadrs(strx, i$) + result = nwadrs(stry, j$) + result = nwadrs(strz, k$) + ] + else, + [ #Set for INCREMENTAL arc center positions + result = nwadrs(strix, i$) + result = nwadrs(striy, j$) + result = nwadrs(striz, k$) + ] + ] + +# -------------------------------------------------------------------------- +# Motion output components +# -------------------------------------------------------------------------- +pfeed # Feedrate output + if modal_feed = no$, *feed + else, + [ + if fmtrnd(feed) <> prv_feed, feed # Has Feedrate changed? + else, strf0 # No, just output an 'F' + ] + +pccdia #Cutter Compensation + if cc_pos$ <> prv_cc_pos$, *sccomp, !cc_pos$ # CDC status changed? + else, + [ + if modal_cdc = no$, *sccomp # Are 'RR' and 'RL' comp codes modal? + else, strr0 # Just output an 'R' + ] + +pspdl # Spindle state + if spdir2 <> prv_spdir2, spindle, !spdir2 + else, strm0 # Just output an 'M' + +pfxout #Force X axis output + if absinc$ = zero, *xabs, !xinc + else, *xinc, !xabs + +pxout #X output + if absinc$ = zero, xabs, !xinc + else, xinc, !xabs + +pfyout #Force Y axis output + if absinc$ = zero, *yabs, !yinc + else, *yinc, !yabs + +pyout #Y output + if absinc$ = zero, yabs, !yinc + else, yinc, !yabs + +pfzout #Force Z axis output + if absinc$ = zero, *zabs, !zinc + else, *zinc, !zabs + +pzout #Z output + if absinc$ = zero, zabs, !zinc + else, + [ + if fmtrnd(zinc) <> zero, zinc + !zabs + ] + +pfcout #Force C axis output + if index = zero & rot_on_x, + [ + if absinc$ = zero, *cabs, !cinc + else, *cinc, !cabs + ] + +pcout #C axis output + if index = zero & rot_on_x, + [ + if absinc$ = zero, cabs, !cinc + else, cinc, !cabs + ] + +pindex #Index output + if index & rot_on_x, + [ + n$, `sindx_mc, indx_out, e$ + !cabs, !cinc + ] + +ppos_cax_lin #Position the rotary axis before move - rapid + if index, pindex + else, + [ + if fmtrnd(prv_cabs) <> fmtrnd(cabs) & rot_on_x, + [ + sav_gcode = gcode$ + gcode$ = zero + n$, sgcode, pcout, e$ + !cia + ps_cinc_calc + gcode$ = sav_gcode + ] + ] + +# -------------------------------------------------------------------------- +# Drilling +# -------------------------------------------------------------------------- +pdrill0$ #Pre-process before drill call + sav_dgcode = gcode$ #Capture gcode for 5 axis drill + +pdrlcommonb #Canned Drill Cycle common call, before + if sav_dgcode = 81, + [ + if drillcyc$ > 6 & drillcyc$ < 12, drlgsel = fsg1(-ss$) + drillcyc$ * two + else, drlgsel = fsg2(dwell$) + drillcyc$ * two + if initht$ <> refht$, drillref = zero + else, drillref = one + prv_dwell$ = zero + ] + if cuttype = three, sav_dgcode = gcode$ + else, z$ = depth$ + if cuttype = one, prv_zia = initht$ + (rotdia$/two) + else, prv_zia = initht$ + pcom_moveb + feed = fr_pos$ + comment$ + pcan + #5 axis must map the true Z, correct Z calculation here + if cuttype = three, + [ + prv_zia = zabs + (-depth$) + initht$ + zia = fmtrnd(zabs) + zinc = zia - prv_zia + ] + pchk_xyz # Which axis are moving ? + if not(modal_XY) & (xmove | ymove), result = force(xabs, yabs) + + # Drilling Calculations (for SETUP and PECKG parameters) + # 'setup_sign' setting -> + # 0 = Do not change the sign of SETUP + # 1 = Always make SETUP a NEGATIVE value + # 2 = Always make SETUP a POSITIVE value + if setup_sign, + [ + if setup_sign = one, setup = abs(refht$) * m_one + else, setup = abs(refht$) + ] + + # 'peckg_sign' setting -> + # 0 = Do not change the sign of PECKG + # 1 = Always make PECKG a NEGATIVE value + # 2 = Always make PECKG a POSITIVE value + if peckg_sign, + [ + if peckg_sign = one, peckg = abs(peck1$) * m_one + else, peckg = abs(peck1$) + ] + + #Get Z axis (drill depth) + if absinc$ = zero, drldepth = zabs #Drill depth (absolute) + else, drldepth = zinc #Drill depth (incremental) + +pdrill$ #Cycle 200 Drilling + pdrlcommonb + top_dwell = dwell$ + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + if peck1$ = 0, peck1$ = abs(depth$) + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *peck1$, *s202, e$ #PLUNGING DEPTH + *top_dwell, *s210, e$ #DWELL TIME AT TOP + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +ppeck$ #Cycle 201 Reaming + pdrlcommonb + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + ret_feed = dwell$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + *ret_feed, *s208, e$ #RETRACTION FEEDRATE + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pchpbrk$ #Cycle 202 Boring + pdrlcommonb + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + ret_feed = dwell$ + shft_dir = peck1$ + stop_ang = peck2$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + *ret_feed, *s208, e$ #RETRACTION FEEDRATE + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *shft_dir, *s214, e$ #DISENGAGING DIRECTION (0/1/2/3/4) AT BOTTOM OF HOLE + *stop_ang, *s336, e$ #ANGLE FOR ORIENTED SPINDLE STOP + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +ptap$ #Cycle 203 Universal Drilling + pdrlcommonb + top_dwell = dwell$ + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + decrement = drl_prm1$ + breaks = drl_prm2$ + min_plunge = drl_prm3$ + ret_feed = drl_prm4$ + chp_brk = drl_prm5$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *peck1$, *s202, e$ #PLUNGING DEPTH + *top_dwell, *s210, e$ #DWELL TIME AT TOP + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *decrement, *s212, e$ #DECREMENT + *breaks, *s213, e$ #BREAKS + *min_plunge, *s205, e$ #MINIMUM PLUNGING DEPTH + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + *ret_feed, *s208, e$ #RETRACTION FEEDRATE + *chp_brk, *s256, e$ #DISTANCE FOR CHIP BREAK + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pbore1$ #Cycle 1 Pecking/Drilling + pdrlcommonb + n$, sdef, *sgdrill, e$ + n$, sdef, "1.1", ssetup, *setup, e$ + n$, sdef, "1.2", sdepth, *drldepth, e$ + n$, sdef, "1.3", speckg, *peckg, e$ + n$, sdef, "1.4", sdwell, *dwell$, e$ + n$, sdef, "1.5", *feed, e$ + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pbore2$ #Cycle 205 Universal Pecking + pdrlcommonb + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + decrement = drl_prm1$ + min_plunge = drl_prm3$ + chp_brk = drl_prm5$ + up_stop = drl_prm6$ + low_stop = drl_prm7$ + infeed = drl_prm8$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *peck1$, *s202, e$ #PLUNGING DEPTH + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *decrement, *s212, e$ #DECREMENT + *min_plunge, *s205, e$ #MINIMUM PLUNGING DEPTH + *up_stop, *s258, e$ #UPPER ADVANCED STOP DISTANCE + *low_stop, *s259, e$ #LOWER ADVANCED STOP DISTANCE + *infeed, *s257, e$ #INFEED DEPTH FOR CHIP BREAKING + *chp_brk, *s256, e$ #DISTANCE FOR CHIP BREAK + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pmisc1$ #Cycle 2 Tapping - with floating holder #TODO + pdrlcommonb + n$, sdef, *sgdrill, e$ + n$, sdef, "2.1", ssetup, *setup, e$ + n$, sdef, "2.2", sdepth, *drldepth, e$ + n$, sdef, "2.3", sdwell, *dwell$, e$ + n$, sdef, "2.4", *feed, e$ + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pmisc2$ #Cycle 206 Tapping New - with floating holder + pdrlcommonb + bot_dwell = shftdrl$ + drill_feed = feed + surf_coord = tosz$ + clearht = initht$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *drill_feed, *s206, e$ #FEED RATE FOR PLUNGING + *bot_dwell, *s211, e$ #DWELL TIME AT BOTTOM + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pdrlcst8 #Cycle 17 Rigid Tapping - without floating holder + pdrlcommonb + if met_tool$, pitch2 = n_tap_thds$ # Tap pitch (mm per thread) + else, pitch2 = 1/n_tap_thds$ # Tap pitch (inches per thread) + if drlgsel = 17, pitch2 = -(pitch) + n$, sdef, *sgdrill, e$ + n$, sdef, "17.1", ssetup, *setup, e$ + n$, sdef, "17.2", sdepth, *drldepth, e$ + n$, sdef, "17.3", spitch, *pitch2, e$ + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pdrlcst9 #Cycle 207 Rigid Tapping New - without floating holder + pdrlcommonb + if met_tool$, pitch = n_tap_thds$ # Tap pitch (mm per thread) + else, pitch = 1/n_tap_thds$ # Tap pitch (inches per thread) + if drlgsel = 19, pitch = -(pitch) + surf_coord = tosz$ + clearht = initht$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *pitch, *s239, e$ #THREAD PITCH + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pdrlcst10 #Cycle 209 Tapping - with chip breaking #TODO + pdrlcommonb + if met_tool$, pitch = n_tap_thds$ # Tap pitch (mm per thread) + else, pitch = 1/n_tap_thds$ # Tap pitch (inches per thread) + if drlgsel = 19, pitch = -(pitch) + surf_coord = tosz$ + clearht = initht$ + infeed = peck1$ + chp_brk = peck2$ + stop_ang = peckclr$ + n$, *sdef, *sgdrill, e$ + *refht$, *s200, e$ #SET-UP CLEARANCE + *depth$, *s201, e$ #HOLE DEPTH + *pitch, *s239, e$ #THREAD PITCH + *surf_coord, *s203, e$ #SURFACE COORDINATE + *clearht, *s204, e$ #2ND SET-UP CLEARANCE + *infeed, *s257, e$ #INFEED DEPTH FOR CHIP BREAKING + *chp_brk, *s256, e$ #DISTANCE FOR CHIP BREAK + *stop_ang, *s336, e$ #ANGLE FOR ORIENTED SPINDLE STOP + n$, *scyclcall, e$ + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +pdrlcst$ #Custom drill cycles 8 - 19 (user option) + if drillcyc$ = 8, pdrlcst8 + if drillcyc$ = 9, pdrlcst9 + if drillcyc$ = 10, pdrlcst10 + if drillcyc$ > 10, + [ + pdrlcommonb + "*-> CUSTOM CYCLE IS NOT SUPPORTED BY THIS POST <-*", e$ + pcom_movea + ] + +#Additional Holes +pdrill_2$ #Canned Drill Cycle, additional points + pdrlcommonb + n$, *strl, pfxout, pfyout, strr0, smaxrate, strm99, e$ + pcom_movea + +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$ + +pdrlcst8_2 #Custom drill cycle 8 + pdrill_2$ + +pdrlcst9_2 #Custom drill cycle 9 + pdrill_2$ + +pdrlcst10_2 #Custom drill cycle 10 + pdrill_2$ + +pdrlcst_2$ #Custom drill cycles 8 - 19, additional points (user option) + if drillcyc$ = 8, pdrlcst8_2 + if drillcyc$ = 9, pdrlcst9_2 + if drillcyc$ = 10, pdrlcst10_2 + if drillcyc$ > 10, + [ + pdrlcommonb + "*-> CUSTOM CYCLE IS NOT SUPPORTED BY THIS POST <-*", e$ + pcom_movea + ] + +pcanceldc$ #Cancel canned drill cycle + z$ = initht$ + if cuttype = one, prv_zia = initht$ + (rotdia$/two) + else, prv_zia = initht$ + pxyzcout + !zabs, !zinc + prv_gcode$ = zero + +# -------------------------------------------------------------------------- +#Subprogram postblocks +#sub_trnstyp - 0=mirror, 1=rotate, 2=scale, 3=translate +#sub_trnmthd (mirror) - 0=X axis, 1=Y axis, 2=line +#sub_trnmthd (rotate) - 0=tplane, 1=tplane origin only, 2=coordinates +# -------------------------------------------------------------------------- +psub_call_m$ #Call to main level, single tool + psub_call_trans + +psub_call_mm$ #Call to main level, multiple tools + psub_call_trans + +psub_call_trans #Translate level calls from toolchange, user + if mi1$ <= one, result = mprint(shomeserror) + sav_absinc = absinc$ + #pindex + #Mirror or Rotate Coord's + if sub_trnstyp$ = zero | (sub_trnstyp$ = one & mr_rt_actv), + [ + #The original pattern is not mirrored or rotated + if sub_sec_no$, + [ + absinc$ = zero + if sub_trnstyp$, psub_rotate + else, psub_mirror + ] + mr_rt_actv = three + ] + else, #Translate + [ + if sub_mny_t$, + [ + if mi1$ > one, absinc$ = zero + n$, *sgcode, pfxout, pfyout, pfzout, pfcout, e$ + pe_inc_calc + ps_inc_calc + ] + ] + absinc$ = sav_absinc + if progno$ = main_prg_no$, result = mprint(sprgnerror) + n$, "CALL", *main_prg_no$, e$ + prv_feed = c9k #Force feed in sub + +psub_mirror #Mirror start code, user + #Mirror Y axis + if sub_trnmthd$, n$, strns_mir_on, *sub_trnsx$, e$ + #Mirror X axis + else, n$, strns_mir_on, *sub_trnsy$, e$ + +psub_rotate #Rotate start code, user + n$, *sgcode, strns_rot_on, *sub_trnsx$, *sub_trnsy$, + [absinc$ = one], *rt_cinc, e$ + +psub_st_m$ #Header in main level + " ", e$ + n$, *main_prg_no$, e$ + #G51/G68 requires absolute position on first move + if mr_rt_actv & absinc$ = one, + [ + sav_absinc = absinc$ + absinc$ = zero + prv_absinc$ = m_one + prv_xabs = m_one + prv_yabs = m_one + ] + +psub_end_m$ #End in main level + n$, "LBL 0", e$ + prv_absinc$ = m_one + #Reset update variables for subs at main level + #Mirror or Rotate cancel, output is forced + if (sub_trnstyp$ = zero & esub_sec_no$ > zero) + | (sub_trnstyp$ = one & esub_sec_no$ = esub_totl_no$-one + & sub_trnmthd$ = two), + [ + subout$ = zero + no_nc_out$ = m_one + sav_absinc = absinc$ + #Mirror cancel + if sub_trnstyp$ = zero, + [ + absinc$ = zero + n$, strns_mir_off, *sub_trnsx$, *sub_trnsy$, e$ + ] + else, #Rotate cancel + [ + n$, strns_rot_off, e$ + ] + absinc$ = sav_absinc + no_nc_out$ = zero + ] + end_sub_mny = sub_mny_t$ + +psub_end_mny #End in main level for many tools sub, user + #Check for coming out of xform with stage tool. + if end_sub_mny & stagetool = one, + [ + *t$ + end_sub_mny = zero + ] + +psub_call_s$ #Call to sub level + sub_prg_no$ = sub_prg_no$ #+ 1000 #Add sub number offset + if progno$ = sub_prg_no$, result = mprint(sprgnerror) + n$, "CALL ", *sub_prg_no$, e$ + +psub_st_s$ #Header in sub leveln + " ", e$ + n$, *sub_prg_no$, e$ + +psub_end_s$ #End in sub level + n$, "LBL 0", e$ + prv_absinc$ = m_one + +# -------------------------------------------------------------------------- +# Canned Text +# -------------------------------------------------------------------------- +pcan #Canned text - before output call + strcantext = sblank + if cant_no$ > zero, + [ + if cant_pos1$ = zero | cant_pos1$ = three, pcant_1 + if cant_pos2$ = zero | cant_pos2$ = three, pcant_2 + if cant_pos3$ = zero | cant_pos3$ = three, pcant_3 + if cant_pos4$ = zero | cant_pos4$ = three, pcant_4 + if cant_pos5$ = zero | cant_pos5$ = three, pcant_5 + if cant_pos6$ = zero | cant_pos6$ = three, pcant_6 + if cant_pos7$ = zero | cant_pos7$ = three, pcant_7 + if cant_pos8$ = zero | cant_pos8$ = three, pcant_8 + if cant_pos9$ = zero | cant_pos9$ = three, pcant_9 + if cant_pos10$ = zero | cant_pos10$ = three, pcant_10 + if cant_pos11$ = zero | cant_pos11$ = three, pcant_11 + if cant_pos12$ = zero | cant_pos12$ = three, pcant_12 + if cant_pos13$ = zero | cant_pos13$ = three, pcant_13 + if cant_pos14$ = zero | cant_pos14$ = three, pcant_14 + if cant_pos15$ = zero | cant_pos15$ = three, pcant_15 + if cant_pos16$ = zero | cant_pos16$ = three, pcant_16 + if cant_pos17$ = zero | cant_pos17$ = three, pcant_17 + if cant_pos18$ = zero | cant_pos18$ = three, pcant_18 + if cant_pos19$ = zero | cant_pos19$ = three, pcant_19 + if cant_pos20$ = zero | cant_pos20$ = three, pcant_20 + n$, strcantext, e$ + strcantext = sblank + ] + +pcan1 #Canned text - with move + strcantext = sblank + if cant_no$ > zero, + [ + if cant_pos1$ = one | cant_pos1$ = four, pcant_1 + if cant_pos2$ = one | cant_pos2$ = four, pcant_2 + if cant_pos3$ = one | cant_pos3$ = four, pcant_3 + if cant_pos4$ = one | cant_pos4$ = four, pcant_4 + if cant_pos5$ = one | cant_pos5$ = four, pcant_5 + if cant_pos6$ = one | cant_pos6$ = four, pcant_6 + if cant_pos7$ = one | cant_pos7$ = four, pcant_7 + if cant_pos8$ = one | cant_pos8$ = four, pcant_8 + if cant_pos9$ = one | cant_pos9$ = four, pcant_9 + if cant_pos10$ = one | cant_pos10$ = four, pcant_10 + if cant_pos11$ = one | cant_pos11$ = four, pcant_11 + if cant_pos12$ = one | cant_pos12$ = four, pcant_12 + if cant_pos13$ = one | cant_pos13$ = four, pcant_13 + if cant_pos14$ = one | cant_pos14$ = four, pcant_14 + if cant_pos15$ = one | cant_pos15$ = four, pcant_15 + if cant_pos16$ = one | cant_pos16$ = four, pcant_16 + if cant_pos17$ = one | cant_pos17$ = four, pcant_17 + if cant_pos18$ = one | cant_pos18$ = four, pcant_18 + if cant_pos19$ = one | cant_pos19$ = four, pcant_19 + if cant_pos20$ = one | cant_pos20$ = four, pcant_20 + ] + if cstop$, strcantext = strcantext + sm00 + if cgstop$, strcantext = strcantext + sm01 + #Output of strcantext occurs at the end of the output line + +pcan2 #Canned text - after output call + strcantext = sblank + if cant_no$ > zero, + [ + if cant_pos1$ = two | cant_pos1$ = five, pcant_1 + if cant_pos2$ = two | cant_pos2$ = five, pcant_2 + if cant_pos3$ = two | cant_pos3$ = five, pcant_3 + if cant_pos4$ = two | cant_pos4$ = five, pcant_4 + if cant_pos5$ = two | cant_pos5$ = five, pcant_5 + if cant_pos6$ = two | cant_pos6$ = five, pcant_6 + if cant_pos7$ = two | cant_pos7$ = five, pcant_7 + if cant_pos8$ = two | cant_pos8$ = five, pcant_8 + if cant_pos9$ = two | cant_pos9$ = five, pcant_9 + if cant_pos10$ = two | cant_pos10$ = five, pcant_10 + if cant_pos11$ = two | cant_pos11$ = five, pcant_11 + if cant_pos12$ = two | cant_pos12$ = five, pcant_12 + if cant_pos13$ = two | cant_pos13$ = five, pcant_13 + if cant_pos14$ = two | cant_pos14$ = five, pcant_14 + if cant_pos15$ = two | cant_pos15$ = five, pcant_15 + if cant_pos16$ = two | cant_pos16$ = five, pcant_16 + if cant_pos17$ = two | cant_pos17$ = five, pcant_17 + if cant_pos18$ = two | cant_pos18$ = five, pcant_18 + if cant_pos19$ = two | cant_pos19$ = five, pcant_19 + if cant_pos20$ = two | cant_pos20$ = five, pcant_20 + n$, strcantext, e$ + strcantext = sblank + ] + +pcant_1 #Canned text - output call + cantext$ = cant_val1$ + pcant_out + +pcant_2 #Canned text - output call + cantext$ = cant_val2$ + pcant_out + +pcant_3 #Canned text - output call + cantext$ = cant_val3$ + pcant_out + +pcant_4 #Canned text - output call + cantext$ = cant_val4$ + pcant_out + +pcant_5 #Canned text - output call + cantext$ = cant_val5$ + pcant_out + +pcant_6 #Canned text - output call + cantext$ = cant_val6$ + pcant_out + +pcant_7 #Canned text - output call + cantext$ = cant_val7$ + pcant_out + +pcant_8 #Canned text - output call + cantext$ = cant_val8$ + pcant_out + +pcant_9 #Canned text - output call + cantext$ = cant_val9$ + pcant_out + +pcant_10 #Canned text - output call + cantext$ = cant_val10$ + pcant_out + +pcant_11 #Canned text - output call + cantext$ = cant_val11$ + pcant_out + +pcant_12 #Canned text - output call + cantext$ = cant_val12$ + pcant_out + +pcant_13 #Canned text - output call + cantext$ = cant_val13$ + pcant_out + +pcant_14 #Canned text - output call + cantext$ = cant_val14$ + pcant_out + +pcant_15 #Canned text - output call + cantext$ = cant_val15$ + pcant_out + +pcant_16 #Canned text - output call + cantext$ = cant_val16$ + pcant_out + +pcant_17 #Canned text - output call + cantext$ = cant_val17$ + pcant_out + +pcant_18 #Canned text - output call + cantext$ = cant_val18$ + pcant_out + +pcant_19 #Canned text - output call + cantext$ = cant_val19$ + pcant_out + +pcant_20 #Canned text - output call + cantext$ = cant_val20$ + pcant_out + +pcant_out #Canned text - build the string for output + #Assign string select type outputs + if cantext$ = three, bld = one + if cantext$ = four, bld = zero + #Build the cantext string + if cantext$ = one, strcantext = strcantext + sm00 + if cantext$ = two, strcantext = strcantext + sm01 + if cantext$ > four, + [ + strtextno = no2str(cantext$) + strcantext = strcantext + strm + strtextno + ] + +# -------------------------------------------------------------------------- +# Position calculations, generally these do not need to be modified +# -------------------------------------------------------------------------- +pmiscint$ #Capture the top level absinc for subprograms + if sub_level$ <= zero, absinc$ = mi2$ + #Disable cutpos2 if not 4 axis, saves time + if rot_on_x = zero, cutpos2$ = m_one + +pmotion_su #Motion Setup (Set brklinestype & linarc) + brklinestype$ = zero + linarc$ = zero + if rot_on_x, + [ + if cuttype = one, linarc$ = one #Axis subs + if cuttype = two, #Polar + [ + brklinestype$ = rotary_axis$ + three + linarc$ = one + ] + ] + if tool_op$ = 100, #Threadmill operation + [ + if thd_ttpr = 1, linarc$ = 1 #If tapered thread, linearize output + ] + +pcuttype #Determine the cut type + #cuttype (0 = Tool Plane, 1 = Axis Subs, 2 = Polar, 3 = 4/5 axis) + cuttype = rotary_type$ + if cuttype = three, cuttype = zero + if mill5$, + [ + if rot_on_x = zero, result = mprint(saxisoff) + cuttype = three + ] + if rotary_axis$, + [ + if rotary_axis$ <> rot_on_x, result = mprint(saxiswarn) + rot_on_x = rotary_axis$ + ] + #Check for Tool Origin in Polar Milling + if cuttype = two & (tox$ | toy$ | toz$), result = mprint(stlorgerr) + #Transform Rotate, set mr_rt_actv if user selected 'coordinates' + if sub_trnstyp$ = one & sub_trnmthd$ = two, + [ + #Calculate the rotation incremental angle for G68 + rt_csav = atan2(sub_m2$, sub_m1$) + rt_cinc = prv_rt_csav - rt_csav + while rt_cinc > 180, rt_cinc = rt_cinc - 360 + while rt_cinc < -180,rt_cinc = rt_cinc + 360 + if rot_ccw_pos = one, rt_cinc = -rt_cinc + !rt_csav + if sub_sec_no$, mr_rt_actv = two + else, mr_rt_actv = one + ] + else, mr_rt_actv = zero + pfcalc_u_min + pmotion_su + +pxyzcout #Map coordinates + if rot_on_x, + [ + if cuttype = zero, pxyzcout0 #Toolplane Positioning + if cuttype = one, pxyzcout1 #Axis Substitution + if cuttype = two, pxyzcout2 #Polar Conversion + if cuttype = three, pxyzcout3 #Simulatneous 4 axis (Multi-axis) + if rot_ccw_pos = one, csav = -csav + if mr_rt_actv <> two, + [ + pcoutrev + if index, pindxcalc + pfcalc + ] + else, feed = fr_pos$ + ] + else, + [ + xabs = vequ (x$) + feed = fr_pos$ + ] + +pxyzcout0 #Toolplane Positioning + xabs = vequ (x$) + if rot_on_x = two, csav = -c$ + else, csav = c$ + +pxyzcout1 #Axis substitution + if rot_on_x = one, #X axis substitution + [ + xabs = x$ + yabs = zero + zabs = z$ + (rotdia$ / two) + csav = y$ * (360 / (pi$ * rotdia$)) + ] + else, #Y axis substitution + [ + xabs = zero + yabs = y$ + zabs = z$ + (rotdia$ / two) + csav = x$ * (360 / (pi$ * rotdia$)) + ] + +pxyzcout2 #polar interpolation + #Drill polar is toolplane drilling toward center + #if not a coincident axis + #Also, Capture initial index position for Polar Milling + if (opcode$ = three & rot_on_x <> three), pxyzcout0 + else, + [ + if rot_on_x = one, #X axis rotation + [ + csav = atan2(y$, z$) #Z+ zero + axisx$ = vequ(aaxisx) + xabs = rotp(csav, x$) + ] + if rot_on_x = two, #Y axis rotation + [ + csav = atan2(-x$, z$) #Z+ zero + axisx$ = vequ(baxisx) + xabs = rotp(csav, x$) + ] + if rot_on_x = three, #Z axis rotation + [ + csav = atan2(-y$, x$) #X+ zero + axisx$ = vequ(caxisx) + xabs = rotp(csav, x$) + ] + csav = csav + c$ + ] + +pxyzcout3 #Multisurf rotary axis motion + if rot_on_x = one, #Multisurf Rotary about X + [ + csav = atan2 (vtooly$, vtoolz$) + axisx$ = vequ (aaxisx) + ] + if rot_on_x = two, #Multisurf Rotary about Y + [ + csav = atan2 (-vtoolx$, vtoolz$) + axisx$ = vequ (baxisx) + ] + xabs = rotp (csav, x$) + u$ = rotp (csav, u$) + csav = csav + c$ + +pcoutrev #Rotary axis revolution calculation (Modify for wind-up) + cdelta = csav - prv_csav + while abs(cdelta) > ctol, #If motion exceeds ctol, add wind-up + [ + if cdelta > zero, + [ + rev = rev - one + cdelta = cdelta - 360 + ] + else, + [ + rev = rev + one + cdelta = cdelta + 360 + ] + ] + if cuttype <> one, cabs = rev * 360 + csav + else, cabs = sav_rev * 360 + csav + !csav + +pindxcalc #Index move calculations, direction is shortest + #Check if in tolerance + cdelta = frac(abs(csav)/ctable) + if cdelta > ixtol & cdelta < 1-ixtol, + result = mprint(sindxerror) + cdelta = prvcabs - cabs + #Phase shift delta 10 revolutions, check odd/even + if frac(int((cdelta + 3600)/180)/two), indx_mc = one + else, indx_mc = zero + #Set range 0-360 + indx_out = csav + while indx_out < 0, indx_out = indx_out + 360 + while indx_out > 360, indx_out = indx_out - 360 + +#Feedrate calculations +pfcalc #Feedrate calculations, gcode 0 does not evaluate + if gcode$ <> zero, + [ + if fmtrnd(cabs) = prvcabs | index, pfcalc_u_min + else, + [ + if cuttype = one & (cutpos2$ <= one | cutpos2$ = four), + pfcalc_u_min + else, pfclc_deg_inv + ] + if ipr_type <> prv_ipr_type, prv_feed = c9k + ] + +pfcalc_u_min #Feedrate unit/min + ipr_type = zero + feed = fr_pos$ + if feed > maxfeedpm, feed = maxfeedpm + prvfrdeg = feed + +pfclc_deg_inv #Feedrate deg/min + circum = zabs * two * pi$ + if circum = zero, circum = c9k #Don't allow Zero + ldelta = sqrt((xabs-prv_xabs)^2+(yabs-prv_yabs)^2+(zabs-prv_zabs)^2) + cdelta = ((abs(cabs - prvcabs))/360)*circum + if ldelta = zero, cldelta = cdelta + else, cldelta = sqrt(cdelta^two + ldelta^two) + if cldelta = zero, cldelta = c9k + if use_frinv, + [ + #Feedrate inverse calculation + ipr_type = two + prv_feed = c9k #Always force feed + if cuttype = three, cldelta = sqrt((x$-prv_x$)^2+(y$-prv_y$)^2+(z$-prv_z$)^2) + frinv = fr_pos$/cldelta + if frinv > maxfrinv, frinv = maxfrinv + feed = frinv + ] + else, + [ + #Feedrate deg/min control and calculation + ipr_type = zero #Change to ipr_type = one to force new DPM + frdeg = abs(cdelta/cldelta) * abs(fr_pos$ * (360/circum)) + if abs(frdeg - prvfrdeg) > frdegstp | ipr_type <> prv_ipr_type, + [ + #Control output of frdeg + prvfrdeg = frdeg + feed = frdeg + ] + if frdeg > maxfrdeg, feed = maxfrdeg + ] + +#Incremental calculations +ps_inc_calc #Incremental calculations, start + xia = fmtrnd(xabs) + yia = fmtrnd(yabs) + zia = fmtrnd(zabs) + xinc = vsub (xia, prv_xia) + ps_cinc_calc + +ps_cinc_calc #Incremental calculations, start rotary + cia = fmtrnd(cabs) + cinc = cia - prv_cia + +pe_inc_calc #Incremental calculations, end + prvcabs = fmtrnd(cabs) #Avoid updating until called explicitly + !xia, !yia, !zia, !cia + !x$, !y$, !z$ + +# -------------------------------------------------------------------------- +# Numbered questions for Mastercam Mill - Read during post update only +# -------------------------------------------------------------------------- +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)? 1200 +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? 18000 +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? y +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? y + +# -------------------------------------------------------------------------- +# Default Miscellaneous Real Values - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +201. Default miscellaneous real variable 1 (mr1)? 0.0 +202. Default miscellaneous real variable 2 (mr2)? 0.0 +203. Default miscellaneous real variable 3 (mr3)? 0.0 +204. Default miscellaneous real variable 4 (mr4)? 0.0 +205. Default miscellaneous real variable 5 (mr5)? 0.0 +206. Default miscellaneous real variable 6 (mr6)? 0.0 +207. Default miscellaneous real variable 7 (mr7)? 0.0 +208. Default miscellaneous real variable 8 (mr8)? 0.0 +209. Default miscellaneous real variable 9 (mr9)? 0.0 +210. Default miscellaneous real variable 10 (mr10)? 0.0 + +# -------------------------------------------------------------------------- +# Default Miscellaneous Real Values (METRIC) - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +1601. Default miscellaneous real variable 1 (mr1) (metric)? 0.0 +1602. Default miscellaneous real variable 2 (mr2) (metric)? 0.0 +1603. Default miscellaneous real variable 3 (mr3) (metric)? 0.0 +1604. Default miscellaneous real variable 4 (mr4) (metric)? 0.0 +1605. Default miscellaneous real variable 5 (mr5) (metric)? 0.0 +1606. Default miscellaneous real variable 6 (mr6) (metric)? 0.0 +1607. Default miscellaneous real variable 7 (mr7) (metric)? 0.0 +1608. Default miscellaneous real variable 8 (mr8) (metric)? 0.0 +1609. Default miscellaneous real variable 9 (mr9) (metric)? 0.0 +1610. Default miscellaneous real variable 10 (mr10) (metric)? 0.0 + +# -------------------------------------------------------------------------- +# Enable/Disable Miscellaneous Real Variable switches - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +1611. Enable miscellaneous real variable 1? y +1612. Enable miscellaneous real variable 2? y +1613. Enable miscellaneous real variable 3? y +1614. Enable miscellaneous real variable 4? y +1615. Enable miscellaneous real variable 5? y +1616. Enable miscellaneous real variable 6? y +1617. Enable miscellaneous real variable 7? y +1618. Enable miscellaneous real variable 8? y +1619. Enable miscellaneous real variable 9? y +1620. Enable miscellaneous real variable 10? y + +# -------------------------------------------------------------------------- +# Default Miscellaneous Integer Values - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +301. Default miscellaneous integer variable 1 (mi1)? 0 +302. Absolute or Incremental [0=ABS, 1=INC] (mi2)? 0 +303. Default miscellaneous integer variable 3 (mi3)? 0 +304. Default miscellaneous integer variable 4 (mi4)? 0 +305. Default miscellaneous integer variable 5 (mi5)? 0 +306. Default miscellaneous integer variable 6 (mi6)? 0 +307. Default miscellaneous integer variable 7 (mi7)? 0 +308. Default miscellaneous integer variable 8 (mi8)? 0 +309. Default miscellaneous integer variable 9 (mi9)? 0 +310. Default miscellaneous integer variable 10 (mi10)? 0 + +# -------------------------------------------------------------------------- +# Enable/Disable Miscellaneous Integer Variable switches - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +1621. Enable miscellaneous integer variable 1? y +1622. Enable miscellaneous integer variable 2? y +1623. Enable miscellaneous integer variable 3? y +1624. Enable miscellaneous integer variable 4? y +1625. Enable miscellaneous integer variable 5? y +1626. Enable miscellaneous integer variable 6? y +1627. Enable miscellaneous integer variable 7? y +1628. Enable miscellaneous integer variable 8? y +1629. Enable miscellaneous integer variable 9? y +1630. Enable miscellaneous integer variable 10? y + +# -------------------------------------------------------------------------- +# Configuration File association parameters (default is "y") - Read during post update only - Set in CD +# -------------------------------------------------------------------------- +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)? y +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 + +# -------------------------------------------------------------------------- +# POST TEXT +# -------------------------------------------------------------------------- +[CTRL_MILL|DEFAULT] +[misc integers] +2. "Absolute or Incremental [0=ABS, 1=INC]" +[simple drill] +1. "Cycle 200 - Drilling" +3. "Dwell - Top" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[peck drill] +1. "Cycle 201 - Reaming" +3. "Dwell - Top" +7. "" +8. "" +9. "" +10. "Retract Rate" +11. "Dwell - Bottom" +[chip break] +1. "Cycle 202 - Boring" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Disengage Dir." +8. "Angle - spdl stop" +9. "" +10. "" +11. "Dwell - Bottom" +[tap] +1. "Cycle 203 - Universal Drilling" +3. "Dwell - Top" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[bore1] +1. "Cycle 1 - Pecking/Drilling" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Peck" +8. "" +9. "" +10. "" +11. "" +[bore2] +1. "Cycle 205 - Universal Pecking" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[misc1] +1. "Cycle 2 - Tapping" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[misc2] +1. "Cycle 206 - Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[drill cycle 9] +1. "Cycle 17 - Rigid Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[drill cycle 10] +1. "Cycle 207 - Rigid Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[drill cycle 11] +1. "Cycle 209 - Tapping with chip breaking" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Infeed Depth" +8. "Retract Dist." +9. "Spindle Angle" +10. "" +11. "" +[drill cycle 12] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 13] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 14] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 15] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 16] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 17] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 18] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 19] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 20] +4. "Clearance" +5. "Retract" +6. "Depth" +[simple drill custom parameters] +1. "Custom Drill Parameters 1" +[peck drill custom parameters] +1. "Custom Drill Parameters 2" +[chip break drill custom parameters] +1. "Custom Drill Parameters 3" +[tap custom parameters] +1. "Universal Drilling Parameters" +2. "Decrement Value" +3. "Number of Breaks" +4. "Minimum Plunging Depth" +5. "Retraction Feed Rate" +6. "Distance for Chip Breaking" +7. "" +8. "" +9. "" +10. "" +11. "" +[bore1 custom parameters] +1. "Custom Drill Parameters 5" +[bore2 custom parameters] +1. "Universal Pecking Parameters" +2. "Decrement Value" +3. "" +4. "Minimum Plunging Depth" +5. "" +6. "Distance for Chip Breaking" +7. "Upper Advanced Stop Distance" +8. "Lower Avanced Stop Distance" +9. "Infeed Depth for Chip Breaking" +10. "" +11. "" +[misc1 custom parameters] +1. "Custom Drill Parameters 7" +[misc2 custom parameters] +1. "Custom Drill Parameters 8" +[drill cycle 9 custom parameters] +1. "Custom Drill Parameters 9" +[drill cycle 10 custom parameters] +1. "Custom Drill Parameters 10" +[drill cycle 11 custom parameters] +1. "Custom Drill Parameters 11" +[drill cycle 12 custom parameters] +1. "Custom Drill Parameters 12" +[drill cycle 13 custom parameters] +1. "Custom Drill Parameters 13" +[drill cycle 14 custom parameters] +1. "Custom Drill Parameters 14" +[drill cycle 15 custom parameters] +1. "Custom Drill Parameters 15" +[drill cycle 16 custom parameters] +1. "Custom Drill Parameters 16" +[drill cycle 17 custom parameters] +1. "Custom Drill Parameters 17" +[drill cycle 18 custom parameters] +1. "Custom Drill Parameters 18" +[drill cycle 19 custom parameters] +1. "Custom Drill Parameters 19" +[drill cycle 20 custom parameters] +1. "Custom Drill Parameters 20" +[drill cycle descriptions] +1. "Cycle 200 - Drilling/Pecking" +2. "Cycle 201 - Reaming" +3. "Cycle 202 - Boring" +4. "Cycle 203 - Universal Drilling" +5. "Cycle 1 - Pecking/Drilling" +6. "Cycle 205 - Universal Pecking" +7. "Cycle 2 - Tapping with floating holder" +8. "Cycle 206 - Tapping NEW with floating holder" +9. "Cycle 17 - Rigid Tapping w/o floating holder" +10. "Cycle 207 - Rigid Tapping NEW w/o floating holder" +11. "Cycle 209 - Tapping with chip breaking" +[canned text] +1. "Stop" +2. "Ostop" +3. "" +4. "" +5. "M5" +6. "M6" +7. "M7" +8. "M8" +9. "M9" +10. "M10" +[CTRL_MILL|GENERIC HEIDENHAIN_TNC530 3X MILL] +[misc integers] +2. "Absolute or Incremental [0=ABS, 1=INC]" +[simple drill] +1. "Cycle 200 - Drilling" +3. "Dwell - Top" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[peck drill] +1. "Cycle 201 - Reaming" +3. "Dwell - Top" +7. "" +8. "" +9. "" +10. "Retract Rate" +11. "Dwell - Bottom" +[chip break] +1. "Cycle 202 - Boring" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Disengage Dir." +8. "Angle - spdl stop" +9. "" +10. "" +11. "Dwell - Bottom" +[tap] +1. "Cycle 203 - Universal Drilling" +3. "Dwell - Top" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[bore1] +1. "Cycle 1 - Pecking/Drilling" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Peck" +8. "" +9. "" +10. "" +11. "" +[bore2] +1. "Cycle 205 - Universal Pecking" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Peck" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[misc1] +1. "Cycle 2 - Tapping" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[misc2] +1. "Cycle 206 - Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "Dwell - Bottom" +[drill cycle 9] +1. "Cycle 17 - Rigid Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[drill cycle 10] +1. "Cycle 207 - Rigid Tapping" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "" +8. "" +9. "" +10. "" +11. "" +[drill cycle 11] +1. "Cycle 209 - Tapping with chip breaking" +3. "" +4. "Clearance" +5. "Retract" +6. "Depth" +7. "Infeed Depth" +8. "Retract Dist." +9. "Spindle Angle" +10. "" +11. "" +[drill cycle 12] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 13] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 14] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 15] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 16] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 17] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 18] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 19] +4. "Clearance" +5. "Retract" +6. "Depth" +[drill cycle 20] +4. "Clearance" +5. "Retract" +6. "Depth" +[simple drill custom parameters] +1. "Custom Drill Parameters 1" +[peck drill custom parameters] +1. "Custom Drill Parameters 2" +[chip break drill custom parameters] +1. "Custom Drill Parameters 3" +[tap custom parameters] +1. "Universal Drilling Parameters" +2. "Decrement Value" +3. "Number of Breaks" +4. "Minimum Plunging Depth" +5. "Retraction Feed Rate" +6. "Distance for Chip Breaking" +7. "" +8. "" +9. "" +10. "" +11. "" +[bore1 custom parameters] +1. "Custom Drill Parameters 5" +[bore2 custom parameters] +1. "Universal Pecking Parameters" +2. "Decrement Value" +3. "" +4. "Minimum Plunging Depth" +5. "" +6. "Distance for Chip Breaking" +7. "Upper Advanced Stop Distance" +8. "Lower Avanced Stop Distance" +9. "Infeed Depth for Chip Breaking" +10. "" +11. "" +[misc1 custom parameters] +1. "Custom Drill Parameters 7" +[misc2 custom parameters] +1. "Custom Drill Parameters 8" +[drill cycle 9 custom parameters] +1. "Custom Drill Parameters 9" +[drill cycle 10 custom parameters] +1. "Custom Drill Parameters 10" +[drill cycle 11 custom parameters] +1. "Custom Drill Parameters 11" +[drill cycle 12 custom parameters] +1. "Custom Drill Parameters 12" +[drill cycle 13 custom parameters] +1. "Custom Drill Parameters 13" +[drill cycle 14 custom parameters] +1. "Custom Drill Parameters 14" +[drill cycle 15 custom parameters] +1. "Custom Drill Parameters 15" +[drill cycle 16 custom parameters] +1. "Custom Drill Parameters 16" +[drill cycle 17 custom parameters] +1. "Custom Drill Parameters 17" +[drill cycle 18 custom parameters] +1. "Custom Drill Parameters 18" +[drill cycle 19 custom parameters] +1. "Custom Drill Parameters 19" +[drill cycle 20 custom parameters] +1. "Custom Drill Parameters 20" +[drill cycle descriptions] +1. "Cycle 200 - Drilling/Pecking" +2. "Cycle 201 - Reaming" +3. "Cycle 202 - Boring" +4. "Cycle 203 - Universal Drilling" +5. "Cycle 1 - Pecking/Drilling" +6. "Cycle 205 - Universal Pecking" +7. "Cycle 2 - Tapping with floating holder" +8. "Cycle 206 - Tapping NEW with floating holder" +9. "Cycle 17 - Rigid Tapping w/o floating holder" +10. "Cycle 207 - Rigid Tapping NEW w/o floating holder" +11. "Cycle 209 - Tapping with chip breaking" +[canned text] +1. "Stop" +2. "Ostop" +3. "" +4. "" +5. "M5" +6. "M6" +7. "M7" +8. "M8" +9. "M9" +10. "M10" +[CTRL_TEXT_END] diff --git a/post/GENERIC HEIDENHAIN_TNC530 3X MILL.control b/post/GENERIC HEIDENHAIN_TNC530 3X MILL.control new file mode 100644 index 0000000000000000000000000000000000000000..70d08e35374e2a6bd9eb78dfed509e0b59c1b1a0 GIT binary patch literal 131120 zcmeI5&u<&ocE?9{6DM-j_PyuyrEdCqpJ_utATgF5|B!=3q$x@!!e0>Sph*NUqv4Pu zG@O~t4CC0@WD&qEP#{45i)?~yyDQ*D3uI9s=%TwcSry2l$v%L3&Yd5;q&beo*v%99 z9YCBr_n!Of!x70Z&*eS;sL^qPAAb37%BQ;V}Wu; z^F|CFx=8Esw=|ZAj49*)qwn9O^!@M8(*U0GbMQOr;w1f@{->}j?vAgYrN4js-=A)( z`IIH||Ko6S{(nNB(jeX`f-2sOiJ8gM0fget62CBg4<( zNBJbqgGxUdrG@7={^iBoxJBGg+|xg^ft=gZ(*`e0P#AIlxvKZVCjBMXJeH?Co--Oh z)8P^KyGWOuj<4f0Tg7SBMzx&^C5T=IeOmWCyp~yj^9W5X{M*o zllD$2$_Uh3&xAD=LFSftE_sK?Bz8Ia)Cg)N6_Y(Usf4u&%{g-ci z_SNCWr@439uYGfP|3PlN|MBa19CEyFC#Urs+ZTPOty^MaX;CIx9n)+JaYNiS{qsVI zOvx9^Tg#N`>46yi0Ad?&M{BZ^W5C8!X009sH0T2KI5CDOr5|~EAsX9#UFHOV6 z(wDX0pQ#n1^p})*LOVr&Y+1~Q*{(30wi#(Al0hBEGt8EKkyH>#Cfi}fBr;o^D}3|) zfoW619`yH2uV;5f;D|;uzta?YAeJvKi>1Xq>!3xA^uq>X%~cx&?jR7szA2V(mfsXx zwVld2;RmF^`lcQDT%W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ykc#1jAj literal 0 HcmV?d00001 diff --git a/post/GENERIC HEIDENHAIN_TNC530 3X MILL.mcam-control b/post/GENERIC HEIDENHAIN_TNC530 3X MILL.mcam-control new file mode 100644 index 0000000000000000000000000000000000000000..c5e273f97d83cfa715c1f139c3a0c9c63f4dc446 GIT binary patch literal 216900 zcmeI5eQX@ZdB%q#Wl3ir&+ucIKZp3Bmsj6nvjk-cHAjX}S5o_-1mtx#O!t-`xG!kB0u|&4ybj?iKp?rvIEL zeeUD$J9OaJpX~d~5B&6J&0qY%`~{9%t2VzPsHBIr`BhVQIWkeBp6q&uqZo5Cr z)xY{r>`n9L8|nWl`v3MX-s)d+mUhu5+<%H(gXIRQz~i64>6YRD5TfUSAKc5~rw;zG znTvj;eQH^~csJ|HTgJnW$Kl1K-W9Q4W%#N2%amd+|hiHGQkPz+L z{~=?i@c%t|`P&uaFIS28_S-*mHsRL?9_F|W>H}7QPh*eLzt&>7vad8(yZA%#0F7cE5FM0%X=$g}F03xLeUSsZ>_ESk*O!(W#11<+ z>~t%)QhZzt(LbZx(>mV&>+9bL|LW>bm|yw#ABK0m=lPeu_LN z*fk+?VoodwU6__HNnLDdsgdeoH6WguOPfuLR4Ly@)y9pyd-<`)jr90-EjBHBf+gPi zD3ynIRXS+Cf> zxP5WQqW`vc(YBe-caQ$j%oiScE$p}#ohlX2C{2rZ9=Im^P5DZ=)b)0vJzWn+|LW|k z7t364C%S%EzcgPtPR=~#iD(k}c)bt{eKdMfr5z60nUNz|F;vd=k2#g)3tuP@xZ zDy8aebPjDAp|i*g4bsp*&_9%YxK~^L;~!tK3F5qlX-<*h8AAif#{C`RL!YsM=z?tGI`C(bGe&>ZfZI zlm7Th1!obQMO>>=R z*^K_tS+RfcoiQ?9<%dTXoe{3J3`&k*0#wg3eh#sP>NgYEsqla`< z>>+$t{q6LSRgAK{_ktTIsDET}{vhh;9jopgYph6iSgK@)*x{>`aL>5O=^aWTQEqw7 zn-;&E_;vgHUii1L<6cbv;Q6oa9`PzA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