[POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V11.00 E1 P0 T1151333411 M11.00 I1076232192 # Post Name : SHPINER 5x00 Axis Mill Post # Product : Mill # Machine Name : Generic # Control Name : Fanuc # Description : SHPINER 5 Axis Mill Post # 4-axis/Axis subs. : Yes # 5-axis : Yes # Subprograms : Yes # Executable : MP 11.0 # # WARNING: THIS POST IS GENERIC OLOS AND IS INTENDED FOR MODIFICATION TO # THE MACHINE TOOL REQUIREMENTS SOLO AND PERSONAL ASIK PREFERENCE. # # Associated File List$ # # GENERIC FANUC 5X MILL.control # # Associated File List$ # # -------------------------------------------------------------------------- # Revision log: # -------------------------------------------------------------------------- # Programmers Note: # CNC 07/09/05 - Initial post update for Mastercam X. # CNC 06/26/06 - Initial post update for Mastercam X2. # # -------------------------------------------------------------------------- # Features: # -------------------------------------------------------------------------- # This post supports Generic 5 axis milling. # It is designed to support the features of Mastercam X Mill # # Following Misc. Integers are used: # # mi2 - Absolute or Incremental positioning at top level # 0 = absolute # 1 = incremental # # mi3 - Select G28 or G30 reference point return. # 0 = G28, 1 = G30 # # mi4 - Start initial primary rotary axis bias # +/-999 represents start as close to limit as possible # 0 represents calculate without using bias # Any other value represents an angle in degrees to attempt # to position near. # -999 = Low, 0 = Off/Default, 999 = Hi, Value = Angle bias # # mi5 - Start initial secondary rotary axis bias # +/-999 represents start as close to limit as possible # 0 represents calculate without using bias # Any other value represents an angle in degrees to attempt # to position near. # -999 = Low, 0 = Off/Default, 999 = Hi, Value = Angle bias # # mi6 - Add work shift position for rotation center programming # 0 = Output relative to work origin (toolplane) # 1 = Output relative to WCS origin (axis shifts) # # mi7 - Enable retract to and from linear limits. Disable for # internal work to prevent part collisions. # 0 = Disable, 1 = Enable # # mi8 - Safe retract/approach at toolchange. # The tool retracts/approachs to limits from last path to current # path or after/before a toolchange # (limits must be enabled, see 'use_stck_typ') # 0 = Disable all toolchange retract/approach # 1 = Enable null toolchange retract/approach only # 2 = Enable toolchange retract/approach only # 3 = Enable both toolchange retract/approach # 4 = Enable retract/approach between 5 axis chains (cutpos) in # toolpath or sign 1 to 3 negative with toolchange options # # mi9 - Nutating bias calculation. # 0 = Calculate angle bias to original vector # 1 = Bias to positive # 2 = Bias to negative # # mi10 - Secondary axis control (non-nutating) # 0 = Continuous secondary (primary controlled) # 1 = Always stay positive # 2 = Always stay negative # # mr1 - Retract/approach clearance distance at tool reposition # # mr2 - Right angle head toolpath conversion (not with nutating machine type). # Right angle rotates secondary axis by degrees # The head may only be rotated perpendicular to the secondary axis # 0 = Off, Enter angle for amount of head rotation (RA = +/- 90) # # mr3 - Not used on Fanuc # # mr4 - Not used on Fanuc # # mr5 - Not used on Fanuc # # mr6 - Absolute Safe height in Z for unwinds and toolchanges # (limits must be enabled and mi8, see 'use_stck_typ') # (set the limits to zero to ignore limits and use this safe height) # 0 = Off # # mr7 - Axis shift for X axis, See 'shft_misc_r' # # mr8 - Axis shift for Y axis, See 'shft_misc_r' # # mr9 - Axis shift for Z axis, See 'shft_misc_r' # # mr10 - Nutating distance from work coordinate zero to table zero (Z axis) # Non-nutating Z axis shift with RA (See mr2) # #Canned text: # Entering cantext on a contour point from within Mastercam allows the # following functions to enable/disable. # Cantext value: # 1 = Stop = output the "M00" stop code # 2 = Ostop = output the "M01" optional stop code # 3 = Bld on = turn on block delete codes in NC lines # 4 = bLd off = turn off block delete codes in NC lines # #Layout: # The term "Reference View" refers to the coordinate system associated # with the Top view (Alt-F9, the upper gnomon of the three displayed). # #3 Axis Rotary (Polar) # Polar positioning is offered in Mastercam 3 axis toolpaths through the # rotary axis options dialog. # #Axis Substitution: # Use the Rotary axis substitution by drawing the geometry flattened # from the cylinder. # #Toolchange retracts: # Mi8 is used to control retracts at tool changes and null toolchanges. # Mi8 for tool changes applies to the approach to the part to the retract # from the part at the next toolchange (unless changed in a null tool # change). Null toolchange control at a null toolchange uses the current # setting and previous setting of mi8. Through a null toolchange, the # setting of mi8 at the retract applies to the approach. # #Additional Notes: # 1) G54 calls are generated where the work offset entry (workofs) are # 0 = G54, 1 = G55, etc. This post only uses work offsets. # 2) Metric is applied from the NCI met_tool variable. # 3) 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. # 4) The variable 'absinc' is pre-defined, set mi2 (Misc. Integer) for # the absolute/incremental program output. # 5) Always avoid machining to the center of rotation with rotary axis! # 6) Set the NCI precision to 7 places precision minimum in Mastercam. Set the # 'Tool vecter length' in 5 axis tool paths as 1 unit minimum, longer is better # to avoid rounding problems (output precision deviations). # 7) The tool length is taken from the overall length entered with the tool # definition in Mastercam. # #Axis Offsetting: # This post is designed to support axis offset and zero shifts to handle # cases where 1) the primary and secondary axis do not intersect and # 2) where the program zero point is not set at the primary and secondary # axis intersection. Always select the WCS origin to be the zero point # relative to the machine model when creating toolpaths in Mastercam. # The zero point should be selected as the primary and secondary # axis intersections whenever possible. # When mi6 is off, the assumption is made that the zero position is # set in the control at a datum. This is disabled in all cases for # 5 axis toolpaths (including polar and axis substitution). # The offsets are set relative to the machine base matrix (matb1-matb9). # The machine zero point must be on the primary or secondary axis and # the shift (saxisx, saxisy, saxisz) describes where the rotation is # relative to the zero point. #Table/Table configuration: # All 3 axis offsets are supported. # #Table/Head configuration (only primary table/secondary head): # Axis offsets are supported on primary axis. # #Head/Head configuration: # All 3 axis offsets are supported for non-nutating machines. # Only the primary to secondary axis offset is supported for nutating machines. # #Subprograms: # Note: Subprograms are not enabled. # # END_HEADER$ # # -------------------------------------------------------------------------- #Constants # -------------------------------------------------------------------------- m_one : -1 #Define constant zero : 0 #Define constant one : 1 #Define constant two : 2 #Define constant three : 3 #Define constant four : 4 #Define constant five : 5 #Define constant six : 6 #Define constant arc45 : 45 #Define constant arc90 : 90 #Define constant arc180 : 180 #Define constant arc360 : 360 #Define constant c9d : 999 #Define constant c9k : 9999 #Define constant # -------------------------------------------------------------------------- # Debugging and Factory Set Program Switches # -------------------------------------------------------------------------- fastmode$ : 1 #Posting speed optimizition bug1$ : 2 #0=No display, 1=Generic list box, 2=Editor bug2$ : 46 #Append postline labels, non-zero is column position? bug3$ : 0 #Append whatline no. to each NC line? bug4$ : 1 #Append NCI line no. to each NC line? whatno$ : yes$ #Do not perform whatline branches? (leave as yes) linktolvar$ : 1 #Associate X tolerance variables to V9- variable? linkplnvar$ : 1 #Associate X plane specific variables to V9- variable? linklvar$ : 1 #Associate X lathe specific variables to V9- variable? #MP executable process controls 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 nobrk$ : no$ #Omit breakup of x, y & z rapid moves, option 2 is not valid tooltable$ : 3 #Pre-read, call the pwrtt postblock #Option 2 not valid, only with table/table types no_updprv$ : yes$ #Post exclusively maintains previous err_msg : 0 #0 = send all messages to file and prompt #1 = send all messages to screen (the error file is written) #2 = send one message to screen (the error file is written) err_file$ : 0 #0 = Keep the error file only if fatal post errors generated. #1 = Keep the error file fatal or non-fatal post errors generated. #2 = Keep the error file on post errors and any mprint messages. #3 = Keep the error file post errors, mprint messages and user prompts (fq). #4 = Always keep the error file. #Tolerances ltol$ : 0.002 #Length tolerance for arccheck vtol$ : 0.0001#System tolerance ltol_m : 0.05 #Length tolerance for arccheck, metric vtol_m : 0.0025#System tolerance, metric brk_tol : 0.001 #Break up chordal tolerance for 'brk_mv_head' brk_tol_m : 0.025 #Break up chordal tolerance for 'brk_mv_head', metric #Arc output settings breakarcs$ : 2 #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$ : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc. do_full_arc$ : 1 #Allow full circle output? 0=no, 1=yes helix_arc$ : 1 #Support helix arc output, 0=no, 1=all planes, 2=XY plane only arccheck$ : 1 #Check for small arcs, convert to linear atol$ : 0.01 #Angularity tolerance for arccheck = 2 #Program control stagetool : 0 #0 = Do not pre-stage tools, 1 = Stage tools progname$ : 1 #Use uppercase for program name ############################################################# #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 ############################################################### sub_level$ : 1 #Enable automatic subprogram support (do not enable) -2 sub_seq_typ$ : 1 #Enable subprogram sequence number reset at sub call cutflag : one #Path location flag, set in post #Before start - 1 #On start - 2 #In path - 3 #On end - 4 #After end - 5 #Retract position - 6 #Plunge point - 7 sav_gcode : 0 #Gcode saved sav_absinc : 0 #Absolute/Incremental Saved Value 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 ####################################################### ####################################################### ####################################################### #Work offsets workofs$ : -1 #Initialize work offset force_wcs : yes$ #Force WCS output at every toolchange? use_frst_wcs: yes$ #Use only the first WCS read and ignore all others in NCI ################################# ################################# WCS WCS WCS ################################# #Spindle control settings use_gear : 0 #Output gear selection code, 0=no, 1=yes max_speed : 10000 #Maximum spindle speed min_speed : 10 #Minimum spindle speed #Feed control settings convert_rpd$ : 0 #Convert rapid to rapid feed use_fr : 0 #Output feedrate #0 - programmed feedrate #1 - inverse feedrate #2 - inverse feedrate on 5 axis continuous #3 - inverse feedrate on motion with rotary inv_fd_typ : 0 #Calculate feed location options #0 - inverse feed at tip #1 - min-max on flute length #2 - tip to pivot on tool length #3 - min-max on flute length to pivot on tool length inv_sec : 0 #Inverse feedrate is in seconds radius_fr : 0 #Use axis radius distance (pri_feed, sec_feed), user must add code rot_feed : 0 #Rapid rotary motion only feed options #0 - convert to G0 rapid #1 - apply rapid feedrate maxfeedpm : 500 #Limit for feed in inch/min maxfeedpm_m : 10000 #Limit for feed in mm/min maxfrinv : 999.99#Limit for feed inverse time fix_fr : 1 #If feedrate is zero, apply these values deffeedpm : 1. #Default for zero feed in inch/min deffeedpm_m : 25. #Default for zero feed in mm/min deffrinv : 500. #Default for zero feed inverse time #Enable canned drill cycle switches, prv_ is used to restore original peckacel$ : 0 #Fractional percent to reduce peck2 when usecan... : no usecandrill$ : yes$ #Use canned cycle for drill usecanpeck$ : yes$ #Use canned cycle for Peck usecanchip$ : yes$ #Use canned cycle for Chip Break usecantap$ : yes$ #Use canned cycle for Tap usecanbore1$ : yes$ #Use canned cycle for Bore1 usecanbore2$ : yes$ #Use canned cycle for Bore2 usecanmisc1$ : yes$ #Use canned cycle for Misc1 usecanmisc2$ : yes$ #Use canned cycle for Misc2 #Sequence numbers omitseq$ : yes$ #Omit sequence no. seqmax$ : 9999 #Max. sequence no. #Output formatting top_map : 0 #Output toolplane toolpaths mapped to top view #The post must have code added for your machine control spaces$ : 1 #No. of spaces to add between fields pang_output : 0 #Angle output options, primary sang_output : 0 #Angle output options, secondary #0 = Normal angle output #1 = Signed absolute output, 0 - 360 #2 = Implied shortest direction absolute output, 0 - 360 #Coolant variables for X style coolant cant_pos : 0 #Read from current canned text (cant_pos1 - cant_pos20) coolant_bin : 0 #Binary value for current coolant command coolant_on : 0 #Binary value holding the sum of all coolants currently on coolantx : 0 #Selector variable for coolant string selector local_int : 0 #Local variable for output of coolant off commands result2 : 0 #Return value for functions suppress : 0 #Flag used to suppress redundant coolant on commands all_cool_off : 0 #First coolant off command shuts off ALL coolant options # -------------------------------------------------------------------------- # 5 Axis Rotary Settings # -------------------------------------------------------------------------- #Assign axis address str_pri_axis "C" str_sec_axis "B" str_dum_axis "A" #Toolplane mapped to top angle position strings str_n_a_axis "A" str_n_b_axis "B" str_n_c_axis "C" #Misc. String settings sopen_prn "(" #String for Open Parenthesis "(" sclose_prn ")" #String for Close Parenthesis ")" sextnc$ .mpf # $ String for program extension sextsub$ .SPF # sextaux$ .MPF # #Machine rotary routine settings mtype : 0 #Machine type (Define base and rotation plane below) #0 = Table/Table #1 = Tilt Head/Table #2 = Head/Head #3 = Nutator Table/Table #4 = Nutator Tilt Head/Table #5 = Nutator Head/Head head_is_sec : 1 #Set with mtype 1 and 4 to indicate head is on secondary #Preferred setup is pri. zero matches sec. zero/direction #Zero machine and determine the planes perp. to axis rotations #These plane combinations are valid: #Primary plane XY XZ YZ #Secondary or XZ XY XY #Secondary YZ YZ XZ #Primary axis angle description (in machine base terms) #With nutating (mtype 3-5) the nutating axis must be the XY plane rotaxis1$ = vecx #Zero rotdir1$ = vecy #Direction #Secondary axis angle description (in machine base terms) #With nutating (mtype 3-5) the nutating axis and this plane normal #are aligned to calculate the secondary angle rotaxis2$ = vecz #Zero rotdir2$ = vecx #Direction #NOTE: Use of 'top_map' requires the dealer match the # above settings below. These must match initial settings!!! p_nut_restore #Postblock, restores original axis settings result = updgbl(rotaxis1$, "vecy")#Zero result = updgbl(rotdir1$, "vecx")#Direction result = updgbl(rotaxis2$, "vecz")#Zero result = updgbl(rotdir2$, "vecx")#Direction #Nutating machine (mtype 3-5) describe the plane that the nutated axis #lays in, this is the plane perpendicular to the primary axis and #secondary axis nut_ang_pri$ : -45 #Nutating head secondary axis angle from machine Z positive #Tool length, typically for head/head machine, both set to zero disables #Applied to the tool length, RA applies this along the tool use_tlength : 0 #Use tool length, read from tool overall length #0=Use 'toollength' var, 1=Mastercam OAL, 2=Prompt toollength : 0 #Tool length if not read from overall length shift_z_pvt : 0 #Shift Z by tool length, head/head program to pivot (Z axis only) #0=Pivot, 1=Pivot-Z, 2=Tool Tip Programming (without zero length) #Option 2, So we can still take advantage of brk_mv_head feature add_tl_to_lim : 0 #Add tool length after intersecting limit, always #on if limit from stock use_g45 : 1 #Use G45 offset with right angle head (RA) g45_of_add : 30 #Add this number to tool length no. for G45 offset number #Axis shift shft_misc_r : 0 #Read the axis shifts from the misc. reals #Part programmed where machine zero location is WCS origin- #Applied to spindle direction, independent of RA #Table/Table - #Offset of tables to secondary axis relative to machine base. #Tilt Head/Table - Head/Head - #Part programmed at machine zero location- #Offset in head based on secondary axis relative to machine base. #Normally use the tool length for the offset in the tool direction saxisx : 0 #The axis offset direction? 0.0043 saxisy : 0 #The axis offset direction? saxisz : 0 #The axis offset direction? 50.0065 r_intersect : 0 #Rotary axis intersect on their center of rotations #Determines if the zero point shifts relative to zero #or rotation with axis offset. #Nutating axis shift, used when calculations are based on mtype 3 or greater #'top_map' and toolplane tool paths use the axis shifts above, 5 axis use these n_saxisx : 0 #The axis offset direction? n_saxisy : 0 #The axis offset direction? n_saxisz : 0 #The axis offset direction? n_r_intrsct : 0 #Rotary axis intersection with nutating (normally zero) #Force rotary axis reset at toolchange and other options frc_cinit : 1 typ3_brk_evn : 0 #Windup limit, use even revolution break position #Primary and/or secondary brk_mv_head : 0 #Break the 5 axis moves to remove gouge brk_max_ang : 0 #'brk_mv_head' maximum angle move, applied if chordal #calculation angles moves are greater (negative disables) skp_rdnt_ck : 0 #Skip 'brk_max_ang' redundant angle check top_type : 1 #With 'top_map' select the top toolplane output #0 = Post selects G7 rotation axis #1 to 4, user selected G7 rotation axis #1 = Primary C : Y zero, Secondary A #2 = Primary C : -X zero, Secondary B #3 = Primary C : -Y zero, Secondary A #4 = Primary C : X zero, Secondary B #5 = Custom settings, ptop_type_ax and ptop_type_lim #Secondary shift (determines position and angle calculation) #plane correction 90 degree shift case (plus or minus) #used when secondary plane is defined perp to primary zero #EX. P - vecx, vecy S - vecz, vecy shift_90_s : 1 #Shift pos.=1, neg.=-1 #Rotary axis limits adj2sec : 1 #Attempt to adjust the primary axis from secondary? #Allows primary axis to flip 180 to satisfy secondary #0 = Off #1 = Use method when secondary is out of limit #Use with pri_limtyp = one to keep secondary as controlling #limit when limit tripped #Use with pri_limtyp = two to allow 180 degree reposition #When the tool repositions, an intersection is made to the limits and the #tool is driven around the limits to the reposition point as required. #Z upper limit is used as the safe transition boundary #Linear limits relative to machine base coordinates / part origin use_stck_typ : 0 #0=Off, 1=Stock def., 2=Limits up_x_lin_lim : 250. #X axis limit in positive direction up_y_lin_lim : 250. #Y axis limit in positive direction up_z_lin_lim : 250. #Z axis limit in positive direction lw_x_lin_lim : -250.#X axis limit in negative direction lw_y_lin_lim : -250.#Y axis limit in negative direction lw_z_lin_lim : -5. #Z axis limit in negative direction clear_stck : 0. #Add inc. offset to stock definition for transition boundary retract_on_rpd : 1 #This control allows retract on rapids too (don't assume rapid is safe) #Set pri_limtyp and sec_limtyp on following conditions #0 = Less than 180 degrees #1 = Equal or greater than 180 degrees and less than 360 degrees #2 = Soft limit at 0-360 degrees with hard limits slightly beyond #Set limhi-limlo to hard limits, inthi-intlo to 360 degrees total #limhi-limlo are expected equal amount from inthi-intlo #3 = Greater than 360 degrees auto_set_lim : 1 #Set the type from the angle limit settings (ignore these) pri_limtyp$ : 0 sec_limtyp$ : 0 #Rotary axis travel limits, always in terms of normal angle output #Set the absolute angles for axis travel on primary pri_limlo$ : -9999 pri_limhi$ : 9999 #Set intermediate angle, in limits, for post to reposition machine pri_intlo$ : -9999 pri_inthi$ : 9999 #Set the absolute angles for axis travel on secondary sec_limlo$ : -0 sec_limhi$ : 110 #Set intermediate angle, in limits, for post to reposition machine sec_intlo$ : -0.001 sec_inthi$ : 110.001 bias_null : 0 #mi4 and mi5 bias are applied at null toolchanges use_clamp : 0 #Use the automatic clamp Mcode # Table/Table spindle axis alignment. This sets the orientation of the base # matrix based on the direction that the spindle retracts when it moves # straight out. A typical VMC retracts straight up in Z+ of the world # coordinate system. The setting for this type of machine is 3(Z+). The spindle # of an HMC typically retracts to the back of the machine. This setting will be 2(Y+). # A nutating table/table is always set to 3! spind_align : 3 #1=(X+), 2=(Y+), 3=(Z+), -1=(X-), -2=(Y-), -3=(Z-) #Machine base matrix (Base matrix to map positions into) matb1$ : 1 matb2$ : 0 matb3$ : 0 matb4$ : 0 matb5$ : 1 matb6$ : 0 matb7$ : 0 matb8$ : 0 matb9$ : 1 #Tolerance settings for wind up p_tol_ang : 210 #Primary angle move to exceed for direction change s_tol_ang : 210 #Secondary angle move to exceed for direction change d_tol_ang : 210 #Dummy angle move to exceed for direction change #pri_limtyp = 1, tolerance to validate tripping limit # reset the p_frc_adj_sec flag when back to normal range #pri_limtyp = 2, angle move >= to trigger reposition on primary and # angle move >= with rev5 or 180 reposition to validate tripping limit p_rsoft_tol : 45 #sec_limtyp = 2, Angle move >= for reposition s_soft_tol : 270 adj_lim_trp : 90 #Angle move in p_pri_rot180 to trip reposition #pri_limtyp = 3 and sec_limtyp = 3 control values p_rsoft_tol3 : 90 #Angle move >= with rev5 or 180 reposition # -------------------------------------------------------------------------- # Format statements - n=nonmodal, l=leading, t=trailing, i=inc, d=delta # -------------------------------------------------------------------------- #Default english/metric position format statements fs2 1 0.8 0.7 #Decimal, absolute, 7 place, default for initialize (:) fs2 2 0.4 0.3 #Decimal, absolute, 4/3 place (linear positioning) fs2 3 0.4 0.3d #Decimal, delta, 4/3 place fs2 20 0.3 0.3 #Decimal, absolute, 3 place (rotary positioning) fs2 21 0.3 0.3d #Decimal, delta, 3 place #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 0l #Integer, force four leading fs2 9 0.1 0.1 #Decimal, absolute, 1 place 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 0.2 0.1 #Decimal, absolute, 2/1 place fs2 16 1 0 1 0n #Integer, forced output fs2 18 1 0 1 0n ##STROKA N-BLOK output #The variables, i, j, k and xout, yout, zout use 'newfs' (format statement # reassignment) with format statements 2 and 3. #The variables, p_out, s_out use 'newfs' with format statements 20 and 21. # -------------------------------------------------------------------------- #String and string selector definitions for NC output # -------------------------------------------------------------------------- #Address string definitions stri "I" strj "J" strk "K" strm "M" strn "N" stro "L" strp "L" strx "X" stry "Y" strz "Z" srad "R" srminus "R-" sblank sneg "-" str_pri_axis_n str_sec_axis_n #Cantext string definitions (spaces must be padded here) sm00 "M00" sm01 "M01" strtextno strcantext # -------------------------------------------------------------------------- # General G and M Code String select tables # -------------------------------------------------------------------------- # Motion G code selection sg00 G0 #Rapid sg01 G1 #Linear feed sg02 G2 #Circular interpolation CW sg03 G3 #Circular interpolation CCW sg04 G4 #Dwell sgcode #Target for string fstrsel sg00 gcode$ sgcode 5 -1 # -------------------------------------------------------------------------- # Select work plane G code sg17 G17 #XY plane code sg19 G19 #YZ plane code sg18 G18 #XZ plane code sgplane #Target string fstrsel sg17 plane_2 sgplane 3 -1 # -------------------------------------------------------------------------- #Select english/metric code sg20 G70 #Inch code sg21 G71 #Metric code smetric #Target string fstrsel sg20 met_tool$ smetric 2 -1 # -------------------------------------------------------------------------- #Select reference return code sg28 G28 #First reference point return sg30 G30 #Second reference point return sg28ref #Target string fstrsel sg28 mi3$ sg28ref 2 -1 # -------------------------------------------------------------------------- # Cutter compensation G code selection sg40 G40 #Cancel cutter compensation sg41 G41 #Cutter compensation left sg42 G42 #Cutter compensation right sccomp #Target for string fstrsel sg40 cc_out sccomp 3 -1 # -------------------------------------------------------------------------- # Mapping conversion G code selection sg69 G69 #Cancel conversion sg68 G68 #Enable conversion smap_mode #Target for string fstrsel sg69 map_mode smap_mode 2 -1 # -------------------------------------------------------------------------- # Canned drill cycle string select sg81 CYCLE81 #drill - no dwell sg81d CYCLE82 #drill - with dwell sg83 CYCLE83 #peck drill - no dwell sg83d CYCLE83 #peck drill - with dwell sg73 CYCLE73 #chip break - no dwell sg73d CYCLE73 #chip break - with dwell sg84 CYCLE84 #tap - right hand sg84d CYCLE74 #tap - left hand sg85 CYCLE85 #bore #1 - no dwell sg85d CYCLE89 #bore #1 - with dwell sg86 CYCLE86 #bore #2 - no dwell sg86d CYCLE86 #bore #2 - with dwell sgm1 CYCLE88 #misc #1 - no dwell sgm1d CYCLE88 #misc #1 - with dwell sgm2 CYCLE89 #misc #2 - no dwell sgm2d CYCLE89 #misc #2 - with dwell sgdrill #Target for string fstrsel sg81 drlgsel sgdrill 16 -1 # -------------------------------------------------------------------------- # Select incremental or absolute G code sg90 G90 #Absolute code sg91 G91 #Incremental code sgabsinc #Target string fstrsel sg90 absinc$ sgabsinc 2 -1 # -------------------------------------------------------------------------- # Feed mode G code selection sg94 G94 #UPM sg93 G93 #Inverse sgfeed #Target for string fstrsel sg94 ipr_type sgfeed 2 -1 # -------------------------------------------------------------------------- #Canned drill cycle reference height sg98 G98 #Reference at initht sg99 G99 #Reference at refht sgdrlref #Target for string fstrsel sg98 drillref sgdrlref 2 -1 # Drill cycle G string select # -------------------------------------------------------------------------- # Generate string for spindle sm04 M4 #Spindle reverse sm05 M5 #Spindle off sm03 M3 #Spindle forward spindle #Target for string fstrsel sm04 spdir2 spindle 3 -1 # -------------------------------------------------------------------------- # Coolant M code selection for V9 style coolant # Note: To enable V9 style coolant, click on the General Machine Parameters icon # in the Machine Definition Manager, Coolant tab, enable first check box. # Output of V9 style coolant commands in this post is controlled by scoolant sm09 M9 #Coolant Off sm08 M7 #Coolant Flood sm08_1 M8 #Coolant Mist sm08_2 M8 #Coolant Tool scoolant #Target for string fstrsel sm09 coolant$ scoolant 4 -1 # -------------------------------------------------------------------------- # Coolant output code selection for X style coolant # Note: To enable X style coolant, click on the General Machine Parameters icon # in the Machine Definition Manager, Coolant tab, disable first check box # Output of X style coolant commands in this post is controlled by pcan, pcan1, & pcan2 scool50 M8 #Coolant 1 on value scool51 M9 #Coolant 1 off value scool52 M8 #Coolant 2 on value scool53 M9 #Coolant 2 off value scool54 M88 #Coolant 3 on value scool55 M89 #Coolant 3 off value scool56 M8(Coolant4=ON) #Coolant 4 on value scool57 M9(Coolant4=OFF) #Coolant 4 off value scool58 M8(Coolant5=ON) #Coolant 5 on value scool59 M9(Coolant5=OFF) #Coolant 5 off value scool60 M8(Coolant6=ON) #Coolant 6 on value scool61 M9(Coolant6=OFF) #Coolant 6 off value scool62 M8(Coolant7=ON) #Coolant 7 on value scool63 M9(Coolant7=OFF) #Coolant 7 off value scool64 M8(Coolant8=ON) #Coolant 8 on value scool65 M9(Coolant8=OFF) #Coolant 8 off value scool66 M8(Coolant9=ON) #Coolant 9 on value scool67 M9(Coolant9=OFF) #Coolant 9 off value scool68 M8(Coolant10=ON) #Coolant 10 on value scool69 M9(Coolant10=OFF) #Coolant 10 off value scoolantx #Target for string fstrsel scool50 coolantx scoolantx 20 -1 # -------------------------------------------------------------------------- #X coolant has the option - First coolant off command shuts off ALL coolant options sall_cool_off "M09" #Coolant off command output with all_cool_off # -------------------------------------------------------------------------- # Primary axis lock/unlock spunlock M79 # Unlock Rotary Table splock M78 # Lock Rotary Table s_plock #Target for string fstrsel spunlock p_lock s_plock 2 -1 # -------------------------------------------------------------------------- # Secondary axis lock/unlock ssunlock M11 # Unlock Rotary Table sslock M10 # Lock Rotary Table s_slock #Target for string fstrsel ssunlock s_lock s_slock 2 -1 # -------------------------------------------------------------------------- # Define the gear selection code flktbl 1 3 #Lookup table definition - table no. - no. entries 40 0 #Low gear range 41 400 #Med gear range 42 2250 #Hi gear range # -------------------------------------------------------------------------- # Define coolant binary value for X style coolant flktbl 2 20 #Lookup table definition - table no. - no. entries 1 50 #Coolant 1 on value 2 51 #Coolant 1 off value 4 52 #Coolant 2 on value 8 53 #Coolant 2 off value 16 54 #Coolant 3 on value 32 55 #Coolant 3 off value 64 56 #Coolant 4 on value 128 57 #Coolant 4 off value 256 58 #Coolant 5 on value 512 59 #Coolant 5 off value 1024 60 #Coolant 6 on value 2048 61 #Coolant 6 off value 4096 62 #Coolant 7 on value 8192 63 #Coolant 7 off value 16384 64 #Coolant 8 on value 32768 65 #Coolant 8 off value 65536 66 #Coolant 9 on value 131072 67 #Coolant 9 off value 262144 68 #Coolant 10 on value 524288 69 #Coolant 10 off value # -------------------------------------------------------------------------- # Toolchange / NC output Variable Formats # -------------------------------------------------------------------------- fmt T 4 t$ #Tool No fmt T 4 first_tool$ #First Tool Used fmt T 4 next_tool$ #Next Tool Used fmt D 4 tloffno$ #Diameter Offset No fmt D 4 tloffno2 #G45 Diameter Offset No fmt D 4 tlngno$ #Length Offset No fmt G 4 g_wcs #WCS G address fmt P 4 p_wcs #WCS P address fmt P 4 p_ofs #G10 P address fmt S 4 speed #Spindle Speed fmt 4 speed_s #Spindle Speed Tap fmt 4 speed_ss #Spindle Speed Tap fmt 10 pit #Shag Tap fmt 11 n_tap_thds$ #Pitch fmt M 4 gear #Gear range # -------------------------------------------------------------------------- fmt N 4 n$ #Sequence number fmt X 2 xout #X position output fmt Y 2 yout #Y position output fmt Z 2 zout #Z position output fmt X 2 xabs #X position output fmt Y 2 yabs #Y position output fmt Z 2 zabs #Z position output fmt X 3 xinc #X position output fmt Y 3 yinc #Y position output fmt Z 3 zinc #Z position output fmt I 3 i$ #Arc center description in X fmt J 3 j$ #Arc center description in Y fmt K 3 k$ #Arc center description in Z fmt I 3 iout #Arc center description in X fmt J 3 jout #Arc center description in Y fmt K 3 kout #Arc center description in Z fmt R 2 arcrad$ #Arc Radius fmt X 2 drlx # X position output fmt Y 2 drly # Y position output fmt 2 drlz # Z position output fmt R 2 refhtoutx # R Reference height fmt R 2 refhtouty # R Reference height fmt 2 refhtoutz # R Reference height fmt 2 peck1$ # Q First peck increment (positive) fmt 2 initht # R2 Two otckok for G81/G82 (=Clearens) fmt 2 peck2$ # Second or last peck (positive) fmt 2 retr$ # Retract distance (positive) fmt Q 2 shftdrl$ # Q Fine bore tool shift fmt F 15 feed # F Feedrate fmt 11 dwell$ # F Dwell fmt M 5 cantext$ # M Canned text fmt 15 frplunge # F Feedrate fmt 15 feed_f # F Feedrate # -------------------------------------------------------------------------- fmt A 20 p_out #Primary output axis position fmt B 20 s_out #Secondary output axis position fmt 20 pp_out #Primary output axis position fmt 20 ss_out #Secondary output axis position fmt C 20 d_out #Dummy output axis position fmt X 2 tox_g #X origin position output (machine base) fmt Y 2 toy_g #Y origin position output fmt Z 2 toz_g #Z origin position output # -------------------------------------------------------------------------- map_mode : 0 #Gcode selection for mapping conversion fmt X 2 xabs_s #X position absolute for unmapped position fmt Y 2 yabs_s #Y position absolute for unmapped position fmt Z 2 zabs_s #Z position absolute for unmapped position fmt X 2 map_x #X origin position output (machine base) fmt Y 2 map_y #Y origin position output fmt Z 2 map_z #Z origin position output fmt I 2 ivec #Mapping rotation vector in X fmt J 2 jvec #Mapping rotation vector in Y fmt K 2 kvec #Mapping rotation vector in Z fmt R 2 map_r #Rotation angle fmt "" 18 cycadd #STROKA cycle 81,83 # -------------------------------------------------------------------------- #Move comment (pound) to ignore program number prefix not used fmt O 7 progno$ #Program number fmt O 7 main_prg_no$ #Program number fmt O 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 "TOOL - " 4 tnote # Note format fmt "" 4 tnote_t # fmt " DIA. OFF. - " 4 toffnote # Note format fmt " LEN.- " 4 tlngnote # Note format fmt " DIA.- " 1 tldia$ # Note format fmt " RAD.- " 1 tcr$ #tool # "R" # -------------------------------------------------------------------------- # User Prompts # -------------------------------------------------------------------------- fq 1 prv_p_wnd_ang "Vertical tool detected! Enter initial primary axis angle:" fq 2 toolength "Enter pivot length for //t$//" # -------------------------------------------------------------------------- # Tool Comment / Manual Entry Section # -------------------------------------------------------------------------- ##### Custom changes allowed below ##### ptoolcomment #Comment for tool tnote = t$ toffnote = tloffno$ tlngnote = tlngno$ #+++ n$, *sopen_prn, pstrtool, *tnote, *toffnote, *tlngnote, *tldia$, *sclose_prn, e$ ###### n$, "(", pstrtool, *tnote, *toffnote, *tlngnote, *tldia$, *sclose_prn, e$ pstrtool #Comment for tool spaces$=0 if strtool$ <> sblank, [ strtool$ = ucase (strtool$) *strtool$, "" ] spaces$=0 pcomment$ #Comment from manual entry (must call pcomment2 if booleans) pcomment2 pcomment2 #Output Comment from manual entry ##### # scomm$ = ucase, ";", "(", scomm$, ")", e$ if gcode$ = 1005, ";", sopen_prn, scomm$, sclose_prn, e$ #Manual entry - as comment if gcode$ = 1006, n$, scomm$, e$ #Manual entry - as code if gcode$ = 1007, n$,";", sopen_prn, scomm$, sclose_prn #Manual entry - as comment with move NO e$ if gcode$ = 1026, n$,";", scomm$ #Manual entry - as code with move NO e$ # spaces$=0 if gcode$ = 1008, ";", sopen_prn, scomm$, sclose_prn, e$ #Operation comment # spaces$=1 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 ##### Stop custom changes ##### # -------------------------------------------------------------------------- # Start of File and Toolchange Setup # -------------------------------------------------------------------------- p_goto_strt_tl #Make the tool start up at toolchange pfd_shft_inc psign_ang_out ##### Custom changes allowed below ##### if use_clamp & not(opcode$ = three | cuttype <> zero), [ p_lock = zero s_lock = zero pbld, n$, s_slock, e$ pbld, n$, s_plock, e$ ] pbld, n$, ";", "(", *tldia$, "MM", *tcr$, "MM", ")", e$ if stagetool <= one, spaces$=0 pbld, n$,' T="',*pstrtool,'"', e$ # *t$,*tlngno$, spaces$=1 pbld, n$, "M6", e$ ############# ########### # tnote_t = 1 tnote_t = prv_tnote_t + 1 ";", "( PEREXOD - N_", *tnote_t, ")", e$ # ] # else, # [ # tnote_t = prv_tnote_t + 1 ############# ########### if n_tpln_mch > m_one, #Toolplane mapping mode [ #Enter your mapping scheme here... pg68_map #############ZZZZZZ########## pbld, n$, *zabs_s, *tlngno$, e$ pbld, n$, *sg00, pwcs, "X0.", "Y0.", *zabs_s, e$ pcan1, pbld, n$, *sgcode, *xabs_s, *yabs_s, *p_out, *s_out, strcantext, e$ ] else, #5 axis and regular mode ( n_tpln_mch = -2) [ if cut_ra_head & use_g45, #Swap xout and yout based on offset axis [ tloffno2 = tlngno$ + g45_of_add pcan1, pbld, n$, *sgcode, pwcs, *sgabsinc, *yout, *speed, *spindle, pgear, strcantext, e$ ################### OSHIBKA ########################## pcan1, pbld, n$, *p_out, *s_out, e$ pbld, n$, "G45", *tloffno2, *xout, e$ ] else, [ ##### pcan1, pbld, n$, *sgcode, pwcs, *sgabsinc, e$ ##### ##### pcan1, pbld, n$, *p_out, *s_out, e$ ##### ################################################################### pp_out = p_out ss_out = s_out spaces$=0 n$, " ","CYCLE800(1,", '"TABLE"' ",200000,192,0,0,0,", *ss_out, ",", *pp_out, ",0,0,0,0,1,100,1)", e$ spaces$=1 ################################################################### pcan1, pbld, n$, *sgcode, pwcs, *sgabsinc, *xout, *yout, *speed, *spindle, pgear, strcantext, e$ ##### if p_out = zero & s_out = zero, #### pbld, n$, sgcode, *p_out, *s_out, e$ ################################################################### # n$, pwcs, e$ # n$,"D1", e$ ] ] if stagetool = one, pbld, n$, *next_tool$, e$ if use_clamp & not(opcode$ = three | cuttype <> zero), [ p_lock = one s_lock = one pbld, n$, s_slock, e$ pbld, n$, s_plock, e$ ] if n_tpln_mch > m_one, #Toolplane mapping mode [ #Enter your mapping scheme here...";", pg68 pbld, n$, *xout, *yout, *zout, scoolant, e$ ] else, pbld, n$, *zout, scoolant, e$ #############ZZZZZZ########## ##### Stop custom changes ##### if top_map, !n_tpln_mch psign_ang_res pcom_movea #locally set delta for feed calculation p_dlt_ang = zero s_dlt_ang = zero toolchng = zero p_goto_strt_ntl #Make the tool start up at null toolchange if workofs$ <> prv_workofs$ | (top_map & (prv_n_tpln_mch <> n_tpln_mch | prv_p_abs <> fmtrnd(p_abs) | prv_s_abs <> fmtrnd(s_abs))), [ pfd_shft_inc sav_absinc = absinc$ absinc$ = zero p_absinc_chng psign_ang_out ##### Custom changes allowed below ##### if n_tpln_mch > m_one, #Toolplane mapping mode [ #Enter your mapping scheme here... pg68_map pbld, n$, pwcs, sgabsinc, *xabs_s, *yabs_s, *zabs_s, *p_out, *s_out, e$ pg68 pbld, n$, *xout, *yout, *zout, e$ ] else, pbld, n$, pwcs, sgabsinc, *xout, *yout, *zout, *p_out, *s_out, e$ ##### Stop custom changes ##### psign_ang_res pe_inc_calc absinc$ = sav_absinc ps_inc_calc #calls p_absinc_chng pcom_movea ] else, p_goto_pos if top_map, !n_tpln_mch #locally set delta for feed calculation p_dlt_ang = zero s_dlt_ang = zero pheader$ #Call before start of file ##### Custom changes allowed below ##### ##### Stop custom changes ##### prot0$ #Call to 'prot' on SOF before ptlchg1002 (in .psb) prot$ prot$ #Call before ptlchg1002 (in .psb) psof$ #Start of file for non-zero tool number ##### Custom changes allowed below ##### if ntools$ = one, [ #skip single tool outputs, stagetool must be on stagetool = m_one !next_tool$ ] if progno$ = zero, progno$ = one #++ "%", e$ # *progno$, *sopen_prn, "PROGRAM - ", sprogname$,*sclose_prn, e$ # pbld, n$, *sopen_prn, "DATE - ", date$, " TIME - ", time$, *sclose_prn, e$ # pbld, n$, *smetric, e$ #++ pbld, n$, *sg00, *sgplane, *sg40, "G80", *sg90, *sgfeed, *sg98, e$ ";PROGRAM -",sprogname$,"_MPF", e$ spaces$=0 n$, " ","WORKPIECE(,,,",'"BOX"' ",0,0,0,0,0,0,0,0)", e$ spaces$=1 n$,";( STANOK: SPINNE_US-620_OLOS)", e$ n$,";( SYSTEM: SINUMERIK 840D )", e$ pbld, n$, ";(", "DATE - ", date$, " TIME - ", time$,")", e$ pbld, n$, *sg00, *sgplane, *sg40, "G71", *sg90, e$ n$,"TRAFOOF", e$ spaces$=0 n$, " ","CYCLE800(1,",'"0"' ",200000,192,0,0,0,0,0,0,0,0,0,1,100,1)", e$ spaces$=1 n$,*sgplane, e$ #### pwcs, # n$,"STOPRE", e$ # n$,"DIAMOF", e$ # n$,"D1", e$ # n$,"M14", e$ # n$,"Z777", e$ # n$,"SETMS(3)", e$ # n$,*sgplane, pwcs, e$ sav_absinc = absinc$ absinc$ = one prefreturn #xout, p_out not output here absinc$ = zero p_absinc_chng ######################################################### pcom_moveb pcheckaxis c_mmlt$ #Multiple tool subprogram call ######################################################### ptoolcomment comment$ pcan ##### Stop custom changes ##### psof_tlchg_blck #Start position block #Save the current brk_ in prv_brk_ for next loop pupd_brk absinc$ = sav_absinc p_absinc_chng pe_inc_calc # This call to 'pcom_movea' has been commented out to avoid # double output of canned text ######################################################### pcom_movea toolchng = zero c_msng$ #Single tool subprogram call ######################################################### ptlchg0$ #Call from NCI null tool change (tool number repeats) #Cancel check in case missed in ptoolend if prv_n_tpln_mch <> n_tpln_mch, pg69 ##### Custom changes allowed below ##### ######################################################### pcom_moveb pcheckaxis c_mmlt$ #Multiple tool subprogram call ######################################################### comment$ # This call to 'pcan' has been commented out to avoid # double output of canned text pcan pbld, n$, sgplane, e$ pspindchng pbld, n$, scoolant, e$ ##### Stop custom changes ##### psof_tlchg_blck #Start position block #Save the current brk_ in prv_brk_ for next loop pupd_brk toolchng = zero ##### Custom changes allowed below ##### if use_clamp & not(opcode$ = three | cuttype <> zero), [ p_lock = one s_lock = one pbld, n$, s_slock, e$ pbld, n$, s_plock, e$ ] ##### Stop custom changes ##### ptlch_ret_app ################################################# if cuttype = zero, ppos_cax_lin if gcode = one, plinout else, prapidout pcom_movea c_msng$ #Single tool subprogram call ################################################# ptlchg$ #Tool change #Cancel check in case missed in ptoolend if prv_n_tpln_mch <> n_tpln_mch, pg69 ##### Custom changes allowed below ##### pbld, n$, "M01", e$ pbld, n$, *sg00, *sgplane, *sg40, "G71", *sg90, *sgfeed, e$ # "G64", #+++++ # tnote_t = prv_tnote_t + 1 #+++++ pbld, n$, *sg00, *sgplane, *sg40, "G80", *sg90, *sgfeed, *sg98, e$ sav_absinc = absinc$ absinc$ = one prefreturn #xout, p_out not output here absinc$ = sav_absinc ################################################# pcom_moveb pcheckaxis c_mmlt$ #Multiple tool subprogram call ################################################# ptoolcomment comment$ pcan sav_absinc = absinc$ absinc$ = zero ##### Stop custom changes ##### p_absinc_chng psof_tlchg_blck #Tool change position block #Save the current brk_ in prv_brk_ for next loop pupd_brk absinc$ = sav_absinc p_absinc_chng pe_inc_calc # This call to 'pcom_movea' has been commented out to avoid # double output of canned text ################################################# pcom_movea # toolchng = zero c_msng$ #Single tool subprogram call ################################################# pretract #End of tool path, toolchange pretract_mov sav_absinc = absinc$ coolant$ = zero cc_pos$ = zero gcode$ = zero spdir2 = one # if nextop$ = 1003, #Uncomment this line to leave coolant on until eof unless [ # explicitely turned off through a canned text edit if all_cool_off, [ #all coolant off with a single off code here if coolant_on, pbld, n$, *sall_cool_off, e$ coolant_on = zero ] else, [ local_int = zero coolantx = zero while local_int < 20, [ coolantx = and(2^local_int, coolant_on) local_int = local_int + one if coolantx > zero, [ coolantx = local_int pbld, n$, scoolantx, e$ ] coolantx = zero ] coolant_on = zero ] ] ##### Custom changes allowed below ##### pbld, n$, scoolant, e$ pbld, n$, sgabsinc, sccomp, spindle, psub_end_mny, e$ # pbld, n$, *sg00, "Z0", "D0", e$ ###"Z550", pbld, n$, *sg00, "G53", "Z350", e$ spaces$=0 n$, " ","CYCLE800(1,",'"0"' ",200000,192,0,0,0,0,0,0,0,0,0,1,100,1)", e$ spaces$=1 ###### pbld, n$, *sg00, "X-200", e$ pg69 absinc$ = one prefreturn #xout, p_out not output here absinc$ = sav_absinc protretinc #01/26/04 #pbld, n, *sg28, protretinc, e #01/26/04 prefreturn #Refernce return # pbld, n$, *sgcode, *sg28, *sgabsinc, "Z0.", e$ # if toolchng = one, pbld, n$, *sgcode, *sg28ref, "X0.", "Y0.", e$ protretinc #Reset the C axis revolution counter if frc_cinit, [ p_abs = zero p_inc = zero s_abs = zero s_inc = zero pset_dlt_to_abs #p_out, s_out #01/26/04 pbld, n$, sgcode, p_out, s_out, e$ #01/26/04 p_wnd_ang = zero s_wnd_ang = zero !p_wnd_ang, !s_wnd_ang ] pbld, n$, *sg00, "G53", "X-350", e$ ############# pbld, n$, "B0.", "C0.", e$ ##### Stop custom changes ##### peof$ #End of file for non-zero tool toolchng = one !gcode$ #to see that this is the EOF in pretract map_mode = zero pretract ##### Custom changes allowed below ##### comment$ # n$,"TRAFOFF", e$ pbld, n$, *sg00, "G53", "Y250", e$ #### "F10000", n$, "M30", e$ ######################################################## mergesub$ clearsub$ mergeaux$ clearaux$ ######################################################## # "%", e$ pwcs #G54+ coordinate setting at toolchange if workofs$ <> prv_workofs$ | (force_wcs & toolchng > zero), [ if workofs$ < 6, [ g_wcs = workofs$ + 54 *g_wcs ] else, [ p_wcs = workofs$ - five "G54.1", *p_wcs ] ] !workofs$ pgear #Find spindle gear from lookup table if use_gear = one, [ gear = frange (one, speed) *gear ] #Toolchange setup pspindchng #Spindle speed change if prv_spdir2 <> spdir2 & prv_speed <> zero, pbld, n$, *sm05, e$ if prv_speed <> speed | prv_spdir2 <> spdir2, [ if speed, pbld, n$, *speed, *spindle, pgear, 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$) ##### Stop custom changes ##### ptoolend$ #End of tool path, before reading new tool data #Determine if cancelling mapping mode if top_map, [ if tlplnno$ <> end_tlplnno$ | workofs$ <> end_workofs$ | end_rot_type$ | not(end_opcode$ <= 16 | end_opcode$ = 19), map_mode = zero ] if end_gcode$ = 1000, [ #Null toolchange toolchng = m_one #Filter retract if toolplane is the same toolplane path if tlplnno$ = end_tlplnno$ & (end_opcode$ <= 16 | end_opcode$ = 19), tlch_ret_app = m_one pretract_mov pg69 ] else, [ #Actual toolchange toolchng = two pretract ] !speed, !spdir2, !tlch_ret_app, !g_lim_trip # -------------------------------------------------------------------------- # Motion NC output # -------------------------------------------------------------------------- ##### Custom changes allowed below ##### prapidout #Output to NC of linear movement - rapid # pcan1, pbld, n$, sgcode, p_out, s_out, e$ pcan1, pbld, n$, `sgcode, sgplane, sgabsinc, pwcs, pccdia, pxout, pyout, e$ # p_out, s_out, n$, `sgcode, sgplane, pzout, strcantext, scoolant, e$ plinout #Output to NC of linear movement - feed punclamp pcan1, pbld, n$, `sgcode, sgplane, sgabsinc, `sgfeed, pccdia, pxout, pyout, pzout, feed, strcantext, scoolant, e$ # p_out, s_out,` if nc_lout$ <> m_one & feed = zero, psfeederror pclamp pcirout #Output to NC of circular interpolation sav_gcode = gcode$ parc_setup pcan1, pbld, n$, `sgcode, sgplane, sgabsinc, `sgfeed, pccdia, pxout, pyout, pzout, parcijk,`feed, strcantext, scoolant, e$ # p_out, s_out, gcode$ = sav_gcode if nc_lout$ <> m_one & feed = zero, psfeederror ################################################################# ################################################################# ################################################################# pncoutput #Movement output comment$ pcan if feed = zero & fix_fr, [ if ipr_type, feed = deffrinv else, feed = deffeedpm ] psign_ang_out if cuttype = one, plane_2 = zero if gcode$ = zero, ppos_cax_lin ####### sgcode, ########## [ if prv_nobrk$, [ if cuttype = zero, ppos_cax_lin ###Toolplane rotary positioning## prapidout ] else, p_nobrk_emul #'nobrk' emulation option ] else, [ if cuttype = zero, ppos_cax_lin #Toolplane rotary positioning if gcode$ = one, plinout if gcode$ > one & gcode$ < four, pcirout ] psign_ang_res if cutflag = 7, fr_pos$ = prv_fr_pos$ pcom_movea ppos_cax_lin #Position the rotary axis before move - rapid if p_inc | s_inc, [ sav_gcode = gcode$ gcode$ = zero #one punclamp ###### pbld, n$, sgcode, p_out, s_out, e$ ###### ################################################################### pp_out = p_out ss_out = s_out spaces$=0 n$, " ","CYCLE800(1,", '"TABLE"' ",200000,192,0,0,0,", *ss_out, ",", *pp_out, ",0,0,0,0,1,100,1)", e$ spaces$=1 #### pbld, n$, sgcode, *p_out, *s_out, e$ ################################################################### pclamp !p_abs, !s_abs ps_cinc_calc gcode$ = sav_gcode ] p_safe_z #Safe Z retract move with reposition, see mr6 if safe_z_ret, [ gcode$ = zero za = safe_z_ret p_goto_pos ] pcom_movea #Common motion preparation routines, after pcan2 ##### Stop custom changes ##### pe_inc_calc ##### Custom changes allowed below ##### pdwl_spd$ #Call from NCI gcode 4 pspindle comment$ pspindchng pcan if fmtrnd(dwell$), pcan1, pbld, n$, *sgcode, *dwell$, strcantext, e$ else, pcan1, pbld, n$, strcantext, e$ pcan2 # -------------------------------------------------------------------------- # Motion output components # -------------------------------------------------------------------------- punclamp #Unclamp the rotary axis if use_clamp & not(opcode$ = three | cuttype <> zero), [ if p_inc, p_lock = zero if s_inc, s_lock = zero pbld, n$, s_slock, e$ pbld, n$, s_plock, e$ ] pclamp #Clamp the rotary axis if use_clamp & not(opcode$ = three | cuttype <> zero), [ if p_inc, p_lock = one if s_inc, s_lock = one pbld, n$, s_slock, e$ pbld, n$, s_plock, e$ ] pbld #Canned text - block delete if bld, '/' pccdia #Cutter Compensation #Force Dxx# sav_cc_pos = cc_pos$ if cc_pos$ & pln_2_rev, cc_out = abs(cc_pos$ - three) else, cc_out = cc_pos$ if prv_cc_out <> cc_out & cc_out, result = (tloffno$,tloffno$) #force sccomp if cc_out, ################# tloffno$ cc_pos$ = sav_cc_pos cc_pos$! # 01/26/04 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, zinc, !zabs psign_ang_out #Signed angle output modification if pang_output, [ sv_p_abs = p_abs ppsign_ang if p_inc, result = force(p_out,p_out) else, !p_out ] if sang_output, [ sv_s_abs = s_abs pssign_ang if s_inc, result = force(s_out,s_out) else, !s_out ] psign_ang_res #Restore p_abs with signed angle output if pang_output, p_abs = sv_p_abs if sang_output, s_abs = sv_s_abs parc_setup #Force the arc position output if pln_2_rev, gcode$ = abs(gcode$ - five) parcijk #Select the arc output if arcoutput$ = zero | full_arc_flg$, [ #Arc output for IJK iout, jout, kout !i$, !j$, !k$ ] else, [ #Arc output for R if abs(sweep$)<=arc180 | arcoutput$=one, result = nwadrs(srad, arcrad$) else, result = nwadrs(srminus, arcrad$) *arcrad$ ] p_nobrk_emul #'nobrk' emulation option if abs(zinc)>brk_tol| not(abs(xinc)>brk_tol | abs(yinc)>brk_tol) | not(mtype = zero | mtype = three), [ if cuttype = zero, ppos_cax_lin #Toolplane rotary positioning prapidout ] else, [ nobrk_xa = vequ(xabs) nobrk_xi = vequ(xinc) nobrk_pa = vequ(p_abs) nobrk_pi = vequ(p_inc) #Z up, move Z, XY, PRI, SEC if zinc > zero, [ #Kill X, Y, PRI, SEC xabs = prv_xabs yabs = prv_yabs xinc = zero yinc = zero p_abs = prv_p_abs s_abs = prv_s_abs p_inc = zero s_inc = zero psign_ang_out #jphjph need p_dlt_ang, s_dlt_ang prapidout #Enable X, Y xabs = vequ(nobrk_xa) xinc = vequ(nobrk_xi) prapidout #Enable PRI, SEC p_abs = vequ(nobrk_pa) p_inc = vequ(nobrk_pi) ppos_cax_lin ] #Z down, move PRI, SEC, XY, Z else, [ ####ppos_cax_lin handles rotation ppos_cax_lin ####Kill Z zabs = prv_zabs zinc = zero prapidout ####Enable Z xabs = vequ(nobrk_xa) xinc = vequ(nobrk_xi) prapidout ] ] ##### Stop custom changes ##### # -------------------------------------------------------------------------- # Drilling # -------------------------------------------------------------------------- pdrlcommonb #Canned Drill Cycle common call, before ##### Custom changes allowed below ##### pbld, n$, sgplane, sgfeed, e$ feed = fr_pos$ prv_dwell$ = zero @dwell$ comment$ pcan prdrlout #Output drill position psign_ang_out if plane_2 = zero, #XY [ if gcode$ = 81, [ result = force(drlz, drlz) result = force(refhtoutz, refhtoutz) ] xout, yout, drlz, p_out, s_out, refhtoutz ] else, [ if plane_2 = one, #YZ [ if gcode$ = 81, [ result = force(drlx, drlx) result = force(refhtoutx, refhtoutx) ] drlx, yout, zout, p_out, s_out, refhtoutx ] else, #XZ [ if gcode$ = 81, [ result = force(drly, drly) result = force(refhtouty, refhtouty) ] xout, drly, zout, p_out, s_out, refhtouty ] ] !refhtoutx, !refhtouty, !refhtoutz, !drlx, !drly, !drlz pdrill$ #Canned Drill Cycle dwell$, === *sgdrlref,=== refhtoutz, pdrlcommonb # CYCLE81 (RTP, RFP, SDIS, DP,DPR) pcan1, pbld, # sav_gcode$ = gcode$, # gcode$=1, n$, *sg01, *feed, e$ initht = zout #/1 retr$, spaces$=0 n$, " ", *sgdrill, "(",*initht,",",*refhtoutz,", ,",*drlz,")", e$ spaces$=1 n$, *sg01, "F2000.", e$ # gcode$=sav_gcode$ # sav_gcode$=0 pcom_movea ppeck$ #Canned Peck Drill Cycle === *sgdrlref,=== pdrlcommonb # CYCLE83 (RTP, RFP, SDIS, DP, DPR, FDEP, FDPR, DAM, DTB, DTS, FRF, VARI, # _AXN, _MDEP, _VRT, _DTD, _DIS1) pcan1, pbld, # sav_gcode$ = gcode$, # gcode$=1, n$, *sg01, *feed, e$ initht = zout #/1 retr$, spaces$=0 n$, " ", *sgdrill, "(",*initht,",",*refhtoutz,", ,",*drlz,", ", ", ,",*peck1$, ", ", ", ", ", ", ".5,", ".5",",1, ,",*peck1$,", ",", ,", "1.",")", e$ spaces$=1 n$, *sg01, "F2000.", e$ # gcode$=sav_gcode$ # sav_gcode$=0 pcom_movea pchpbrk$ #Canned Chip Break Cycle pdrlcommonb pcan1, pbld, n$, *sgdrill, sgabsinc, *sgdrlref, prdrlout, *peck1$, *feed, strcantext, e$ pcom_movea ptap$ #Canned Tap Cycle pdrlcommonb #### feed = (1 / n_tap_thds$) * speed #### result = newfs(17, feed) pcan1, pbld, initht = zout #/1 retr$, *peck1$,", ", speed_s=speed speed_ss=speed*2.5 pit = mr4$ #feed/10 spaces$=0 n$, " ", *sgdrill, "(",*initht,",",*refhtoutz,", ,",*drlz,", ", ", ", dwell$,","," 3", ", 5", ", ", *n_tap_thds$, ", ", "90, ", *speed_s,", ", *speed_ss, ", 3, 1, 0", ", 2", ", " *pit,",", ")", strcantext, e$ spaces$=1 n$, *sg01, "F2000.", e$ pcom_movea pbore1$ #Canned Bore #1 Cycle pdrlcommonb pcan1, pbld, initht = zout #/1 retr$, frplunge = feed feed_f= 1.5*feed spaces$=0 n$, " ", *sgdrill, "(",*initht,",",*refhtoutz,", ,",*drlz,", ,",dwell$,",", *frplunge,",",*feed_f,")", e$ spaces$=1 n$, *sg01, "F2000.", e$ #n$, *sgdrill, sgabsinc, *sgdrlref, prdrlout, # dwell$, *feed, strcantext, e$ pcom_movea pbore2$ #Canned Bore #2 Cycle pdrlcommonb pcan1, pbld, n$, *sgdrill, sgabsinc, *sgdrlref, prdrlout, *feed, strcantext, e$ pcom_movea pmisc1$ #Canned Misc #1 Cycle (Finish Bore) pdrlcommonb pcan1, pbld, n$, *sgdrill, sgabsinc, *sgdrlref, prdrlout, shftdrl$, dwell$, *feed, strcantext, e$ pcom_movea pmisc2$ #Canned Misc #2 Cycle (Floating Tap) pdrlcommonb pcan1, pbld, n$, *sgdrill, sgabsinc, *sgdrlref, prdrlout, shftdrl$, dwell$, *feed, strcantext, e$ pcom_movea pdrill_2_cmn #Canned Drill Cycle, additional points pdrlcommonb punclamp # n$, "F2000", e$ pcan1, pbld, n$, sgplane, prdrlout, dwell$, feed, strcantext, e$ pclamp pcom_movea pdrill_2$ #Canned Drill Cycle, additional points # if gcode$ = 81, pdrill$ pdrlcommonb punclamp n$, xout, yout, e$ # *sg01, *sg00, "F2000", n$, *sg01, *feed, e$ spaces$=0 initht = zout n$," ", *sgdrill, "(",*initht,",",*refhtoutz,", ,",*drlz,")", e$ spaces$=1 n$, *sg01, "F2000.", e$ pclamp pcom_movea else, pdrill_2_cmn ## _cmn ppeck_2$ #Canned Peck Drill Cycle # if gcode$ = 81, ppeck$ pdrlcommonb # punclamp n$, xout, yout, e$ # *sg01, "F2000.", n$, *sg01, *feed, e$ spaces$=0 initht = zout n$," ", *sgdrill, "(",*initht,",",*refhtoutz,", ,",*drlz,", ", ", ,",*peck1$, ", ", ", ", ", ", ".5,", ".5",",1, ,",*peck1$,", ",", ,", "1.",")", e$ spaces$=1 n$, *sg01, "F2000.", e$ # pclamp pcom_movea else, pdrill_2_cmn pchpbrk_2$ #Canned Chip Break Cycle if gcode$ = 81, pchpbrk$ else, pdrill_2_cmn ptap_2$ #Canned Tap Cycle # if gcode$ = 81, ptap$ pdrlcommonb n$, xout, yout, e$ # n$, *sg01, *feed, e$ initht = zout #/1 retr$, *peck1$,", ", speed_s=speed speed_ss=speed*2.5 pit = mr4$ #feed/10 spaces$=0 n$, " ", *sgdrill, "(",*initht,",",*refhtoutz,", ,",*drlz,", ", ", ", dwell$,","," 3", ", 5", ", ", *n_tap_thds$, ", ", "90, ", *speed_s,", ", *speed_ss, ", 3, 1, 0", ", 2", ", " *pit,",", ")", e$ spaces$=1 n$, *sg01, "F2000.", e$ pcom_movea else, pdrill_2_cmn pbore1_2$ #Canned Bore #1 Cycle # if gcode$ = 81, pbore1$ pdrlcommonb punclamp n$, xout, yout, e$ # n$, *sg01, *feed, e$ spaces$=0 initht = zout frplunge = feed feed_f= 1.5*feed spaces$=0 n$, " ", *sgdrill, "(",*initht,",",*refhtoutz,", ,",*drlz,", ,",dwell$,",", *frplunge,",",*feed_f,")", e$ spaces$=1 n$, *sg01, "F2000.", e$ pclamp pcom_movea else, pdrill_2_cmn pbore2_2$ #Canned Bore #2 Cycle if gcode$ = 81, pbore2$ else, pdrill_2_cmn pmisc1_2$ #Canned Misc #1 Cycle if gcode$ = 81, pmisc1$ else, pdrill_2_cmn pmisc2_2$ #Canned Misc #2 Cycle if gcode$ = 81, pmisc2$ else, pdrill_2_cmn pdrlcst$ #Custom drill cycles 8 - 19 (user option) #Use this postblock to customize drilling cycles 8 - 19 pdrlcommonb "CUSTOMIZABLE DRILL CYCLE ", prdrlout, e$ pcom_movea pdrlcst_2$ #Custom drill cycles 8 - 19, additional points (user option) #Use this postblock to customize drilling cycles 8 - 19 pdrlcommonb "CUSTOMIZABLE DRILL CYCLE ", prdrlout, e$ pcom_movea pcanceldc$ #Cancel canned drill cycle prv_gcode$ = zero # pbld, n$, "G80", e$ # -------------------------------------------------------------------------- # Misc. integer/real postblocks # -------------------------------------------------------------------------- pmiscint$ #Set the misc. integer values absinc$ = mi2$ add_wrk_sht = mi6$ enable_lim = mi7$ ptlch_ret_app chain_ret_app = (mi8$ = four | mi8$ < zero) nut_bias = mi9$ sec_bias = mi10$ pmiscreal$ #Set the misc. real values clear_vec = mr1$ cut_ra_head = mr2$ safe_z_ret = mr6$ nut_z_dist = mr10$ ptlch_ret_app #Set tlch_ret_app tlch_ret_app = abs(mi8$) if tlch_ret_app > 4, tlch_ret_app = 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$ #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 pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfzout, e$ pe_inc_calc ps_inc_calc ] ] absinc$ = sav_absinc result = nwadrs(strp, main_prg_no$) if progno$ = main_prg_no$, result = mprint(sprgnerror) pbld, e$ #, prv_feed = c9k #Force feed in sub psub_mirror #Mirror start code, user #Mirror Y axis if sub_trnmthd$, pbld, n$, *sgabsinc, strns_mir_on, *sub_trnsx$, e$ #Mirror X axis else, pbld, n$, *sgabsinc, strns_mir_on, *sub_trnsy$, e$ psub_rotate #Rotate start code, user pbld, n$, *sgcode, *sgabsinc, strns_rot_on, *sub_trnsx$, *sub_trnsy$, [absinc$ = one], *sgabsinc, e$ psub_st_m$ #Header in main level result = nwadrs(stro, main_prg_no$) *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 ] else, pbld, n$, sgabsinc, e$ psub_end_m$ #End in main level n$, e$ prv_absinc$ = -1 #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 pbld, n$, *sgabsinc, strns_mir_off, *sub_trnsx$, *sub_trnsy$, e$ ] else, #Rotate cancel [ pbld, 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 result = nwadrs(strp, sub_prg_no$) sub_prg_no$ = sub_prg_no$ + 1000 #Add sub number offset if progno$ = sub_prg_no$, result = mprint(sprgnerror) pbld, e$ psub_st_s$ #Header in sub leveln result = nwadrs(stro, sub_prg_no$) "", e$ pbld, sgabsinc, e$ psub_end_s$ #End in sub level n$, "2", e$ prv_absinc$ = -1 # -------------------------------------------------------------------------- # 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 pbld, 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 pbld, n$, strcantext, e$ strcantext = sblank ] pcant_1 #Canned text - output call cant_pos = cant_pos1$ cantext$ = cant_val1$ pcant_out pcant_2 #Canned text - output call cant_pos = cant_pos2$ cantext$ = cant_val2$ pcant_out pcant_3 #Canned text - output call cant_pos = cant_pos3$ cantext$ = cant_val3$ pcant_out pcant_4 #Canned text - output call cant_pos = cant_pos4$ cantext$ = cant_val4$ pcant_out pcant_5 #Canned text - output call cant_pos = cant_pos5$ cantext$ = cant_val5$ pcant_out pcant_6 #Canned text - output call cant_pos = cant_pos6$ cantext$ = cant_val6$ pcant_out pcant_7 #Canned text - output call cant_pos = cant_pos7$ cantext$ = cant_val7$ pcant_out pcant_8 #Canned text - output call cant_pos = cant_pos8$ cantext$ = cant_val8$ pcant_out pcant_9 #Canned text - output call cant_pos = cant_pos9$ cantext$ = cant_val9$ pcant_out pcant_10 #Canned text - output call cant_pos = cant_pos10$ cantext$ = cant_val10$ pcant_out pcant_11 #Canned text - output call cant_pos = cant_pos11$ cantext$ = cant_val11$ pcant_out pcant_12 #Canned text - output call cant_pos = cant_pos12$ cantext$ = cant_val12$ pcant_out pcant_13 #Canned text - output call cant_pos = cant_pos13$ cantext$ = cant_val13$ pcant_out pcant_14 #Canned text - output call cant_pos = cant_pos14$ cantext$ = cant_val14$ pcant_out pcant_15 #Canned text - output call cant_pos = cant_pos15$ cantext$ = cant_val15$ pcant_out pcant_16 #Canned text - output call cant_pos = cant_pos16$ cantext$ = cant_val16$ pcant_out pcant_17 #Canned text - output call cant_pos = cant_pos17$ cantext$ = cant_val17$ pcant_out pcant_18 #Canned text - output call cant_pos = cant_pos18$ cantext$ = cant_val18$ pcant_out pcant_19 #Canned text - output call cant_pos = cant_pos19$ cantext$ = cant_val19$ pcant_out pcant_20 #Canned text - output call cant_pos = cant_pos20$ cantext$ = cant_val20$ pcant_out pcant_out #Canned text - build the string for output #Assign string select type outputs if cant_pos < three, #cant_pos indicates canned text output [ 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 ] ] else, #cant_pos indicates coolant output [ coolant_bin = flook (two, cantext$) #Create binary value for each coolant using lookup table if frac(cantext$/two), [ if all_cool_off, [ if coolant_on, pbld, n$, *sall_cool_off, e$ coolant_on = zero ] else, coolant_on = coolant_on - coolant_bin/2 #Odd = off command, subtract appropriate binary value. ] else, #Even = on command [ #Determine if this coolant is already on local_int = zero coolantx = zero while local_int < 20, [ result2 = and(2^local_int, coolant_on) local_int = local_int + one if result2 = coolant_bin, suppress = one ] ] if suppress <> 1, #Don't output an on code for a coolant that is already on [ if not(frac(cantext$/two)), coolant_on = coolant_on + coolant_bin #Maintain binary sum of all coolants currently on coolantx = cantext$ - 50 #Create a coolantx value for string select pbld, n$, *scoolantx, e$ ] suppress = zero ] ##### Stop custom changes ##### # -------------------------------------------------------------------------- # Override normal processing # -------------------------------------------------------------------------- plin0$ #Linear movement, set brklinestype pcir0$ #Circular interpolation, set linarc plane_no = one pplane_map if pln_match = zero | cuttype, linarc$ = one else, linarc$ = zero pfd_shft_ovrd #Overide prior to shift and feed calculation if cutflag = 7, [ !fr_pos$ fr_pos$ = plunge_feed ] ppln_mtch_ovrd #Overide plane match, can drill is off if planes don't match if plane_no = zero, [ if pln_match = zero & drilltype = two, pdrl_set_use #Sets usecan.. off ] pchng_addrs #Address and string re-assignments, called from pq ptop_type_ax #Custom axis limit settings for top_map type str_pri_asign = str_n_c_axis str_sec_asign = str_n_a_axis str_dum_asign = str_n_b_axis result = updgbl(rotaxis1$, "vecy")#Zero result = updgbl(rotdir1$, "vecx")#Direction result = updgbl(rotaxis2$, "vecz")#Zero result = updgbl(rotdir2$, "vecy")#Direction ptop_type_lim #Custom axis limit settings for top_map limits pri_limlo$ = -9999 pri_limhi$ = 9999 sec_limlo$ = -9999 sec_limhi$ = 9999 pri_intlo$ = -9999 pri_inthi$ = 9999 sec_intlo$ = -9999 sec_inthi$ = 9999 # -------------------------------------------------------------------------- # Mapping mode - # Rotations are always about the zero point # Only toolplane toolpaths by entire toolpath section use mapping mode # Modify according to specific post setup # -------------------------------------------------------------------------- pg69 #Cancel mapping mode if top_map, [ #Add your code to cancel mapping mode... pbld, n$, smap_mode, e$ ] pg68_map #Map the first postion to the machine if p_out | s_out, [ #Rotate xabs back xabs_s = vequ(xabs) axisx$ = vequ(caxisx) xabs_s = rotv(-p_vec_rot, xabs_s) axisx$ = vequ(baxisx) axisx$ = rotv(p_vec_rot, axisx$) xabs_s = rotv(-s_vec_rot, xabs_s) ] pg68 #Enable mapping mode map_mode = one #Primary mapping output ivec = vequ(caxisx) if p_out, [ map_r = -p_out pbld, n$, smap_mode, *map_x, *map_y, *map_z, *ivec, *jvec, *kvec, *map_r, e$ prv_map_mode = zero ] #Secondary mapping output ivec = vequ(baxisx) if s_out, [ map_r = -s_out pbld, n$, smap_mode, *map_x, *map_y, *map_z, *ivec, *jvec, *kvec, *map_r, e$ ] if p_out | s_out, prv_map_mode = one # -------------------------------------------------------------------------- # Parameter Data # -------------------------------------------------------------------------- pparameter$ #Parameter Read if prmcode$ = 20004, tempf1 = rpar(sparameter$, 12) if prmcode$ = 20007 & use_tlength = one, temp1 = rpar(sparameter$, 3) pprep2 #User defined post block - allows access to pprep$ which is in binned portion of post #Allows post instructions after post is parsed but before NC and NCI file are opened. #DO NOT ATTEMPT OUTPUT TO NC FILE IN THIS POSTBLOCK - THE NC OUTPUT FILE IS NOT YET OPENED! rd_mch_ent_no$ = 0 #Read only the machine base parameters rd_md$ #Read machine definition parameters pmachineinfo$ #Machine information parameters postblock #rd_md is used to call pmachineinfo postblock and read the parameters of the selected axis combination machine entity set in rd_mch_ent_no #rd_cd is used to call pmachineinfo postblock and read the active control definition parameters #rd_tlpathgrp is used to call pmachineinfo postblock and read the active toolpath group parameters #"-->pmachineinfo", ~prmcode$, " ", ~sparameter$, e$ #Do not uncomment if being called from pprep$ - see pprep comment if prmcode$ = 17101, all_cool_off = rpar(sparameter$, 1) #First coolant off command shuts off ALL coolant options [STARTBIN] # -------------------------------------------------------------------------- # Error messages # -------------------------------------------------------------------------- #One time message #Calculation scalcerr "ERROR-POST CALCULATION ERROR" scalcerr1 "ERROR-PRIMARY AND SECONDARY PLANES ARE COINCIDENT" scalcerr2 "ERROR-SPINDLE CAN NOT BE ALIGNED TO AXIS, SEE 'spind_align'" scalcerr3 "ERROR-SETUP FOR PRIMARY OR SECONDARY AXIS IS ILLEGAL" sratioerr "ERROR-THE CALCULATED BREAK IS OUTSIDE THE MOVES" slimiterr "ERROR-THE TOOL CAN NOT BE POSITIONED WITHIN MACHINE ROTARY LIMITS" sfeederror "ERROR-FEED RATE IS ZERO" #Annoying errors snoraerror "ERROR-NUTATING MACHINE TYPES DO NOT ALLOW RIGHT ANGLE HEAD" sprgnerror "ERROR-SUBPROGRAM NUMBER MATCHES THE MAIN PROGRAM NUMBER" stlorgerr "ERROR-TOOL ORIGIN DOES NOT MATCH CENTER OF ROTATION IN POLAR MILLING" swcserror "ERROR-WORK OFFSET NUMBER OUT OF RANGE" svers_limit_msg "This post is designed to function with Mastercam X only OLOS!" stime_limit_msg "Time limit has expired!" sdays_left_msg " Days left on trial" # -------------------------------------------------------------------------- # Numbered questions for Mastercam Mill # -------------------------------------------------------------------------- 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? 5000 107. Average time for tool change (seconds)? 2.0 159. Compensate the first and last point in cutter comp. in control 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? y 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 # -------------------------------------------------------------------------- 201. Retract/approach clearance distance at tool reposition (mr1)? 2.0 202. Right Angle head angle/activate [0=Off] (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. Safe Z retract [0=Off] (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. Distance from work coordinate zero to table zero/RA spindle (mr10)? 0.0 # -------------------------------------------------------------------------- # Default Miscellaneous Real Values (METRIC) # -------------------------------------------------------------------------- 1601. Retract/approach clearance distance at tool reposition (mr1) (metric)? 50.0 1602. Right Angle head angle/activate [0=Off] (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. Safe Z retract [0=Off] (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. Distance from work coordinate zero to table zero/RA spindle (mr10) (metric)? 0.0 # -------------------------------------------------------------------------- # Enable/Disable Miscellaneous Real Variable switches # -------------------------------------------------------------------------- 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 # -------------------------------------------------------------------------- 301. Miscellaneous integer variable 1 (mi1)? 0 302. Absolute or Incremental [0=Abs, 1=Inc] (mi2)? 0 303. Reference return [0=G28, 1=G30] (mi3)? 0 304. Initial primary [-999=Low, 0=Def, 999=Hi] (mi4)? 0 305. Initial secondary [-999=Low, 0=Def, 999=Hi] (mi5)? 0 306. Add work shift [0=Orig, 1=WCS Orig] (mi6)? 1 307. Enable retract to/from limits [0=Off, 1=On] (mi7)? 1 308. Retract toolchange [0=Off, 1=Null, 2=Tlchg, 3=Both, NEG/4=Chain]? 1 309. Nutating bias [0=off, 1=Pos, 2=Neg] (mi9)? 2 310. Secondary axis [0=off, 1=Pos, 2=Neg] (mi10)? 0 # -------------------------------------------------------------------------- # Enable/Disable Miscellaneous Integer Variable switches # -------------------------------------------------------------------------- 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") # -------------------------------------------------------------------------- 401. Read SYSTEM COLORS section? y 402. Read ALLOCATIONS section? y 403. Read TOLERANCES section? y 404. Read DATA PATHS section? y 405. Read COMMUNICATIONS section? y 406. Read DRAFT SETTINGS section? y 407. Read MISCELLANEOUS section? y 408. Read NC SETTINGS section? y 409. Read DIALOG SCRIPTS section? y 410. Read DESIGN SETTINGS section? y 411. Read PLOTTER SETTINGS section? y 412. Read ALT-KEY ASSIGNMENTS section? y 413. Read CAD section? y 414. Read START/EXIT section? y 415. Read SCREEN section? y 416. Read FILE NAMES section? y 1500. Chook to execute from 'Misc. values' button? 1501. Insert parameter information in the ascii NCI? n 1502. Write operation information to binary file (.ops)? n 1503. Write transform operations (0=transform ops, 1=source ops, 2=both)? 1 1520. Display a warning when cutter compensation in control simulation finds an error? y 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 [CTRL_MILL|DEFAULT] [misc integers] 2. "Absolute or Incremental [0=Abs, 1=Inc]" 3. "Reference return [0=G28, 1=G30]" 4. "Initial primary [-999=Low, 0=Def, 999=Hi]" 5. "Initial secondary [-999=Low, 0=Def, 999=Hi]" 6. "Add work shift [0=Orig, 1=WCS Orig]"//1 7. "Enable retract to/from limits [0=Off, 1=On]"//1 8. "Retract toolchange [0=Off, 1=Null, 2=Tlchg, 3=Both, NEG/4=Chain]"//1 9. "Nutating bias [0=off, 1=Pos, 2=Neg]"//2 10. "Secondary axis [0=off, 1=Pos, 2=Neg]" [misc reals] 1. "Retract/approach clearance distance"//2.//50. 2. "Right Angle head angle/activate [0=Off]" 6. "Safe Z retract [0=Off]" 10. "Nutating distance WCS to table/RA spindle" [simple drill] 1. "Drill/Counterbore" 7. "" 8. "" 9. "" 10. "" 11. "" [peck drill] 10. "" 11. "" [chip break] 11. "" [tap] 7. "" 8. "" 9. "" 10. "" 11. "" [bore1] 1. "Bore #1 (feed-out)" 7. "" 8. "" 9. "" 10. "" 11. "" [bore2] 1. "Bore #2 (stop spindle, rapid out)" 7. "" 8. "" 9. "" 10. "" 11. "" [misc1] 1. "Fine bore (shift)" 7. "" 8. "" 9. "" 10. "" [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. "Custom Drill Parameters 4" [bore1 custom parameters] 1. "Custom Drill Parameters 5" [bore2 custom parameters] 1. "Custom Drill Parameters 6" [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" [canned text] 1. "Ostop" 2. "Stop" 3. "Bld on" 4. "bLd off" 5. "Text5" 6. "Text6" 7. "Text7" 8. "Text8" 9. "Text9" 10. "Text10" [CTRL_MILL|GENERIC FANUC 5BX MILL] [misc integers] 2. "Absolute or Incremental [0=Abs, 1=Inc]" 3. "Reference return [0=G28, 1=G30]" 4. "Initial primary [-999=Low, 0=Def, 999=Hi]" 5. "Initial secondary [-999=Low, 0=Def, 999=Hi]" 6. "Add work shift [0=Orig, 1=WCS Orig]"//1 7. "Enable retract to/from limits [0=Off, 1=On]"//1 8. "Retract toolchange [0=Off, 1=Null, 2=Tlchg, 3=Both, NEG/4=Chain]"//1 9. "Nutating bias [0=off, 1=Pos, 2=Neg]"//2 10. "Secondary axis [0=off, 1=Pos, 2=Neg]" [misc reals] 1. "Retract/approach clearance distance"//2.//50. 2. "Right Angle head angle/activate [0=Off]" 6. "Safe Z retract [0=Off]" 10. "Nutating distance WCS to table/RA spindle" [simple drill] 1. "Drill/Counterbore" 7. "" 8. "" 9. "" 10. "" 11. "" [peck drill] 10. "" 11. "" [chip break] 11. "" [tap] 7. "" 8. "" 9. "" 10. "" 11. "" [bore1] 1. "Bore #1 (feed-out)" 7. "" 8. "" 9. "" 10. "" 11. "" [bore2] 1. "Bore #2 (stop spindle, rapid out)" 7. "" 8. "" 9. "" 10. "" 11. "" [misc1] 1. "Fine bore (shift)" 7. "" 8. "" 9. "" 10. "" [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. "Custom Drill Parameters 4" [bore1 custom parameters] 1. "Custom Drill Parameters 5" [bore2 custom parameters] 1. "Custom Drill Parameters 6" [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" [canned text] 1. "Ostop" 2. "Stop" 3. "Bld on" 4. "bLd off" 5. "Text5" 6. "Text6" 7. "Text7" 8. "Text8" 9. "Text9" 10. "Text10" [CTRL_MILL|GENERIC FANUC 5X MILL] [misc integers] 2. "Absolute or Incremental [0=Abs, 1=Inc]" 3. "Reference return [0=G28, 1=G30]" 4. "Initial primary [-999=Low, 0=Def, 999=Hi]" 5. "Initial secondary [-999=Low, 0=Def, 999=Hi]" 6. "Add work shift [0=Orig, 1=WCS Orig]"//1 7. "Enable retract to/from limits [0=Off, 1=On]"//1 8. "Retract toolchange [0=Off, 1=Null, 2=Tlchg, 3=Both, NEG/4=Chain]"//1 9. "Nutating bias [0=off, 1=Pos, 2=Neg]"//2 10. "Secondary axis [0=off, 1=Pos, 2=Neg]" [misc reals] 1. "Retract/approach clearance distance"//2.//50. 2. "Right Angle head angle/activate [0=Off]" 6. "Safe Z retract [0=Off]" 10. "Nutating distance WCS to table/RA spindle" [simple drill] 1. "Drill/Counterbore" 7. "" 8. "" 9. "" 10. "" 11. "" [peck drill] 10. "" 11. "" [chip break] 11. "" [tap] 7. "" 8. "" 9. "" 10. "" 11. "" [bore1] 1. "Bore #1 (feed-out)" 7. "" 8. "" 9. "" 10. "" 11. "" [bore2] 1. "Bore #2 (stop spindle, rapid out)" 7. "" 8. "" 9. "" 10. "" 11. "" [misc1] 1. "Fine bore (shift)" 7. "" 8. "" 9. "" 10. "" [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. "Custom Drill Parameters 4" [bore1 custom parameters] 1. "Custom Drill Parameters 5" [bore2 custom parameters] 1. "Custom Drill Parameters 6" [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" [canned text] 1. "Stop" 2. "Ostop" 3. "Bld on" 4. "bLd off" 5. "M5" 6. "M6" 7. "M7" 8. "M8" 9. "M9" 10. "M10" 11. "One" 12. "Two" 13. "Three" 14. "Four" 15. "Five" 16. "Six" 17. "Seven" 18. "Eight" 19. "Nine" 20. "Ten" 21. "Eleven" 22. "Twelve" 23. "Thirteen" 24. "Fourteen" 25. "Fifteen" 26. "Sixteen" 27. "Seventeen" 28. "Eighteen" 29. "Nineteen" [CTRL_TEXT_END]