training mill mm

Upload: renato-simoes

Post on 03-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Training Mill Mm

    1/48

  • 7/28/2019 Training Mill Mm

    2/48

    * Version 11.5* 20/09/06 RHA DEV00017909 Expand trace options* 26/10/06 RHA DEV00018471 HPCC improvements* 24/11/06 RHA DEV00017338 Move CPLNAME to a template variable* 08/01/07 RHA DEV00018930 Make ZSAFE value available as a token for hole cycles* Version 11.75* 30/04/07 RHA DEV00019883 Tokens etc for Euler angles in Index output* 14/05/07 RHA DEV00019985 Tokens for XINC etc., improve XABSORIGIN Description* 21/05/07 RHA DEV00020096 Implement Maintain Index Option at ToolChange* 24/05/07 RHA DEV00019981 Orthogonal plane cycle controls* Version 12.00* 10/08/07 RHA DEV00020285 Add new ISO Datum Shift Tokens* 25/09/07 RHA DEV00021119 Add setvars and tokens for pivot mode control* 27/09/07 RHA DEV00021119 Give pivot code its own format entry* Version 12.25* 18/10/07 RHA DEV00021382 Correct use of #TMP - #COMPTEMP* 04/12/07 RHA DEV00021534 Enable longhand tapping* Version 12.50* 17/01/08 RHA DEV00022021 Incremental option for Z Clear* 18/01/08 RHA DEV00021841, DEV00021908 New optional warnings* 22/01/08 RHA DEV00022142 Clearance options applied to all clearance tokens* 19/03/08 RHA DEV00022891 Allow concecutive coincident indexes to CPL* Version 2009.1* 14/04/08 RHA DEV00018979 Correct BNUM reset

    * 07/07/08 RHA DEV00023548 Implement NC Code Suppression* 06/08/08 RHA DEV00024310 Back bore and face in milling* 06/08/08 RHA DEV00023786 Add tool group and ID tokens* 11/08/08 RHA DEV00024364 Implement helical hole cycles* 21/08/08 RHA DEV00024504 Probing tokens for ISO machines* 28/08/08 RHA DEV00023797 Add tool token and remove chamfer angle restriction* 10/09/08 RHA DEV00024504 Probe token corrections* 24/09/08 RHA DEV00024855 Correct spindle direction in back bore longhand* 07/10/08 RHA DEV00025129 Longhand back bore cutting in M5 spindle stop mode* Version 2009.2* 24/10/08 RHA DEV00025000 Allow Rapid after tool change with null move* 05/11/08 RHA DEV00024851 Cycle DEf 204 for TNC* 05/11/08 RHA DEV00023525 Fix CYCL DEF numbers and descriptions as tokens

    * 07/11/08 RHA DEV00025098 Make tool angle available in setup & core tool change* 12/11/08 RHA DEV00024851 CYCLE DEF 204 fixes* 14/11/08 RHA DEV00024851 Counter bore depth token corrections* 21/11/08 RHA DEV00025098 Use new system variable for Included tool angle* 07/01/09 RHA DEV00025831 Add token for holdertype* 09/01/09 RHA DEV00024568 Make Tool Unit available in toolchange. Set variableon token* 06/03/09 RHA DEV00026198 Use Job data instead of ASK questions* Version 2010.1* 05/06/09 RHA WI32294 Create Siemens adaptive mill template* 05/06/09 RHA WI32294 Siemens datum set tokens* 16/06/09 RHA WI32294 Siemens Subroutine End tokens and Cycle return feed factor

    * 18/06/09 RHA WI31681 Siemens Thread Mill tokens* 19/06/09 RHA WI31681 Siemens Angle tokens for toolchange and index* 22/06/09 RHA WI31681 Tokens and variables for Siemens Hermle variant* 25/06/09 RHA WI34681 Correction to Home and ToolChange tokens* 07/07/09 RHA WI32294 Initial feedback from GST* 09/07/09 RHA WI34873 New Thread Mill - Add new code options* 15/07/09 RHA WI34873 Fix Thread Mill Cycle Level* 27/07/09 RHA WI31681 Tokens and logic for thread ID & OD settings* 05/08/09 RHA WI35305 Add Probing mode control tokens etc* 06/08/09 RHA WI35307 Add code con and option for manual toolchange

  • 7/28/2019 Training Mill Mm

    3/48

    * 19/08/09 RHA W35537 Add Lead and Starts tokens for thread mill* 20/08/09 RHA W35450 Add tokens for coordinate rotation to sub call* 09/09/09 RHA W35307 Manual toolchange and tokens for angled head* 15/09/09 RHA W35307 Set values for tool angle (angled head) tokens etc* 17/09/09 RHA W35307 System variables renamed HEADANGLE MOUNTANGLE* 23/09/09 RHA W35563 Thread mill bottom to top formatting & suppress points call* Version 2010.2* 13/11/09 RHA W36665 Correct action of planar rotate on rotary angles* 11/12/09 RHA W36903 Add "Ask Once" to the NC Stlyes > Interactive Startup options* 04/01/10 RHA W37181 Templates Mill TNC - add token for Q355 (threads per step)* 04/01/10 RHA W32567 Implement G28 Moves to Home etc. ISO Template* 15/01/10 RHA W37297 Add Single Shot option for Exact Stop* 25/01/10 RHA W37441 Hole locations for angled head - direction token* 26/01/10 RHA W37441 Make new hole depth variable modal* 13/04/10 RHA W38640 Hole parameters adjusted for TLO and Angled Head* Version 2011.1* 02/07/10 RHA W38284 Add Reset_Spindle token to toolchange* 13/07/10 RHA W39785 Implement tap type setting at toolchange* 24/08/10 RHA W39967 THISZMOVE Token for Siemens Rapid after TC* Version 2011.2* 25/10/10 RHA W32074 Restructure Datum Shift and Index handling, #XTSUB etc.* 28/10/10 RHA W32074 Fix #XSHIFT etc. remove redundant variables

    * 28/10/10 RHA W37422 Siemens datum shift tokens* 29/10/10 RHA W38135 Alternative incremental datum base for TNC* 15/12/10 RHA W38043 Feed mode code for TNC* 16/12/10 RHA W41997 Implement peck tapping* 11/01/11 RHA W42393 New Option - Control for negative radius when angle>180* 28/01/11 RHA W42399 Add tapping type code for Siemens* 24/02/11 RHA W42352 Separate clamping for secondary rotary axis* 28/02/11 RHA W43151 Tapping reverse with combined coolant codes* 29/03/11 RHA W31156 Correct undefined variable fault on 3 axis* Version 2012.1* 06/06/11 RHA W43692 Fix direction setting, backbore with spindle blocks* 06/07/11 RHA W44708 Add Thread Mill tokens* 21/06/11 RHA W42241 Selective threadmill canned cycles

    * 18/08/11 RHA W45704 TNC Allow use of Modify Cycle for tapping and thread mill* 21/12/11 RHA W47111 Force GCode after Dwell* Version 2012.2* 17/01/12 RHA W45710 Force Index token on first toolchange* 31/01/12 RHA W47500 Implement auxiliary Z axes* 14/03/12 RHA W49403 Implement Quill Retract function* 14/03/12 RHA W49476 Call QUILL_BLOCK only when needed* 15/03/12 RHA W49072 add QUILLZDEPTH token for drilling code constructors* 20/03/12 RHA W49476 Call AUXZ_BLOCK only when needed* 20/03/12 RHA W49072 More Quill tokens for drilling code constructors* 27/03/12 RHA W49627 Quills - add clamp / unclamp codes* Version 2013.1* 31/05/12 RHA W48878 Phantom warnings from Subroutines, #MASKKEEP

    * 30/08/12 RHA W43286 Support peck tapping via cycle point calls**************************************************************************************************************************************************************************************************************** SPLINE OUTPUT** For Polynomial Interpolation End points EX,EY,EZ Coeffs AX,BX etc***************************************************************************

  • 7/28/2019 Training Mill Mm

    4/48

    ** NC Output control for PCIs (ECS2700)* Block Numbering* G (preparatory) codes* Circular Interpolation* Spindle / Gears* General Coordinate Systems* Rapid Traverse* Hole Cycles* Toolchange / Tooling* Subroutines* Cutter Radius Compensation** Datum Shifting** #RECORD* Multi-plane / Rotary* M-FUNCTIONS*Thread Mill* Variables for Thread Mill canned cycle**Extra Variables for TNC************ Check useage and remove if not required*User variables for

    ** Constants for start of G function in DATA1 & M function in DATA2 statements***** ********************************** Tokens - Use in Code Constructor* ************************************ G-Codes

    * M Codes* General* Toolchange / Tooling* Angled Head* Rapid to Home or ToolChange* G28 format for ISO* Cutter Radius Compensation* Circular Interpolation* Hole Cycles* Added for Sinumerik840 & Fadal cycles* Datum Shift : Translate / Index* Origin shift for TNC*

    * Datum shift for ISO* Datum Tokens For Siemens* Tooling Sheet / Program Information* Subroutines* By block number* Position : Before, after, in-line with main NC Program* Datums* Rotary Axes / Milling* Token^TOOL-ANGLE-1^[#TOOLR1=!FT_PRIMARY2]^Tool Angle - First Axis* Token^TOOL-ANGLE-2^[#TOOLR2=!FT_SECONDARY2]^Tool Angle - Second Axis

  • 7/28/2019 Training Mill Mm

    5/48

    * 5 Axis IKJ* Pivot options* Spline Output* Fanuc specific* Heidenhain specific* Also in Siemens* Siemens Polynomial* Tokens for Polynomials - Trailng brackets* Tap cycle tokens for different addresses* Thread Mill Canned Cycle* Added for Siemens* For Heidenhain************************************************************ Job Record Tokens*********************************************************************************************************************** User tokens for************************************************************ Heidenhain TNC Only* modal lines in Drill Cycle Modify* Euler angles for Workplane* Tokens for back bore cycles* Tokens for Helical cycles* Tokens for tool group and ID

    * Tokens for Probing* One token for depth #BOREBOSSZDEPTH #WEBPOCKETZDEPTH #4THAXISZDEPTH************************************************************ Auxilliary axis*********************************************************************************************************************** M-Functions (Used to create default Code Constructor)************************************************************************************************************************************** Machine independant Code Generator include file** Filename: mill-iso-mach-mm.cgi* Author: RHA

    * Date: 11 November 2005** New file for adaptive milling templates derived from earlier multiplane template **************************************************************************** Change History* Version 10.5* FIRST ISSUE* 16/12/05 RHA DEV00015566 Spline output enabled* 20/02/06 RHA DEV00016344 New MM line switch for 5 axis IJK* 02/03/06 RHA DEV00016506 Change default Home and Tool Change locations* 07/03/06 RHA DEV00015555 High Speed mode tolerance* Version 11.0

    * 18/07/06 RHA DEV00017692 Tidy Code Generator options in hole macros* 28/07/06 RHA DEV00017797 New MM and MT line switches* 07/08/06 RHA DEV00012241 Add High speed and coolant controls to Tool Change** 08/08/06 RHA DEV00017341 Correct Tool Length Offset setting* 13/09/06 RHA DEV00018145 Correct High Speed Mode Q var macro setting* Version 12.00* 03/04/07 RHA DEV00020278 Allow Macro15 access to USERVAR2* Version 12.50* 06/02/08 RHA DEV00022190 Set default helical interpolation* 19/03/08 RHA DEV00022891 Allow concecutive coincident indexes to CPL

  • 7/28/2019 Training Mill Mm

    6/48

    * Version 2009* 06/08/08 RHA DEV00024310 Back Bore Cycles Q205* 13/08/08 RHA DEV00024364 Helical Hole Cycles Q205* Version 2009.2* 19/12/08 RHA DEV00025797 Comment new MT fields* Version 2010.1* 18/06/09 RHA WI34606 Set SPLINE_OUTPUT for Siemens. Add comment to MM detailsfor all adaptive mill* 25/09/09 RHA W36130 Set CRC factor to 1.1* Version 2010.2* 06/04/10 RHA W38513 Default output to machine coords for 3ax mills* Version 2011.1* 04/06/10 RHA W39410 Document MM line switches 42 43* Version 2011.2* 16/11/10 RHA W41684 Document MM line switches* Version 2012.1* 31/08/11 RHA W45992 Make Max Rapid and High Feed the same value*************************************************************************** Note that SPLINE_OUTPUT must also be set to the same value in this file.*********************************************** Setting up spindle defaults*********************************************** Code Generator Options* Tapping Modifiers

    * Longhand^No^Yes* CRC Register* Work Datum Override* Tap Cycle Type^Floating^Rigid* Tap CycleTap Cycle^Right Hand^Left Hand*Chord Enter chord length for arc splitting*Full Canned Cycle* High speed tolerance* High Speed Mode^Off^On* Coolant^Off^Flood^Mist* Tool Length Offset*********************************************************************************

    *********************** Gcodes 2030 35 40 45

    * Mcodes**************************************************************************** Machine independant Code Generator include file** Filename: mill-default-kt.cgi* Author: RHA* Date: 11 November 2005** New file for adaptive milling templates

    *************************************************************************** Change History* Version 10.5* FIRST ISSUE* 13/03/06 RHA DEV00016683 Alter horizontal machine width* Version 11.75* 23/04/07 RHA Change gantry default size* Version 2012.2* 06/02/12 RHA W47500 Implement auxiliary Z axes**************************************************************************

  • 7/28/2019 Training Mill Mm

    7/48

    * Base=Height, Width, Length, Thickness* Mount=Length,Width,Height would be used in case of trunnion table*lower mount would be used as the default mount*side mount is for machines with a vertical mount*saddle mount is for machines with a saddle* Table=Length, Width, Height, Lead, Angle, Radius* the line below is used for table in case of horizontal machines with B primary

    axis* Head=Type,Length, Width, Height,Lead, Angle,Protrusion Length,Protrusion Width,Protrusion Ht,SpindleLocation* Head=Type,Length, Width, Height,Protrusion Length,Protrusion Width,ProtrusionHt* KTTILTTABLE Length, Width, Height, Lead, Angle, Radius* cylinder KTROTUNIT Length, Radius* KTSADDLE Length, Radius,thickness,width,height* KT Chuck Type, Length,Diameter,Bore,JawLength,JawHeight,JawWidth,Protrusion,NoJaws,NoSteps*KT ATC - Length Width Depth Lead Angle Diameter Protrusion* Auxiliary Z axes**************************************************************************** Machine independant Code Generator include file** Filename: mill-iso.cgi

    * Author: RHA* Date: 11 November 2005** New file for adaptive milling templates derived from earlier multiplane template*************************************************************************** Change History* Version 10.5* FIRST ISSUE* 16/12/05 RHA DEV00015647 Add R in XY Only Option* 31/01/06 RHA DEV00012212 Align code constructor trace text* 06/02/06 RHA DEV00007742 Single helix option for Thread Mill* 10/02/06 RHA DEV00016236 Spindle control fixes

    * 14/02/06 RHA DEV00016311 Change index defaults* 15/02/06 RHA DEV00016297 Incremental datum shift* 20/02/06 RHA DEV00016344 Implement IJK vector for 5 axis cycle* 24/02/06 RHA DEV00016420 Dwell token in peck drill codecon* 27/02/06 RHA DEV00016236 Spindle control fixes* 28/02/06 RHA DEV00016369 Fix Convert rapid to feed* 01/03/06 RHA DEV00016487 Set modality of inex direction M code* 02/03/06 RHA DEV00016511 G54 default format to be 2.2* 07/03/06 RHA DEV00015555 High Speed mode tolerance, Reposition ZMOVE in Rapidcodecon* 07/03/06 RHA DEV00014230 Rotation axes range correction* 14/03/06 RHA DEV00016367 Spindle control - add spindir to rapid codecon* 15/03/06 RHA DEV00015533 Add format table entries for toolstore tokens

    * 15/03/06 RHA DEV00015655 Add GEARMCODE token to hole cycles* 21/03/06 RHA DEV00007321 Correct Datum setting - limits* Version 10.75* 12/04/06 RHA DEV00010822 Designate logical tokens by colour* 12/04/06 RHA DEV00016781 Document use of UARRAY1 in template* 12/04/06 RHA DEV00016809 Colour code tokens* 20/04/06 RHA DEV00016925 Add PLANEGCODE to Rapid After ToolChange* 22/05/06 RHA DEV00017232 Add FEEDMODEGCODE for Inverse Time Feeds* Version 11.0* 25/07/06 RHA DEV00016799 Remove force output in Rapid After ToolChange

  • 7/28/2019 Training Mill Mm

    8/48

    * 26/07/06 RHA DEV00017767 Correct g98g99 terminology - all amachines* 01/08/06 RHA DEV00017818 Hole cycle clearance and level options* 01/08/06 RHA DEV00017490 Make spindle start warning optional* 03/08/06 RHA DEV00017814 Add WORKGCODE token to Rapid Home & Rapid TC* 04/08/06 RHA DEV00017771 Number of turns token for ISO* 24/08/06 RHA DEV00017771 Suppress P0 in helix* Version 11.5* 20/09/06 RHA DEV00017909 Expand trace options* 26/10/06 RHA DEV00018471 HPCC improvements* 03/11/06 RHA DEV00018471 ToolChange HPCC call should only be via a token* 21/12/06 RHA DEV00018873 Call 5 axis off at end if still active* 04/01/07 RHA DEV00018873 5 Axis cancel, correct for 3 axis machines* 08/01/07 RHA DEV00018930 Make ZSAFE value available as a token for hole cycles* 07/02/07 RHA DEV00018471 Correct Highspeed output in CORE TC* 07/02/07 RHA DEV00018873 try again* Version 11.75* 30/04/07 RHA DEV00019883 Tokens etc for Euler angles in Index output* 14/05/07 RHA DEV00019985 Tokens for XINC etc.* 24/05/07 RHA DEV00019981 Orthogonal plane cycle controls* 29/05/07 RHA DEV00019981 Force longhand holes in mc coords* Version 12.00* 09/08/07 RHA DEV00020648 Implement pitch suppression in ISO mill* 10/08/07 RHA DEV00020285 Add new ISO Datum Shift Tokens* 25/09/07 RHA DEV00021119 Add setvars and tokens for pivot mode control

    * 27/09/07 RHA DEV00021119 Give pivot code its own format entry* Version 12.25* 03/12/07 RHA DEV00021534 Enable longhand tapping* Version 12.50* 17/01/08 RHA DEV00022021 Incremental option for Z Clear* 04/02/08 RHA DEV00016982 Make tool user tokens available in tool set up* 18/02/08 RHA DEV00022063 Fix single helix and tidy call structure* Version 2009.1* 14/04/08 RHA DEV00023113 Feed after ToolChange code constructor added* 08/05/08 RHA DEV00020490 Add new hole depth option. Incremental from Retract* 06/08/08 RHA DEV00024310 Back bore and face in milling* 06/08/08 RHA DEV00023786 Add tool group and ID tokens* 07/08/08 RHA DEV00023786 Format table entries for Tooling tokens

    * 11/08/08 RHA DEV00024364 Implement helical hole cycles* 20/08/08 RHA DEV00024474 Add Feed Type setting to toolchange* 26/08/08 GST DEV00022751 Thread mill depth in canned cycle, RHA-added set variables* 26/08/08 RHA DEV00021410 Thread mill token values* 28/08/08 RHA DEV00023797 Add tool token and remove chamfer angle restriction* 11/09/08 RHA DEV00024662 Fix ASIN error in thread mill canned cycle* 11/09/08 RHA DEV00024504 Probing format table* 16/09/08 RHA DEV00024824 Format helical tokens with decimal part* 16/09/08 RHA DEV00024845 Remove duplicate token from back bore* 24/09/08 RHA DEV00024504 Format table changes requested* 24/09/08 RHA DEV00024855 Correct spindle direction in back bore longhand* 01/10/08 RHA DEV00024310 Add format Table entries for back bore

    * Version 2009.2* 24/10/08 RHA DEV00025000 Allow Rapid after tool change with null move* 07/11/08 RHA DEV00025098 Make tool angle available in setup & core tool change* 14/11/08 RHA DEV00024851 Counter bore depth token corrections* 07/01/09 RHA DEV00025831 Add token for holdertype* 09/01/09 RHA DEV00024568 Make Tool Unit available in toolchange. Set variableon token* 06/03/09 RHA DEV00026198 Use Job data instead of ASK questions* 17/03/09 RHA DEV00026452 Changes for 3D Z with TLO application* Version 2010.1

  • 7/28/2019 Training Mill Mm

    9/48

    * 25/06/09 RHA WI34681 Correction to Home and ToolChange tokens* 08/07/09 RHA WI34873 New Thread Mill - Restructure existing canned cycle* 09/07/09 RHA WI34873 New Thread Mill - Add new code options* 15/07/09 RHA WI34964 5 Axis IJK vectors should have format default 1.6* 20/07/09 RHA WI34873 Fix Internal/External codes* 22/07/09 RHA WI34873 Add Thread Mill token format refs* 23/07/09 RHA WI34873 Clarify option for Threaded Depth Sign* 23/07/09 RHA WI35139 Remove duplicate variable declarations* 29/07/09 RHA WI34873 Add signed absolute option for depth* 05/08/09 RHA WI35305 Add Probing mode control tokens etc* 05/08/09 RHA WI34754 Make call to Feed Type code constructor optional in toolchange* 06/08/09 RHA WI35307 Add code con and option for manual toolchange, tidy safeblock* 07/08/09 RHA WI34873 Fix Format entry for T-MILL-MODE* 19/08/09 RHA W35537 Add Lead and Starts tokens for thread mill* 20/08/09 RHA W35450 Add tokens for coordinate rotation to sub call* 25/08/09 RHA W35537 Add TEXT for Starts in old cycle* 09/09/09 RHA W35307 Manual toolchange and tokens for angled head* 15/09/09 RHA W35307 Set values for tool angle (angled head) tokens etc* 17/09/09 RHA W35307 System variables renamed HEADANGLE MOUNTANGLE* 17/09/09 RHA W35307 Improve token availability* Version 2010.1 SP1* 13/10/09 RHA W36119 Remove [RELIEFDIR] [RELIEFDIST] from back face cycle

    * 13/10/09 RHA W36121 [RELIEFDIR] token has no value* 13/10/09 RHA W33257 Make Through Coolant token more widely available* 13/10/09 RHA W36415 Allow TNC TOOLCALL when #MOVE=0 PT_INDEX_HANDLER* 14/10/09 RHA W33489 Default coords, feeds, speeds etc to 5 digits before decimal* 15/10/09 RHA W33119 Correct ZLEVEL modality setting* Version 2010.2* 13/11/09 RHA W36665 Correct action of planar rotate on rotary angles* 20/11/09 RHA W36755 Make #MOVE diagnostic available in 3 axis CGDs* 11/12/09 RHA W36903 Add "Ask Once" to the NC Stlyes > Interactive Startup options* 17/12/09 RHA W37043 Shorten PITCH and LEAD note for Thread mill* 04/01/10 RHA W32567 Implement G28 Moves to Home etc. ISO Template

    * 15/01/10 RHA W37297 Add Single Shot option for Exact Stop* 26/01/10 RHA W37441 Make new hole depth variable modal* 26/01/10 RHA W37512 set chipbreak cycle depth to output now* 26/01/10 RHA W37512 set chipbreak cycle depth to output now - all mc configurations* 12/03/10 RHA W38140 Add ZMOVE to hole cycle and cycle points default output* 31/03/10 RHA W38513 Activate canned cycle switches for orthogonal planes* Version 2011.1* 02/07/10 RHA W38284 Add Reset_Spindle token to toolchange* 15/07/10 RHA W39785 Implement tap type setting at toolchange* 16/08/10 RHA W39553 Control allowable chamfer for helical hole cycle* 24/08/10 RHA W33388 Add more tokens to Program Stop* 16/09/10 RHA W31859 Improve use of hole clearance on approach

    * 21/09/10 RHA W40898 Refresh CPL variable when datum selecting* 27/09/10 RHA W40898 Allow for no index condition* 29/09/10 RHA W40981 Correct incremental datum setting (W40898 error)* Version 2011.2* 26/10/10 RHA W41396 Use MAXFEED for Rapid conversion* 28/10/10 RHA W32074 Fix #XSHIFT etc.* 29/10/10 RHA W38135 Alternative incremental datum base* 03/12/10 RHA W41396 Clarify NCStyle description text* 10/12/10 RHA W38043 Mill TNC and others - support feed type* 16/12/10 RHA W41997 Implement peck tapping

  • 7/28/2019 Training Mill Mm

    10/48

    * 20/12/10 RHA W31156 Rotary Sin=direction and angle option (+-360)* 22/12/10 RHA W41738 New option - Always use IJK with 360deg arcs* 11/01/11 RHA W42393 New Option - Control for negative radius when angle>180* 19/11/11 RHA W38043 Corrections & add thread mill cycle option* 14/02/11 RHA W42352 Separate clamping for secondary rotary axis* 22/02/11 RHA W42941 Re-organise Notes section & add macro number details* 23/02/11 RHA W42848 Make #USERAD options more descriptive* 28/02/11 RHA W42352 Separate clamping for secondary rotary axis* 28/03/11 RHA W31156 Initialise rotary direction for #ROTTYPE=4* Version 2012.1* 06/07/11 RHA W44708 Add Thread Mill tokens* 22/06/11 RHA W42241 Selective threadmill canned cycles* 28/07/11 RHA W43985 Implement feedrate multiplier* 03/08/11 RHA W42241 Move taper thread check onto Thread Mill tab* 10/08/11 RHA W42871 Make use of NEXTSPEED optional* 19/12/11 RHA W47452 Change #ROTTYPE=4 initialisation* 21/12/11 RHA W47111 Force GCode after Dwell* Version 2012.2* 19/01/12 RHA W45710 Force Index token on first toolchange* 31/01/12 RHA W47500 Implement auxiliary Z axes* 15/02/12 RHA W47500 Various minor fixes* 22/02/12 RHA W48595 Make PLANEGCODE more robust* 14/03/12 RHA W49403 Implement Quill Retract function* 15/03/12 RHA W49473 Option for W (quill) move to be tool tip

    * 15/03/12 RHA W49072 Add quill tokens [QUILL_BLOCK] [QUILLMOVE] to drilling code constructors.* 20/03/12 RHA W49473 Option for W (quill) move to be tool tip QUILL* 20/03/12 RHA W49072 More Quill tokens for drilling code constructors.* 27/03/12 RHA W49627 Quills - add clamp / unclamp codes* 03/04/12 RHA W49857 Add modality options for Quill Hole Cycles* 18/03/12 RHA W49403 Implement Quill Retract function* Version 2013.1* 31/05/12 RHA W48878 Phantom warnings from Subroutines* 30/08/12 RHA W43286 Support peck tapping via cycle point calls* 11/09/12 RHA W43286 Remove #USER1* 13/09/12 RHA W43286 Fix for multi-depth etc* 03/10/12 RHA W31018 Correct CPL tool tip option for Rapid to Tool Change

    * 16/10/12 RHA W43286 Fix peck tapping via cycle point calls* 29/10/12 RHA W53736 Fix peck tapping for negative cut increment***************************************************************************** ************************************************************** * Template Dependant Language extensions for Code Wizard ** *************************************************************************************************************** Tab Name : General G-Codes

    *************************************************************************************************** Tab Name : Hole Cycle G-Codes*************************************************************************************************** Tab Name : Datum G-Codes************************************************** Setvar^DATA1(25)^54^Datum G-Codes^REAL^Work Coord System 1* Setvar^DATA1(26)^55^Datum G-Codes^REAL^Work Coord System 2* Setvar^DATA1(27)^56^Datum G-Codes^REAL^Work Coord System 3

  • 7/28/2019 Training Mill Mm

    11/48

    * Setvar^DATA1(28)^57^Datum G-Codes^REAL^Work Coord System 4* Setvar^DATA1(29)^58^Datum G-Codes^REAL^Work Coord System 5* Setvar^DATA1(30)^59^Datum G-Codes^REAL^Work Coord System 6********************************************* Tab Name : M-Codes********************************************************************************************** Tab Name : More Hole Cycle G-Codes*************************************************************************************************** Tab Name : Coolant Control*************************************************************************************************** Tab Name : New Datum Setting*************************************************************************************************** Tab Name : NC File General ******************************************************************************************************************* Tab Name : Setup Sheet****************************************************************************************************************** Tab Name : Block Numbers*************************************************

    ************************************************** Tab Name : Feed Moves*************************************************************************************************** Tab Name : Rapid Traverse*************************************************************************************************** Tab Name : Circular Interpolation*************************************************************************************************** Tab Name : Cutter Compensation**************************************************************************************************

    * Tab Name : Hole Cycles*************************************************************************************************** Tab Name : Thread Mill Cycle*************************************************************************************************** Tab Name : Subroutines*************************************************************************************************** Tab Name : Tool Change************************************************************************************************************* Workplane definition

    *********************************************************************************************************************** Tab Name : 4-5 Axis Machining****************************************************************************************************************************************************** Modal Variables***************************************************************** Tab Name : Debug****************************************************************

  • 7/28/2019 Training Mill Mm

    12/48

    ****************************************************************** ****************************************** * Tab Name : Program Start ** ******************************************* Note ! Cannot be a procedure because %SUBROUTINE must be defined in theSTART or END macros** Rotary Axes set to zero for start of program*$DEBUG=Y****************************************************************************************************************** Note ! Cannot be a procedure because %SUBROUTINE must be defined in theSTART or END macros* ************************************************** Code constructors* ************************************************** ************************************************** * Tab Name : Set-Up / Tooling Sheet ** ****************************************************

    * Setup sheet header if requested (not in loop)** Remove duplicate tools from Tool Sheet** Setup sheet trailer if requested (not in loop)*** ************************************************** * Tab Name : Set Tooling Data** ***************************************************

    * ****************************************** * Tab Name : Rapid Move ** ******************************************* Output speed block ?** ********************************************** * Tab Name : Linear Interpolation ** *********************************************** Output speed block ?** *************************************************

    * * Tab Name : Circular Interpolation ** *************************************************** 2D only, blank unwanted values* Output speed block ?* Enables control of multi-helix block for TNC* Call to get number of turns* Output speed block ?* Suppress number of turns if 0*

  • 7/28/2019 Training Mill Mm

    13/48

    * ****************************************** * Tab Name : Dwell ** ******************************************** ****************************************** * Tab Name : Cutter Compensation ** ********************************************* ************************************************** * Tab Name : Cancel Cutter Compensation ** **************************************************** ************************************************** * Tab Name : Drill Cycle** **************************************************** Output speed block ?*

    * ************************************************** * Tab Name : Counterbore Cycle** **************************************************** Output speed block ?** ************************************************** * Tab Name : Peck Drill Cycle** **************************************************

    ** Output speed block ?** ************************************************** * Tab Name : Tapping Cycle** *********************************************************************************** Code for point based peck tapping* Repeated calls for Peck Tapping*******************************

    * Rigid or floating* Output speed block ?* Output speed block ?** ************************************************** * Tab Name : Ream / Bore Cycle** ***************************************************

  • 7/28/2019 Training Mill Mm

    14/48

    * Output speed block ?** ************************************************** * Tab Name : Bore Cycle** **************************************************** Output speed block ?** ************************************************** * Tab Name : Chipbreak Cycle** **************************************************** Output speed block ?*** ********************************************** * Tab Name : Back Bore Cycle ** ***********************************************

    * Set Relief token values* Output speed block ?* *********************************** * Tab Name : Back Bore Longhand ** ************************************* ********************************************** * Tab Name : Back Face Cycle ** ************************************************ Output speed block ?

    * ************************************ * Tab Name : Back Face Longhand ** *************************************** ************************************************** * Tab Name : Helical Cycle ** ***************************************************** *************************************************

    * * Tab Name : Thread Mill Cycles ** **************************************************** Set Minor Diameter value* Output speed block ?** ************************************************** * Tab Name : Hole Cycle Points*

  • 7/28/2019 Training Mill Mm

    15/48

    * **************************************************** Output speed block ?********************* Repeated calls for Peck Tapping************************ ************************************************** * Tab Name : Cancel Canned Cycle** ***************************************************** ****************************************** * Tab Name : First Toolchange ** ******************************************* Output speed block ?

    ** ****************************************** * Tab Name : General Toolchange ** ******************************************* Output speed block ?** ****************************************** * Tab Name : Last Toolchange ** ******************************************* Output speed block ?*

    * ****************************************** * Tab Name : Core Toolchange ** ******************************************** ****************************************** * Tab Name : Manual Toolchange ** ******************************************* Move to Manual TC Position* Move to ATC Position, Z First* Sequence - All Stop* Sequence - Unload ATC

    * Sequence - Move to Manual TC Position* Sequence - Unload Manual* Sequence - Move to ATC Position* Sequence - Load Manual* Sequence - Re-Start** ****************************************** * Tab Name : Spindle ** ******************************************

  • 7/28/2019 Training Mill Mm

    16/48

  • 7/28/2019 Training Mill Mm

    17/48

    ** Output speed block ?** ********************************************** * Tab Name : Feed After Toolchange ** *********************************************** Output speed block ?* Output speed block ?** ********************************************** * Tab Name : Rapid After Toolchange ** *********************************************** Output speed block ?* Output speed block ?** ****************************************** * Tab Name : Rapid To Home ** ******************************************* Output speed block ?**

    * ************************************************** * Tab Name : Set Work Datums** ***************************************************** ************************************************** * Tab Name : Select Work Datums** ***************************************************

    * Datum Shift- no rotary motion* Called from Datum Shift and Index Pallet commands for Absolute Datum setting* Index Pallet with Rotary output via Index Pallet Code Constructor.*** Datum Shift- no rotary motion* Called from Datum Shift and Index Pallet commands for Incremental Datum setting* Index Pallet with Rotary output via Index Pallet Code Constructor.*** ************************************************** * Tab Name : Subroutine Start

    ** *************************************************** Output mode change for subroutines if different** ************************************************** * Tab Name : Coordinate Rotate** **************************************************

  • 7/28/2019 Training Mill Mm

    18/48

    ** ************************************************** * Tab Name : Subroutine Call** **************************************************** ************************************************** * Tab Name : Subroutine End** *************************************************** Output mode change for subroutines if different* ************************************************** * Tab Name : Translate** ***************************************************** ************************************************** * Tab Name : Spline Parameter** *************************************************

    ** Following code constructors for MPL support only* Dummy procedures*** Format table* Note token numbers 0-14 should not be changed* 10 is null output for initialisation of variables.* FT_SECONDARYROT2, A,3,2,640,4,2,640, 50 Head - Secondary Setting*************************************************************************** Machine independant Code Generator include file** Filename: mill-Iso-Probing.cgi* Author: Sam Haslar / RHA* Date: 22 August 20085

    ** New file for adaptive milling templates derived from earlier multiplane template **************************************************************************** Change History* Version 2009.1* FIRST ISSUE* Change output procedures to code constructors* Change macro numbers to 301 series after discussion with SJO* Remove command details* 26/08/08 RHA Update logic to latest received mac file* 11/09/08 RHA Update logic to latest received mac file* 16/09/08 RHA Trailing comma - macro 304 definition

    * 18/09/08 RHA Incorporate latest logic changes from Sam Hasler* 24/09/08 RHA DEV00024504 Code constructor formatting changes* 01/10/08 RHA DEV00025060 Force distance positive on 4th axis probe cycles* Version 2009.1 SP* 01/10/08 RHA DEV00025318 Correct datum setting for probe cycles* Version 2010.1* 05/08/09 RHA WI33007 Fix S word for datum Over-ride* 05/08/09 RHA WI35305 Add Probing mode control tokens etc* Version 2010.2* 04/12/09 RHA W34615 Add Probing first Z for G43 code constructor

  • 7/28/2019 Training Mill Mm

    19/48

    * 19/01/10 RHA W37370 Remove PROBEANG tokens from the 4th axis code constructors* Version 2011.2* 28/01/11 RHA W42563 Correct corner probe approach************************************************************************************** prototype probing macros*************************************************************************************** This file implements the following cycles:** Feed:* 1 Move probe* Bore/Boss:* 2 Bore 3 Point* 3 Boss 3 Point* 4 Bore 4 Point* 5 Boss 4 Point* Surface:* 6 Probe Surface* 7 Angled Single surface* Web/Pocket* 8 Probe Web/Pocket* 9 Angled Web / Pocket

    * Internal/External Corner:* 10 Internal Corners* 11 External Corners* 4th Axis:* 12 4th Axis X* 13 4th Axis Y** Modifier 250 mapped to system variable 62 (PATHTRACE) will be set to one

    of the above cycle numbers*************************************************************************************** Notes

    *************************************************************************************** Find and count (possible) format table references* grep -E "=[0-9]+\]" ..\ext\VAB-probe.mxt |sed 's/ .*=\([0-9]\+\)\].*$/\1/g' | C:\cygwin\bin\sort -n | uniq -c** machdef\error.mpp** Probing entries in Format Table start at Line 3455 of VAB-probe.mxt************************************************************************************** Internal Variables - NOT exposed to Code Wizard users

    ************************************************************************************** All Cycles (except cycle 1)* Cycles 2, 3, 4 & 5* Cycle 6* Cycle 8************************************************************************************** Tokens for Code Wizard:********************************************************************************

  • 7/28/2019 Training Mill Mm

    20/48

    ****** %DECLARE=#BOREBOSSZDEPTH* %DECLARE=#WEBPOCKETZDEPTH* Cycles the Token is output for.

    Below are the Renishaw Inspection Plus definitions of these inputs.* #FEEDX 1 X = The target positions for the probe positioning move.* #FEEDY 1 Y = Thetarget positions for the probe positioning move.* #FEEDZ 1 Z = Thetarget positions for the probe positioning move.* #TRX 6 | | | X = The surfaceposition or size.* 8 | | X = Nominal size of feature when measured in the X-axis.* 10 11 X = c.* #TRY 6 | | | Y = The surfaceposition or size.* 8 | | Y = Nominal size of feature when measured in the Y-axis.* 10 11 Y = Nominal corner position Y-axis.* #TRY 6 Z = The surfaceposition or size.

    * #FEEDRATE 1 * * * * * * * * * * * * F = The modal feedrate for all protected positioning moves. The feedrate will be modal to this macro and subsequent feedrate calls are unnecessary unless a change of feedrate is required. The maximum safe fast feedrate established during installation should not be exceeded.*(Note: Cycle 1 is called before and after all the other cycles to perform linking moves)** Feedrate passed to all cycles for TNC support* #AngleA 2 3 A = Thefirst angle for vector measurement, measured from the X+ axis direction.* #ANGLE 7 | A = Direction of

    probe measurement measured from the X+ axis direction.* 9A = Angle of the surface to be measured from the X+ axis direction.* #AngleB 2 3 B = Thesecond angle for vector measurement, measured from the X+ axis direction.* #AngleC 2 3 C = Thethird angle for vector measurement, measured from the X+ axis direction.* #DIAMETER 2 3 4 5 D = Nominal size

    of the feature.* #DISTANCE 7 | D = Nominal distance to the surface (radial).* 9 D = Nominal size of the feature.

    * #?????X 12 X = The X-axis distance between Z1 and Z2 measurement positions.* #?????Y 13 Y = The Y axis distance between Z1 and Z2 measurement positions.* #BOREBOSSZDEPTH 2 3 4 5 Z = The absolute Z-axisposition when measuring a boss feature. If this is omitted a bore cycle is assumed.* #WEBPOCKETZDEPTH 8 9 Z = The absolute Z axisposition when measuring a web feature. If this is omitted a pocket cycle is assumed.

  • 7/28/2019 Training Mill Mm

    21/48

    * #4THAXISZDEPTH 12 13 Z = The Z-axis expectedsurface position.* #RADCLEAR 2 3 4 5 8 9 R = This is an incremental dimension that is used in external features, e.g. bosses and webs, to give a radial clearance from the nominal target surface prior to a Z-axis move. Default = 5 mm(0.200 in).* 2 3 4 5 | | -R= This is similar to Rr, except that the clearance is applied in the opposite direction to force an internal boss cycle. Default = 5 mm (0.200 in).* 8 9 -R= This

    is similar to Rr, except that the clearance is applied in the opposite direction to force an internal web cycle. Default = 5 mm (0.200 in).* #SecondX 10 11 I = Incrementaldistance to the second probe position along the X-axis (positive value is assumed). Default = no move.* #SecondY 10 11 J = Incrementaldistance to the second probe position along the Y-axis (positive value is assumed). Default = no move.* #DATUM 2 3 4 5 6 7 8 9 10 11 12 13 S = The work offset number which will be set.*The work offset number will be updated.*S1 to S6 (G54 to G59)

    *S0 (external work offset).*S101 to S148 (G54.1 P1 to G54.1 P48) additional offsets option.*New work offset = active work offset + error.*New external offset = external offset + error.* #OVERTRAVEL 2 3 4 5 6 7 8 9 10 11 | | Q = The probe overtravel

    distance for use when the default values are unsuitable. The probe will then travel beyond the expected position when it searches for a surface. Default = 4 mm

    (0.16 in) in the Z-axis, and 10 mm (0.394 in) in the X and Y axes.* 12 13 Q = The probe overtravel

    distance for use when the default values are unsuitable. The probe then travelsbeyond the expected position when it searches for a surface. Default = 10 mm (0.4 in).* #TOLERANCE 2 3 4 5 6 7 8 9 H = Tolerance value of a

    feature dimension being measured.*Example: For dimension 50.0 mm +0.4 mm 0 mm, the nominal*tolerance is 50.2 mm with H.2.*(For dimension 1.968 in +0.016 in 0 in, the nominal tolerance is 1.976 in*with H.008.)

    *(Guy Brown's Description: Size Tolerance Alarm if incorrect size)* #POSITIONTOLERANCE 2 3 4 5 6 7 8 9 10 11 M = True position tolerance of a feature. A cylindrical zone about the theoretical position.* #UPPERTOLERANCE 2 3 4 5 6 7 8 9 10 11 U = Upper tolerance limit. If this value is exceeded there is no work offset updated and the cycle is stopped with an alarm. This tolerance is applied to both size and position where applicable. Example: U2. to set the upper tolerance limit to 2 mm.* #ANGULARTOLERANCE 10 11 | | B = Angle tolerance. This applies to both X and Y surfaces. It is equal to half the total tolerance, e.g

  • 7/28/2019 Training Mill Mm

    22/48

  • 7/28/2019 Training Mill Mm

    23/48

    *%CALL=VAR-DUMP************************************************************************************** Dialog: Probe Internal/External Corner************************************************************************************** Internal*External************************************************************************************** Dialog: Probe 4th Axis*************************************************************************************************************************************************************************** Support procedures - mode control************************************************************************************** Called only from token PROBE_MODE (Tool Change)* Called from token PROBE_ON & PT_PROBE_MODE* Called from token PROBE_OFF & PT_PROBE_MODE************************************************************************************** prototype probing code constructors

    *************************************************************************************************************************************************************************** CYCLE 1: Probe Feed************************************************************************************** Trap first Z move after toolchange for G43*************************************************************************************** CYCLE 2: |_| - Three Point Bore********************************************************************************

    ******************************************************************************************* CYCLE 3: || - Three Point Boss*************************************************************************************************************************************************************************************************************** CYCLE 4: |_| - Four Point Bore*********************************************************************************************************************************************************************

    ****** CYCLE 5: || - Four Point Boss*************************************************************************************************************************************************************************** CYCLE 6: Single Surface*********************************************************************************************************************************************************************

  • 7/28/2019 Training Mill Mm

    24/48

    ****** CYCLE 7: Angled Single Surface*************************************************************************************************************************************************************************** CYCLE 8: Web/Pocket*************************************************************************************************************************************************************************** CYCLE 9: Angled Web/Pocket*************************************************************************************************************************************************************************** CYCLE 10: Internal Corner*************************************************************************************************************************************************************************** CYCLE 11: External Corner*************************************************************************************

    ************************************************************************************** CYCLE 12: 4th Axis X*************************************************************************************************************************************************************************** CYCLE 13: 4th Axis Y**************************************************************************************************************************************************************** Machine independant Code Generator include file*

    * Filename: Whiteboard.cgi* Author: RHA* Date: 09 December 2005** New file for all adaptive template*************************************************************************** Change History* Version 10.5* FIRST ISSUE* 14/02/05 RHA DEV00016309 Fix long lines for codecon.txt* Version 12.5* 19/02/08 RHA DEV00022469 Add note prohibiting duplicate macros and procedures* Version 2009.2

    * 26/01/09 RHA DEV00025914 Add attribute_extension to macros and whiteboard* 27/01/09 RHA DEV00025914 Put new procedure in new code constructor - allows CGD compilation* 17/02/09 RHA DEV00025914 Prevent user deletion of new procedure*************************************************************************** ****************************************** * Tab Name : Hackers Corner ** ******************************************* Procedure for additional attribute function in connection with PDI customisati

  • 7/28/2019 Training Mill Mm

    25/48

    on* Terminate the procedure defining the code_constructor* Dummy procedure for customised function* Example declaration* Dummy procedure for customised function* %ENDM for the last procedure is contained within the code_constructor*************************************************************************** Machine independant Code Generator include file** Filename: mill-iso-macros.cgi* Author: RHA* Date: 11 November 2005** New file for adaptive milling templates derived from earlier multiplane template **************************************************************************** Change History* Version 10.5* FIRST ISSUE* 06/02/06 RHA DEV00007742 Single helix option for Thread Mill* 28/02/06 RHA DEV00016465 Remove macro 101 - old spindle control* 03/03/06 RHA DEV00016525 Correct longhand drill output* 07/03/06 RHA DEV00015555 High Speed mode tolerance* 08/03/06 RHA DEV00016567 Use system var for work datum name override

    * Version 11.0* 18/07/06 RHA DEV00017692 Tidy Code Generator options in hole macros* 01/08/06 RHA DEV00017489 #Macro not set for hole cycles* 07/08/06 RHA DEV00012241 Add High speed and coolant controls to Tool Change** 08/08/06 RHA DEV00017341 Correct Tool Length Offset setting* Version 11.5* 18/07/06 RHA DEV00012692 Correct drill sub output for 1 location* 26/10/06 RHA DEV00018471 HPCC improvements* 13/12/06 RHA DEV00018738 Correction for profile start* Version 11.75* 03/04/07 RHA DEV00017611 Implement 21 flag in rotary rotate* 18/05/07 RHA DEV00017611 Change withdrawn, pending other fixes* Version 12.00

    * 03/04/07 RHA DEV00020278 Allow Macro15 access to USERVAR2* Version 12.25* 03/12/07 RHA DEV00021534 Enable longhand tapping* Version 12.50* 04/02/08 RHA DEV00006310 Allow canned cycles in Rotary Rotate* Version 2009.1* 07/07/08 RHA DEV00023548 Implement NC Code Suppression* 06/08/08 RHA DEV00024310 Back bore and face in milling* 11/08/08 RHA DEV00024364 Implement helical hole cycles* 26/08/08 GST DEV00022751 Thread mill depth in canned cycle* 16/09/08 RHA DEV00024818 Back Bore and Helical parameters - level retract etc.* Version 2009.2* 07/11/08 RHA DEV00025098 Make tool angle available in setup & core tool change

    * 26/01/09 RHA DEV00025914 Add attribute_extension to macros and whiteboard* 02/04/09 RHA DEV00023944 Fix unwanted angles from rotary rotate (head/table)* 14/07/09 RHA WI34873 New Thread Mill - Add new macro and processing* 17/07/09 RHA WI34873 New Thread Mill - Use Hole cycle point processing* 18/04/09 RHA W34873 Initialise CRC controls in Macro 675* Version 2010.1 SP1* 13/10/09 RHA W32420 Correct setting of stationary angle in rotary rotate* 08/12/09 RHA W35163 Add FEED modifier to macro 672* 15/01/10 RHA W37297 Add Single Shot option for Exact Stop* 29/01/10 RHA W37371 Warn for subroutines if converted to longhand (Thread mill

  • 7/28/2019 Training Mill Mm

    26/48

    )* 31/03/10 RHA W38513 Activate canned cycle switches for orthogonal planes* 11/05/10 RHA W39137 Set #HOLEOFFSET in a procedure and call from Move Angular* 29/09/10 RHA W40981 Correct incremental datum setting (W40898 error)* Version 2011.2* 26/10/10 RHA W32074 Datum Shift, modify GETCPL call in macro 48* 29/11/10 RHA W33515 Fix incremental angles for rotary rotate* 15/12/10 RHA W38043 Set FEEDTYPE system var in Macro 21* 16/12/10 RHA W41997 Implement peck tapping* 05/04/11 RHA W43835 Force G Code output after Peck call (Macro=35)* Version 2012.1* 17/05/11 RHA W43644 Correct dwell code output, back bore etc (Macro=71)* 21/06/11 RHA Selective threadmill canned cycles* Version 2012.2* 25/10/11 RHA W45241 Macro trace fixes* 06/02/12 RHA W47500 Implement auxiliary Z axes* 22/02/12 RHA W48595 Make PLANEGCODE more robust* 19/03/12 RHA W49403 Implement Quill Retract function**************************************************************************** Force #TOOLCHANGE=#FALSE to prevent SPEEDS lookahead* Suppress CRC calls until Subfunct is set* * %IF STYPE=1 %THEN* #ROTVALS controls use of ROT1/ROT2 values for rotary positioning* #ROTVALS=#FALSE* Only applies to Subprogram style NOT inline block number reference.*Set HOLD values* SF201 Reverse spindle in longhand tapping************************************************************** Miscellaneous "User Defined" Macros : Reserved ** ============================================== ***

    ************************************************************** 101 Spindle Stop/ CLW/ CCLW/ CLW+Coolant/ CCLW+Coolant* 102 Reserved (Used by software?)* 103 Stop Type Program/ Optional* 104 Coolant Flood/ Mist/ Off* 105 Block Skip Off/ On* 106 Exact Stop/Smooth Off/On* 107 Reserved (Used by software?)* 108 Comment Text string input* 109 Insert NC Code NC code literal input* 110 High Speed M/C Off/On* 111 Reserved

    * 112 Reserved* 113 Reserved* 114 Reserved* 115 Reserved* 116 Length Offset Tool Length Offset* 117 Reserved* 118 Reserved* 119 Reserved* 120 Reserved* 121 Reserved

  • 7/28/2019 Training Mill Mm

    27/48

    * 122 Reserved* 123 Reserved* 124 NC Code Output Suspension On/Off* This macro allows the user to suspend NC code via a misc function* Note that it relies on MASK being reset by Code Generator for each macro call* In each macro - %IF #NCSUPPRESS=1 %THEN MASK=1* Suspend NC Code Output*************************************************************************** Machine independant Code Generator include file** Filename: mill-procedures-basic.cgi* Author: RHA* Date: 11 November 2005** New file for adaptive milling templates derived from earlier multiplane template*************************************************************************** Change History* Version 10.5* FIRST ISSUE* 16/12/05 RHA DEV00014907 TLO setting* 16/12/05 RHA DEV00015647 Add R in XY Only Option* 02/02/06 RHA DEV00012705 Set radius for thread milling* 06/02/06 RHA DEV00007742 Single helix option for Thread Mill

    * 06/02/06 RHA DEV00015578 Thread mill - G40 if G01 followed by G00* 10/02/06 RHA DEV00016236 Spindle control fixes* 10/02/06 RHA DEV00016273 Fix G2/3 swap for G18/19* 10/02/06 RHA DEV00016282 Thread mill move correction* 15/02/06 RHA DEV00016297 Incremental datum shift* 20/02/06 RHA DEV00016344 Implement IJK vector for 5 axis cycle* 27/02/06 RHA DEV00016236 Spindle control fixes* 27/02/06 RHA DEV00016320 Rapid after toolchange with thread mill canned cycle* 27/02/06 RHA DEV00016464 Force spindle code out if stop* 28/02/06 RHA DEV00016465 Correct 2D arc output in thread mill* 28/02/06 RHA DEV00016369 Fix Convert rapid to feed* 01/03/06 RHA DEV00016464 Add warning for feed moves at Spindle Stop* 03/03/06 RHA DEV00016525 Correct longhand drill output

    * 08/03/06 RHA DEV00016567 Use system var for work datum name override* 14/03/06 RHA DEV00016367 Correct spindle control* 14/03/06 RHA DEV00016464 Correction* 16/03/06 RHA DEV00016662 Suppress unwanted CRC warning* 21/03/06 RHA DEV00007321 Correct Datum setting - limits* 21/03/06 RHA DEV00012705 Correct radius in helix output for thread mill* 22/03/06 RHA DEV00016714 Remove diagnostic output line for #DATUMMAX* 24/03/06 RHA DEV00016742 Correct index codecon calls for 4 axis, #AXISTYPE2=#AXISTYPE1* 28/03/06 RHA DEV00016749 Correct subroutines processing for hole cycles* Version 10.75* 16/05/06 RHA DEV00017213 Correct index handling for no rotation cases* 18/05/06 RHA DEV00017213 Fine tune

    * 23/05/06 RHA DEV00017233 Correction for always use radius* 24/05/06 RHA DEV00017039 Fix spindle directions in tapping* 06/06/06 RHA DEV00017232 5 Axis check in Nomotion as well at PT_Rotary_Axes* 13/06/06 RHA DEV00017523 Prevent output of longhand tapping cycles* Version 11.0* 12/07/06 RHA DEV00017700 Set #SPEED=NEXTSPEED if SPEED unset* 25/07/06 RHA DEV00016799 Initialise tool position at toolchange and index* 26/07/06 RHA Correct NEXTZMOVE setting for reversed axes* 28/07/06 RHA DEV00017797 New MM and MT line switches* 01/08/06 RHA DEV00017818 Hole cycle clearance and level options

  • 7/28/2019 Training Mill Mm

    28/48

    * 01/08/06 RHA DEV00016703 Only process speed and gears if there is a change* 01/08/06 RHA DEV00017490 Make spindle start warning optional* 04/08/06 RHA DEV00017771 Number of turns token for ISO, trap and fix exact 360deg helix count* 07/08/06 RHA DEV00012241 Add High speed and coolant controls to Tool Change* 09/08/06 RHA DEV00017902 Correct thread mill helix for TNC* 11/08/06 RHA DEV00012241 Remove diagnostic line, Correct thread mill for reversed axes* 13/09/06 RHA DEV00018171 Correct initialisation of tool position after datum shift* Version 11.5* 25/09/06 RHA DEV00017909 Expand trace options* 12/10/06 RHA DEV00012692 Correct drill sub output for 1 location* 13/10/06 RHA DEV00018390 PT_CONVERT_COORDS* 17/10/06 RHA DEV00018409 Fix Duplicate angle reversal by Rapid to ToolChange* 03/11/06 RHA DEV00018471 ToolChange HPCC call should only be via a token* 24/11/06 RHA DEV00017338 Move CPLNAME to a template variable* 05/12/06 RHA DEV00018738 Fix CRC calls to cancel on arc* 08/12/06 RHA DEV00018738 Correct calls in circle and intialise variables* 19/12/06 RHA DEV00018593 Set #PLANEGCODE in Thread Milling* 21/12/06 RHA DEV00018869 Remove diagnostic code* 02/01/07 RHA DEV00017909 Remove old thread mill array dump* 25/01/07 RHA DEV00019078 Correct datum over ride setting* 15/02/07 RHA DEV00017338 Correction to CPL name in Rapid after TC

    * Version 11.75* 19/03/07 RHA DEV00019554 Correct precision of XCP YCPL ZCPL in use* 13/04/07 RHA DEV00019730 Correct wrapped drill cycle approach move* 30/04/07 RHA Post processing speed up* 21/05/07 RHA DEV00020096 Implement Maintain Index Option at ToolChange* 24/05/07 RHA DEV00019981 Orthogonal plane cycle controls* 29/05/07 RHA DEV00019987 Reverse coordinate after array axis swap* 30/05/07 RHA DEV00019987 Limit fix to 5 axis rotary* 01/06/07 RHA DEV00019987 Leave array axis swap but remove sign reversal.* 01/06/07 RHA DEV00020208 Fix Index after TC (Head Head)* Version 12.00* 23/07/07 RHA DEV00020524 Avoid spurious CRC warnings* 24/07/07 RHA DEV00020524 Comp Fix, Plan B. Set $COMPOUT only when state change

    d* 03/08/07 RHA DEV00020524 Fix comp problem in CIRCLE procedure* 10/08/07 RHA DEV00020285 Add new ISO Datum Shift Tokens* 28/08/07 RHA DEV00020760 DEV00020742 DEV00019720 Fix approach coordinates* 29/08/07 RHA DEV00020760 DEV00020742 DEV00019720 Fix axis reversals in toolchange* 27/09/07 RHA DEV00021172 Correct datum output when index not maintained* Version 12.25* 18/10/07 RHA DEV00021382 Correct use of #TMP, Use #COMPTEMP* 07/11/07 RHA DEV00019365 Additional debug output for holes and thread mill* 03/12/07 RHA DEV00021534 Enable longhand tapping* 17/12/07 RHA DEV00021869 Correct Rapid after TC for longhand hole cycles* Version 12.5

    * 21/12/07 RHA DEV00021292 ASIN fails on taper thread* 24/12/07 RHA DEV00021372 Trap hole cycle level change* 17/01/08 RHA DEV00022021 Incremental option for Z Clear* 18/01/08 RHA DEV00021841, DEV00021908 New optional warnings* 18/02/08 RHA DEV00022063 Fix single helix and tidy call structure* 19/03/08 RHA DEV00022891 Allow concecutive coincident indexes to CPL* Version 2009.1* 07/04/08 RHA DEV00013774 Correct arc centres and streamline arc calculations* 14/04/08 RHA DEV00023113 Feed after ToolChange code constructor added* 14/04/08 RHA DEV00018979 Correct BNUM reset

  • 7/28/2019 Training Mill Mm

    29/48

    * 22/04/08 RHA DEV00022820 Correct angle at toolchange logic PMACRO-15* 22/04/08 RHA DEV00022820 Set hold values to #FUNNY in PMACRO-15* 01/05/08 RHA DEV00023246 Adjust rotary initialisation according to machine type* 07/05/08 RHA DEV00023285 Set angle output vars at toolchange* 08/05/08 RHA DEV00020490 Add new hole depth option. Incremental from Retract* 22/07/08 RHA DEV00024069 Correction to spindle reverse with coolant* 06/08/08 RHA DEV00024310 Back bore and face in milling* 11/08/08 RHA DEV00024364 Implement helical hole cycles* 20/08/08 RHA DEV00024474 Add Feed Type setting to toolchange* 26/08/08 GST DEV00023989 Helical approach number of turns corrected* 26/08/08 GST DEV00023205 Correct TLO application if NOMOTION* 28/08/08 GST DEV00024586 Apply TLO correction to XY arcs* 28/08/08 RHA DEV00023797 Add tool token and remove chamfer angle restriction* 08/09/08 RHA DEV00024603 Correct angle setting for Rapid after ToolChange e=pt

    _output_rapid* 11/09/08 RHA DEV00024584 ASIN error on helical profile* 18/09/08 RHA DEV00024886 Call feed type code constructor from toolchange* Version 2009.2* 24/10/08 RHA DEV00025195 Plunge to cycle clearance if needed* 24/10/08 RHA DEV00025000 Allow Rapid after tool change with null move* 29/10/08 RHA DEV00025195 Suppress call if already at clearance* 31/10/08 RHA DEV00025264 Do not reset centre if adjustment fails* 05/11/08 RHA DEV00025093 Correct spindle with coolant in tapping cycle

    * 16/02/09 RHA DEV00026148 Correct first hole location in rotary mode* 17/02/09 RHA Correct 3 Axis compilation* 06/03/09 RHA DEV00026198 Use Job data instead of ASK questions* 09/03/09 RHA DEV00026198 Fix PROGDESCR with PARTNAME default* 09/03/09 RHA DEV00026183 Fix radius value in adjust arc centre procedure* 10/03/09 RHA DEV00026183 Remove rounding of comparitive radius* 13/03/09 RHA DEV00025238 #TMPCLEAR is wrongly handled in PT_ZCLEAR (Threadmill)* 13/03/09 RHA DEV00026452 Changes for 3D Z with TLO application* 18/03/09 RHA DEV00026539 3D approach for hole cycles* 19/03/09 RHA DEV00026198 Correct PROGID default* 20/03/09 RHA DEV00026198 Change ASK default behaviour, Programmer & Version* 02/04/09 RHA DEV00026928 Correct subroutine processing for hole cycles

    * 03/04/09 RHA DEV00026928 Correction to subcall logic, for non-hole calls* Version 2010.1* 27/05/09 RHA DEV00022849 Lookahead for Rapid move speed set* 11/06/09 RHA WI33874 Fix Lookahead, use SPEED if NEXTSPEED=#FUNNY* 15/06/09 RHA WI33580 Move M89/99 setting to TNC.cgi and fix* 16/06/09 RHA WI32294 Siemens - allow 0 datum increment* 08/07/09 RHA WI34873 New Thread Mill - Restructure existing canned cycle* 09/07/09 RHA WI34873 New Thread Mill - Add new code options* 14/07/09 RHA WI34873 New Thread Mill - Add new macro and processing* 16/07/09 RHA WI34873 Remove temporary diagnostics* 17/07/09 RHA WI34873 New Thread Mill - Use Hole cycle point processing* 22/07/09 RHA WI34814 Correct Z lift when emulating multi-level cycles pt_hole_ cycles

    * 23/07/09 RHA WI35048 Z lift - adjust for last hole and for subroutines* 23/07/09 RHA WI34873 New Thread Mill More variables and cycle parameters* 27/07/09 RHA WI31681 Axis Reversals* 29/07/09 RHA WI34873 Add signed absolute option for depth* 05/08/09 RHA WI34754 Make call to Feed Type code constructor optional in toolchange* 07/08/09 RHA WI24873 Fix thread depth sign options* 10/08/09 RHA WI31681 Siemens thread mill, remove diagnostic* 10/08/09 RHA WI31163 Output angles for rotary rotate, Fix nomotion check* 12/08/09 RHA WI34580 Fix subroutines when #CYCLEPOINTS=3

  • 7/28/2019 Training Mill Mm

    30/48

    * 13/08/09 RHA WI34873 Adjust for changed system variables* 18/08/09 RHA W35155 Adjust arc feeds only if not adjusted by cycle (Thread Mill)* 19/08/09 RHA W35537 Add Lead and Starts tokens for thread mill* 20/08/09 RHA W35048 Warn if multi-level holes use subroutines* 20/08/09 RHA W35450 Add tokens for coordinate rotation to sub call* 27/08/09 RHA W34873 Move #THREADLEAD calculation up in CANNED675* 28/08/09 RHA W34873 Fix to above change. Reset #THREADLEAD with sign* 07/09/09 RHA W35780 Multi depth cycle should be detected using ZLEVEL variable* 14/09/09 RHA W35898 Correct angle setting for planar rotate - PMACRO-33* 15/09/09 RHA W35307 Set values for tool angle (angled head) tokens etc* 17/09/09 RHA W35307 System variables renamed HEADANGLE MOUNTANGLE* 23/09/09 RHA W35563 Thread mill bottom to top formatting & suppress points call* 24/09/09 RHA W36102 MCALL cycle definitions for Macro37 thread milling* 24/09/09 RHA W35563 Force canned cycle every time for thread mill* 01/10/09 RHA W35498 Use LEADFEED for thread mill approach (675 canned cycle)* Version 2010.1 SP1* 13/10/09 RHA W35934 Suppress spindle stop warning at Toolchange* 23/10/09 RHA W36513 Ask only one time for same variable when not set* 30/10/09 RHA W35934 Detect spindle stop in sequence* Version 2010.2* 13/11/09 RHA W36665 Correct action of planar rotate on rotary angles* 13/11/09 RHA W36755 Add #MOVE to Mode Flags trace

    * 18/11/09 RHA W31914 COMPGCODE suppressed on Z only moves* 20/11/09 RHA W36665 Correct #Move setting for planar rotate NOMOTION* 27/11/09 RHA W31718 Trap invalid LEFTRIGHT values in arc feed adjustment* 08/12/09 RHA W35163 Use XYFEED for Helical hole cycles* 11/12/09 RHA W36903 Add "Ask Once" to the NC Stlyes > Interactive Startup options* 04/01/10 RHA W32567 Implement G28 Moves to Home etc. ISO Template* 15/01/10 RHA W37297 Add Single Shot option for Exact Stop* 22/01/10 RHA W37441 Hole locations for angled head - Restructure array reading* 25/01/10 RHA W37441 Hole locations for angled head* 02/03/10 RHA W37976 Correct #nKEEP settings in P-RESET* 11/03/10 RHA W38137 Output angled head diagnostics from Toolchange only if modes trace is on.

    * 11/03/10 RHA W38139 Angled head, hole cycle approach unsafe in machine coordinates* 17/03/10 RHA W38176 Allow for angled heads in PT_COMPENSATE_TLO* 19/03/10 RHA W38304 Correct reversal of move to ZCLEAR in PT_GET_HOLE_POSITION* 19/03/10 RHA W38305 Correct approach to hole cycles when 3D is off* 25/03/10 RHA W38435 Old thread mill canned to set KEEP values* 26/03/10 RHA W38341 Remove #ZMOVE setting for hole cycles in PT_OUTPUT_RAPID* 29/03/10 RHA W38474 Use CPLPLANE>4 instead of CPLPLANE=5, allow for invalid values.* 30/03/10 RHA W38341 Allow for traditional fixed XY then Z move after TC* 31/03/10 RHA W38513 Activate canned cycle switches for orthogonal planes* 01/04/10 RHA W38341 Allow for traditional fixed XY then Z move after TC* 06/04/10 RHA W38513 Correct switch use for 3AX with angled head

    * 06/04/10 RHA W38474 Reset to use CPLPLANE=5, underlying EC problem has been fixed.* 08/04/10 RHA W38633 Call PT_COMPENSATE_TLO after NOMOTION in PMACRO-15* 08/04/10 RHA W38619 Allow MCoords hole array analysis for head-head without angled attachment* 09/04/10 RHA W38607 Remove %IF #3DAFTERTC=1 @CALLRAP from PT_HOLE_CYCLES* 13/04/10 RHA W38640 Hole parameters adjusted for TLO and Angled Head* 14/04/10 RHA W38607 Use %IF #3DAFTERTC=1 @CALLRAP in PT_HOLE_CYCLES if after TC* 16/04/10 RHA W38640 Correct sign of hole parameter offset

  • 7/28/2019 Training Mill Mm

    31/48

    * 04/05/10 RHA W39031 Correct TLO offsetting for gantry machine with machine coordinate output* 11/05/10 RHA W39137 Set #HOLEOFFSET in a procedure and call from Move Angular* 14/05/10 RHA W39206 PT_CONVERT_COORDS needs to cater for HeadTable combinations* Version 2011.1* 28/05/10 RHA W39270 Suppress spindle warning on back bore approach/retract* 02/06/10 RHA W38680 Add thread mill and probe to SET_TOOL_TYPE* 07/06/10 RHA W39270 Reset SPINWARN at Toolchange* 02/07/10 RHA W37828 Fix arc centre adjustment for reversed axes* 15/07/10 RHA W39785 Implement tap type setting at toolchange* 28/07/10 RHA W40156 Allow peck subroutines in machine coordinate output* 30/07/10 RHA W38672 Correction to coordinate rounding & new procedure* 04/08/10 RHA W40156 Allow for unset system vars in Peck* 06/08/10 RHA W40156 Fix when in CPL Coords* 06/08/10 RHA W40290 Correction for CPLPLANE=6 condition* 10/08/10 RHA W40156 Remove changes in PT_OUTPUT_SUBSTART* 12/08/10 RHA W40290 Correct loop in PMACRO-35* 16/08/10 RHA W39553 Control allowable chamfer for helical hole cycle* 16/08/10 RHA W38928 Allow both rotary axes on hole cycle approach* 16/09/10 RHA W31859 Improve use of hole clearance on approach* 17/09/10 RHA W31859 Don't change approach after tool change* 20/09/10 RHA W31859 Fix for machine axes. Use #PREVIOUSHEIGHT instead of #TEMP* 21/09/10 RHA W40897 Implement correct processing for rotary drill in MC coords

    * 27/09/10 RHA W39102 Extend rotary hole processing for angled head and machinecoordinates* 29/09/10 RHA W40981 Correct G92 output for Incremental datum shift* 11/10/10 RHA W39884 Fix DIRECTION corruption by GETCPL* 13/10/10 RHA W40981 Correct Absolute datum regressions* 13/10/10 RHA W40981 Change for absolute converted to shift* 14/10/10 RHA W40981 Change for same datum, different offset* 14/10/10 RHA W40981 Fix Head-Head (no maintain index) problem* Version 2011.2* 22/10/10 RHA W32074 Restructure Datum Shift and Index handling* 25/10/10 RHA W34915 Allow Datum Override on first tool* 26/10/10 RHA W41396 Use MAXFEED for Rapid conversion* 28/10/10 RHA W32074 Fix longhand radial hole approach regression

    * Fix #XSHIFT etc. remove redundant variables* 29/10/10 RHA W32074 Axis reversals, #XSHIFT etc.* 29/10/10 RHA W38135 Alternative incremental datum base* 01/11/10 RHA W41315 Remove Update_Offset_Registers from absolute datum shift* 01/11/10 RHA W38135 Alternative incremental datum base* 02/11/10 RHA W32074 Update temporay annotation in Select_Work_Datums procedure* 11/11/10 RHA W41606 Avoid Spindle warning for probe tools* 10/12/10 RHA W33515 Fix incremental angles for hole cycles* 10/12/10 RHA W38043 Mill TNC and others - support feed type* 13/12/10 RHA W33515 Fix for hole cycle in rotary rotate* 10/12/10 RHA W38043 Fix for thread mill and improve efficiency* 14/12/10 RHA W33291 Fix for incremental angles* 16/12/10 RHA W41997 Implement peck tapping

    * 23/12/10 RHA W41738 New option - Always use IJK with 360deg arcs* 11/01/11 RHA W42393 New Option - Control for negative radius when angle>180* 17/01/11 RHA W30504 Incremental angle fixes* 18/01/11 RHA W41711 Protect DWELL from 0/#FUNNY switching* 18/01/11 RHA W42408 Angle direction code fix* 18/01/11 RHA W42463 Suppress direction if no rotation* 19/11/11 RHA W38043 Corrections & add thread mill cycle option* 21/01/11 RHA W41711 Protect USERVAR1, PMACRO-29* 25/01/11 RHA W42393 Signed radius for single turn helix* 11/02/11 RHA W42866 Correct inc angles in 5 axis approach and subcall

  • 7/28/2019 Training Mill Mm

    32/48

    * 16/02/11 RHA W38043 More fixes for thread mill* 28/02/11 RHA W43151 Tapping reverse with combined coolant codes* 28/02/11 RHA W38043 Fix for Arcs* 04/03/11 RHA W43249 Fix absolute datum shift* 26/04/11 RHA W44169 Tapping feed conversion* Version 2011.2.2* 17/05/11 RHA W43899 Fix 3D approach switching for holes (CPL Coords)* 17/05/11 RHA W43524 Fix TNC arc centre correction (Non G17)* Version 2012.1* 02/06/11 RHA W43821 Improve efficiency of arcs and coordinate rounding* 14/06/11 RHA W44874 Use NEXTSPEED for rapids from TRANSLATE* 15/06/11 RHA W44874 Re-initialise Feed/Speed in TRANSLATE* 16/06/11 RHA W44058 Force #PLANEGCODE at start of subroutine* 21/06/11 RHA W42241 Selective threadmill canned cycles* 28/07/11 RHA W39982 Trap null arc moves* 28/07/11 RHA W43985 Implement feedrate multiplier* 03/08/11 RHA W42241 Improve helical taper warning for 675 cycle* 10/08/11 RHA W42871 Make use of NEXTSPEED optional* 10/08/11 RHA W43985 Fix converted FPR value* 11/08/11 RHA W42871 Make use of NEXTSPEED optional - Improve pt_speed_set* 31/08/11 RHA W45704 Fix CODECON_TAPPING-CYCLE calls, make Siemens compatible* 05/09/11 RHA W45704 Fix multilevel retract for thread mill* Version 2012.2* 02/11/11 RHA W45241 Improve processing times

    * 20/12/11 RHA W47496 Allow G93 through PT_CONTROL_FEEDTYPE* 17/01/12 RHA W45710 Force Index token on first toolchange* 15/02/12 RHA W47500 Implement auxiliary Z axes* 22/02/12 RHA W48740 calculate number of helical turns in G18/19 modes* 22/02/12 RHA W48595 Make PLANEGCODE more robust* 22/02/12 RHA W49150 Fix index after head-head toolchange* 15/03/12 RHA W49473 Option for W (quill) move to be tool tip* 15/03/12 RHA W49072 Add quill Function for drilling code constructors.* 20/03/12 RHA W49072 More Quill tokens for drilling code constructors.* 28/03/12 RHA W49150 Fix index after head-head toolchange* 20/03/12 RHA W49072 Fix #AUXZDEPTH* 03/04/12 RHA W49473 Fix Z2MOVE token, use #ZHOLD for unchanged value* 04/04/12 RHA W49150 Set Angular hold values from rotary drilling

    * 11/04/12 RHA W49150 Set Head Angle and Hold values at ToolChange* 12/04/12 RHA W49745 Quill movements for canned hole cycle* 17/04/12 RHA W49150 Initialise Head Angle output at ToolChange* 18/04/12 RHA W49745 Quill movements for canned hole cycle* 19/04/12 RHA W50157 Head Angle output at First ToolChange* Version 2013.1* 31/05/12 RHA W48878 Phantom warnings from Subroutines* 14/06/12 RHA W50832 Set rotary direction of hole cycles to Shortest* 29/08/12 RHA W50032 Avoid CG crash when #DATUMMAX=#FUNNY* 03/10/12 RHA W31018 Correct CPL tool tip option for Rapid to Tool Change* 26/10/12 RHA W53700 Correct thread mill (37) regression**************************************************************************** *******************

    * Initialisation procedures* ********************* Auxiliary axes* ASK variables* Initialisation system and user defined variables* Axis Reversal Multipliers* Automatic Datum Setting** Retrieve from MM & MT lines* Coolant code output

  • 7/28/2019 Training Mill Mm

    33/48

    * Subroutine numbering* Block numbers*PRECISION=#INCR-(#INCR/100)* Head operation mode variables* Run-time questions ask once********************************************************************************************* Select abs/inc at post run time* Note #incrxyz is current abs/inc setting* #incrxyzhold is main program setting* #incrsubs is subroutine setting********************************************************************************************* Called by all START macros to set initial position etc.* Current CPL output values* %CALL=PT_SET_PRECISION might need functionality here* Machine Datum output values* %CALL=PT_SET_PRECISION might need functionality here* Reset HOLD with reversals if not incremental* Set CPL offset for moves to Home and TC* Baseline for incremental datum********************************************************************************************* Canned cycle capability checks, Longhand if canned cycle not available

    *Drill* No chamfer allowed* Check tool orientation conditions* Note, checks included in 3ax for angled head use.* * DB12120 Rotary Rotate outputs cycle and expanded equivalent. Suppress cycle to prevent duplicate moves* Entry feed set - longhand output only********************************************************************************************* ******************** Macro support procedures* ********************

    ** * %IF #EXPANDG82=1 %THEN %NOCYCLE* Counter bore cycle* Peck Cycle* Drill Cycle********************************************************************************************************************************************************************************************************************************************************************************************************* Back Face****************************************************************************************************************************************************

    ** Check and reset direction* Right hand threads* Left hand threads** %IF #TAPTYPE=2 %THEN $CYCLETYPE=RIGIDTAPPING* #DEPTH=#DEPTH*#FUNNY*************************************************************************** Set CRC output control for profile lead in/out**************************************************************************

  • 7/28/2019 Training Mill Mm

    34/48

  • 7/28/2019 Training Mill Mm

    35/48

    * Reset within 0-360* Accommodate -0 by setting zero angle to 0.0000001 and calculating sign* This will truncate to 0 on output with correct +/- sign**************************************************************************** Retract first if requested** Rapid to Rplane** Move 2 axes to start point*** Plunge to start point* NB Only the active INC value is set for PECK**************************************************************************************** Diagnostic printout************* Full canned cycle USERVAR8=1. #THREADCANNED=2* Canned cycle preparation* Canned cycle output* True canned cycle only**************************************************************************

    *If no comp requested ensure output flag is true* Check for helical interpolation* %IF PATHTRACE=1 %THEN %NOCYCLE*Check for array data.* #TMP=XPOINT(#LOOP):#TMP1=YPOINT(#LOOP):#TMP2=RADIUS(#LOOP)* *look for lift out on NEXT move* * * Look for last leg and cancel compensation*************************************************************************** Through Tool Coolant* Adjust tool/home position to current CPL if required

    *************************************************************************** Through Tool Coolant* Adjust tool/home position to current CPL if required*************************************************************************** * * * * Translate Reset* Reset is only needed if absolute subroutines have been used with G92 datum setting* Update stored end point (XINC etc in Reset are TOTAL increments for this level)

    ** Final G92 position.* Update Keep values*************************************************************************** Processing logic called by macro 106, Exact Stop* Single shot, G code set in linear move* If On then G09 will be output in Feed Macro instead of FeedGcode* Mode setting***************************************************************************

  • 7/28/2019 Training Mill Mm

    36/48

    * Find Gear* Spindle control* Reset old values if stopped*************************************************************************** Helix inaccurate for Taper thread* Suppress CRC calls until Subfunct is set* Canned cycle requested* Check thread attributes* Check tool orientation conditions*************************************************************************** ******************** Debug Trace Procedures* ********************* Called from token TOOLTYPE* ******************** Program Runtime Questions* ********************* Handle User Input, Token PROGVERSION* Options - Always Ask (1), Ask if Not Set (2), Never Ask (3), Ask Only Once (4)* Ask Only Once* **********************************

    * Handle User Input, Token PROGRAMMER* Options - Always Ask (1), Ask if Not Set (2), Never Ask (3), Ask Only Once (4)* Ask Only Once* *********************************** Handle User Input, Token PROGDESCR* Options - Always Ask (1), Ask if Not Set (2), Never Ask (3), Ask Only Once (4)* Ask Only Once* *********************************** Handle User Input, Token PROGID* Options - Always Ask (1), Ask if Not Set (2), Never Ask (3), Ask Only Once (4)* Ask Only Once* ****************************************** * Test Profile Lead conditions *

    * ******************************************* Check for arc move* Thread Milling* #WarnCRC = 0 No warnings* 1 CRC Warn if Used only* 2 CRC warn if not 90 only* 3 Both above warnings** Warn for CRC application on Z move* Warn for CRC cancellation on Z move**

    * Global output Rapids as high feedrates if #FEEDRAPIDS set to Yes- use #FEED to force re-instate of cut feed** Changed 26/03 dont set zmove here (mc coords etc)* Don't use NEXTZ if FEED move follows** If the first move after is in xy only then z should be next z* %IF #MACRO=37 @NOSET**Set CPL Parameters

  • 7/28/2019 Training Mill Mm

    37/48

    * 28/10/10* Output G43 on first Z* Z Component in move***Look ahead* #LOOKAHEAD=2 Last Rapid** %IF #SPINWARN=0 @END* Only process if speed changed or not running* %IF #SPEED=#SPEEDHOLD @END* %IF #SPINWARN=2 @WARN* Warn for feed moves only* %IF #FEEDWARN=1 @WARN* %IF #MACRO=54 @WARN* %IF #MACRO=53 @WARN* %IF #MACRO=1 @END** procedure to set and check spindle speed* Note following IFs ordered for efficient processing*** Fix for thread mill lead out* Comp On

    * Comp Off* Fix for thread mill lead out, Thread mill always sets SUBFUNCT to 1* Checks for CRC* W31914 DCODE always suppressed. Now GCODE is also suppressed* This could have an NCStyle switch but is it needed?* Output Feed move* Output G43 on first Z* Z Component in move* Cancel cutter compensation via CodeCon_cancel-cutter-comp* Code Constructor must be empty if output is with move otherwise blank block will be produced** Handles cutter compensation in all situations

    * #COMPON signals the state requested by the cycle* Subfunct signals state for this move* $COMPOUTPUT signals whether it has been output****************************** Profile Cycle ******************************* IF SUBFUNCT=0 @END********************************************** Handles apply compensation in all cases *********************************************** Retrieve original compensation Gcode* Retrieve current compensation Dcode (register)*************************************************

    * Handles cancel compensation in all cases *************************************************** Set Cancel GCode* Output is from motion procedure since is either with or after move* Call codecon for machines needing separate G40 block** Reverse G41/G42 if processing mirror image longhand** After Mirror, Compensation may be cancelled due to final Rapid. Need to

  • 7/28/2019 Training Mill Mm

    38/48

    retrieve last* active Comp GCode.* reverse G41/G42 is processing mirror image** This procedure is to trap variables which when formatted are output as -0* Suppress COMPDCODE if no COMPGCODE* Suppress too small moves in single quad case only* Radial Rotary Arcs output via Procedure=Radial_circle* Process planar arc*** Reset CRC Register* Suppress COMPDCODE if no COMPGCODE* Suppress too small moves in single quad case only* Radial Rotary Arcs output via Procedure=Radial_circle* Process planar arc*** Reset CRC Register* Set flag for 360 degree arc* Adjust Feedrate if required** Check for null move*

    * Setvar^#USERADS^Use Radius: 0 Never, 1 When Possible, 2 When Possible (XY), 3Always, 4 Always except 360* Use rads if XY plane only* Check CRC lead conditions* Lead Out* Lead in* Set plane G code* * < Set Centre>* Check for full circle (0 or 360)* * Set Radius Sign & precision*

    ** Radius bulge check* * * Check centre accuracy and correct* XYPLANE is set as 0, 1 and 2 for XY, ZX and ZY respectively* Apply user defined axis reversals** Helix* ZEND set for G17 helical arcs. G18/9 not set because of DEV00011313* * Check accuracy of centre point*

    * Force IJK if calculated centre out of position* *****************************************************************************Set up parameters and call standard procedure to*calculate angle bearings for TNC helical arc moves* DEV00012570 undo previous change to correct thread mill regression* #RADIUS=ABS(RADIUS)

  • 7/28/2019 Training Mill Mm

    39/48

    * Set arc parameter system variables* #RADIUS=ABS(#STARTRAD)* Multiple turns, Note that complete circle can have included angle of 0 or 360* Thread Mill, multiple turn arc has only 0-360 included angle, derive from pitch and Z move* ZSTART ZEND are not available in thread milling* Check for last helix full 360 degrees* Still needed for thread milling************** NEED TO USE XINC.YINC IN ASIN_BEARING*Double check for 360 case* Full circle* ************************************************** Compensate feedrates for arcs if option selected* **************************************************** #TMP=ABS(RADIUS):%IF #TMP=TOOLRAD @END* External Corners* Following check safer in two lines because of precision checking* Internal Corners* Output all Hole cycles Drill, Chipbreak, Ream and Bore as Canned Cycles- coords are held in the XYZPOINT array* Called from each cycle macro and cyclsub for subroutines

    * Code Wizard will present the cycle definition line which will be in theloop expand and thus output-if-changed* will, typically, produce the XY points list previously separated into PROCEDURE=LOOPEXPAND* If called from CYCLSUB, points are expanded from 2nd point (Loop=2)- cycle line is outside subroutine.* This inhibits the ability to support the format whereby the cycle parameters are variables e.g. Seimens************* Diagnostic printout************* Status Flags in use* Option flags in use

    * #XREVERSE,#YREVERSE,#ZREVERSE Axis reversals* $OUTPUTSUBS* #ROTARYTYPE=2 1 for* MILLMODE 0 for rotary, 1 for planar* #TOOLCHANGE =1 if previous instruction was toolchange* #PREPOSITION: 0 never* Keep move parameters* Rapid to first XY position then to Zclear with Tool Length Offset. Call

    procedure for single Code Constructor* Could put this on a switch e.g. Call Rapid After toolchange ?************************************************** < Approach Moves CPLPLANE=[CPLPLANE=0] Keep [#XKEEP=0][#YKEEP=1][#ZKEEP=2]>*************************************************

    ** Lift to clearance* * *** Approach to first point - Rapid in XY* CHANGE 14/04** Not Rapid 3D, maintain clearance axis

  • 7/28/2019 Training Mill Mm

    40/48

    * Plunge to Clearance, Nomotion will prevent null move************************************************** DEFINE CYCLE************************************************** Branch on $OUTPUTSUBS. =null if PATHTRACE expansion* Set HOLD values for incremental calculations in subroutines*Include first position in expansion**

  • 7/28/2019 Training Mill Mm

    41/48

    se task* Use XCPL etc for G92 in Incremental Done 28/10/10* 6) System variables INFORMATION* 7) Template vars #XBASE etc - set to previous XSUB Done 28/10/10* 8) Do we need Update_Offset_Registers procedure ? Probably

    not, all calls removed************************************************************************** Set CPL offset for moves to Home and TC* Absolute datum selected* * Index - same datum, check offset* Now at* Shift By** * Datum not found* $WARNING="ERROR - SYSID for CPL not found in Datum List":%CALL=CODECON_WARNING* * Speed*

    * Rot1/Rot2 are not set from drill array**** Calculate vector distance from current to next coordinate* Use to determine if rapid move should be converted to feedrate move** XY distance* 3D distance i.e. incorporate Z axis* If move is smaller than the specified amount then convert to a feedrateat highfeed.* #TOOLSHEET 1=Output with Main NC program 2=Output as seperate file 3=None

    ******************************************************** * ******************************************************** Keep circle start in case needed** Set Precision********************************************* Check move content** Check feed type***********************************************

    * Make incremental* Set Move for XYZ**************************************************************************************************************** Procedure trace is ON. Additional trace options* #TRTHREAD,#TRHOLE control array dumps in CY procedure* #TRX,#TRY,#TRZ,#TRC1,#TRC2,#TRB temporary output vars* Not Drill, ToolChange, Index or Thread Mill* Output End Points

  • 7/28/2019 Training Mill Mm

    42/48

    * Output Current Mode Settings* ** Angled head and machine coords in use*** Round Arc Centre values* Determines the method of fixing arc centre* NOTE! Thread Milling uses %PROCEDURE=PT_THRD_ARC_CENTRE for simplicity** Setvar^#ARCTYPE* Signed Start to Centre 1* Signed Centre to start 2* Unsigned Start / Centre 3* Centre4** Setvar^#USERADS^Use Radius: 0 Never, 1 When Possible, 2 When Possible (XY), 3Always, 4 Always except 360* #XSTART etc set in Nomotion* #XCENTRE etc set in PT_ARC_CENTRE** ********************** * Thread Milling

    ** ************************ Full canned cycle* * Preposition after toolchange** Next Z for first move* Set canned cycle variables** * %IF #ZMOVE

  • 7/28/2019 Training Mill Mm

    43/48

    ** Canned cycle output* #MODALCYCLE=DATA2(48)* %CANCEL=#MODALCYCLE* Always output cycle definition, not hole point* Count arc blocks skipped*Suppress intermediate helical blocks if instructed. Maintain #ZHOLD*Set K word to full circle pitch for multi-pass block* reset helical block count* Handle Arc centre for Thread milling - force I&J output* Setvar^#A