<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>The CLSF</title>
      <script language="javaScript">
        abridged="false";
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <div class="title_topic2" id="xps10_pagetitle">The CLSF</div>
      <hr noshade="true">
      <p class="para_topic">The executable end product of NX machining operations is the Cutter Location Source File (CLSF). After the tool path is generated, it can be converted into a CLS File for postprocessing by selecting Export.</p>
      <p class="para_topic">The CLSF contains the coordinates of where (in Machine Coordinate System values) the cutting tool center line will travel to machine the workpiece. It consists of tool motion commands, control commands, feed rate commands, display commands, and postprocessor commands. In addition, macro commands may be written into the CLSF or retrieved from a library.</p>
      <p class="para_topic">When work on the CLSF is completed, it is saved using the File&gt;Save&gt;CLSF option.</p>
      <p class="para_topic">Multiple CLSFs can be used with a single part. It is important to note that the CLSF and part files are totally separate and each must be saved separately.</p>
      <p class="para_topic">Following is an example CLSF.</p><pre class="indent">10 TOOL PATH/P2,TOOL,T2
20 TLDATA/MILL,0.3750,0.0000,1.0000,0.0000,0.0000
30 MSYS/0.0000000,0.0000000,0.0000000,1.0000000
0.0000000,0.00000000.000000,1.000000,0.0000000
40 PAINT/PATH
50 PAINT/SPEED,5
60 PAINT/TOOL,FULL,1
70 PAINT/COLOR,1
80 RAPID
90 GOTO/-0.2875,3.2861,0.5000
100 PAINT/COLOR,3
110 FEDRAT/IPM,10.0000
120 GOTO/0.0000,3.2861,0.5000
130 GOTO/6.0000,3.2861,0.5000
140 PAINT/COLOR,1
150 RAPID,
160 GOTO/6.0000,3.3361,0.5500
170 PAINT/SPEED,10
180 PAINT/TOOL,NOMORE
190 END-OF-PATH</pre><div class="title_division">Syntax</div>
      <p class="para_division">CLSF statements are composed of major and minor words, along with additional qualifiers or parameters. The major words used as commands are normally followed by a slash (/). In this manual, all optional fields are enclosed in brackets [ ]. The number of fields permitted depends on the command. Commas are used as field separators and no trailing commas are permitted.</p>
      <p class="para_division">The number of decimal places in each field of statements such as GOTO or CIRCLE is a fixed value. The numerical values in CLSF tool paths have up to seven decimal places.</p>
      <p class="para_division">You can set this value entering the desired value in the Decimal Place text field located under Preferences&gt;General CAM.</p>
      <div class="title_division">Decimal Place Exception</div>
      <p class="para_division">The tool axis and the circle axis vector (for CIRCLE/ records) values will always be output with seven decimal places.</p>
      <p class="para_division">The number of decimal places output for MSYS values is not controlled by the decimal place value set under Preferences. The system first attempts, to output seven decimal places. If this would cause significant whole digits to be lost, the system reduces the number of decimal places until all whole digits can be output.</p>
      <p class="para_division">The total number of characters available for any numeric value is ten. This includes the minus sign and decimal point. If the total number of characters needed for a value is greater than seven, the CLSF field will consist of blanks or asterisks.</p>
      <table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_note">
                  <p class="para_note_body"> For FEDRAT statements, the number of decimal places is limited to five. Even if the number of decimal places set in Preferences is greater than five, FEDRAT statements will have five decimal places.</p>
               </div>
            </td>
         </tr>
      </table>
      <p class="para_division">If the number of decimal places is set to seven (the maximum allowed), the allowable range for motion commands is -9.9999999 to 99.9999999. A value out of that range causes overflow.</p>
      <div class="title_division">CLSF Commands</div>
      <p class="para_division">While it is true that a large portion of CLSF coding can be generated automatically through NX machining techniques, the additional commands and coding techniques discussed below will greatly enhance your part programming speed and efficiency.</p>
      <p class="para_division">This section discusses CLSF commands, including both the impact of interactive tool path creation on the CLSF, and the need for user-inserted commands. Included are:</p>
      <ul>
         <li>
            <p class="para_item">Display Commands</p>
         </li>
         <li>
            <p class="para_item">Tool Setup Commands</p>
         </li>
         <li>
            <p class="para_item">Tool Motion Commands</p>
         </li>
         <li>
            <p class="para_item">Macro Commands</p>
         </li>
         <li>
            <p class="para_item">Control Commands</p>
         </li>
         <li>
            <p class="para_item">Comments and Continuations</p>
         </li>
      </ul>
      <p class="para_division">You can add commands to the CLSF using Edit.</p>
      <div class="title_division">DISPLAY Commands</div>
      <p class="para_division">The MSYS statement and the PAINT command control the manner in which a tool is displayed. The MSYS statement describes the machining coordinate system. The PAINT command allows you to modify or annotate the tool display.</p>
      <div class="title_division">MSYS (MCS)</div>
      <p class="para_division">An MSYS statement, used internally by the system, is generated when a CLSF is created. Its fields represent a matrix which relates the coordinates of the tool path to the absolute coordinate system. You are advised not to change these fields. The following is an example of an MSYS command:</p><pre class="indent">MSYS/2.000000,-1.000000,0.000000,1.000,0.000,0.000,0.000,-1.000,0.000</pre><p class="para_division">The first three fields represent a vector from the model space origin to the origin of the Machine Coordinate System. The next six fields are the first two columns of a three-by-three matrix that maps the motion points described in the CLSF from the MCS to the Absolute Coordinate System. The third column of this matrix is the cross-product of the first two columns.</p>
      <div class="title_division">Tool Path Header</div>
      <p class="para_division">Every generated tool path contains a tool path header statement. This statement delineates one tool path from another and is used by the system for various purposes, such as tool display, tool path transformations, optimizing the CLSF, etc.</p>
      <p class="para_division">The contents of the tool path header statement differ based on operation type.</p>
      <p class="para_division">For 5-Parameter Mill tool paths:</p><pre class="indent">TOOL PATH/&lt;operation name&gt;, TOOL, &lt;tool name&gt; TLDATA/MILL,DIAMETER,LOWER RADIUS,LENGTH,TAPER ANGLE, TIP ANGLE</pre><p class="para_division">For 7-Parameter Mill tool paths:</p><pre class="indent">TOOL PATH/&lt;operation name&gt;, TOOL, &lt;tool name&gt;
TLDATA/MILL,DIAMETER,LOWER RADIUS,LENGTH,TAPER ANGLE, TIP ANGLE,X CENTER R1,
Y CENTER R1
</pre><p class="para_division">For 10-Parameter Mill tool paths:</p><pre class="indent">TOOL PATH/&lt;operation name&gt;, TOOL, &lt;tool name&gt;
TLDATA/MILL,DIAMETER,LOWER RADIUS,LENGTH,TAPER ANGLE, TIP ANGLE,X CENTER R1, 
Y CENTER R1,UPPER RADIUS,X CENTER R2,Y CENTER R2</pre><p class="para_division">For Drill tool paths:</p><pre class="indent">TOOL PATH/&lt;operation name&gt;, TOOL, &lt;tool name&gt; 
TLDATA/DRILL,MODULE TYPE,DIAMETER,CORNER,RADIUS, LENGTH,POINT ANGLE,FLUTE 
LENGTH</pre><p class="para_division">For Lathe Rough and Finish tool paths:</p><pre class="indent">TOOL PATH/&lt;operation name&gt;, TOOL, &lt;tool name&gt; 
TLDATA/TURN,TOOL ORIENTATION, TYPE OF WORK, LATHE SPINDLE AXIS, NOSE 
DIAMETER,HOLDER WIDTH,LEAD ANGLE,HEEL ANGLE,HOLDER HEIGHT,ORIENTATION ANGLE
</pre><p class="para_division">For Lathe Groove tool paths:</p><pre class="indent">TOOL PATH/&lt;operation name&gt;, TOOL, &lt;tool name&gt; 
TLDATA/GROOVE,TOOL ORIENTATION,TYPE OF WORK, TRACKING SIDE,LATHE SPINDLE AXIS,
INSERT WIDTH, LEFT CORNER RADIUS,RIGHT CORNER RADIUS, MAXIMUM DEPTH,LEAD 
ANGLE,INSERT ANGLE,HOLDER HEIGHT,HOLDER WIDTH</pre><p class="para_division">For Lathe Thread tool paths:</p><pre class="indent">TOOL PATH/&lt;operation name&gt;, TOOL, &lt;tool name&gt; 
TLDATA/THREAD,TOOL ORIENTATION,TYPE OF WORK, LATHE SPINDLE AXIS, MAXIMUM DEPTH,
HOLDERWIDTH, RELIEF ANGLE,HEEL ANGLE,HOLDER HEIGHT</pre><table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_note">
                  <p class="para_note_body"> If you are using a temporary tool, the TOOLNAME field is omitted.</p>
               </div>
            </td>
         </tr>
      </table>
      <div class="title_division">PAINT Commands</div>
      <p class="para_division">The PAINT command controls the ways in which the tool path is displayed. Using the PAINT command effectively can help greatly in obtaining graphic verification of tool movements.</p>
      <p class="para_division">PAINT commands are not processed by the postprocessor (they are stripped out when the CLSF is submitted). Many of these commands can be inserted automatically using Display Options.</p>
      <p class="para_division">The general format for the PAINT commands is:</p>
      <p class="para_division"> <img align="bottom" src="graphics/mm_clsfmgr_clAt04.gif" border="0">    
      </p>
      <p class="para_division">Examples:</p><pre class="indent">PAINT/TOOL,FULL,1 
PAINT/FEED 
PAINT/FEED,NOMORE 
PAINT/OFF</pre><p class="para_division">The PAINT commands are listed below in the event that you wish to include them in a standard macro. Refer to the discussion of macro commands for how to use these commands.</p>
      <p class="para_division">PAINT/ARROW causes an arrow to be displayed on the end point of a tool path vector when a 90 degree directional change occurs. PAINT/ARROW,NOMORE inhibits the arrow display.</p>
      <p class="para_division">PAINT/PATH causes all non-rapid tool motion to be displayed as a solid line. Rapid motion is displayed as a dashed line. PAINT/PATH,DASH causes the tool motion to be displayed as a dashed line.</p>
      <p class="para_division">PAINT/PATH,SIL,n[,i,j,k] causes the tool motion to be displayed as silhouette lines, where n is the percentage of the tool diameter that the silhouettes are separated by and [,i,j,k] is the optional path normal. If [i,j,k] are left off, the path normal is defaulted to the tool axis.</p>
      <p class="para_division">PAINT/FEED causes feed rates to be displayed (&quot;F&quot; followed by the feed rate value). The feed rate value is displayed at the closest CL-point. PAINT/FEED,NOMORE inhibits feed rate display.</p>
      <p class="para_division">PAINT/LINNO enables display of a CLSF line number at the first CL point of each tool path. PAINT/LINNO,NOMORE inhibits the line number display.</p>
      <p class="para_division">PAINT/TOOL requests a graphic display of the tool end while replaying the CLSF. For a Mill operation, the tool end is represented by a circle with a radius equal to the tool radius given in the tool path header. For Lathe operations, a representation of the appropriate cutting tool is displayed based on information in the tool path header statement.</p>
      <p class="para_division">PAINT/TOOL,FULL,n requests a three-dimensional representation of the tool while replaying the CLSF. The frequency with which the tool is displayed is controlled by the value of n.</p>
      <p class="para_division">Users with raster screens with continuous update, can simulate the motion of the tool along the path by specifying a negative value for the n parameter. This causes the tool display to be erased at one CL point before it appears at the next. PAINT/TOOL,NOMORE stops the tool display.</p>
      <p class="para_division">PAINT/ON, PAINT/OFF are used to BLANK and UNBLANK the tool path. When the system encounters a PAINT/OFF command, the tool path associated with this command is not displayed until a PAINT/ON command is inserted.</p>
      <p class="para_division">PAINT/SPEED,n controls the relative speed at which the tool path is repainted, where n is a number from 1 (the slowest rate) to 10 (the fastest rate). The display rate is modal and if no value is specified, the default is 10.</p>
      <p class="para_division">PAINT/PRINT,character string is used to add notes to the tool path display. You can enter up to 40 characters. The character string is displayed after the next CLSF replay request, at the tool's current position.</p>
      <p class="para_division">PAINT/COLOR,n gives users with color terminals a choice of fifteen colors. The colors are taken from either the default color table or from a user-defined color table. The number n corresponds to the nth entry in the color table in use.</p>
      <div class="title_division">Using PAINT Commands</div>
      <p class="para_division">The following is a typical paint macro. This macro can be written as a library macro or in-line macro. Refer to the discussion of Macro later in this chapter.</p><pre class="indent">PNTMAC=MACRO 
PAINT/TOOL,FULL,1 
PAINT/ARROW 
PAINT/PATH,DASH 
PAINT/SPEED,10 
TERMAC</pre><p class="para_division">and called by:</p><pre class="indent">CALL/PNTMAC</pre><div class="title_division">TOOL SETUP Commands</div>
      <p class="para_division">It is often more efficient in parts programming to leave out machine tool commands initially in order to concentrate on motion commands. You can leave space in the CLSF by means of comment lines to show where tool postprocessor commands are needed.</p>
      <p class="para_division">A number of tool commands may be entered by means of machining menus (feed rates, turret and spindle data, etc.). However, you can also enter these commands manually through the Edit option.</p>
      <p class="para_division">Because tool setup commands vary, refer to the appropriate postprocessor manual for details on command formats. It is possible to insert postprocessor commands, change automatically inserted commands as needed, or write tool setup macros for repetitive operations.</p>
      <p class="para_division">FEDRAT - This command specifies units of feed measurement (IPM, MMPM, IPR, MMPR) and the number of units. Example:</p>
      <p class="para_division">FEDRAT/IPM,100 - Refer to the appropriate postprocessor specification manual for details. You can display feed rate changes by using the PAINT/FEED command.</p>
      <p class="para_division">RAPID - When RAPID is used, the system applies a rapid traverse feed rate to the next GOTO command. The previously established feed rate is reinstated with the movement following the RAPID motion. The RAPID motion is displayed in dashed line font.</p>
      <p class="para_division">The RAPID command has no parameters.</p>
      <p class="para_division">You can use a RAPID command under the CYCLE mode to temporarily interrupt the CYCLE operation for the next motion only. The RAPID motion is not considered to be part of the CL-point series following the CYCLE command. The CYCLE operation continues after the RAPID motion as if the RAPID motion has not been executed. ZC axis motion occurs either before or after XC-YC axis motion depending on the work plane change.</p>
      <div class="title_division">TOOL MOTION Commands</div>
      <p class="para_division">The tool motion commands GOTO, GODLTA, and CIRCLE move a tool from one specific location directly to another by a single movement.</p>
      <p class="para_division">GOTO command - moves the tool to a specified motion point.</p>
      <p class="para_division">GODLTA command - moves the tool a given incremental distance from its current position.</p>
      <p class="para_division">CIRCLE command - specifies the parameters of an arc. Splines and conics are approximated by line segments which are, in turn, represented by GOTO commands in the CLSF.</p>
      <p class="para_division">These commands are most often inserted in the CLSF automatically by means of graphics techniques or menu displays. They can however be developed and coded manually.</p>
      <div class="title_division">GOTO</div>
      <p class="para_division">The system begins the tool and/or tool path display at the first GOTO point.</p>
      <p class="para_division">The GOTO command specifies the MCS coordinates of a motion point. The following three-axis GOTO statement defines a three-dimensional point:</p><pre class="indent">GOTO/x,y,z</pre><p class="para_division">Example: GOTO/4.00,17.60,0.00</p>
      <p class="para_division">The following five-axis GOTO statement defines a three-dimensional point (X,Y,Z) and a tool axis vector (i,j,k).</p><pre class="indent">GOTO/x,y,z,i,j,k</pre><p class="para_division">Example: GOTO/4.00,17.60,0.00,0.0000000,0.0000000,1.0000000</p>
      <p class="para_division">The real numbers 0,0,1 define a tool axis vector parallel to the Z axis of the MCS. The tool axis vector does not have to be a unit vector, but it must not be a zero vector. Also, the tool axis values will always be output with seven decimal places. The decimal place accuracy of other CLSF values are controlled by the DECPL statement.</p>
      <div class="title_division">GODLTA</div>
      <p class="para_division">The GODLTA command moves a tool in a given direction and distance from its current location. The three-axis GODLTA command specifies one vector:</p><pre class="indent">GODLTA/dx,dy,dz</pre><p class="para_division">Example: GODLTA/1,1,0</p>
      <p class="para_division">moves the tool one unit along the X axis and one inch along the Y axis.</p>
      <p class="para_division">The three scalars dx,dy,dz can be thought of as the amounts that must be added to the tool start coordinates to obtain the coordinates of the tool destination point.</p>
      <div class="title_division">CIRCLE</div>
      <p class="para_division">The CIRCLE statement specifies a tool path arc in any arbitrary plane, or a helical motion. This statement is automatically generated when boundaries containing circles are machined using the Lathe or Mill functions. Circle records are output in the following format:</p><pre class="indent">CIRCLE/x,y,z,i,j,k,r,t,f,d,e, [TIMES,n]</pre><p class="para_division">where</p>
      <p class="para_division">x,y,z is the center of the curve or helix in MCS.</p>
      <p class="para_division">i,j,k is the circle or helix axis vector in the MCS (assuming a clockwise direction).</p>
      <p class="para_division">r is radius of the circle or helix.</p>
      <p class="para_division">t is the total tolerance, equal to INTOL + OUTTOL. (Uses custom tolerances if any are specified)</p>
      <p class="para_division">f is ratio = INTOL / (INTOL + OUTTOL). (Uses default tolerances for the part) For example, if f is .25, this means that 1/4 of the total tolerance is INTOL.</p>
      <p class="para_division">d is the tool diameter.</p>
      <p class="para_division">e is the corner radius of the tool.</p>
      <p class="para_division">TIMES, n specifies the revolution number where a helical motion stops at the terminating point, in cases where there is more than one revolution. If TIMES is not present, the motion is less than one full revolution, and the cutter stops the first time it reaches the terminating point.</p>
      <p class="para_division">For example: There is 30 degrees between the beginning point and the terminating point of an arc or helix. If TIMES isn't specified, the cutter only moves 30 degrees. It leaves the beginning point, and stops the first time it reaches the terminating point. If TIMES, 2 is specified, the cutter stops at the terminating point during the revolution number 2, traveling a total of 390 degrees (360 + 30). If TIMES, 5 is specified, the cutter completes 4 full revolutions, and then stops during revolution number 5, for a total of 1470 degrees (360 x 4 + 30).</p>
      <table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_note">
                  <p class="para_note_body"> The system only creates and recognizes arcs of less than 180 degrees.</p>
               </div>
            </td>
         </tr>
      </table>
      <p class="para_division">A GOTO command must appear before and after the CIRCLE statement to mark the start and end points of the curve. When the CL-file is generated, each CIRCLE statement is interpolated into a block of GOTO commands which approximate the arc.</p>
      <table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_note">
                  <p class="para_note_body"> For any GOTO, GODLTA, or CIRCLE command automatically generated by the system, there is a limit of ten characters in any field of the command. This includes the decimal place and minus sign, if applicable. If a record is generated that exceeds this limit, the system completely fills that field with asterisks.</p>
               </div>
            </td>
         </tr>
      </table>
      <p class="para_division">Macro commands (macros) are a powerful way of handling repetitive tasks in the CLSF with a minimum of coding. A macro is a series of CLSF statements that can be invoked with one major word, CALL. Those familiar with programming will recognize that the use of macros is similar to using subroutines.</p>
      <div class="title_division">MACRO Commands</div>
      <p class="para_division">There are two types of macros in NX machining: in-line macros and library macros. An in-line macro is written in the CLSF and can only be used in the CLSF in which it is defined. A library macro is written and stored as a separate CLSF in the current directory and can be called by any CLSF.</p>
      <p class="para_division">Variables can be passed to a macro before it is called, and default variables are allowed. Variables in a macro must be declared in the macro.</p>
      <p class="para_division">The in-line macro name must start with an alphabetic character and may consist of up to six alphanumeric characters. No punctuation characters or operators may be used. This name may not be used in any other Macro or SYN (synonym) statements. Macro names may not be subscripted.</p>
      <p class="para_division">Examples of valid and invalid macro names are as follows:</p>
      <table border="1" cellspacing="2" frame="void" rules="none" align="center">
         <colgroup span="1">
            <col span="1" width="49*">
            <col span="1" width="62*">
            <col span="1" width="185*">
         </colgroup>
         <tr>
            <th bgcolor="#D0D0D0" colspan="1" rowspan="1" valign="middle">
               <p class="para_th">Valid Names</p>
            </th>
            <th bgcolor="#D0D0D0" colspan="1" rowspan="1" valign="middle">
               <p class="para_th">Invalid Names</p>
            </th>
            <th bgcolor="#D0D0D0" colspan="1" rowspan="1" valign="middle">
               <p class="para_th">Explanation</p>
            </th>
         </tr>
         <tr>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="top">
               <p class="para_td">M10</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="top">
               <p class="para_td">10</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="middle">
               <p class="para_td">NO ALPHABETIC CHARACTER</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="top">
               <p class="para_td">M1</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="top">
               <p class="para_td">1M</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="middle">
               <p class="para_td">FIRST CHARACTER NOT ALPHABETIC</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#F7F7F7" colspan="1" height="30" rowspan="1" valign="top">
               <p class="para_td">DRILL1</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" height="30" rowspan="1" valign="top">
               <p class="para_td">DRILL</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" height="30" rowspan="1" valign="middle">
               <p class="para_td">VOCABULARY WORD</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="top">
               <p class="para_td">LMAC1</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="top">
               <p class="para_td">TLMAC10</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="middle">
               <p class="para_td">MORE THAN SIX CHARACTERS</p>
            </td>
         </tr>
         <tr>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC1</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC(1)</p>
            </td>
            <td bgcolor="#F7F7F7" colspan="1" rowspan="1" valign="middle">
               <p class="para_td">NAME SUBSCRIPTED</p>
            </td>
         </tr>
      </table><br><div class="title_division">Calling a Macro</div>
      <p class="para_division">Once you define a macro, you can execute it by inserting a CALL statement in the CLSF. The format for the CALL statement is:</p><pre class="indent">CALL/macroname[,list]</pre><p class="para_division">The optional argument [,list] contains macro variables whose values can be defined in each CALL statement. This use of optional arguments is discussed later in this section.</p>
      <p class="para_division">Example: If you have a tool change routine with six statements, instead of repeating the routine where tool changes are needed, you would simply code:</p><pre class="indent">CALL/TCMAC</pre><p class="para_division">and the statements composing the TCMAC macro would be executed.</p>
      <p class="para_division">Suppose that a macro definition and the calling of the macro are in different tool paths. If you list these tool paths in the Operation Manager (or the Tool Path Action, List in the Tool Path Manager), you will get Undefined Macro warnings. This is because the system lists the tool paths separately in these cases, and will therefore not find the macros defined in other tool paths. To list multiple tool paths as a whole, use CLSF Action, List in the Tool Path Manager.</p>
      <div class="title_division">In-Line Macros</div>
      <p class="para_division">An in-line macro is written entirely within a CLSF. The macro must physically precede any CALL command that uses it. Because of this, you may wish to code all macros near the top of the CLSF. The format for an in-line macro is:</p><pre class="indent">name=MACRO[/argument list] 
statement 
statement 
statement 
TERMAC</pre><p class="para_division">The first line indicates the start of the macro and names it. The statements to be processed follow the macro statement and are processed in the order in which they are written. In the following example, a macro with the name STTMAC, the FEDRAT command is executed first; then the COOLNT command and the GODLTA command are executed. The TERMAC statement is used to indicate the end of the in-line macro.</p><pre class="indent">100 STTMAC=MACRO 
110 FEDRAT/15 
120 COOLNT/ON 
130 GODLTA/5,2,1 
140 TERMAC</pre><p class="para_division">The following is an example of an in-line macro:</p>
      <table cellspacing="0" width="721" align="center">
         <colgroup span="1">
            <col align="left" span="1" width="82*">
            <col span="1" width="117*">
         </colgroup>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">Machine Coordinate System</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">MSYS0.00,0.00,0.00,1.00,0.00,0.00,0.00,1.00,0.00 
$$
$$
$$MACRO DEFINITION 
$$ 
MAC1=MACRO SPINDL/ON</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">In-Line Macro</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">GOTO/7.00,3.00,1.00 <br>FEDRAT/IPM,15 <br>OPSTOP</pre></td>
         </tr>
         <tr>
            <td colspan="1" height="113" rowspan="1" valign="top"><pre class="indent">Tool Path Header</pre></td>
            <td colspan="1" height="113" rowspan="1" valign="top"><pre class="indent">TERMAC 
TOOL PATH/P1,TOOL,T1 
$$ 
$$</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">$$ 
TLDATA/MILL,0.375,0.187,1.000,0.000,0.000,0.000 
GOTO/-0.8038,2.5875,0.0000 
GOTO/-0.7897,0.0776,0.0000 
GOTO/ 0.8038,0.1199,0.0000 
GOTO/ 0.7474,-0.8672,0.000 
GOTO/-0.8038,-0.7967,0.0000 
GOTO/-0.7897,-1.8684,0.0000 
END-OF-PATH 
$$</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">Call Command</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">$$ 
CALL/MAC1 
$$</pre></td>
         </tr>
      </table><br><div class="title_division">Library Macros</div>
      <p class="para_division">A library macro is a separate CLSF and is retrieved from the current or designated directory when called. The name by which you CALL the macro must be the CLSF filename of the macro. Unlike the in-line macro, no TERMAC statement is used with a library macro. Library macro names can consist of up to 30 alphanumeric characters (plus the file extension, &quot;.CLS&quot;) - the same as CLS file names. The following format is used for library macros:</p><pre class="indent">MACRO[/ argument list] 
statement 
statement 
statement </pre><p class="para_division">The Macro statement must be the first statement in a library macro.</p>
      <p class="para_division">Example: The following macro might be filed in the current directory under the name STARTM. Note that there is neither a STARTM=MACRO nor a TERMAC statement within the file.</p><pre class="indent">MACRO 
SPINDL/ON 
GOTO/7.00,7.00,0.00 
FEDRAT/IPM,10.0</pre><p class="para_division">This macro would be called with the statement CALL/STARTM.</p>
      <div class="title_division">Macro Variables</div>
      <p class="para_division">A macro variable is a symbol (of six or fewer characters) used in a macro to represent a scalar or vocabulary word. Variable fields are designated when the macro is defined. The following example shows a macro using variable fields.</p><pre class="indent">100 MAC1=MACRO/A=15,B=ON,C=5 
110 FEDRAT/A 
120 COOLNT/B 
130 GODLTA/C 
140 TERMAC</pre><p class="para_division">The values assigned to A, B, and C in the macro statement become the default values and are used in macro execution when the macro is first called, if values are not supplied with the call statement.</p>
      <p class="para_division">CALL/MAC1 calls the macro and allows initial values to be used, while CALL/MAC1,A=10,B=ON,C=2 supplies altered values for that one call.</p>
      <p class="para_division">Default values do not have to be assigned when the macro is first defined. They can be designated the first time the macro is called.</p>
      <p class="para_division">In this example:</p><pre class="indent">100 MAC1=MACRO/A,B,XC,YC,ZC 
110 FEDRAT/A 
120 COOLNT/B 
130 GODLTA/XC,YC,ZC 
140 TERMAC</pre><p class="para_division">No values have been assigned to variables A, B, or C.</p>
      <p class="para_division">When the macro is first called during CLSF execution, supply the variable information. The following example shows a CALL statement assigning values to the variables.</p><pre class="indent">CALL/MAC1,A=15,B=ON,C=5</pre><p class="para_division">The assigned values are valid for one call only. If you fail to supply variable information each time the macro is called, the error message Undefined Argument appears.</p>
      <p class="para_division">Default values are not changed in subsequent CALL statements by specifying new values. If new values are not specified the next time the macro is called, the system uses the default values.</p>
      <p class="para_division">There are some restrictions to remember when using variables:</p>
      <ul>
         <li>
            <p class="para_item">algebraic expressions are not allowed;</p>
         </li>
         <li>
            <p class="para_item">fields cannot be subscripted;</p>
         </li>
         <li>
            <p class="para_item">all variables designated in the definition must also be defined in the statements to be executed.</p>
         </li>
      </ul>
      <p class="para_division">You can use some vocabulary words such as DWELL, MILL, THREAD, etc. as major or minor words. These words can only be used as minor words when they are defined as values of macro variables.</p>
      <p class="para_division">The following major words denote an operation and cannot be used as a default or assigned value of variables.</p>
      <table cellspacing="0" frame="box" rules="all" width="400" align="center">
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">JUMPTO</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">SYN</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">TRANTO</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">DEF</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">FINI</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">RESERV</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">MACRO</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">LISTING</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">TERMAC</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">NOTAPE</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">CALL</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">INCLUD</pre></td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">SYSLIB</pre></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">OBTAIN</pre></td>
         </tr>
      </table><br><div class="title_division">Macro Nesting</div>
      <p class="para_division">One macro may call another macro. An in-line macro may contain a CALL command for a library macro or for another in-line macro. Library macros may reference other library macros. The maximum level of nesting is ten; that is, the first macro can call a second, which can call a third, and so on until a tenth macro is called. If a level of ten is reached, program flow must return to at least the ninth level before any additional macro is called.</p><pre class="indent"></pre><p class="para_division">The program shown below contains one macro nested within another. The double dollar signs ($$) indicate comment lines.</p>
      <p class="para_division">MAC1 is defined in lines 7 through 11. MAC2 is defined in lines 15 through 23. MAC1 is nested into MAC2 on line 19 of the MAC2 definition.</p>
      <p class="para_division">Line 140 shows the CALLing of MAC2, which will in turn CALL MAC1.</p>
      <p class="para_division">Note that MAC1 definition precedes MAC2 definition in the program. A macro must physically precede any CALL statement in which the name of the macro appears.</p>
      <table cellspacing="0" width="600" align="center">
         <colgroup span="1">
            <col span="1" width="47*">
            <col span="1" width="46*">
            <col span="1" width="204*">
         </colgroup>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">1</pre></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">2</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$ EXAMPLE OF MACRO NESTING</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">3</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$ BOTH MACROS ARE IN-LINE MACROS</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">4</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC1</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">5</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$ DEFINITION OF MAC1 -- TOOL CHANGE1</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">6</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">7</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC1=MACRO/TN</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">8</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">SELECT/TOOL,TN</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">9</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">LOAD/TOOL ,TN</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">10</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">GOTO/7.00 ,7.00 ,2.00</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">11</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">TERMAC</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">12</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC2</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">13</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">STOP/START</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">14</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">15</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC2=MACRO/A,B,C,D</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">16</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">COOLNT/OFF</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">17</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">SPINDL/OFF</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">18</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC218 GOTO/0,0,2</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">calls</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">19</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CALL/MAC1,TN=A</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC1</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">20</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">SPINDL/RPM,B,RANGE,C</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">21</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">FEDRAT/IPM,D</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">22</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">COOLNT/ON</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">23</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">TERMAC</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">30</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">40</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">TOOL PATH USING MACROS</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">50</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">60</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MSYS/0.00,0.00,0.00,1.00,0.00,0.00,0.00,1.00,0.00</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">70</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">* TOOL PATH/,P1</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">72</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">* TLDATA/MILL,0.3750,0.1875,2.0000,0.000,0.0000,0.0000</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">80</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">GOTO/-0.8038,2.5875,0.0000</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">90</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">GOTO/-0.7897,0.0776,0.0000</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">92</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">* END-OF-PATH</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">94</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">96</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MACRO CALL</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">Call</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">97</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAC2</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">98</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CALL/MAC2,A=1,B=400,C=HIGH,D=12.0</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top"></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">99</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">$$</p>
            </td>
         </tr>
      </table><br><div class="title_division">CONTROL Commands</div>
      <p class="para_division">The control commands INDEX, COPY, and CYCLE, allow you to repeat a sequence of motion commands.</p><pre class="indent"></pre><p class="para_division">The combination of the INDEX and COPY commands may be used to repeat, translate or rotate motion points. These commands can be nested in the same manner as macros. The CYCLE command is used to specify a sequence of different operations at identical points on the part.</p>
      <div class="title_division">The INDEX Command</div>
      <p class="para_division">The INDEX command is used to frame a part of the program that is to be copied by the COPY command.</p>
      <p class="para_division">The code to be copied should be preceded by: INDEX/K</p>
      <p class="para_division">where K is a unique integer between -2048 and 2047.</p>
      <p class="para_division">The code to be copied should be followed by: INDEX/K,NOMORE</p>
      <p class="para_division">where K is the same integer.</p>
      <p class="para_division">Example:</p><pre class="indent">INDEX/1 
GOTO/-3.442,-4.8738,0 
GOTO/-3.4186,-4.8760,0 
GOTO/-3.4125,-4.8761,0 
INDEX/1,NOMORE</pre><p class="para_division">Later in the program, execution of a COPY/1 command (in the basic format COPY/K) will result in a repetition of this code.</p>
      <p class="para_division">One set of INDEX commands can be nested within another set of INDEX commands as shown in the following example:</p><pre class="indent">INDEX/2 
INDEX/1 
GOTO/-3.442,-4.8738,0 
GOTO/-3.4186,-4.8760,0 
GOTO/-3.4125,-4.8761,0 
INDEX/1,NOMORE 
COPY/1,TRANSL,1,1,0,3 
INDEX/2,NOMORE 
$$ 
COPY/2,XYROT,15,3
</pre><p class="para_division">Up to ten levels of nesting are permitted.</p>
      <p class="para_division">Note that the INDEX/2 and INDEX/2,NOMORE statements bracket the INDEX/1 and INDEX/1,NOMORE portion of the program. The use of the COPY/1 and COPY/2 statements is explained in the next section.</p>
      <p class="para_division">The listing will not show the expanded CLSF. To see the expanded CLSF, select Replay in the CLSF Manager dialog.</p>
      <div class="title_division">The COPYCommand</div>
      <p class="para_division">The COPY command generates copies of all CLSF statements between the framing INDEX/K and INDEX/K,NOMORE statements. It has the format:</p>
      <p class="para_division"> <img align="bottom" src="graphics/mm_clsfmgr_clAt03.gif" border="0"></p>
      <p class="para_division">In each of these formats, K is the number of the INDEXed code to be used (the same number as the INDEX/K and INDEX/K,NOMORE statements being called).</p>
      <p class="para_division">COPY/K,SAME,n - This option copies the same actions, without alteration, &quot;n&quot; number of times. The repetition count (n) must be a positive integer. This command might be used to produce a quantity of simple parts, one at a time, by repeating the complete sequence of cutting instructions.</p>
      <p class="para_division">COPY/K,TRANSL,dx,dy,dz,n - This option copies statements &quot;n&quot; times, translating the motion points by a specified delta (dx,dy,dz) each time. Since the translation is cumulative from the original position, the first copy consists of the original data translated the dx,dy,dz distances; the second copy consists of the original data translated to 2dx,2dy,2dz; and the last copy consists of the original data translated by ndx,ndy,ndz.</p>
      <p class="para_division">COPY/K,XYROT,a,n - This option copies statements &quot;n&quot; times, rotating the motion points about the MCS origin through an angle, &quot;a.&quot; Since the translation is cumulative from the original position, the first copy consists of the original data translated by angle &quot;a&quot;; the second copy consists of the original data rotated by angle &quot;2a&quot;; and the last copy consists of the original data rotated by angle &quot;na.&quot;</p>
      <p class="para_division">To see some of the power of the INDEX and COPY commands, review the example given for INDEX.</p><pre class="indent">1 INDEX/2 
2 INDEX/1 
3 GOTO/-3.442,-4.8738,0 
4 GOTO/-3.4186,-4.8760,0 
5 GOTO/-3.4125,-4.8761,0 
6 INDEX/1,NOMORE 
7 COPY/1,TRANSL,1,1,0,3 
8 INDEX/2,NOMORE 
9 $$ 
10 COPY/2,XYROT,15,3
</pre><p class="para_division">When the program executes the COPY/2 statement in line 10, it copies lines between INDEX/2 and INDEX/2, NOMORE three times -- rotating each CL-point 15 degrees each time. However, within the INDEX/2 statements is a COPY/1 statement. This statement copies the lines between INDEX/1 and INDEX/1,NOMORE three times -- with a translation of CL-points. The result is nine iterations of the GOTO moves in INDEX/1.</p>
      <div class="title_division">The CYCLE Command</div>
      <p class="para_division">The CYCLE command is a postprocessor command used to perform a set of related operations without forcing the user to repeat specification of each tool motion. This command defines a specific sequence of tool motions which are to be performed repeatedly at each motion point in a series. A series of motion points consists of all CL-points between a CYCLE command and a CYCLE/OFF or another CYCLE command. Motion points following CYCLE/OFF are not part of the series.</p>
      <p class="para_division">Many CYCLE commands are generated automatically by the Point-To-Point module. However, these commands can also be entered manually through the Edit option.</p>
      <p class="para_division">The format of the cycle command is:</p>
      <p align="center"><img align="bottom" src="graphics/mm_clsfmgr_clAt02.gif"></p>
      <p class="para_division">A typical CYCLE/ statement contains an operation, a subtype of operation, specific parameters, general parameters, and scalars, though not all are required. Parameters pertinent to CLSF display are briefly described below. Refer to the appropriate postprocessor manual for details.</p>
      <p class="para_division">Example:</p><pre class="indent">CYCLE/DRILL,RAPTO,0.10,FEDTO,-1.00,RTRCTO,1.00,IPR,.012</pre><p class="para_division">The RAPTO parameter defines a clearance distance along the tool axis from the CL point to which the tool will position before performing the cycle operation. This distance is normally a positive value. In the example, this distance is 0.10.</p>
      <p class="para_division">The FEDTO parameter defines the distance along the tool axis from the CL point to which the tool feeds. This distance is normally a negative value to represent tool motion into the part. In the example, this distance is -1.00.</p>
      <p class="para_division">The RTRCTO parameter defines the distance along the tool axis from the CL point to which the tool retracts following the cycle operation. If RTRCTO is not included in the CYCLE statement, the system uses the RAPTO value for the retract distance. The RTRCTO distance is normally a positive value. In the example, this distance is 1.00.</p>
      <p class="para_division">CYCLE/DRILL,CSINK is a special type of cycle for a countersinking operation. It uses the CSKDIA and TLANGL parameters instead of the FEDTO parameter to define tool depth.</p>
      <p class="para_division">Example:</p><pre class="indent">CYCLE/DRILL,CSKINK,CSKDIA,0.75,TLANGL,118.000,RAPTO,0.10,RTR CTO,0.10,IPR,.012</pre><p class="para_division">The CSKDIA parameter defines the diameter of the countersink. In the example, this value is 0.75.</p>
      <p class="para_division">The TLANGL parameter defines the tool point angle. This value should be greater than zero and less than 180. In the example, the tool point angle is 118 degrees.</p>
      <p class="para_division">If any CYCLE is active (except CYCLE/MILL) and either a RAPTO and FEDTO or a CSKDIA and TLANGL are also active, the CLSF display shows positioning motions to the RAPTO point, feed motions to tool depth and retract motions back to the RAPTO or RTRCTO point. Positioning moves between CL points are displayed as dashed lines to represent rapid motion. Feed moves to depth are displayed as solid lines.</p>
      <p class="para_division">If a tool axis is not active (no I,J,K values with GOTO x,y,z values) and the RAPTO plane changes from one point to the next, the positioning move between the two points is displayed as a squared move. If the new RAPTO plane is higher, a move along the tool axis followed by a move perpendicular to the tool axis is displayed. If the new RAPTO plane is lower, a move perpendicular to the tool axis is displayed first, followed by a move along the tool axis. This is intended to simulate motions generated by the target postprocessor or machine tool.</p>
      <div class="title_division">Usage Notes</div>
      <p class="para_division">Assume you have framed a series of point-to-point moves with INDEX and INDEX,NOMORE statements:</p><pre class="indent">INDEX/3 
GOTO/1,1,0 
GOTO/2,2,0 
GOTO/3,3,0 
INDEX/3,NOMORE
</pre><p class="para_division">The following CYCLE statements would manage drilling, boring and tapping:</p><pre class="indent">CYCLE/DRILL,RAPTO,0.10,FEDTO,-1.00,IPR,.012 
COPY/3,SAME,1 
CYCLE/BORE,FEDTO,-.75,IPR,.008 
COPY/3,SAME,1 
CYCLE/TAP,FEDTO,-.75,IPR,.0833 
COPY/3,SAME,1
</pre><p class="para_division">The following shows CYCLE commands and the characters displayed at subsequent CL-Points.</p>
      <table cellspacing="0" frame="box" rules="all" width="379" align="center">
         <colgroup span="1">
            <col span="1" width="99*">
            <col span="1" width="99*">
         </colgroup>
         <tr>
            <td colspan="1" rowspan="1" valign="top"><pre class="indent">STANDARD CYCLE</pre></td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CHARACTERS DISPLAYED</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/BORE</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">B</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/BORE,BACK</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">BB</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/BORE,DRAG</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">BD</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/BORE,MANUAL</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">BM</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/BORE,NODRAG</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">BN</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/DRILL</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">D</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/DRILL,BRKCHP</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">DB</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/DRILL,CSINK</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">DC</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/DRILL,DEEP</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">DD</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/MANUAL</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">MAN</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/TAP</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">T</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/OFF</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">Turns off the displayed character</p>
            </td>
         </tr>
         <tr>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">CYCLE/ON</p>
            </td>
            <td colspan="1" rowspan="1" valign="top">
               <p class="para_td">Reinstates the previous character display</p>
            </td>
         </tr>
      </table><br><div class="title_division">Synonyms</div>
      <p class="para_division">The SYN (synonym) command is used to assign customized names to N/C Machining vocabulary words. This command is useful for abbreviating frequently used words or scalars. Synonyms cannot be used for the words SYN, CALL, TOOL PATH or END-OF-PATH.</p><pre class="indent"></pre><p class="para_division">The format of each SYN command is a couplet: the synonym and the vocabulary or scalar value to be assigned to it:</p><pre class="indent">SYN/newterm,oldterm[,newterm,oldterm]...</pre><p class="para_division">Note that you can use one SYN statement to assign several synonyms:</p><pre class="indent">SYN/PI,3.14 
SYN/PI,3.14,FAST,RAPID 
SYN/PI,3.14,FAST,RAPID,F,FEDRAT
</pre><p class="para_division">In the above examples, the scalar value 3.14 is assigned to PI, RAPID is assigned to the variable FAST, and FEDRAT is assigned to the variable F.</p>
      <p class="para_division">Synonyms may be up to six alphanumeric characters in length, and the first character must be alphabetic. Once a synonym is established as a substitute for a vocabulary word, you can use the synonym anywhere the original word itself might have been used. The synonym does not replace the word in the N/C Machining vocabulary list, so either can be used.</p>
      <div class="title_division">Comments and Continuations</div>
      <p class="para_division">If a command contains more than 132 characters, it can be continued on the next line by entering a single dollar sign ($) at the end of the partial command.</p>
      <p class="para_division">Any characters on the same line following the dollar sign are considered comments.</p>
      <p class="para_division">The characters on the next line are treated as part of the previous command. For example, the following lines ...</p><pre class="indent">30 DELAY/REV, $ COMMENT BLAH BLAH BLAH 
40 2</pre><p class="para_division">... are the same as the single statement:</p><pre class="indent">30 DELAY/REV,2</pre><p class="para_division">... but not...</p><pre class="indent">30 DELAY/REV,2 $ COMMENT BLAH BLAH BLAH</pre><p class="para_division">...because the single dollar sign indicates that the command is split.</p>
      <p class="para_division">Also, do not split a major or minor word or a number. For example:</p><pre class="indent">50 FED$ 
60 RAT,IPM,10</pre><p class="para_division">... causes an error message to be displayed when you attempt to display the CLSF or generate the CL-file. Also, you cannot use a continuation between a major word and the following slash (/).</p><pre class="indent">70 SPINDL$ 
80 /OFF</pre><p class="para_division">If the command is not split, use double dollar signs ($$) to indicate that the command is complete. For example:</p><pre class="indent">30 DELAY/REV,2 $$ COMMENT BLAH BLAH BLAH</pre><p class="para_division">Also, you can create comment lines by using double dollar signs to title sections of the CLSF file, to flag where tool control commands are needed, to make the code more readable, etc. For example:</p><pre class="indent">130 $$ 
140 $$ MOVE CLAMPS TO POSITION 2 
150 $$
</pre><p class="para_division">Comments are not processed when a CLSF or a CL-file is generated.</p>
   </body>
</html>