You are on page 1of 91

Post Processing

Ge

T M

Information in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic, or mechanical, for any purpose, without the express written permission of Delcam USA. The software described in this document is furnished under a license agreement. The software may be used or copied only in accordance with the terms of the agreement. 1995 2005 Delcam USA. All rights reserved. FeatureCAM, EZFeatureMILL FeatureTURN, EZFeatureTURN, FeatureMILL3D and FeatureCAM and are trademarks of Delcam USA in the United States of America and other countries. Restricted Rights Legend The Program and Program Materials are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the United States Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software Clause at DFARS 252.227-7013, Manufacturer is the Licensor: Delcam USA. Permission to Copy for Licensed Users Delcam USA grants permission for licensed users to print copies of this manual or portions of this manual for personal use only. Schools that are licensed to use FeatureCAM may make copies of this manual or portions of this manual for students currently registered for classes where FeatureCAM is used. June 2005 Twelfth Edition Delcam US 275 East South Temple, Suite 305 Salt Lake City, UT 84111

Table Of Contents
XBuild General Post Processor ....................................................................................................... 1 Post Processing in FeatureCAM ................................................................................................. 1 Referencing the post processor ............................................................................................... 1 Template concept.................................................................................................................... 1 Posting file types..................................................................................................................... 2 Types of post processors......................................................................................................... 2 XBuild File Menu ....................................................................................................................... 3 Open CNC .............................................................................................................................. 3 Save CNC ............................................................................................................................... 3 Save as CNC ........................................................................................................................... 3 Document CNC ...................................................................................................................... 3 Save & Test CNC ................................................................................................................... 3 Exit.......................................................................................................................................... 3 Reserved Words .......................................................................................................................... 3 NUMERIC-TYPE RESERVED WORDS.............................................................................. 4 STRING-TYPE RESERVED WORD.................................................................................... 4 ESTABLISHING CONDITIONAL STATEMENTS ............................................................ 4 Words-1 Words-2 Words-3 Words-4 ..................................................................................... 5 Formats menu.............................................................................................................................. 6 Program .................................................................................................................................. 6 Move....................................................................................................................................... 6 Macro...................................................................................................................................... 6 Cycle....................................................................................................................................... 6 Custom.................................................................................................................................... 6 Formats editor ............................................................................................................................. 7 Words list................................................................................................................................ 7 Save Format ............................................................................................................................ 7 Previous Format...................................................................................................................... 8 Next Format ............................................................................................................................ 8 Save & Test CNC ................................................................................................................... 8 Quit ......................................................................................................................................... 8 Edit menu................................................................................................................................ 8 Using expressions in formats ...................................................................................................... 8 Printing square brackets.......................................................................................................... 8 XBuild numeric operators....................................................................................................... 8 XBuild logical operators....................................................................................................... 10 Xbuild string operators ......................................................................................................... 11 Assignment ........................................................................................................................... 11 Formatting expressions......................................................................................................... 12 Suppressing the printing of an expression ................................................................................ 12 Example expressions ............................................................................................................ 13 Making reserved words modal .................................................................................................. 13 Entering mixed printable ASCII and non-printable codes ........................................................ 14 Milling........................................................................................................................................... 15 CNC Info Menu ........................................................................................................................ 15 Logical Reserved word table ................................................................................................ 15 General.................................................................................................................................. 16 NC-Codes ............................................................................................................................. 19

iii

XBuild Reference Manual Fixture ID.............................................................................................................................. 20 5-axis machine types............................................................................................................. 20 Formats menu............................................................................................................................ 26 Program ................................................................................................................................ 26 Move..................................................................................................................................... 26 Macro.................................................................................................................................... 26 Cycle..................................................................................................................................... 26 Custom.................................................................................................................................. 26 Numeric Reserved word table................................................................................................... 26 Milling program formats ........................................................................................................... 29 Rules ..................................................................................................................................... 29 Defining program formats .................................................................................................... 30 Program start rules................................................................................................................ 30 Tool change rules.................................................................................................................. 30 Segment start rules................................................................................................................ 30 File End................................................................................................................................. 31 Defining program moves ...................................................................................................... 31 Defining cycle formats ......................................................................................................... 31 Defining macro formats........................................................................................................ 32 Hole canned cycles in XBuild................................................................................................... 33 Using FeatureCAM and XBuild................................................................................................ 33 Input dimension .................................................................................................................... 34 Cycle types............................................................................................................................ 34 Z data .................................................................................................................................... 35 Handling cutter compensation .............................................................................................. 35 Handling multiple fixture documents ................................................................................... 35 Handling Pecking.................................................................................................................. 36 Handling 3D arcs .................................................................................................................. 37 Fanuc line numbering ........................................................................................................... 38 Handling milling macros........................................................................................................... 38 Expected G-code for different post settings ......................................................................... 38 Configuring a post for local coordinate systems................................................................... 39 Configuring a post for incremental macros .......................................................................... 41 Fourth and fifth axis support ..................................................................................................... 43 Rotation styles ...................................................................................................................... 43 4th axis indexing in the post ................................................................................................. 45 4th axis wrapping in the post ................................................................................................ 45 5th axis indexing in the post ................................................................................................. 46 Handling Turn/mill program formats........................................................................................ 47 Turning .......................................................................................................................................... 49 Turning CNC Info Menu........................................................................................................... 49 General.................................................................................................................................. 49 NC Codes.............................................................................................................................. 49 Turrets................................................................................................................................... 49 Turrets Information ................................................................................................................... 49 Spindles ................................................................................................................................ 50 Feeds and Speeds.................................................................................................................. 50 Cycles ................................................................................................................................... 50 Fixture ID.............................................................................................................................. 51 Formats Menu ........................................................................................................................... 51 Defining Program Formats ................................................................................................... 51

iv

Table Of Contents Rules for Program Formats................................................................................................... 51 Program Formats .................................................................................................................. 52 Move Formats....................................................................................................................... 52 Cycle Formats....................................................................................................................... 54 Groove Path Start and Groove Path End Formats ................................................................ 56 Turning Numeric Reserved Words ........................................................................................... 56 Numeric General Words ....................................................................................................... 56 Numeric Turning Canned Cycle Block Words..................................................................... 57 Numeric Circular Block Words ............................................................................................ 58 Numeric Drilling and Threading Type Cycle Words ........................................................... 58 LOGICAL RESERVED WORDS FOR Turning CONDITIONAL STATEMENTS .............. 59 Turning String-type reserved words.......................................................................................... 60 Relationship between FeatureTURN and XBUILD.................................................................. 62 Roughing and Profiling Cycles............................................................................................. 62 START/END POINTS ......................................................................................................... 62 OTHER RESERVED WORDS ............................................................................................ 62 Computed tapping cycles in turning ......................................................................................... 62 Turn/Mill ....................................................................................................................................... 63 Handling Turn/mill program formats........................................................................................ 63 TURN / MILL logical variables................................................................................................ 64 TURN / MILL Keywords ......................................................................................................... 64 Multi-turret Turning ...................................................................................................................... 65 Multi-turret Keywords .............................................................................................................. 65 Multi-turret Posts ...................................................................................................................... 65 Synchronizing Spindle Speed Changes on Okuma Lathes ................................................... 65 Pinch and Follow Turning .................................................................................................... 66 Wire EDM ..................................................................................................................................... 67 EDM CNC info menu ............................................................................................................... 67 General information.............................................................................................................. 67 NC Codes.............................................................................................................................. 67 Machine Constants................................................................................................................ 67 EDM reserved words ................................................................................................................ 68 EDM program formats .............................................................................................................. 70 Program formats ................................................................................................................... 70 Move formats........................................................................................................................ 71 Macro formats....................................................................................................................... 72 Using FeatureWIRE and XBuild .............................................................................................. 73 Input Dimension ................................................................................................................... 73 Path Definition...................................................................................................................... 73 Other Reserved Words.......................................................................................................... 73 Handling Macros .................................................................................................................. 73 Handling Wire Compensation .............................................................................................. 73 Handling Tapers.................................................................................................................... 74 Handling XY UV.................................................................................................................. 74 Cycle Type............................................................................................................................ 75 Outputting 4-axis wire EDM arc moves ............................................................................... 75 Tutorials......................................................................................................................................... 77 Understanding Milling Formats ................................................................................................ 77 General Tutorial Description..................................................................................................... 77 Specific Instructions.................................................................................................................. 77 Summary of new formats .......................................................................................................... 78

XBuild Reference Manual Understanding Drilling Formats ............................................................................................... 78 Creating Program Formats ........................................................................................................ 79 Index.............................................................................................................................................. 81

vi

Chapter 1 XBuild General Post Processor


Post Processing in FeatureCAM
Various machine tool manufacturers have implemented CNC (Computerized Numerical Control) program standards that differ in detail from each other (and from the EIA RS-274C standard). Because of this wide range of standards, XBuild was designed to allow for the creation of CNC information files for virtually any CNC. The process of creating a CNC information file is also referred to as building a post processor.

Referencing the post processor


Please note that, throughout this section the Post module is referred to as though it were separate from the FeatureCAM program. It is in fact, part of the FeatureCAM program, but for the sake of simplicity it is referred to as a separate entity from FeatureCAM. This concept is important to understanding many of the references to the Post module.

Template concept
The CNC data file created in XBuild is used by Post as a "template" to format the part program data file created in FeatureCAM. The template consists of program formats (e.g., LINEAR MOVE, RAPID MOVE, etc.) that determine the structure of a part program for a specific CNC. Each format uses address characters (X, Z, etc.) and Reserved Words such as <X-COORD>, <ZCOORD>, etc., to indicate the sequence of data in program blocks. Program formats are sequentially filled (i.e., Reserved Words are substituted by their corresponding values, G and M codes [machine tool codes]) when the part program data file is post processed. A typical CNC program LINEAR MOVE format block that is output by Post might look like this: N305G1Z3.4X2.753F5.<CR>

XBuild Reference Manual Post extracts the coordinate data from the FeatureCAM part program data file, as well as the line format from the XBuild CNC information file. Then, the appropriate values are substituted to generate the line of code. Letter addresses N, Z, X and F are typed as literals, and appear in the output CNC file as they appear in the format block. The Reserved Words <SEQ>, <MOTION>, etc., identify placement of corresponding values (or strings) in the block. Codes can be imbedded in a program format. To enter these control characters, type the decimal value equivalent of the ASCII code, delimited by angular brackets.

Posting file types

Types of post processors


XBuild allows you to create post processors four different types of machines. These types are specified as the Machine Type in the General Information dialog box.

Milling post processors

XBuild General Post Processor

XBuild File Menu


The XBuild file menu is the same for all post processor types.

Open CNC
Use Open CNC to load an XBuild post file. A Windows open dialog box is displayed allowing user to browse computer directory for a post processor. Post processors have a .CNC file extension. Post processors are kept in the folders M-LBRY, T-LBRY and E-LBRY within the FeatureCAM folder. Mill posts are in M-LBRY, Turn posts are in T-LBRY and Wire posts are in E-LBRY.

Save CNC
Saves new or updated CNC file. Note: The use of post processors in FeatureCAM is restricted by the particular version of XBUILD / FeatureCAM it was created or modified in. A post created or modified in a newer version of XBUILD will not be backward compatible with an older version. Post processors are forward compatible with newer versions of FeatureCAM. A warning message will be displayed when saving a post that was modified in a newer version than the one it was created in. This is not a problem unless the post needs to be used in an older version or FeatureCAM.

Save as CNC
Saves file with user defined name and location.

Document CNC
CNC files are binary files and cannot be directly printed. Use Document CNC to create a text file from the current CNC data file. This file can be edited and printed with any text editor. These files have a .CNX extension.

Save & Test CNC


Saves changes to post and enables user to view changes to NC code without exiting XBuild.

Exit
Exit closes XBuild.

Reserved Words
Reserved Words are specific words that are saved for system use, and can represent a numeric value, a string (sequence of alphanumeric characters, e.g., M03), or a logical variable. Another type of Reserved Word is the system-type. System Reserved Words are used to establish conditional statements. Reserved Words are referenced in program formats by enclosing each word with angular brackets (< >). Additional ASCII characters (e.g., X, Z and F) are used to specify the letter for each word address. There are four types of Reserved Words: Numeric, String, Logical and System Reserved Words.

XBuild Reference Manual

NUMERIC-TYPE RESERVED WORDS


Numeric-type Reserved Words are replaced by their numeric values when Post is executed. For example, the numeric-type Reserved Word <X-COORD> is replaced by the current X axis coordinate position. Each numeric Reserved Word contains a corresponding Words Tables record to specify its output format (see "Words Tables" in this chapter for more information). IMPORTANT Numeric Reserved Words can be preceded by the symbols $, or @ (<$name>, or <@name>). The $ prefix signals Post to output the previous value of a Reserved Word. The @ prefix signals Post to output an incremental value (the difference between the current value and the previous value).

STRING-TYPE RESERVED WORD


String-type Reserved Words provide a set of characters that were previously defined in CNC-Info / NC codes. For example, G01, G02, or M03 could be strings that were previously defined as <MOTION> and <SPINDLE>.

ESTABLISHING CONDITIONAL STATEMENTS


System and logical-type Reserved Words are used together to set up conditional statements that are evaluated by Post. Depending on whether a conditional statement is true, or false, Post either includes, or omits certain data from the program format. The format for a conditional statements is as follows: <IF><Logical Reserved Word><THEN> {N<SEQ>} . . . <ENDIF> or <IFNOT><Logical Reserved Word><THEN> {N<SEQ>} . . . <ENDIF>
For example, in the conditional statement (shown below), the data between the words <THEN> and <ENDIF> are only output if CSS is ON.

<IF><CSS-ON><THEN> {N<SEQ>}G96S<CSS-SPEED><EOB> <ENDIF> System Reserved Words <IF> First element in a conditional statement, always followed by a logical-type Reserved Word to verify that a condition is true <IFNOT> First element in a conditional statement, always followed by a logical-type Reserved Word to verify that a condition is false. <THEN> Second element in a conditional statement, placed after a logical-type Reserved Word.

XBuild General Post Processor <ELSE> Third element in a conditional statement following an <IF><logical><THEN> to output an alternative decision. <ELSEIF> Third and higher element in a conditional statement to verify that a condition is True. Used to evaluate multiple alternative decisions within an <IF> <ENDIF> block. <ELSEIFNOT> Third and higher element in a conditional statement to verify that a condition is false. Used to evaluate multiple alternative decisions within a single <IF> <ENDIF> block. <ENDIF> Last in a conditional statement (must be on a line by itself) <INCLUDE:CUSTOM FORMAT NAME > Operates like a subroutine by calling a custom format from within another format. The custom format is used to eliminate duplicating large blocks of code in more than one format.

Words-1 Words-2 Words-3 Words-4


When any of the Words commands are selected, a dialog box is displayed showing a table of numeric reserved words. The three buttons at the bottom of the dialog box, labelled OK, Cancel and Next can be used to preserve the changes made, exit the table without saving any changes, and advance to the next Words dialog box respectively. The Words tables display the format (symbolic name, numeric parameters and factors) for each numeric-type Reserved Word (see Figures 4-10 through 4-12). The LD_ZR, TRL_ZR, DEC_PT, +SIGN and UNS_V fields for each Reserved Word all toggle On/Off. To change an item in the table, click the mouse on the check box in the appropriate column for that item. To select the FORMT (format),or FACTR (factor) field for any of the Reserved Words, move the cursor to the appropriate box and double-click the mouse there; the selection is highlighted. To change the format, or factor, type the new value, then press Enter. The first column (far left side) in the tables identifies the symbolic name (sometimes abbreviated) of each numeric-type Reserved Word. All of the words in the table that apply to the NC machine must be configured. LD_ZR (Leading Zeros) are output if this option is toggled ON. Zeros are output in all leading positions of the value, excluding significant digit locations (e.g., 1 " with a 3.4 format would output two leading zeros [001]). TRL_ZR (Trailing Zeros) are output when this option is set to ON. Zeros are output in all trailing positions of each value output for the designated Reserved Word, excluding significant digit locations (e.g., 10" with a 3.4 format would be output with four trailing zeros [100000]). DEC_PT (Decimal Point) is used to turn the decimal point character ON/OFF (e.g., when DEC_PT is toggled ON, 100inches is output as 100.0). The character (either a [,] representing the European decimal, or a [.] representing the U.S. decimal) is specified in GENERAL INFO. +SIGN (Plus Sign) When this optional plus sign is toggled ON, the plus sign (+) is output for positive integers. UNS_V (Unsigned Value) When this is turned on, the number is output without its sign. This is often useful for distances.

XBuild Reference Manual FORMT specifies the number of digits in the numeric value, represented by each numeric-type Reserved Word. Numbers are specified in the format, N.n, where N represents the maximum number of digits to the left of the decimal point, and n is the maximum number of digits to the right of the decimal point. For example, entering 3.4 specifies a maximum +, or departure of 999.9999, or a minimum departure of 0.0001. With the Words tables, a numeric representation can be specified for each Reserved Word that requires it. FACTR is used to modify numeric values during post processing. Each value that is output by Post is multiplied by its FACTR. (e.g. some controls require arcs to be calculated from center to start point. This requires a 1 factor for <ARC-Z> and <ARC-X>).

Formats menu
The Formats menu enters specific program formats for the various parts of a program. Each format is made up of combinations of Reserved Words, literals, comments, and user-defined variables. The Formats menu lists five general groups of program formats. Each of these groups contains specific program formats which, when selected, are displayed in the Formats Editor. The five groups are:

Program
Program formats found in this group are used in almost every part program, and include commonly used formats such as: Program Start, Tool Change , Segment Start, Program End, and File End.

Move
Move formats include the rapid and feed moves which make up the largest portion of any part program. These program formats must be carefully defined. These formats include Rapid, Z Rapid, Linear , and Circular.

Macro
Macro formats include Open Macro, Close Macro, Macro Call, In-Macro Linear, and InMacro Circular. These formats do not need to be defined if the target control does not use macros.

Cycle
Cycle formats include most of the canned cycles which are found in many controls. These cycles also use specific reserved words which are discussed in detail below. The Cycle formats include Drill, Deep Hole, Tap, Bore (F-F), Chip Break, Cycle Cancel, and Canned Move.

Custom
The custom format is used as a place holder for a block of code that may be used in several different formats. The system reserved word <INCLUDE:> is placed into the appropriate section of a format that uses the block of code from the custom format. Insert name of custom format after colon. <INCLUDE: CUSTOM FORMAT NAME>

XBuild General Post Processor

Formats editor
When a program format is selected from the Formats menu, the XBuild program shifts into the Formats editor and displays the selected format on the screen. The formats editor has two menus which are used in editing the selected format; however, these menus do not change from one format to another. All program formats are edited in the same manner. The Edit menu contains standard windows text editing functions.

Words list
The Word List command displays a list of the reserved words. This list can be scrolled up and down by means of the scroll bar at the right side of the list. Moving the bar to the arrow at the top of the scroll bar and clicking the mouse there causes the list to scroll up, while the arrow at the bottom of the scroll bar causes the list to scroll downwards. The reserved words are grouped into four categories as described earlier, Numeric, String, Logical, and System. To place a reserved word into the format, (displayed in the main part of the screen) scroll the Words List to the desired word, and then click the mouse on it. The word is placed in the program format at the point where the test insertion bar was last placed. (The test insertion bar is a blinking vertical bar which shows where text will be entered. If it is not visible, move the mouse to the format window and click the mouse. Reserved words can be removed from the program format by using the backspace key on the keyboard. The text editing functions in the Formats Editor are similar to those of any Windows word processor. The Words List can be removed from the screen by double clicking the mouse in the gray box at the upper left corner of the Word List window, or by selecting the Word List command a second time in the File menu.

Modal Delimiters
Modal Delimiters can be inserted by clicking the mouse in the check box at the bottom of the Words List when this list is chosen from the File menu in on of the Program Formats. In some cases, the CNC machine can use the concept of modality to avoid redundant data and reduce the length of the program. When using modality, repeated coordinates or commands are "stripped" from the part program. String and Numeric type Reserved Words may be surrounded by modal delimiters { }, to signify to Post to remove redundant data. The modality delimiter prevents a repetitive occurrence of a Reserved Word as long as its value remains the same as the previous occurrence of it. Modal delimiters used in {<SEQ>} are placed to give the programmer the option of "stripping" all sequence numbers from the program during postprocessing. This is done by specifying 0 for the sequence step number in Post, which forces it to remain the same and allow modality to act upon it.

Save Format
Saves changes made to current format.

XBuild Reference Manual

Previous Format
Moves to format proceeding the current format. The Ctrl and P keys may be used as a shortcut to move backwards through the various formats.

Next Format
Moves to format following the current format. The Ctrl and N keys may be used as a shortcut to advance through the various formats.

Save & Test CNC


Save & Test CNC saves changes made to post and updates NC code without having to exit Xbuild.

Quit
This command is used to exit the Formats Editor and to save the modified format in memory. If any changes have been made to the selected format when the Quit command is selected, the user is prompted to save (Yes or No) the changes that were made, or to cancel the Quit command. If Cancel is selected, the Formats Editor remains active.

Edit menu
This menus contains five commands found in most Windows programs. These are briefly described here, but for more details, see the Windows Users Manual (Using the Clipboard). 1. Undo can be used to undo the last action. If a reserved word was placed incorrectly, the Undo command removes it. 2. Cut removes the selected text and places it in the clipboard where it can be recalled with the Paste command. 3. Copy places the selected text to the clipboard in the same way as the Cut command does, except that the selected text is not removed, from its selected location. 4. Paste places the contents of the clipboard at the text insertion point. 5. Delete removes the selected text without copying it to the clipboard.

Using expressions in formats

Expressions are surrounded by square brackets [ ]. They are evaluated prior to being output. This example multiplies the current X coordinate by five: [<X-COORD>*5]. This example offsets a rapid move by (5,5): N<SEQ>G00 X[<X-COORD>+5] Y[<Y-COORD>+5] Z<ZCOORD>.

Printing square brackets

Since [ and ] are now special characters, for them to be output in the NC code, you would have to enter them as <91> and <93>, respectively. When opening an existing CNC file that contains the characters, they will be automatically converted to <91> and <93>.

XBuild numeric operators


XBuild accepts the following numeric operators:

XBuild General Post Processor + addition, adds two numbers. !" string concatenation, joins two strings. !" if given a string and a number, the string is converted into a number and then the two numbers are added. subtraction, subtracts two numbers multiplication, multiplies two numbers division, divides two numbers Computes the sine of an angle (given in radians). Computes the cosine of an angle (given in radians). Computes the tangent of an angle (given in radians). Computes the sine of an angle (given in degrees). Computes the cosine of an angle (given in degrees). Computes the tangent of an angle (given in degrees). Computes the arcsine (in radians) of a number. Computes the arccosine (in radians) of a number. Computes the arctangent (in radians) of a number. Computes the arctangent (in radians) of a number.
!"

acosd (num)

Computes the arccosine (in degrees) of a number.

* /

atand (num) atan2d (num) ceil(num)

Computes the arctangent (in degrees) of a number. Computes the arctangent (in degrees) of a number. returns the nearest integer greater than or equal to a number. Returns the nearest integer less than or equal to a number. Returns the absolute value of a number. Returns the square root of a number. Converts from milliliters to inches. Returns e^x where e = 2.71828. Returns ln(x) where ln is the natural logarithm. Returns the base-10 logarithm of a number. Returns a base number raised to a power. Returns an angle in radians as converted from degrees Returns an angle in degrees as converted from radians

sin (num) cos (num) tan (num) sind (num) cosd (num) tand (num) asin (num) acos (num) atan (num) atan2 (num)

floor(num)

fabs(num)

sqrt(num)

mm2in (millimeters) exp(num)

log(num)

log10 (num) pow(base, power) degtorad (num) radtodeg (num)

XBuild Reference Manual asind (num) Computes the arcsine (in degrees) of a number. pi The mathematical value of pi to ten decimal places. Computes the distance from the origin to (XY)

in2mm (num) Converts inches to millimeters. anglexy(x,y) Computes the angle between the X-axis to the line between (0,0) and (x,y)

radiusxy(x,y)

XBuild logical operators


Operator Function

eq

neq

lt

gt

le

ge

and

or

not apxeq

True if <TOOL> # 0 Also works for strings. Not Equal [neq(<TOOL>, 0)] True if <TOOL> $ 0 Also works for strings. Less Than [lt(<TOOL>, 0)] True if <TOOL> % 0 Also works for strings. Greater Than [gt(<TOOL>, 0)] True if <TOOL> & 0 Also works for strings. Less Than or [le(<TOOL>, 0)] True if <TOOL> ' Equal 0 Also works for strings. Greater Than or [ge(<TOOL>, 0)] True if <TOOL> ( Equal 0 Also works for strings. And [and(<Z-UP>, True if both <Z <INDEX>)] UP> and <INDEX> are true Or [or(<Z-UP>, True if either <Z <INDEX>)] UP> or <INDEX> is true Not [not(<ZTrue if <Z CHANGED>)] CHANGE> is false Approximately [apxeq(<Z-COORD>, True if <Z Equal (if tolerance 0)] COORD> # 0 is not given, the [apxeq(<Z-COORD>, within ) 1e-6 Equal [eq(<TOOL>, 0)]

Example

Explanation

10

XBuild General Post Processor

default is 1e-6.)

0, 1e-6)]

Examples of logical expressions


Some example expressions using operators are: 1. Output Z as 0 if Z is within 0.0001 of zero. <IF>[apxeq(<Z-COORD>, 0 , 0.0001)]<THEN> N<SEQ> G00 X<X-COORD> Y<Y-COORD> Z0<EOB>
<ENDIF>

2. Rapid move using polar coordinates. N<SEQ> I0 J0<EOB> N<SEQ> G10 R[sqrt(pow(<X-COORD>, 2) + pow(<Y-COORD>, 2))] H[D|3.2|1.0:atan2d(<Y-COORD>, <X-COORD>)]<EOB> 3. Output Z as 15 if Z is between 10 and 20 inclusively <IF>[and(ge(<Z-COORD>, 10), le(<Z-COORD>, 20))] <THEN> N<SEQ> G00 X<X-COORD> Y<Y-COORD> Z15<EOB>
<ENDIF>

4. If the P variable, P1, is not set, then set it to the string, G0 <IF>[eq(<P1>,"")]<THEN> [<P1>=G0] <ENDIF>

Xbuild string operators


Operator Function

uppercase

Convert string to [uppercase(abc)] all uppercase characters If used with two [abc + def] strings, the strings are concatenated. If used with a [0.5 +0.0] string and a number the number is converted to a string and then they are added.

Example

Explanation

Prints ABC

Prints abcdef

Prints 0.5 This is a shortcut for converting a string into a number.

Many of the logical operators also work for strings.

Assignment
The result of any operation can be assigned to another keyword or to a variable. Variable names can consist of one more characters and are not case sensitive. The first character must be alphabetic and the rest can be any combination of alphanumeric characters and the underscore character. Examples of variables are: ABC, X23, and CENTER_PT.

11

XBuild Reference Manual Note that the result of an assignment operation is the value of the keyword or variable being assigned. For example the result is 5 for [x = 5]. Strings can contain numeric, logical and string values. Examples of assignment and variable usage are: 1. Increase the current value of the keyword <Z-COORD> by ten. [<Z-COORD> = <Z-COORD> + 10] 2. Set the variable, XVAR, to the current value of <X-COORD>, then double XVAR. Note that these statements do not change the value of <X-COORD> [x_var = <X-COORD>] [x_var = x_var * 2] 3. Set the variable, FEATURE, to the string, hole, then add the string, top to the variable, FEATURE, and set the new string to the variable, NAME. [feature=hole] [name= top + feature]

Formatting expressions
The format for an expression can be customized by preceding the expression with an optional format specification. The format specification is separated from the expression by a :. Where: LTDUP|Format|Factor
L stands for leading zeros

T stands for trailing zeros D stands for decimal point U stands for unsigned value P stands for plus sign Format specifies the number of digits (e.g. 3.4) Factor specifies the multiplier (e.g. 1.0) The above form is in correspondence with the Words Info dialog in XBuild.. The following examples illustrate types of formatting. Expression Result [D|3.4|1.0:10] 10.0 [D|5.4|1.0:10] 10.0 [LD|3.4|1.0:10] 010.0 [LP|3.0|1.0:10] +010 [PT|3.1|1.0:10] +100 When no format specification is given and there is no colon specified, we automatically use the format of the numeric keyword within the square brackets. For example [<X-COORD>+1] is printed in the default format for the <X-COORD> keyword that is specified in the Words 1 Words4 dialog boxes. If there is no such keyword, such as in the expression [1+2], the default format for the keyword <Z-COORD>s format is used.

Suppressing the printing of an expression


To suppress the printing of the assignment result, specify only the colon as the format specification. Neither of the following expressions will print a value because the first character of the expression:

12

XBuild General Post Processor [:x_var=<X-COORD>+1] [:<Y-COORD>*2]

Example expressions
[# Set x = 3, y = 5, z = 0.0001] X[<X-COORD>=3]Y[<Y-COORD>=5]Z[<Z-COORD>=0.0001]<EOB> [# Calc (x + 3)*2] [(<X-COORD>+3)*2]<EOB> [# Calc sqrt(pow(x, 2) + pow(y, 2))] [sqrt(pow(<X-COORD>,2)+pow(<Y-COORD>,2))]<EOB> [# Calc atan2d(y, x)] [atan2d(<Y-COORD>,<X-COORD>)]<EOB> [# Is z = 0 within +-0.001? If so, print Yes] <IF>[apxeq(<Z-COORD>,0,0.001)]<THEN> Yes<EOB> <ENDIF> [# Print special charcters] <91><93><EOB> [# Format x using tool's format] [<TOOL>:<X-COORD>]<EOB> [# Format -x as LTDUP|2.2|2] [LTDUP|2.2|2:-<X-COORD>]<EOB> [# Set x = 1 without printing anything] [:<X-COORD>=1]<EOB> [# Is x != 0 and y != 0?] <IF>[and(not(apxeq(<X-COORD>,0)),not(apxeq(<Y-COORD>,0)))]<THEN> Yes<EOB> <ENDIF> [# Set variable a = x] [a=<X-COORD>]<EOB> [# Calc a + 5] [a+5]<EOB>

Making reserved words modal


In some cases, the CNC machine uses modality to avoid redundant data to reduce the length of the program. Under modality, repeated coordinates or commands are stripped from the part program. String and numeric-type Reserved Words may be surrounded by modality delimiters ({

13

XBuild Reference Manual }) to signal Post to remove redundant data. The modality delimiter prevents a repetitive occurrence of a Reserved Word as long as its value remains the same as the previous occurrence. For example, when modality delimiters are used in {<SEQ>}, you have the option of stripping all sequence numbers from the program during post processing. This is accomplished by specifying 0 for the start and sequence step numbers in Post. This forces the sequence numbering to remain the same. Modality brackets may be used on expressions containing reserved words, example: {X[<ABS-DEPTH>*2]}.

Entering mixed printable ASCII and non-printable codes


Different systems may allow for ASCII (American Standard Code for Information Interchange) control character(s) (non-printable characters). Control characters such as: <13> for a carriage return <10> for a line feed <32> for a space <9> for a horizontal tab <91> for a left square bracket <93> for a right square bracket can be imbedded in a program format. To enter control characters, type the decimal value equivalent of the ASCII code, delimited by angular brackets <>.

14

Chapter 2 Milling
CNC Info Menu
Logical Reserved word table
Reserved Word <CHIP-TAP> <COMP-END> Word type Definition True if tap cycle is CHIP. Logical True if the move represents the end section for compensation Logical (last element, or move of path), otherwise <COMP-END> is false. True if cutter diameter compensation is ON, otherwise <COMP-ON> Logical <COMP-ON> is false. True if the move represents the middle section for <COMP-MID> Logical compensation (between the first and last moves of path), otherwise <COMP-MID> is false. True if the move represents the start section for compensation <COMP-START> Logical (first element, or move of path), otherwise <COMP-START> is false. True if the spindle rotates in the clockwise direction, otherwise <CW-SPINDLE> Logical <CW-SPINDLE> is false True for the last hole location in a canned cycle. False <CYCLE-DONE> Logical otherwise True if the current segment is in a canned cycle <CYCLELogical MACRO> True of tap cycle is DEEP <DEEP-TAP> Logical True if drill moves are computed using linear moves. False if <DRILL-CPTED> Logical canned cycles True if a drilling-type cycle is used in a segment, otherwise <DRILLING> Logical <DRILLING> is false, and a milling segment is in process Last element in a conditional statement (must be on a line by <ENDIF> System itself) Corresponds to the Exposed length tool parameter <EXP-LENGTH> Numeric True if tap cycle is FLOATING <FLOAT-TAP> Logical First element in a conditional statement, always followed by a <IF> System logical-type Reserved Word to verify that a condition is true First element in a conditional statement, always followed by a <IFNOT> System logical-type Reserved Word to verify that a condition is false <INDEX> Logical True if 4th or 5th axis indexing is set in FeatureCAM. For the Segment start formats <INDEX> is only true when the indexing move is actually being performed <INDEXING> Logical True if the user has turned on indexing for X,Y,or Z axis True if the current setup is named WORLD <IS-WORLD> Logical <IS-INCLogical True if incremental macros are enabled MACRO> <LAST-TOOL> Logical True if the current tool is the very last tool in the program

15

XBuild Reference Manual <OFFSET-CH> Logical Normally used in a SEGMENT START block; true if the OFFSET# is changed between segments:
<IF><OFFSET-CH><THEN> {N<SEQ>}T{<COMP-NUM>}<TOOL><OFFSET#><EOB> <ENDIF>

<RIGID-TAP> <THEN> <USE-FIXTURE> <WAS-WORLD> <WRAP> <WRAP-ZDOWN> <WRAP-Z-UP> <X-WRAP> <XY-PLANE> <Y-WRAP>

Logical System Logical Logical Logical Logical Logical Logical Logical Logical

True of tap cycle is RIGID. Second element in a conditional statement, placed after a logical-type Reserved Word True if using 5th axis positioning with Fixture Ids. True if the previous setup is named WORLD. True if 4th axis wrapping is set. True if wrapping and the tool is moving down in the Z direction. True if wrapping and the tool is moving up in the Z direction. True if the current milling operation is wrapping in the X direction True if the current arc is in the XY plane. True if the current milling operation is wrapping in the Y direction True if the current arc is in the YZ plane. True if current move changes Z from the previous location. True if the tool moves down in the Z direction, otherwise <ZDOWN> is false True if the current arc is in the ZX plane. True if the tool moves up in the Z direction, otherwise <Z-UP> is false

<YZ-PLANE> Logical <Z-CHANGED> Logical <Z-DOWN> Logical <ZX-PLANE> <Z-UP> Logical Logical

General
General opens a list of options pertaining to the output program format. Any parameter may be changed by selecting it, typing the value, or toggling to the desired selection. The comment block describes the post processor. These values are default values when no CNC Data file has been loaded into the XBuild program. When a file is loaded, several or all of these values may change.

Machine Type
The Machine type classifies the type of post. The choices are !" Milling use this type of post for 2.5D or 3D milling. !" Turning use this classification for 2-axis turned parts !" Turn/Mill use this type of post for lathe with powered rotary tools. !" Wire EDM - use this type of post for Wire EDM machines. This distinction controls type of reserved words and program formats that are available in the post.

16

Milling

Dimension
Dimension toggles between Inch and Metric output. Post uses the selection to convert the dimensions that affect X and Y coordinates as well as feed rate. The setting in the CNC Data file takes precedence over the assumed inch unit in FeatureCAM. If a part program is written in inch units, and is processed with a metric CNC data file, the resulting part program is converted (using standard conversion constants) into metric units.

Circ. Interpol
Circ. Interpol. toggles between Multi-Quadrant, Single Quadrant and Not Supported and specifies the programming format on the CNC for which the postprocessor is being built. For example, if the Numerical Control cannot drive an arc across a quadrant line (plus or minus X and Y axes), then select Single Quadrant circular interpolation. When circular interpolation is turned off in post, then wrap tolerance is used to control fineness of toolpath.

EOB
EOB defines the end of block character(s) (<EOB>). It is recommended that the default characters be used (i.e., <13><10>, carriage return and line feed).

Decimal Point
Decimal Point defines the decimal point character. This character is usually a period (.) for United States controls, and a comma (,) for European controls.

Max. Macros
Max. Macros specifies the maximum number of macros (sub-programs) available on the control. If macros are not available, set this value to zero, and select Not Available in the Macro Type parameter, described next.

Dogleg rapid moves


Type your drop-down text here.

Call local macro after it is defined


Some controls (such as the Heidenhain 370) automatically execute macros when they are defined. For these controls uncheck Call local macro after it is defined so that the macro is not called twice. For other types of controls, leave this option checked.

Include first canned cycle move in macro


Checking this option will output the current position as the first location of a macro. Without this checked, the first move will not be in the macro, instead it is assumed that it is output on the canned cycle line. To properly include the first move in a macro, you will need to use a combination of this checkbox and the logical variable <CYCLE-MACRO> to suppress actually performing the canned cycle on the canned cycle line. For a Fanuc 0M, if a canned cycle line ends with K0 then the machine goes into canned cycle mode, but the actual canned cycle is not performed. Here is the drilling format for the Fanuc 0M. {N<SEQ>}<CYCLE>{X<X-COORD>}{Y<Y-COORD>}R<ABS-ZCLEAR>Z<ABSDEPTH>F<FEED> <IF><CYCLE-MACRO><THEN>

17

XBuild Reference Manual K0 <ENDIF> <EOB> Note that Include first canned cycle move in macro checkbox must be checked so that the initial location is output in the macro.

Post supports local coordinates


Post that redefines the coordinate system using datum shifts should have this option checked.

Post supports incremental macros


Posts that program milling macros in an incremental fashion should have this option checked. .

Macro Type
Macro Type specifies how macros are formatted when the part program requires them.: Local places macro definitions within the main NC part program. End of Prog. places macro definitions at the end of the main part program (e.g., Heidenhain controls). The PROGRAM END program format should be specified for output at the end of the main program and the FILE END program format should be specified for output at the end of these macro definitions. Not Available signals Post that macros are not available. Indiv. Files places macro definition in a separate file (e.g., FANUC and GE MC 2000 controls). The name of each macro file consists of the assigned name that was specified in Post and the system-assigned macro number The internal sub-program name is automatically added to the main program name as the external file name. One File places all macro definitions in one file. Post generates two files, the main part program and a file containing all macros. This option can output to Bridgeport controls via the EZ-Utils module, CNCCOMMUNICATION option (Heidenhain DNC utility). The name of the macro file consists of the assigned name specified in Post, MA (representing the macro specification) and the .TXT file extension. For example, SAMPLEMA.TXT (macro file) and SAMPLE.TXT.

2-axis machine
2-axis machineremoves ramping moves and ensures that the plunge move is performed in a single move. Overall, this setting eliminates unnecessary Z moves that cannot be handled by a 2axis machine. This checkbox is only available for milling posts.

Seq max
This is the maximum value for sequence numbers. After reaching this number, the sequence numbers start over. If the Seq max radio button is not clicked, then no limit is set.

NC File Ext.

This is the default file extension for you CNC programs. For example if it is set to .txt, and your part is called bracket, then the gcode file will be called bracket.cnc.

Polar interpolation done by


These radio buttons are available in turn/mill posts. The two options are:

18

Milling FeatureCAM in this case, the polar interpolation will be performed by FeatureCAM. That means that Cartesian coordinates are mapped into polar coordinates by FeatureCAM prior to being sent to the post. Machine Tool FeatureCAM will send Cartesian coordinates to the post processor. The formats of post processor must be configured to request polar interpolation from the machine control.

NC-Codes
NC-Codes specifies the exact character strings for different NC commands. The character strings entered in the dialog box must match the required strings specified for the NC control. This information is usually found in the programmers manual for the NC control.

Motions
Motions describes motion types required by the NC machine. All of these codes must be specified. For example, Linear is generally defined as G1, but may be changed to G01, or any other string (up to 11 characters). All motion commands are passed to Post via the string-type Reserved Word, <MOTION>. The Motions group has these options: Rapid = rapid move Linear = feed move Circ. CW = circular interpolation, clockwise Circ. CCW = circular interpolation, counter-clockwise

Compensation
Compensation generates cutter diameter compensation in the output when turned On in FeatureCAM, and if it is built into the CNC data file. Compensation selections use the stringtype Reserved Word, <COMP-STAT> for one of the below options, or an empty string is assigned if Compensation was not turned On in FeatureCAM. the Compensation group has these options: Cancel = compensation off Left = compensation on cutter, applied to left in direction of travel Right = compensation on cutter, applied to the right in the direction of travel

Circular Planes
Type your drop-down text here.

Pecking types
Pecking types are the types of pecking performed for drilling and tapping. See Handling Pecking for details.

Miscellaneous
Miscellaneous contains selections for Spnd CW (Spindle Start Clockwise) and SpndCCW (Spindle Start Counter-Clockwise). Both of these specify that the spindle is ON and the direction code. Both spindle selections use the string-type Reserved Word, <SPINDLE>. Other Miscellaneous codes include coolant specifications. Coolant selections use the string-type Reserved Word, <COOLANT>. The Miscellaneous group has these options:

19

XBuild Reference Manual Cool OFF = coolant off Cool Mist = coolant on, mist Cool Flood = coolant on, flood Coolant 3 = Coolant 4 = Spnd. CW = spindle on, clockwise Spnd. CCW = spindle on, counterclockwise Spnd. Stop = stops spindle Spnd. Orient = Orients spindle

Cycles
The following program formats are canned cycle formats. They are used for header, canned motion and cycle cancel blocks. The header block (for all canned cycles) must contain formats to position down to the clearance plane to drill the first hole. Drill Cycle specifies the header block for a drilling cycle. Spot face Cycle specifies header block for a spot face cycle. Deep hole cycle specifies a deep hole cycle header block. Tap cycle specifies the header block for a tapping cycle. Chip break cycle specifies the header block for a chip break cycle. Bore (F-D-F) Cycle specifies a boring (feed-in, dwell, feed-out) cycle header block. Bore (F-F) cycle specifies a header block for a boring (feed-in, feed-out) cycle. Bore (F-S-R) Cycle specifies a boring (feed-in, stop spindle, rapid) cycle. Bore (No drag) Cycle specifies a boring (feed-in, stop spindle, move to side, retract) cycle. Z rapid retract R plane retract

Rotary Tools
This section of NC codes is only displayed for turn/mill posts. It deals with coolant specifications. Coolant selections use the string-type Reserved Word, <COOLANT>. Cool OFF = coolant off Cool Mist = coolant on, mist Cool Flood = coolant on, flood

Fixture ID
This list contains the various G codes that are valid fixture Id's. An example list might be: 54 55 56 57 58 59 FeatureCAM will automatically look in the current post processor and will assign the next available fixture ID to a new setup and to the numeric reserved word <FIXTURE>.

5-axis machine types


Five axis machine types supported by FeatureCAM are:

20

Milling Table on table machines Horizontal with stacked tables - These horizontal milling machines rotate about the Y-axis, then around the X-axis. They are also called A over B machines.

Vertical with stacked tables These machines are vertical mills that rotate about X-axis then around the Y-axis. These machines are also known as B over A machines. Machines with tilting heads FeatureCAM supports machines with tilting heads as long as they have the following two capabilities: 3D coordinate transforms The control must allow programming of 2.5D features in the X and Y planes. This means that the depth of features are always in the Z or Z directions. Tool length offset The touch-off point (or zero point) of the tool must move with the rotated tool. The specific machine architectures support are as follows: C rotary table and B tilting head These machines rotate about X and then the head rotates around the Y-axis.

21

XBuild Reference Manual

C rotary table and A tilting head These machines rotate about Z and the head rotates around X.

C swiveling and A tilting head These machines rotate around Z with a table and then the head tilts around the X axis. They are also known as gimbal heads.

22

Milling

B and A tilting head - Rotates about Y using a table and then X in the head.

A and B tilting head - Rotates about X using a table and then Y in the head.

23

XBuild Reference Manual

B and 45 Degree angled A tilting head - Rotate about Y, then rotate about X with a head that is angled by 45 degrees. This head is also known as a huron head.

A and 45 degree angled B tilting head - Rotate about X, then about Y with a head that is angled by 45 degrees. Also known as a huron head.

24

Milling

Machine Dimensions The Rotary Center Offset values are contained in the post processor files. Enter the following values measured on the machine. Y coordinate of A-axis centerline:Y distance from machine zero to the A-axis centerline. Z Offset of A-axis face from b-axis centerline: Z signed offset of A axis face from B axis centerline. Offset of centerline of axis to centerline of b-axis: X side-to-side inaccuracy in mounting of the rotational centerline of the A axis pedestal, measured relative to B axis centerline.

25

XBuild Reference Manual

Formats menu
The Formats menu enters specific program formats for the various parts of a program. Each format is made up of combinations of Reserved Words, literals, comments, and user-defined variables. The Formats menu lists five general groups of program formats. Each of these groups contains specific program formats which, when selected, are displayed in the Formats Editor. The five groups are:

Program
Program formats found in this group are used in almost every part program, and include commonly used formats such as: Program Start, Tool Change , Segment Start, Program End, and File End.

Move
Move formats include the rapid and feed moves which make up the largest portion of any part program. These program formats must be carefully defined. These formats include Rapid, Z Rapid, Linear , and Circular.

Macro
Macro formats include Open Macro, Close Macro, Macro Call, In-Macro Linear, and InMacro Circular. These formats do not need to be defined if the target control does not use macros.

Cycle
Cycle formats include most of the canned cycles which are found in many controls. These cycles also use specific reserved words which are discussed in detail below. The Cycle formats include Drill, Deep Hole, Tap, Bore (F-F), Chip Break, Cycle Cancel, and Canned Move.

Custom
The custom format is used as a place holder for a block of code that may be used in several different formats. The system reserved word <INCLUDE:> is placed into the appropriate section of a format that uses the block of code from the custom format. Insert name of custom format after colon. <INCLUDE: CUSTOM FORMAT NAME>

Numeric Reserved word table


Reserved Word <ABS-DEPTH> <ABS-SHIFTX> <ABS-SHIFTY> <ABS-SHIFTZ> <ABS-STEP1> <ABS-ZCLEAR> Definition Absolute Z axis depth from Z axis origin, <ZSURF> <DEPTH>. X offset from machine zero to current setup without any rotations applied. Y offset from machine zero to current setup without any rotations applied. Z offset from machine zero to current setup without any rotations applied. Absolute first step, <ZSURF> <STEP1>. Absolute position of Z Clear -- Z Clear + Z Surf (not used in incremental

26

Milling programming). <ABS-ZRAPID> Absolute position of Z Rapid -- Z Rapid + Z Surf (not used in incremental programming). <ANG-CFEED> Outputs the feed value required for an Okuma or Fanuc control to maintain the programmed feed rate. This is a Cartesian feed rate value. Wrapped feed rate, degrees per minute. <ANG-DPM> Wrapped feed rate, inch (or mm) per minute. <ANG-FPM> <ANG-INVTIME> Wrapped feed rate inverse time. Used in the circular interpolation block to specify the signed X distance <ARC-X> from the start point of the arc, to the center of the arc along the X axis. Used in the circular interpolation block to specify the signed Y distance <ARC-Y> from the start point of the arc, to the center of the arc along the Y axis. <ARC-Z> Used in the circular interpolation block to specify the signed Z distance from the start point of the arc, to the center of the arc along the Z axis. <BOT-LALLOW> Corresponds to Bottom Semi Finish Allowance or Bottom Semi Finish Allowance attributes for a milling operation. Compensation number passed from FeatureCAM. <COMP-NUM> <COMP-VAL> Cutter compensation diameter. Z Depth value passed from FeatureCAM for drilling-type cycles. <DEPTH> Reproduces the dwell value passed from FeatureCAM. <DWELL> <EXP-LENGTH> Corresponds to the Exposed length tool parameter. Feed rate value identifier passed from FeatureCAM. <FEED> Finish allowance of a milling operation. <FINI-ALLOW> Fixture ID number passed from FeatureCAM. <FIXTURE> <FSHIFTX> The X distance from the fixture offset to the local coordinate system. <FSHIFTX> The Y distance from the fixture offset to the local coordinate system. <FSHIFTX> The Z distance from the fixture offset to the local coordinate system. <HELIX-PITCH> Pitch of helical move. Controlled by Max Ramp Angle attribute. Incremental depth from Z Clear, <DEPTH> + <ZCLEAR>. <INC-DEPTH> <INC-MACX> X location of the pattern instance that will be cut by the macro. This coordinate is typically not output in the cnc program. <INC-MACY> Y location of the pattern instance that will be cut by the macro. This coordinate is typically not output in the cnc program. <INC-MACZ> Z location of the pattern instance that will be cut by the macro. This coordinate is typically not output in the cnc program. Incremental first step, <STEP1> + <ZCLEAR>. <INC-STEP1> Macro number identifier (system-generated). Macros are not user definable, <MACRO#> however some Macros are generated automatically, especially with multiple fixture parts and for repeated features. This number starts at 00 and increments automatically up to the Max Macros number that is contained on the General Information dialog box. Minimum Peck drilling parameter. <MIN-STEP> Amount to move over in X for no drag boring. <NO-DRAG-X> Amount to move over in Y for no drag boring. <NO-DRAG-Y> Represents the next tool to be used (may be required by some controls). <NEXT-TL> Tool nose radius of an endmill or the tip radius of a threading tool or <NOSE-RAD> turning tool.

27

XBuild Reference Manual <OFFSET#> <OV-LENGTH> <PITCH> <RADIUS> <ROT1-ANSI> <ROT1-MATH> <ROT1-WIND> <ROT2-ANSI> <ROT2-MATH> <ROT2-WIND> <S-RAD> Diameter offset register number passed from tool mapping dialog. The overall length of the tool. Corresponds to the Overall Length parameter of a tool. The pitch value for the Tap cycle. This value is in Z-distance per spindle revolution. Reproduces arc radius in a circular block. Rotation about primary axis in ANSI style. Rotation about primary axis in Mathematical style. Rotation about primary axis in Winding style. Rotation about secondary axis in ANSI style. Rotation about secondary axis in Mathematical style. Rotation about secondary axis in Winding style. Generates the signed arc radius value in a circular block, +R<180 degrees and R>180 degrees.

<SEQ>

This is a line sequence number identifier (when the word appears in a line, it is substituted with the current sequence number, and is subsequently incremented by the sequence step value). X offset from machine zero to current setup after axis rotations are applied. <SHIFTX> Y offset from machine zero to current setup after axis rotations are applied. <SHIFTY> Z offset from machine zero to current setup after axis rotations are applied. <SHIFTZ> <SIDE-LALLOW> Corresponds to Bottom Finish Allowance or Bottom Finish Allowance attributes for a milling operation. Spindle speed value passed from FeatureCAM. <SPEED> Initial angle of helical move. Added for Heidenhain control. <STATR-ANG> First Peck value passed from FeatureCAM. <STEP1> Second Peck value passed from FeatureCAM. <STEP2> <STEPOVER> Step over distance passed from feature properties dialog. Tool number passed from FeatureCAM. <TOOL> Tool diameter, passed from FeatureCAM. <TOOL-DIAM> <TOOL_LENGTH> Cutter length of the tool. <TOOL-LENGTH> Corresponds to cutter length of endmills or length of drills. Total angle of a helical move. Added for Heidenhain. <TOTAL-ANG> The TPI value for the Tap cycle in an inch CNC file or the pitch value for <TPI-PITCH> the Tap cycle in a millimeter CNC file. Reproduces the absolute X coordinate position from the X axis origin to the <X-CEN> arc's center in a circular block X coordinate of desired tool change location passed from post options <X-CHANGE> dialog. Current X coordinate position. <X-COORD> Calculated X vector for the next move (cutter compensation vector for <X-VECTOR> Cincinnati Milacron). Reproduces the absolute Y coordinate position from the Y axis origin to the <Y-CEN> arc's center in a circular block. Y coordinate of desired tool change location passed from Post options <Y-CHANGE> dialog. Current Y coordinate position. <Y-COORD>

28

Milling <Y-VECTOR> <ZCEN> <Z-CHANGE> <ZCLEAR> <Z-COORD> <Z-INC> <Z-INDEX-CLR> <ZRAPID> Calculated Y vector for the next move (cutter compensation vector for Cincinnati Milacron). Reproduces the absolute Z coordinate position from the Z axis origin to the arc's center in a circular block. Z coordinate of desired tool change location passed from post options dialog. Z coordinate that programmed feed rate begins. This is the Plunge Clearance attribute passed from hole properties dialog. Current Z coordinate position. Rough pass Z increment attribute passed from feature properties dialog. The Z retract distance when indexing 4th axis. Z distance from surface of stock that tool rapids to. This distance is the Z rapid plane attribute plus the absolute distance from the UCS to the surface of the stock. Z coordinate of stock surface relative to UCS origin.

<ZSURF>

Milling program formats


For each segment of a part program, parameters and calculated values are passed via Reserved Words from the program formats' definitions. These program formats act as a template; they are sequentially filled (i.e., Reserved Words are substituted by their corresponding values, G and M codes) as the part data file is post-processed.

Rules
1. The Reserved Words, <X-COORD> and <Y-COORD> are the assigned values of the first path point, and must appear in all program formats to provide the first positioning move to the start of the path. 2. It is mandatory that the Reserved Word, <Z-COORD> be used for the SEGMENT START program format. It is calculated as the largest Z Rapid value of the current and previous segments, thereby allowing for the tool to be retracted from the part, to a safe plane. 3. Use of the <Z-COORD> Reserved Word is optional for PROGRAM START and TOOL CHANGE program formats. It is calculated in the following manner: 4. <Z-COORD> = TL CHG (Z) 5. TL CHG (Z) is programmed in FeatureCAM 6. Whether <Z-COORD> is used or not, Post assumes that the tool is at this Z level, after the code for any of the aforementioned formats is generated.

Incremental programming rules


The following information explains the rules for building postprocessors for controls that only support incremental input. Each occurrence of the following Reserved Words must be in the specified form in PROGRAM FORMATS: Reserved Word Form <X-CHANGE> <@X-CHANGE> <Y-CHANGE> <@Y-CHANGE> <X-COORD> <@X-COORD> <Y-COORD> <@Y-COORD>

29

XBuild Reference Manual <Z-COORD> <@Z-COORD>

The Program Start format may not contain any of the following reserved words: <@XCHANGE>, <@Y-CHANGE>, or <@Z-COORD>. This is assuming that the first tool has been positioned at the start point (the first segment's tool change position) by the operator before starting the NC part program. The Program end format must contain the Reserved Words, <@X-CHANGE> and <@YCHANGE> to reposition the tool back to the start point.

Defining program formats


1. As Post reads each segment from the part data file, it determines if it is the first segment of the program, a tool change, or a non-tool changing segment. 2. Based upon this information, Post outputs the appropriate segment block (i.e., PROGRAM START, TOOL CHANGE, or SEGMENT START) prior to executing segment data. 3. Only one of these three program formats is used at the beginning of any one segment. NOTE: Each definition can include multiple lines, and each line must end with <EOB>.

Program start rules


The program start format is called once at the beginning of each program. This format must contain instructions for doing the following: 1. Setup the initial conditions of the machine such as the program dimensions, absolute versus incremental positioning. 2. Perform the first tool change and position the tool at the Z rapid plane. 3. Turn on the spindle, set its initial speed, and set up the coolant. Functions such as, <SPEED>, <SPINDLE> and <COOLANT> status can be passed to the Post output with the first positioning move via <X-COORD> and <Y-COORD>. If the target machine tool uses fixture offsets (G54, G55/E1, E2), the Reserved Word <FIXTURE> should be positioned before the <MOTION> <X COORD> and <YCOORD> words.

Tool change rules


1. A TOOL CHANGE block is output between segments that require a tool change. 2. This block is only output if the Tool # specification (FeatureCAM) differs from the previous one. 3. Functions such as, <SPEED>, <SPINDLE> and <COOLANT> status can be passed to the Post output with the first positioning move via <X-COORD> and <Y-COORD> Reserved Words. 4. If the target machine tool uses fixture offsets (G54, G55/E1, E2), the Reserved Word <FIXTURE> should be positioned before the <MOTION> <X COORD> and <YCOORD> words

Segment start rules


1. SEGMENT START is only output between non-tool changing segments. This typically occurs when there is a change in fixture offset or spindle speed. 2. SEGMENT START should contain any commands that may change between segments (e.g., <SPEED>, <COOLANT>, etc.).

30

Milling 3. The Reserved Words: <X-COORD>, <Y-COORD> and <Z-COORD>, must be included in SEGMENT START. 4. If the target machine tool uses fixture offsets (G54, G55/E1, E2), the Reserved Word <FIXTURE> should be positioned before the <MOTION> <X COORD> and <YCOORD> words. It is recommended that any coordinates not be output with modality brackets, since there may be a change of coordinate systems.

File End
File End specifies the format of a line(s) to be placed at the end of a file. This is generally used with the END OF PROG specification (GENERAL INFO, MACRO TYPE).

Defining program moves


There are four move formats: X,Y Rapid Move defines the output format for rapid positioning moves. Generally, modality delimiters ({}) are placed around the <X-COORD> and <Y-COORD> Reserved Words. This allows the postprocessor to strip X, or Y from the line when a coordinate is redundant. If the first case is true (see cases following the Z RAPID MOVE format), then the <Z-COORD> Reserved Word must be included. Z Rapid Move is used to rapid to the plunge clearance plane in Z. If the first case is true, then the Z RAPID MOVE program format must remain empty. If the second case is true, then the <ZCOORD> Reserved Word must be included. Linear Move defines the output format for linear moves. The following Reserved Words must be defined in this block: <X-COORD>,<Y-COORD>, <Z-COORD>,<FEED> and <MOTION>. Cutter diameter compensation can be turned ON/OFF in this format line via the <COMPSTART> Reserved Word. Some CNC machines may require the use of the vector Reserved Words, <X-VECTOR> and <YVECTOR>. Circular move defines circular and arc moves. The following Reserved Words are provided as arc modifiers for I, J, or R values: <ARC-X>, <ARC-Y>,<RADIUS>, <S-RAD>, <X-CEN>,or <Y-CEN>. Depending on the control, one of two cases is true for these program formats. 1. If the CNC requires X, Y and Z axes motion to be programmed in the same rapid line, then all three Reserved Words (X, Y and Z) must be included in the X,Y RAPID MOVE program format. The Z RAPID MOVE format must remain empty. 2. If the CNC does not allow for X, Y and Z axes motion to be programmed in the same rapid line, then use both (the X,Y RAPID MOVE and Z RAPID MOVE) formats. NOTE: The order in which moves are generated depends upon whether the current Z position is greater, or less than the previous Z position.

Defining cycle formats


Drill cycle
This program format specifies the header block for a drilling cycle.

Spot face cycle


The header block for a spot face cycle is specified via this format.

Deep hole cycle


A deep hole cycle header block is determined with this format. 31

XBuild Reference Manual

Tap cycle
This format specifies the header block for a tapping cycle.

Bore (F-F) cycle


The header block for a boring (feed-in, feed-out) cycle is specified with this format.

Chip break cycle


This format specifies the header block for a chip break cycle.

Bore (F-D-F) cycle


A boring (feed-in, dwell, feed-out) cycle header block is specified via this format.

Bore (F-S-R)) cycle


A boring (feed-in, stop spindle, rapid) cycle is specifed with this format.

Bore (No Drag) cycle


This cycle specifies a boring (feed-in, stop spindle, move to side, retract) cycle.

Cycle cancel
Cycle Cancel specifies the cycle cancel block for any of the canned cycles.

Canned move
This format specifies the format of canned cycles, following their initial definition.

Defining macro formats


In-Macro Linear
This format is similar to the Linear Move format, but it is only used within a macro definition (without the <Z-COORD> reserved word.

In-Macro Circular
This format is similar to the Circular Move format, but it is only used within a macro definition (without the <Z-COORD> reserved word.

Open Macro
Open Macro specifies the format of the lines preceding the macro definition. The <MACRO#> reserved word must be used. A preparatory function code (i.e. incremental for defining incremental macros) can also be used.

Close Macro
Close Macro specifies the format of the lines following a macro (end delimiter) definition. A preparatory function code may be used to redefine the absolute specification (that is, if the main program starts in the absolute mode).

32

Milling

Macro Call
MACRO CALL specifies the format of a line for "calling" a macro. The reserved word, <MACRO#> must be used to identify the macro.

Hole canned cycles in XBuild


For milling posts, hole drilling canned cycles are used based on the existence of the cycles gcodes. If FeatureCAM requests a canned cycle for a particular cycle, and the g-code is undefined, an alternate cycle is searched for. If the alternate also does not exist, then a computed cycle is used. The table below lists the alternate canned cycles. For example if FeatureCAM is trying to output a drill canned cycle, but there is no drill canned cycle defined in the post, it looks to see if a spotface (its alternative cycle) exists. If it does, a spotface cycle is used. If a spotface cycle is not defined, then a computed drilling cycle is output. If you do not want to output any drilling canned cycles, just blank out all the cycles in the NC codes dialog box of Xbuild. Desired Cycle Drill Spotface Deep hole Tap Chip break Bore FDF Bore FF Bore FSR Bore Nodrag Alternate Cycle Spotface Drill Chip break No alternate Deep hole Bore FF Bore FDF Bore FF Bore FF

For turn or turn/mill posts, the variable Enable hole canned cycle in the post options dialog box controls the outputting of canned cycles For computed cycles to work correctly, the Spindle and Dwell formats and the Spindle codes in XBUILD have to be completed. The <SPINDLE> keyword also needs to be added to the Linear format. Example Spindle format: {N<SEQ>}<SPINDLE><EOB> Example Dwell format: {N<SEQ>}G4 <DWELL><EOB> Example Linear format: {N<SEQ>}{<MOTION>}{<COMP-STAT>}{X<X-COORD>}{Y<YCOORD>}{Z<Z-COORD>} {F<FEED>}{<SPINDLE>}<EOB> See also Include first canned cycle move in macro .

Using FeatureCAM and XBuild


This section explains how the parameters that are defined in FeatureCAM correspond to XBuild Reserved Words, and how these are handled when NC is pressed.

33

XBuild Reference Manual

Input dimension
If the units of your part and the post processor are different, a conversion factor is automatically applied to them at the time the program is posted.

Cycle types
The operations in FeatureCAM are mapped to the following canned cycle formats: Operation Chamfer Countersink Counterbore Drill Ream Tap Peck Drilling Canned Cycle Format SPOT FACE SPOT FACE SPOT FACE DRILL BORE(F-F) TAP DEEP HOLE and CHIP BREAK

The following FeatureCAM parameters contain corresponding Reserved Words in XBuild: FeatureCAM Tool No.(from Operations Sheet) Fixture ID Tool Change Location X (from Post Options dialog box) Tool Change Location Y (from Post Options dialog box) Tool Change Location Z (from Post Options dialog box) Coolant Manufacturing Attribute (Default Attribute or Feature Attribute) XBUILD <TOOL> TYPE Numeric

<FIXTURE> <X-CHANGE>

Numeric Numeric

<Y-CHANGE>

Numeric

<Z-COORD>

Numeric

<COOLANT>

String

Some CNC machines require the previous Tool # and Fixture #. In this case, use the $symbol to represent the previous number. Tool parameter lines are formatted in PROGRAM START, TOOL CHANGE and PROGRAM END program formats.

34

Milling Coolant parameters (Off, Mist and Flood) are defined in XBuild, and are output by Post whenever the Reserved Word, <COOLANT> appears in a program format block.

Z data
XBuild has a Reserved Word for each Z parameter in FeatureCAM. XBuild also provides words that signal Post to perform arithmetic operations to accommodate the different ways that machines handle the Z axis. The following manufacturing attributes in FeatureCAM contain corresponding Reserved Words in XBuild: FeatureCAM Z Rapid Plane Plunge Clearance BUILD <ZRAPID> <ZCLEAR> TYPE Numeric Numeric

Handling cutter compensation


Cutter compensation is handled by XBuild and can be configured several ways, depending upon the CNC requirements. The most common configuration is to turn compensation On in the first X-Y feed move of the cutter path, and turn compensation Off in the last X-Y feed move. If the aforementioned configuration is utilized, then define the LINEAR MOVE program format as follows: LINEAR MOVE BLOCK {N<SEQ>}{<COMP-STAT>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}{Z<ZCOORD>}{F<FEED>}<EOB> If it is necessary to output the vector direction of the next move (for Cincinnati Milacron controls only), use the <X-VECTOR> and <Y-VECTOR> Reserved Words. Other configurations may require the X and Y coordinates to be repeated as compensation is turned On. In that case, establish a conditional statement so that these repeated coordinates do not appear in every linear move of the cutter path. A conditional statement for a LINEAR MOVE program format is as follows: LINEAR MOVE BLOCK <IF><COMP-ON><THEN> {N<SEQ>}<COMP-STAT>X<$X-COORD>Y<$Y-COORD><EOB> <ENDIF> {N<SEQ>}{<COMP-STAT>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}{Z<ZCOORD>}{F<FEED>}<EOB> The $ symbol is a Reserved Word modifier to generate the previous values of X and Y (to represent the current position of the tool). The <X-COORD> and <Y-COORD> Reserved Words always represent the next point in the cutter path.

Handling multiple fixture documents


To use the multiple fixture document capability of FeatureCAM, the reserved word <FIXTURE> or <MCSID> must be placed in the program start, tool change and segment start program formats prior to any <MOTION> statements. Your choice of <FIXTURE> or <MCSID> depends on your programming preference and the type of controller being used. Generally one or the other reserved word is used, not both. When the reserved word <FIXTURE> is used, it is preceded by the controllers fixture offset letter (e.g. D, E, F, G or H) in the appropriate program

35

XBuild Reference Manual formats. Remember that the reserved word <FIXTURE> is obtained from the Fixture ID of the setup in FeatureCAM. For example, the following build line is the last line of the program start format of the 850sxm.cnc post. {N<SEQ>}G0X<X-COORD>Y<Y-COORD>Z<ABS-ZRAPID><COOLANT><EOB> Adding an H command using the <FIXTURE> reserved word prior to the motion command would look like this, {N<SEQ>}H<FIXTURE>G0X<X-COORD>Y<Y-COORD>Z<ABSZRAPID><COOLANT><EOB> A similar modification to the tool change and segment start program formats would complete the necessary changes to the post. When using the reserved word <MCSID>, recall that this word is the name of the setup in FeatureCAM. This reserved word has more flexibility than the <FIXTURE> reserved word since it is a string. The only requirement is that the setup name in FeatureCAM uses the appropriate Gcode command for your post. The placement of the <MCSID> reserved word in the block is identical to that of the <FIXTURE> reserved word only it does not need a preceding command letter. Using the above example, the modification would be, {N<SEQ>}<MCSID>G0X<X-COORD>Y<Y-COORD>Z<ABSZRAPID><COOLANT><EOB> The setup name in this particular example must be of the form "Hx" where x is a number. In controllers that accept specific commands to indicate particular fixture offsets, such as "G54", or "G55", using the <MCSID> reserved word may lessen confusion during the design process. By placing the reserved word <FIXTURE> or <MCSID> in the program start, tool change, and segment start program formats, the fixture offset is called immediately prior to any motion commands. When a fixture offset is changed, it is recommended that the <FIXTURE> or <MCSID> reserved word not be surrounded by modal brackets such that the fixture offset is repeated at each tool change or segment start line. This allows the tool change and segment start lines (under appropriate conditions) to used as a possible restart line.

Handling Pecking
Pecking applies to Deep Hole, Chip Break and Tap operations. The first step to handling pecking in a CNC file is to set the type of pecking that will be used for drilling and tapping on the NC Codes page. FeatureCAM checks the pecking type in the currently loaded post processor to duplicate canned cycles when simulating toolpaths. The second step is to create the appropriate program formats for the canned cycles based on the pecking type. Fixed steps The NC code specifies one depth and all the steps peck at that depth. An example would be the deep hole cycle of the Fanuc 0m: {N<SEQ>}<CYCLE>{X<X-COORD>}{Y<Y-COORD>}R<ABS-ZCLEAR>Z<ABSDEPTH>Q<STEP1>F<FEED><EOB> Two steps The NC code specifies two depths. The first step pecks at the first depth and all the subsequent steps peck at the second depth. The Bridgeport Machines Boss9I control deep hole cycle is an example .{N<SEQ>}<CYCLE>Z<INC-DEPTH>Z<INC-STEP1>Z<STEP2>F<FEED><EOB> {N<SEQ>X<X-COORD><EOB> Value reduction The NC code specifies the first depth, a reducing value and a minimum depth. The first step pecks at the first depth. Each subsequent step is reduced by the reducing value until the minimum

36

Milling depth is reached. To use the FeatureCAM attributes consistently with the other pecking methods, it is recommended that the reducing value be calculated with the expression, [<STEP1><STEP2>] as shown in the deep hole drilling cycle for the Fadal control below: {N<SEQ>}<CYCLE>{X<X-COORD>}{Y<Y-COORD>}R<ABS-ZCLEAR>Z<ABSDEPTH>I<INC-STEP> J<[<STEP1>-<STEP2>]K<MIN-STEP>F<FEED><EOB> Factor reduction The NC code specifies the first depth, a reducing factor and a minimum depth. The first step pecks at the first depth. Each subsequent step is reduced by the reducing factor until the minimum depth is reached. To use the FeatureCAM attributes consistently with the other pecking methods, it is recommended that the reducing value be calculated with the expression, [<STEP2>/<STEP1>] as shown in the deep hole drilling cycle for the GE2000 control below: {N<SEQ>}<CYCLE>Z<ABS-DEPTH>R<ABS-ZCLEAR>D<TOOL>F<FEED> P1=<INCSTEP1> P2=[<STEP2>/<STEP1>]P5=<MIN-STEP>F<FEED><EOB> {N<SEQ>} X<X-COORD>Y<Y-COORD><EOB>

Handling 3D arcs
3-axis techniques that produce toolpaths in the principle planes can approximate the them with 3D lines and arcs. To activate this option, check the Arc/line approx milling attribute. To output the proper g-codes, the post must support 3D arcs. The proper g-codes for each circular plane must be entered in the NC Codes dialog box. These g-codes are stored in the <PLANE> reserved word. The Circular Move format must also be augmented to support arcs in each plane. The logical variables <XY-PLANE>, <ZX-PLANE>, and <YZ_PLANE> distinguish the plane of the current arc. The following is a Circular Move format for 3D arcs. The major purpose of the various cases is to output the correct arc centers. {N<SEQ>}{<PLANE>}<MOTION> <IF><XY-PLANE><THEN> X<X-COORD>Y<Y-COORD>{Z<Z-COORD>}I<X-CEN>J<Y-CEN> <ENDIF> <IF><ZX-PLANE><THEN> Z<Z-COORD>X<X-COORD>{Y<Y-COORD>}K<Z-CEN>I<X-CEN> <ENDIF> <IF><YZ-PLANE><THEN> Y<Y-COORD>Z<Z-COORD>{X<X-COORD>}J<Y-CEN>K<Z-CEN> <ENDIF> {F<FEED>}<EOB> Handling retract planes in canned cycles If the control allows the changing of retract planes during a canned cycle you must adjust the post with the following steps: 1. Enter the G-codes for each rapid plane under Z rapid retract (this is the higher plane, G98 on a Fanuc) and R plane retract (this is the lower plane, G99 on a Fanuc). 2. In the Canned Move and all the Drilling canned cycles, the keyword, <CYCLE-RTRCT> must be included. For example, for Fanuc, the G98 and G99 g-codes are entered in the NC Codes dialog and a sample drilling cycle would be: {N<SEQ> }<CYCLE> <CYCLE-RTRCT> Z<ABS-DEPTH> R<ABS-ZCLEAR> F<FEED><EOB> {N<SEQ> }{X<X-COORD>}{ Y<Y-COORD>}<EOB>

37

XBuild Reference Manual

Fanuc line numbering


Many Fanuc control users do not want line numbers, except they want to sequentially number the tool changes. This is accomplished with the following steps: 1. Either remove all the occurrence of N<SEQ> in the post or make sure that all occurrences are modal and set the Block Increment in FeatureCAM to 0. 2. Use the following line as the tool change in the Start Format. This line sets a variable, tc, to 1 and outputs it in the format for <SEQ> N[<SEQ>:tc=1] T<TOOL> M6 ( TOOL <TOOL> [uppercase(<TOOL-NAME>)] )<EOB> 3. Use the following line as the tool change in the Tool Change Format N[<SEQ>:tc=tc+1] T<TOOL> M6 ( TOOL <TOOL> [uppercase(<TOOL-NAME>)] )<EOB>

Handling milling macros


Macros are activated in FeatureCAM by creating a pattern of features and then checking the Use macro calls for each instance in the pattern check box in the pattern's strategy tab. A post that supports milling macros must have the Post supports local coordinate or the Post supports incremental macros checkboxes set in the General dialog box. Setting up a post processor to handle milling macros is not a matter of specifying a single format, rather this logic affects many program formats.

Expected G-code for different post settings


The type of macro code that is created by a specific post processor depends on whether the post processor supports incremental programming, local coordinate systems or both. Incremental No Local coordinate No File Type .fm .mf with multiple fixture .mf with global fixture Yes No .fm Code Created Pattern instances are cut with absolute coordinates relative to the current setup Each FM part is cut with absolute coordinates relative to the global fixture. Pattern instances in each FM part are cut with absolute coordinates relative to the global fixture. Each FM part is cut with absolute coordinates relative to it's local fixture (G54). Pattern instances in each FM part are cut with absolute coordinates relative to the part's local fixture (G54). Each pattern instance calls a macro with incremental coordinates relative to the pattern instance location Each FM part is cut with absolute coordinates relative to the global fixture. Pattern instances in each FM part are cut with incremental coordinates relative to the pattern instance location based on the global fixture. Each FM part is cut with absolute coordinates relative to it's local fixture (G54). Pattern instances in each FM part are cut with incremental

.mf with multiple fixture

.mf with global fixture

38

Milling coordinates relative to the pattern instance location based on the part's local fixture (G54). A local coordinate system is established for each pattern instance. A macro is called with absolute coordinates relative to the pattern instance location. A local coordinate system is established for each FM part. A local coordinate system is established for each pattern instance. A macro is called with absolute coordinates relative to the pattern instance location which is based on the global fixture. Each FM part is cut with absolute coordinates relative to it's local fixture (G54). A local coordinate system is established for each pattern instance. A macro is called with absolute coordinates relative to the pattern instance location which is based on the local fixture (G54). Local coordinates are not used. A local coordinate system is established for each FM part. pattern instances in each FM part are cut with incremental coordinates relative to the pattern instance location based on the part's local coordinate system Local coordinates are not used.

No

Yes

.fm

.mf with multiple fixture

.mf with global fixture

Yes

Yes

.fm .mf with multiple fixture

.mf with global fixture

Configuring a post for local coordinate systems


Examples of local coordinate systems include the Fanuc G92 g-code, Heidenhain's datum shift and G58 on the Siemen's control. The following program format examples illustrate how to implement local coordinate systems for the Fanuc 18 control.

Program start format


% :<PROG-NAME><EOB> {N<SEQ>}G90<EOB> {N<SEQ>}T<TOOL>M6<EOB> <IFNOT>[ and( and( eq(<FSHIFTX>,0), eq(<FSHIFTY>,0)), eq(<FSHIFTZ>,0))]<THEN> [# ]{N<SEQ>}<MOTION>G<FIXTURE>X<FSHIFTX>Y<FSHIFTY>Z[<FSHIFTZ>+<ABSZRAPID>]<EOB> [# ]{N<SEQ>}G92 X0 Y0 Z<ABS-ZRAPID><EOB> [# ]{N<SEQ>}<MOTION>X<X-COORD>Y<Y-COORD>S<SPEED><SPINDLE><EOB> <ENDIF> <IF>[ and( and( eq(<FSHIFTX>,0), eq(<FSHIFTY>,0)), eq(<FSHIFTZ>,0))]<THEN> [# ]{N<SEQ>}<MOTION>G<FIXTURE>X<X-COORD>Y<YCOORD>S<SPEED><SPINDLE><EOB> <ENDIF>

39

XBuild Reference Manual {N<SEQ>}G43H<TOOL>Z<Z-COORD>T<NEXT-TL><EOB> {N<SEQ>}<COOLANT><EOB>

Tool change format


{N<SEQ>}M09<EOB> {N<SEQ>}G91G30Z0.M19<EOB> {N<SEQ>}M06<EOB> [# ] [# if fixture change, reset G92 to current fixture home before changing to new fixture] <IFNOT>[ eq(<$FIXTURE>,<FIXTURE>)]<THEN> [# ]{N<SEQ>}<MOTION>X-<$FSHIFTX>Y-<$FSHIFTY>Z[-<$FSHIFTZ>+<ABSZRAPID>]<EOB> [# ]{N<SEQ>}G92 X0 Y0 Z<ABS-ZRAPID><EOB> [# ]<IFNOT>[ and( and( eq(<FSHIFTX>,0), eq(<FSHIFTY>,0)), eq(<FSHIFTZ>,0))]<THEN> [# ]{N<SEQ>}<MOTION>G<FIXTURE>X<FSHIFTX>Y<FSHIFTY>Z[<FSHIFTZ>+<ABSZRAPID>]<EOB> [# ]{N<SEQ>}G92 X0 Y0 Z<ABS-ZRAPID><EOB> [# ]<ENDIF> <ENDIF> [# ] [# if same fixture, set new G92 location] <IF>[ eq(<$FIXTURE>,<FIXTURE>)]<THEN> [# ]<IFNOT>[ and( and( eq(<@FSHIFTX>,0), eq(<@FSHIFTY>,0)), eq(<@FSHIFTZ>,0))]<THEN> [# ]{N<SEQ>}<MOTION>G<FIXTURE>X<@FSHIFTX>Y<@FSHIFTY>Z[<@FSHIFTZ>+<A BS-ZRAPID>]<EOB> [# ]{N<SEQ>}G92 X0 Y0 Z<ABS-ZRAPID><EOB> [# ]<ENDIF> <ENDIF> {N<SEQ>}<MOTION>G<FIXTURE>G90X<X-COORD>Y<YCOORD>S<SPEED><SPINDLE><EOB> {N<SEQ>}G43H<TOOL>Z<Z-COORD>T<NEXT-TL><EOB> {N<SEQ>}<COOLANT><EOB>

Segment start format


{N<SEQ>}{<MOTION>}Z<Z-COORD><EOB> [# ] [# if fixture change, reset G92 to current fixture home before changing to new fixture] <IFNOT>[ eq(<$FIXTURE>,<FIXTURE>)]<THEN> [# ]{N<SEQ>}<MOTION>X-<$FSHIFTX>Y-<$FSHIFTY>Z[-<$FSHIFTZ>+<ABSZRAPID>]<EOB> [# ]{N<SEQ>}G92 X0 Y0 Z<ABS-ZRAPID><EOB> [# ]<IFNOT>[ and( and( eq(<FSHIFTX>,0), eq(<FSHIFTY>,0)), eq(<FSHIFTZ>,0))]<THEN> [# ]{N<SEQ>}<MOTION>G<FIXTURE>X<FSHIFTX>Y<FSHIFTY>Z[<FSHIFTZ>+<ABSZRAPID>]<EOB> [# ]{N<SEQ>}G92 X0 Y0 Z<ABS-ZRAPID><EOB> [# ]<ENDIF>

40

Milling [# ]{N<SEQ>}{<MOTION>}G<FIXTURE>X<X-COORD>Y<YCOORD>{S<SPEED>}{<COOLANT>}<EOB> <ENDIF> [# ] [# if same fixture, set new G92 location] <IF>[ eq(<$FIXTURE>,<FIXTURE>)]<THEN> [# ]<IFNOT>[ and( and( eq(<@FSHIFTX>,0), eq(<@FSHIFTY>,0)), eq(<@FSHIFTZ>,0))]<THEN> [# ]{N<SEQ>}<MOTION>G<FIXTURE>X<@FSHIFTX>Y<@FSHIFTY>Z[<@FSHIFTZ>+< ABS-ZRAPID>]<EOB> [# ]{N<SEQ>}G92 X0 Y0 Z<ABS-ZRAPID><EOB> [# ]{N<SEQ>}{<MOTION>}X<X-COORD>Y<YCOORD>{S<SPEED>}{<COOLANT>}<EOB> [# ]<ENDIF> [# ]<IF>[ and( and( eq(<@FSHIFTX>,0), eq(<@FSHIFTY>,0)), eq(<@FSHIFTZ>,0))]<THEN> [# ]{N<SEQ>}{<MOTION>}G<FIXTURE>{X<X-COORD>}{Y<YCOORD>}{S<SPEED>}{<COOLANT>}<EOB> [# ]<ENDIF> <ENDIF>

Program end format


<IFNOT>[ and( and( eq(<FSHIFTX>,0), eq(<FSHIFTY>,0)), eq(<FSHIFTZ>,0))]<THEN> [# ]{N<SEQ>}<MOTION>G<FIXTURE>X-<FSHIFTX>Y-<FSHIFTY>Z[<FSHIFTZ>+<ABS-ZRAPID>]<EOB> [# ]{N<SEQ>}G92 X0 Y0 Z<ABS-ZRAPID><EOB> <ENDIF> {N<SEQ>}M09<EOB> {N<SEQ>}G30G91Z0.M19<EOB> {N<SEQ>}G28G90X<X-CHANGE>Y<Y-CHANGE><EOB> {N<SEQ>}M30<EOB>

Configuring a post for incremental macros


The use of Fanuc's G91 in a macro is an example of incremental macro programming. Note that the coordinate for the relative moves are preceeded by the @ symbol so that only the relative distance it output.

Rapid move format


<IF><IS-INC-MAC><THEN> [# ]{N<SEQ>}{<MOTION>}{X<@X-COORD>}{Y<@Y-COORD>}<EOB> <ENDIF> <IFNOT><IS-INC-MAC><THEN> [# ]{N<SEQ>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}<EOB> <ENDIF>

Linear move format


{N<SEQ>}{<MOTION>}{<COMP-STAT>} <IF><COMP-START><THEN>

41

XBuild Reference Manual [# ]D<COMP-NUM> <ENDIF> <IF><IS-INC-MAC><THEN> [# ]{X<@X-COORD>}{Y<@Y-COORD>}{Z<@Z-COORD>}{F<FEED>}<EOB> <ENDIF> <IFNOT><IS-INC-MAC><THEN> [# ]{X<X-COORD>}{Y<Y-COORD>}{Z<Z-COORD>}{F<FEED>}<EOB> <ENDIF>

Circular move format


{N<SEQ>}{<PLANE>}{<MOTION> <IF><XY-PLANE><THEN> [# ]<IF><IS-INC-MAC><THEN> [# ]X<@X-COORD>Y<@Y-COORD>{Z<@Z-COORD>}I<ARC-X>J<ARC-Y> [# ]<ENDIF> [# ]<IFNOT><IS-INC-MAC><THEN> [# ]X<X-COORD>Y<Y-COORD>{Z<Z-COORD>}I<ARC-X>J<ARC-Y> [# ]<ENDIF> <ENDIF> <IF><ZX-PLANE><THEN> [# ]<IF><IS-INC-MAC><THEN> [# ]Z<@Z-COORD>X<@X-COORD>{Y<@Y-COORD>}K<ARC-Z>I<ARC-X> [# ]<ENDIF> [# ]<IFNOT><IS-INC-MAC><THEN> [# ]Z<Z-COORD>X<X-COORD>{Y<Y-COORD>}K<ARC-Z>I<ARC-X> [# ]<ENDIF> <ENDIF> <IF><YZ-PLANE><THEN> [# ]<IF><IS-INC-MAC><THEN> [# ]Y<@Y-COORD>Z<@Z-COORD>{X<@X-COORD>}J<ARC-Y>K<ARC-Z> [# ]<ENDIF> [# ]<IFNOT><IS-INC-MAC><THEN> [# ]Y<Y-COORD>Z<Z-COORD>{X<X-COORD>}J<ARC-Y>K<ARC-Z> [# ]<ENDIF> <ENDIF> {F<FEED>}<EOB>

Open macro format


:<PROG-NAME><MACRO#><EOB> <IF><IS-INC-MAC><THEN> [# ]{N<SEQ>}G91<EOB> <ENDIF>

Close macro format


<IF><IS-INC-MAC><THEN> [# ]{N<SEQ>}G90<EOB> <ENDIF> {N<SEQ>}M99<EOB>

42

Milling

Z rapid move format


<IF><IS-INC-MAC><THEN> [# ]{N<SEQ>}{<MOTION>}{Z<@Z-COORD>}<EOB> <ENDIF> <IFNOT><IS-INC-MAC><THEN> [# ]{N<SEQ>}{<MOTION>}{Z<Z-COORD>}<EOB> <ENDIF>

Fourth and fifth axis support


FeatureCAM supports the use of a rotary table as a fourth axis for indexing between operations and for wrapping, allowing continuous movement of the rotary axis during the cutting operations. Both of these strategies depend on hardware which supports this kind of operation, and the user of post-processor designed to address that hardware. Fifth axis indexing, known also as fifth axis positioning, is supported in the 5th axis positioning option. If using 4th or 5th axis capabilities you must use different post processors files. For 4th axis indexing or wrapping use a post in the 4thxs directory. For 5th axis positioning, use a post in the 5thxs directory.

Rotation styles
FeatureCAM supports four different styles of specifying rotation angles. These styles along with their reserved words are shown below: Style Primary Axis ANSI/EIA RS-274-D <ROT1-ANSI> Mathematical <ROT1-MATH> Relative <@ROT1-WIND> Winding and Unwinding <ROT1-WIND> Secondary Axis <ROT2-ANSI> <ROT2-MATH> <@ROT2-WIND> <ROT2-WIND>

ANSI/EIA RS-274-D
In this style, the value of the angle specifies the angular position measured from zero in the positive direction. The sign of the angle indicates the direction of rotation. The following are two example sequences:

43

XBuild Reference Manual

Mathematical
In this style, the value of the angle specifies the angular position measured from zero and the sign indicates the direction of measurement. The sign of the angle also indicates the direction of rotation. The following are two example sequences:

Relative
In this style, the value of the angle specifies the angular distance measured from the current position and the sign indicates the direction of measurement. The sign of the angle also indicates the direction of rotation. The following are two example sequences:

Winding and Unwinding


In this style, the value of the angle specifies the angular position measured from zero and the sign indicates the direction of measurement. The sign of the difference between the angle and the current position indicates the direction of rotation. The following are two example sequences:

44

Milling

4th axis indexing in the post


The axis to wrap around is fixed in the post and must match the index specified in FeatureCAM. All posts that ship with FeatureCAM assume that 4th axis indexing (and wrapping) is around the X-axis. Indexing commands must be added to the Program Start, Segment Start and Tool Change formats. It is not necessary to add indexing commands to feed move blocks (Circular or Macro blocks) since indexing takes place only between operations. The logical keyword <INDEX> specifies indexing (either 4th or 5th axis) has been activated for the current setup. For Segment Start formats, <INDEXING> is true only if indexing is enabled in FeatureCAM and the machine tool is performing the actual indexing move. This example is the Segment Start format from the a Bridgeport control that supports 4th axis. The <Z-INDEX-CLR> is a Z clearance value calculated from the maximum Z coordinate of the part (or parts if using Tombstone machining) plus the Z Index Clearance default attribute. '<SEGM-ID>'<EOB> {'COMMENT:<SEG-CMT>'}<EOB> {N<SEQ>}F<FEED><EOB> {N<SEQ>}{<MOTION>}{Z<Z-COORD>}<COOLANT><EOB> {N<SEQ>}{S<SPEED>}{<SPINDLE>}<EOB> {N<SEQ>G97}{X<SHIFTX>}{Y<SHIFTY>}{Z<SHIFTZ>}{<EOB>} <IF><INDEX><THEN> {N<SEQ>}Z<Z-INDEX-CLR><EOB> {N<SEQ>}M51; INDEX <ROT1-MATH><EOB> <ENDIF> {N<SEQ>}<MOTION>X<X-COORD>Y<Y-COORD>{Z<Z-COORD>}<COOLANT><EOB>

4th axis wrapping in the post


4th axis wrapping in FeatureCAM causes rotary motion of the part, while the tool is cutting. A simple example of this might be engraving letters on the outside of a cylinder. However, FeatureCAM can wrap any feature, including surface milling features around the fourth axis. See page 381 for how to enable wrapping in FeatureCAM. To support wrapping, a test for the logical word <WRAP> and the necessary lines should be added to the Program Start, Tool Change and Segment Start formats as well as the feed formats (Linear and In_Macro Linear). It is not necessary to add the fourth axis support blocks to the circular move formats since all arc moves are broken into linear moves when the wrap feature is enabled.

45

XBuild Reference Manual The following is an example of a Linear program format for a Bridgeport Torq-Cut mill that wraps around the Y axis. Note that in the wrapping case, a rotation is used for what would be a Y move in the non-wrapping case. <IF><COMP-START><THEN> {N<SEQ>}<COMP-STAT>X<$X-COORD>Y<$Y-COORD><EOB> <ENDIF> <IF><WRAP><THEN> {N<SEQ>}{<MOTION>}{X<X-COORD>}{C<ROT1-MATH>}{Z<Z-COORD>}{F<ANGFEED>}<EOB> <ENDIF> <IFNOT><WRAP><THEN> {N<SEQ>}{<MOTION>}{<COMP-STAT>}{X<X-COORD>}{Y<Y-COORD>}{Z<ZCOORD>}{F<FEED>}<EOB> <ENDIF> Wrapping requires special consideration in the Rapid move block. To prevent a collision between the tool and part during rotation, the tool must be withdrawn from the part before the rotation takes placed. Since the control does not normally test for this case, Xbuild includes two logical reserved words which are used only to test for the wrap setting and the rapid move condition. The rapid move block then includes both of these words (<WRAP-Z-UP> and <WRAP-Z-DOWN>) and is implemented in this way: <IF><WRAP-Z-DOWN><THEN> {N<SEQ>}{<MOTION>}{C<ROT1-MATH>}<EOB> {N<SEQ>}{X<X-COORD>}{<COOLANT>}<EOB> {N<SEQ>}{Z<Z-COORD>}<EOB> <ENDIF> <IF><WRAP-Z-UP><THEN> {N<SEQ>}{<MOTION>}{Z<Z-COORD>}<EOB> {N<SEQ>}{C<ROT1-MATH>}<EOB> {N<SEQ>}{X<X-COORD>}{<COOLANT>}<EOB> <ENDIF> <IFNOT><WRAP><THEN> {N<SEQ>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}{Z<ZCOORD>}{<COOLANT>}<EOB> <ENDIF>

5th axis indexing in the post

Fifth axis indexing allows 2 D or 3D toolpaths to be performed from many orientations. For 5th axis positioning, use a post in the 5thxs directory. Indexing commands must be added to the Program Start, Segment Start and Tool Change formats. It is not necessary to add indexing commands to feed move blocks (Linear, Circular or Macro blocks) since indexing takes place only between operations. The logical keyword <INDEX> specifies indexing (either 4th or 5th axis) has been activated for the current setup. To help create smaller NC programs, the <INDEX> variable is interpreted differently in different program formats. For Program Start and Tool Change formats, <INDEX> is true if indexing is enabled in FeatureCAM. For Segment Start formats, <INDEX> is true only if indexing is enabled in FeatureCAM and the machine tool is performing the actual indexing move. The following is the Segment Start program format is for the Fanuc 16 control: <IF><INDEX><THEN> {N<SEQ>}{<MOTION>}G53G90G00G80G49Z0M11M71<EOB>

46

Milling <10><13> {N<SEQ>}{<MOTION>}{X<X-COORD>}A<ROT1-WIND>B<ROT2WIND>M10M70<EOB> <ENDIF> <IF><WRAP><THEN> {N<SEQ>}{<MOTION>}{X<X-COORD>Y0}{A<ROT1-WIND>}{Z<ZCOORD>}{<COOLANT>}<EOB> <ENDIF> <IFNOT><WRAP><THEN> {N<SEQ>}{<MOTION>}{Z<Z-COORD>}{<COOLANT>}<EOB> {N<SEQ>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}<EOB> <ENDIF> {N<SEQ>}S<SPEED>F<FEED><EOB>

Handling Turn/mill program formats


General Structure
For program start, tool change, rapid and Z rapid formats the general logical flow is to handle turning and milling in separate sections. For milling use the <ROTARYX> variable to distinguish between face milling and OD milling <IF><TURNING><THEN> [* Do turning tasks} <ENDIF> <IF><MILLING><THEN> <IF><ROTARYX><THEN> [* Do OD milling tasks] <ENDIF> <IFNOT><ROTARYX><THEN> [* Do Face milling tasks] <ENDIF> <ENDIF>

Program Start Format and Tool Change Format


For milling moves, you must enable the C-axis and orient the C-axis in both of these formats. Here is an example for the Acramatic 850 TC: <IF><MILLING><THEN> {N<SEQ> }M21<EOB> {N<SEQ> }S<SPEED> <SPINDLE> <EOB> {N<SEQ> }C<ROT1-WIND><EOB> <ENDIF>

Rapid Move
Rapid moves should include the C axis move as shown below. {N<SEQ> }{<MOTION> }{X<X-COORD> }{Z<Z-COORD> } <IF><MILLING><THEN> {C<ROT1-WIND>} <ENDIF>

47

XBuild Reference Manual

Linear Move
For machines in which FeatureCAM is doing the interpolation the formats must be conditional on whether it is a turning or milling move. In the milling case the C-axis rotation and the angular feedrate must be output. The following is an example from the Acramatic 850TC: <IF><TURNING><THEN> {X<X-COORD> }{Z<Z-COORD> }F<FEED><EOB> <ENDIF> <IF><MILLING><THEN> {X<X-COORD> }{Z<Z-COORD> }{C<ROT1-WIND> }{F<ANG-FPM>}<EOB> <ENDIF> For machines in which the controller performs the interpolation, make sure to set Polar interpolation done by machine tool in the General Information dialog box. This changes the toolpaths as they are output from FeatureCAM into the post. Here is an example for a Fanuc 16, 18 or 21. <IF><TURNING><THEN> {X<X-COORD> }{Z<Z-COORD> }F<FEED><EOB> <ENDIF> <IF><MILLING><THEN> {X<X-COORD> }{C<Y-Coord>}{Z<Z-COORD> }{F<FEED>}<EOB> <ENDIF>

Rapid Format
For posts where the machine tool is performing the polar interpolation, the post will still have to perform the polar interpolation for positioning. In the example below, the C and X coordinates are calculated using the anglexy and radiusxy functions. <IF><MILLING><THEN> <IFNOT><ROTARYX><THEN> {<MOTION> }C[anglexy(<X-COORD>, <Y-COORD>)] X[radiusxy(<X-COORD>, <YCOORD>)*2] {Z<Z-COORD>}<EOB> <ENDIF>

48

Chapter 3 Turning
Turning CNC Info Menu
General
When General is selected, a list of options pertaining to the output program format displays. Any parameter may be changed by selecting it, typing the value, or toggling to the desired selection (if a new value is entered, press Enter). All of the general options for turning are the same as the milling general options with the addition of Tool Ln Comp. The Tool Ln Comp option allows for the compensation of tool length by subtracting the tool's X and Z length from the coordinate data at postprocessing time. Using Tool Ln Comp allows the user to shift or compensate for different tool lengths without presetting the origin for each tool. For Japanese machines such as FANUC, this selection should be turned Off. If the output is to be incremental, Tool Ln Comp must be turned On.

NC Codes
With theNC Codesdialog, the exact character strings that are required for commands by the NC machine for different motion types can be specified. For example, LINEAR is generally defined as G1, but may be changed to G01, or any other string (up to eight characters). All motion commands are passed to Post via the string-type Reserved Word, <MOTION>. Tool tip radius compensation may be generated in the output when turned On in FeatureTURN, and if it is built into the CNC BUILD file. Compensation selections use the string-type Reserved Word, <COMP-STAT> for one of the strings shown above, or an empty string is assigned if the Compensation option was not turned On in FeatureTURN Pecking types are the types of pecking performed for drilling and tapping.

Turrets

Turrets Information
This page describes all of the turrets on a lathe. The top of the page contains three fields: Multi-turret programming indicates the style of multi-turret programming that is available on this machine. If the lathe only has a single turret, select None. For Okuma style lathes with multiple turrets that requires a single part program for all of the turrets, select Okuma. For Fanuc style multi-turret lathes that desire a separate output file for each turret, select Fanuc. Synch Number Start is the initial M code number that is reserved for synch codes (also called wait codes). Most machines reserve all M codes above a certain number for synchronization codes. Synch Number Increment is the increment between synchronization codes. FeatureCAM can support up to four turrets. Each turret location is represented as either Main Spindle Side Upper Turret, Main Spindle Side Lower Turret, SubSpindle Side Upper Turret or Main Spindle Side Lower Turret. Check the boxes that apply to your specific machine and then check the following boxes for each spindle if they apply. Coolant On is the code for turning on the coolant. Coolant Off is the code for turning off the coolant. Can address main spindle should be checked if the turret can cut on the main spindle. 49

XBuild Reference Manual Can address sub spindle should be checked if the turret can cut on the subspindle. Can hold live tools should be checked if the turret can hold drills or mills that can spin. Can hold Baxis tools should be checked if the turret can hold tools that can rotate around the Y axis. C Angle Offset indicates the C angle for the tool at its start position. Typically upper turrets should be at 0 degrees and lower turrets will be at 180 degrees.
Z and X distances between turrets are signed values measured from the primary turret reference point to the secondary turret reference point. The turret reference points are always the locations from which the tool lengths are measured.

Spindles
This page contains the M codes for selecting the main spindle, selecting the sub spindle. If the Z directions are the same for both spindles, check Main and sub spindles have the same Z axis direction. If this checkbox is left unchecked, it is assumed that the Z directions are opposite.

Feeds and Speeds


These parameters are used to specify the spindle direction, feed units and the speed range codes that are required by the machine: Feed max and Feed min are the feed rate limits when specified in Feed Per Minute. Degrees/Minute Max and Degrees/Minute MIN are the feed rate limits when specified in degrees per minute. Range 1- Range 4 are for lathes that have speed ranges. For each range, enter the M-codes for selecting the range and the Max. speed for the range. UPM (Units per Minute) and UPR (Units per Revolution) describe the feed rate in terms of UPM or UPR (or the spindle). Only one option at a time is used by Post, depending upon FeatureTURN's segment data. Spindle CW (clockwise) and Spindle CCW (counter-clockwise) describe the spindle On and direction code. Both of these selections use the string-type Reserved Word <SPINDLE> to specify spindle On and direction. * NOTE * Spindle Dir may be specified in FeatureTURN with a negative, or positive spindle RPM value. A negative value specifies a CCW direction, while a positive value specifies a CW direction. When CSS is turned on in FeatureTURN, the spindle speed is limited to the maximum set for the appropriate speed range set here.

Cycles
The following options contained in Cycles Info allow for specifying the manner in which drilling, threading and grooving cycles are handled. Groove simple If this option is checked a groove is output as series of computed moves. Or in the case of a straight walled dimensioned groove, the roughing operation is output as a canned cycle. Groove canned If this option is checked, the curve is output in the NC code twice and the roughing and finishing canned cycles reference the curves. If reuse path is checked then the curve is output only once and the roughing and finishing cycles reference the same curve. Grooving has only limited canned cycle support. Only roughing of straight-walled grooves are output as a canned cycle. This applies to grooves with Chamfer = 0, Angle = 0 and Radius = 0.

50

Turning

When Canned is selected, a format for a canned threading, drilling, or tapping cycle is defined, which is output by Post only one time. If Computed is chosen, the drilling, threading, or tapping move definitions are output as the respective cycle's pass for each step.

Fixture ID
This list contains the various G codes that are valid fixture Id's. An example list might be. 54 55 56 57 58 59 FeatureCAM will automatically look in the current post processor and will assign the next available fixture ID to a new setup and to the numeric reserved word <FIXTURE>.

Formats Menu
The Formats menu in XBuild is used to enter specific program formats for the various blocks which can appear in a part program. Each format is made up of combinations of Reserved Words, literals, comments, and user-defined variables. This section first describes the Formats menu and briefly describes the program formats and how they are used. Next, the use of the XBuild Formats Editor, and its menus and keyboard commands, are described in detail. The rest of this section is a reference guide to creating program formats in order to build a CNC data file. It may be helpful at times to refer to the last chapter in this manual, a listing of the ROM35I.CNC postprocessor as it would be created in a document file (.CNX). The program formats found in this group are used in almost every part program, and include commonly used formats such as Program Start, Turret Change, Tool Change, Segment Start, Program End. The Move formats include the rapid and feed moves which make up the largest portion of any part program. These program formats must be carefully defined. These formats include Rapid, Linear, and Circular. The Cycle formats include Drill, Thread, and Groove. These formats also use specific reserved reserved words which are discussed in detail below.

Defining Program Formats


The following information provides definitions for all of the program formats, as well as the rules, or cases (if applicable) that apply to specific program formats. As Post reads each segment from the part data file, it determines if it is the first segment of the program, a tool change, or a non-tool changing segment. Based upon this information, Post outputs the appropriate block (i.e., PROGRAM START, TOOL CHANGE, or SEGMENT START) prior to executing segment data. Onlyone of these three program formats are used at the beginning of any one segment. IMPORTANT Each definition can include multiple lines, and each line must end with <EOB>.

Rules for Program Formats


The Reserved Words, <Z-COORD> and <X-COORD> are the assigned values of the first

51

XBuild Reference Manual path point, and must appear in all program formats to provide the first positioning move to the start of the path

Program Formats
PROGRAM START
Post outputs lines that are defined in PROGRAM START at the beginning of a program. In PROGRAM START, general preparatory codes (e.g., absolute, incremental, etc.) are placed to define the dimension system. The first tool change must also be defined. Functions such as, <SPEED>, <SPINDLE> and <COOLANT> status, as well as the first positioning move can be passed to the Post output via <Z-COORD> and <X-COORD> Reserved Words.

SPINDLE CHANGE

TOOL CHANGE
A TOOL CHANGE block is output between segments that require a tool change. This block is only output if the Tool # specification, or Turret selection (FeatureTURN) differs from the previous one. The tool should be positioned to a safe location (index position), before indexing tools. Functions such as: <SPEED>, <SPINDLE> and <COOLANT> status can be passed to the Post output with the first positioning move via <ZCOORD> and <X-COORD> Reserved Words.

SEGMENT START
This block is only output between non-tool changing segments. SEGMENT START should contain any commands that may change between segments (e.g., <OFFSET #>, <SPEED>, <CSS-SPEED>, etc.). The Reserved Words: <Z-COORD> and <X-COORD> must be included in SEGMENT START.

PROGRAM END
This block can be used to: turn the CoolantOff; position the tool to an endpoint; and rewind the part program. Using the Reserved Words: <X-RETURN> and <Z-RETURN> calculates to return to the first index position.

Move Formats
Rapid Move
The RAPID MOVE defines the output format for rapid positioning moves. Generally, modality delimiters ({ }) are placed around the <X-COORD> and <Z-COORD> Reserved Words. This allows the postprocessor to "strip" X, or Z from the line when a coordinate is redundant. In motion blocks (rapid, linear and circular), the Reserved Word, <MOTION> receives the path definition parameter from FeatureTURN (Rapid, Linear, Arc CW, Arc CCW, or the Thread command).

52

Turning

Linear Move
LINEAR MOVE defines the output format for linear moves. The following Reserved Words must be defined in this block: <MOTION>, <X-COORD>,<Z-COORD> and<FEED>. Tool tip compensation must be turned ON in this format line via the <COMP-STAT> Reserved Word. Some CNC machines may require the use of the vector Reserved Words, <Z-VECTOR> and <XVECTOR>.

Circular Move
The following Reserved Words are provided as arc modifiers for I, K, or R values: <ARC-X>, <ARC-Z>,<RADIUS>, <S-RAD>, <X-CEN>,or <Z-CEN>. The method of specifying arc definition is defined in a CIRCULAR MOVE block.

Spindle Dwell Bar Feed


This block contains the necessary codes for opening and closing the spindle and also the bar feed code.

Catcher In
This block would contain the M-code for retracting the parts catcher.

Catcher Out
This block would contain the M-code for extending the parts catcher.

Rough Cycle Start


This block contains the code for starting the roughing canned cycle. See Numeric Turning Canned Cycle Block Words for applicable reserved words.

Rough Cycle End


This block contains the code (if any is required) for ending the roughing canned cycle. See Numeric Turning Canned Cycle Block Words for applicable reserved words.

Finish Cycle Start


This block contains the code for starting the finishing canned cycle. See Numeric Turning Canned Cycle Block Words for applicable reserved words.

Finish Cycle End


This block contains the code for starting the finishing canned cycle. See Numeric Turning Canned Cycle Block Words for applicable reserved words.

53

XBuild Reference Manual

Spindle Open
This format contains commands for opening the current spindle. It should contain logic for opening the main and subspindle. The logical variable <MAIN-SPCMD> is used to determine which spindle is current.

Spindle Close
This format contains commands for closing the current spindle. It should contain logic for opening the main and subspindle. The logical variable <MAIN-SPCMD> is used to determine which spindle is current.

Spindle Position
This format positions the sub-spindle with a rapid move. The variable, <SPINDLE-POS>, contains the position of the sub-spindle. When the sub-spindle is positioned using both a rapid and a feed move, the Spindle Position and Spindle Position Feed formats are called in succession.

Spindle Position Feed


This format positions the sub-spindle with a feed move. The Sub-spindle feature for positioning has an intermediate point that can be specified.

Spindle Orient
This format is used to orient the spindle. It should contain logic for orienting the main spindle and sub-spindle. This format is used for setting the angle of a spindle. It can be used before or after grabbing the part.

Spindle Start/Stop
The Spindle On/Off format starts or stops the spindle. The variable, <SPINDLE> contains the mcode to perform these functions.

UDF Text Program Stop Turret Home

Cycle Formats
Turning Drill Cycle
This block contains the canned cycle for twist drill operations including the support of peck drilling. For drilling the following reserved words have the following values: <DEPTH> is the calculated depth of the drilling operation including compensation for tool tip. <STEP1> is pecking depth. This value is calculated by dividing <DEPTH> by the Number of Pecks. This is an example drilling cycle format: {N<SEQ>}G83X0Z<DEPTH>Q<STEP1>F<FEED><EOB> See Numeric Drilling and Threading Type Cycle Words for applicable reserved words.

54

Turning

Turning Thread Cycle


When one of these options is chosen, the desired format may be entered for the threading program block. See Numeric Drilling and Threading Type Cycle Words for applicable reserved words.

Turning Groove Canned Cycle Formats


There are 3 turning groove canned cycle formats available in XBUILD, and they apply in 2 different situations. The formats can be found under Formats>Cycle>Groove. There are two kinds of grooving canned cycle: simple canned cycle and path canned cycle. If you don't choose to use any canned cycles, then you'll be using longhand code which we call "Computed".

Groove Simple/Computed Format


You need to fill in the "Groove Simple/Computed" format whenever you specify "Use simple canned cycle or computed cycle" in the strategy page tab of the turning groove feature.

Simple Canned Cycles


The simple canned cycle can be turned on by the radio button in the Cycles Information dialog of XBUILD (CNC-Info>Cycles). If it is on then any rectangular simple groove feature (straight walls and no chamfer or bottom radius) will be posted out as a single line of code using the "Groove Simple/Computed" format (for an example see the Groove Simple/Computed format in fan6ti.cnc).

Example Simple Groove Canned Cycle Format


N<SEQ> G75 X<X-COORD>Z<Z-COORD>I<DEPTH>K<STEPOVER>F<FEED><EOB> If simple canned cycles are being used ("Simple" is chosen in Cycles Information dialog, and you've filled in the "Groove Simple/Computed" format), then the system computes the diagonal bottom point of the groove slot as the "target point" (shown below).

FeatureCAM only supports canned cycles that utilize this computed "target point". If a canned cycle program format block is required, then the values of the <X-COORD> and <Z-COORD> Reserved Words (as shown in the format block example below) are the X and Z coordinates of the "target points".

Computed Style of Grooving


If you are using computed style of groove, then the "Groove Simple/Computed" format must be (at the very least) identical to the LINEAR MOVE format block. Other parameters can be used (see the examples below).

55

XBuild Reference Manual

Example Computed groove canned cycle format with dwell


If you need a dwell, then you should choose "Computed" in the Cycles Information dialog of XBUILD and fill in the "Groove Simple/Computed" format with something like the following: {N<SEQ>}{<MOTION>}{X<X-COORD>}{Z<Z-COORD>}{F<FEED>}<EOB> {N<SEQ>} GO4 F<DWELL><EOB>

Groove Path Start and Groove Path End Formats


These formats are used for what we call "path canned cycles". The path canned cycle can be turned on by the checkbox in the Strategy page of the turning groove feature. If it is on then the curve of the feature is output as the path (see the "Groove Path Start" and "Groove Path End" formats in path_cyc.cnc). Choosing "use path canned cycle" on the feature will ignore the "simple/computed" radio buttons in the Cycles Information dialog in XBUILD and instead will use the "Groove Path Start" and "Groove Path End" formats. The "simple/computed" radio button in XBUILD are applicable only if the "use path canned cycle" option on the strategy page of the feature is off. The path posts (path_cyc.cnc, pths_cyc.cnc and pp15_cyc.cnc) do support grooving canned cycles -- not the simple kind but the path kind.

Turning Tapped Canned Cycle Format


Enter the program block for tapping. For this operation <DEPTH> is the depth of the tapping operation. See Numeric Drilling and Threading Type Cycle Words for applicable reserved words.

Turning Numeric Reserved Words


Numeric General Words
<CALC-SPEED> Calculated direct RPM speed at the path's start point; the spindle can be turned ON, or readjusted in direct RPM prior to rapid traversing to the path's start point, where CSS is turned ON. The <CALC-SPEED> Reserved Word can be used to automatically calculate the direct RPM "turn on" speed (to turn on CSS after position moves), which avoids rapid traversing to and from a remote indexing point in the CSS mode. Corresponds to the clearance attribute. <CLEARANCE> + <DEPTH> Compensation number passed from FeatureCAM. Corresponds to Surface Speed parameter on the Feed/Speed tab of a feature. Corresponds to Dwell parameter for Cutoff, Groove, and Tapping. 90 - Engage Angle for turning or 90 + Engage Angle for boring. Passes the feed rate value to the word format of <FEED-UPM> or <FEED-UPR>, depending upon the Feed Units specified in FeatureTURN. Format of this word is used to pass feed rate value and/or the Reserved Word <FEED> when Use IPR is not checked on the Feed/Speed tab for a feature. Format of this word is used to pass feed rate value and/or the Reserved Word <FEED> Use IPR is checked on the Feed/Speed tab for a feature. X location of the pattern instance that will be cut by the macro. This coordinate is typically not output in the cnc program. Z location of the pattern instance that will be cut by the macro. This coordinate is typically not output in the cnc program. For groove only. Corresponds to Liftoff Dist. Attribute. Next tool to be used, may be required by some controls. Corresponds to the Tool column of the Tool Mapping Dialog box. Tool nose radius of an endmill or the tool tip radius of a turning or threading tool. Tool length offset number. Corresponds to the Offset parameter in the Tool Mapping Dialog Box. Radius value in constant surface speed; in Post, this value is set to the first X coordinate value The Withdraw Angle used for EZ-Path.

<CLEARANCE> <CLR-DEPTH> <COMP-NUM> <CSS-SPEED> <DWELL> <ENG-ANGLE90> <FEED> FEED-UPM FEED-UPR <INC-MACX> <INC-MACZ> <LIFT-OFF> <NEXT-TL> <NOSE-RAD> <OFFSET#> <R-CSS> <RTR-ANGLE-P>

56

Turning
<RTR-FEED> <SEQ> <SPEED> <SP-MAX> Withdraw feed rate. This is a line sequence number identifier (when the word appears in a line, it is substituted with the current sequence number, and is subsequently incremented by the sequence step value) Spindle RPM value passed from feature properties dialog. Maximum spindle RPM when CSS is ON, used to set the maximum RPM at which the spindle should run. Corresponds to CSS Max RPM turning attribute or the Max. speed for the current range specified on the Feed and Speed dialog box of XBUILD. Sub-spindle position. For groove only. Corresponds to Stepover % * Tool Width. Returns sync number from Post / CNC-Info / turrets dialog. Used to synchronize multiple turrets. Width of selected tool. Tool number passed from FeatureCAM. Corresponds to the Tool column of the Tool Mapping Dialog box. Returns the number of the current turret. X coordinate of desired tool change location passed from post options dialog. Returns current X coordinate value. X-Index turret position passed from FeatureTURN. Corresponds to the X coordinate of the Tool Change Location (either the Turning attribute or the setting in the Post Options dialog box.) Distance between the tool program point and the part origin when at the index position along the X axis; this value is calculated by Post as: <X-PRESET> = <X-INDEX> + <X TOOL LENGTH> <distance btw turrets> (<distance btw turrets> is equal to zero for primary turret) X coordinate of the previous X-PRESET value plus any differences between tool change locations; this value is calculated by Post as: <X-RETURN> = <$X-PRESET> + <X-INDEX> <$X-INDEX> Calculated X vector for the next move. Returns current Z coordinate value. Z coordinate of desired tool change location passed from post options dialog. Z-Index turret position passed from FeatureTURN. Corresponds to the Z coordinate of the Tool Change Location (either the Turning attribute or the setting in the Post Options dialog box. Distance between the tool program point and the part origin when at the index position along the Z axis; this value is calculated by Post as: <Z-PRESET> = <Z-INDEX> + <Z TOOL LENGTH> <distance btw turrets> (<distance btw turrets> is equal to zero for primary turret) Z coordinate of the previous Z-PRESET value plus any differences between tool change locations; this value is calculated by Post as: <Z-RETURN> = <$Z-PRESET> + <Z-INDEX> <$Z-INDEX> Calculated Z vector for the next move.

<SPINDLE-POS> <STEPOVER> <SYNC-NUM1> <SYNC-SPEED> <TL-WIDTH> <TOOL> <TURRET-NUM> <X-CHANGE> <X-COORD> <X-INDEX> <X-PRESET>

<X-RETURN>

<X-VECTOR> <Z-COORD> <Z-CHANGE> <Z-INDEX> <Z-PRESET>

<Z-RETURN>

<Z-VECTOR>

Numeric Turning Canned Cycle Block Words


The following example code fragment from a Fanuc control will be used to illustrate the parameters below. N012 G72 P013 Q018 U4.0 W2.0 D7000 F30 S55 N013 G00 Z58.0 F15 S58 N014 G01 X120.0 Z70.0 N015 Z80.0 N016 X80.0Z909.0 N017 Z110.0 N018 X36.0Z132.0

57

XBuild Reference Manual N019 G70P013Q018 <PATH-ID> <PRO-FEED> The current canned cycle path ID. Finishing feed rate. This value is usually specified along with the profile. It is often ignored during roughing. This variable would have the value of 15 in the above example. Corresponds to Withdraw Length in FeatureTURN

<RTRLENGTH> <SEQ-END>

Ending NC program line number of profile for roughing and finishing canned cycle. This variable would have the value of 18 in the above example. <SEQ-START> Starting NC program line number of profile for roughing and finishing canned cycle. This variable would have the value of 13 in the above example. <X-ALLOW> Corresponds to X Finish Allowance in FeatureTURN <Z-ALLOW> Corresponds to Z Finish Allowance in FeatureTURN

Numeric Circular Block Words


<ARC-Z> Used in the circular interpolation block to specify the signed Z distance from the start point of the arc to the center of the arc, along the Z axis <ARC-X> Used in the circular interpolation block to specify the signed X distance from the start point of the arc to the center of the arc, along the X axis <RADIUS> Reproduces arc radius in a circular block <S-RAD> Generates the signed arc radius value in a circular block, +R<180 degrees and R>180 degrees <Z-CEN> Reproduces the absolute Z coordinate position from the Z axis origin to the arc's center in a circular block <X-CEN> Reproduces the absolute X coordinate position from the X axis origin to the arc's center in a circular block * NOTE * To generate the signed distance from the arc's center to the arc's start position, for <ARC-Z> and <ARC-X> Reserved Words, the FACTR value in Words Tables must be changed to 1. To generate the unsigned distance from the arc's start position to the center of an arc, change the status of UNS_V to ON in Words Tables for these Reserved Words.

Numeric Drilling and Threading Type Cycle Words


<DEPTH> This word has different values for different operations. Tap operation: Calculated depth of tap. Twist drill operation: Calculated depth of drilling operation including tip. Turning, Boring and Face: Depth of Cut Groove: Depth of Cut. The X location where the thread cutting pass ends. This is usually the same as <START-X> except for tapered threads. The Z location where the thread cutting pass ends. Corresponds to 90 Infeed Angle threading attribute. Calculated tip to tip X axis lead Corresponds to Pitch thread dimension.

<END-X> <END-Z> <ENG-ANGLE> <LEADX> <LEADZ>

58

Turning <MIN-INFEED> Corresponds to Min Infeed attribute. <NUM-SPRING> Number of thread spring passes. Corresponds to Spring Passes threading attribute. <RTR-ANGLE> Corresponds to Withdraw Angle. <RTR-ANGLE90> Withdraw Angle 90. This parameter was added to support threading on a Fanuc. On that controller, a vertical retract is considered to be 0, not 90. <START-X> The X location where the thread cutting pass starts. <START-Z> The Z location where the thread cutting pass starts. <STEP1> This word has different values for different operations. !" Thread operation: Step 1 of threading pass. !" Drill operation: First Peck !" Groove operation: Stepover % <STEP2> This word has different values for different operations. !" Thread operation Step 2 value of threading pass. !" Drill operation: Second Peck <TAPER-DEPTH> The Z distance between the lowest and hightest point on the thread. <THRD-DEPTH> Corresponds to the Thread Height in FeatureTURN. <TIP-ANGLE> The tip angle of the tool.

LOGICAL RESERVED WORDS FOR Turning CONDITIONAL STATEMENTS


<AUTOROUND> <BAR-FEED> <BAR-PULL> <COMP-END> <COMP-MID> <COMP-ON> <COMPSTART> <CSS-ON> <CWSPINDLE> <FACEBFACE> True if the Auto Round check-box is checked in turn properties. True if the current operation is a bar feeder operation. True if the current operation is a bar puller operation. True if the move represents the end section for compensation (last element, or move of path), otherwise <COMP-END> is false. True if the move represents the middle section for compensation (between the first and last moves of path), otherwise <COMP-MID> is false True if tool nose radius compensation box is checked in turn properties. True if the move represents the start section for compensation (first element, or move of path), otherwise <COMP-START> is false True if constant surface speed check-box is checked in turn properties. True if spindle is rotating clockwise.

True if performing a facing or back-facing operation. This would be true for a Turning feature using a Face or Back face roughing strategy or a Facing feature. <FINISH> True for finish operations. <FLOAT-TAP> True if floating tap cycle is selected in feature properties. <ID> True for Inside Diameter operations. <IDOD-GROV> Used to differentiate among G codes that are specialized for grooves on ID

59

XBuild Reference Manual (inner diameter), OD (outer diameter), or those on the FACE as shown in the examples below:
<IFNOT><IDOD-GROV> Implies that s FACE GROOVE CYCLE program format block is output <IF><IDOD-GROV> Implies that an ID, or OD GROOVE CYCLE format block is output

<IS-INC-MAC> <LAST-TOOL> <LEFTHANDED> <MAINSPCMD> <MAINSPNDLE> <OD> <OFFSET-CH>

True if incremental macros are enabled in feature properties / strategy dialog. True if the current tool is the very last tool in the program True if the current tool is left handed. True if the current spindle is the main. False if the sub-spindle is the current spindle. True if main spindle is current spindle. True for Outside Diameter operations. Normally used in a SEGMENT START block; true if the OFFSET# is changed between segments:
<IF><OFFSET-CH><THEN> {N<SEQ>}T{<COMP-NUM>}<TOOL><OFFSET#><EOB> <ENDIF>

<POS-DIR> <POST-RCAN> <PRE-GCAN> <PRE-PCAN> <PRE-RCAN> <RANGE-CH>

True if the operation is cutting in a positive direction. True for the moves after rough canned cycle. True for the last move before groove canned cycle. True for the moves before finish canned cycle. True for the moves before rough canned cycle. Normally used in a SEGMENT START block, and is true if there is a change in gear range:
<IF><RANGE-CH><THEN> {N<SEQ>}MO5<EOB> {N<SEQ>}<SP-RANGE><EOB> {N<SEQ>}S<CALC-SPEED><SPINDLE-ON><EOB> <ENDIF>

<REUSEPATH> <RIGID-TAP> <TAPER> <TCANCYCLE> <TCAN-END> <TCANSTART> <TOOL-LEFT> <UNDERCHECK>

True if the "Reuse path in canned cycle" check-box is checked in turn properties. True if rigid tap cycle is selected in feature properties. True for tapered threads. True if inside a turning canned cycle. True for last move in the profile. True for first move in the profile. True if the tool is on the left of the cutting path. True if the Undercut Check check-box is checked in turn properties.

Turning String-type reserved words


The following information explains all string-type Reserved Words.

60

Turning

<BOL> <COMP-STAT>

Beginning of line identifier. Used to indent line in NC code output. Indents line by spacing amount between <BOL> and rest of line. Returns the applicable code from Post / CNC-Info / NC codes, when tool nose radius compensation is selected in Turn Properties dialog (e.g., G41, G42). Turns ON at the first feed move of the profile path. Returns the coolant "turn on" code from Post / CNC-Info / Turrets dialog, for the selected turret. Returns the date that NC code was posted. Specifies the end of block code on each line of a format. Returns the name of the FeatureCAM file. Returns the applicable code from Post / CNC-Info / Speeds & Feeds dialog, for feed per revolution or feed per linear unit feed rates. (e.g., G99, G98). Feed rate per revolution can be selected in Turn Properties / Feed Speed dialog. Returns the current fixture offset code from Post / CNC-Info / Fixture ID dialog. Returns the estimated time required to machine part. Returns the current setup name. Name can be changed in part view and in setups. Returns the applicable motion code from Post / CNC-Info / NC codes dialog, for the current move. Returns Rough or Finish based on the type of pass. Returns the current operation type name (e.g., turn, groove). User-definable parameters passed from the particular Feature Properties / Post Vars... dialog. Assigned to perform specific actions that are not normally handled as standard functions. When tool tip compensation and canned cycle status is selected, <PRO-COMP> returns the applicable code from Post / CNC-Info / NC codes dialog to establish a right/left tool relationship with the part and turns ON at the first feed move of the profile path. Used within a turning canned cycle format to return applicable code for feed per revolution or feed per linear unit. (e.g., G99, G98). Returns the part name from the setup definition from FeatureCAM setups dialog. Returns the date in the regional format (e.g. British DD/MM/YY instead of MM/DD/YY) specified in Windows. Returns a user input comment from the particular feature properties / Post Vars... dialog. Returns the name of the current feature from the part view in FeatureCAM. Returns the applicable code from Post / CNC-Info / NC codes dialog, for spindle rotation direction. (e.g., M3, M4). Returns the applicable code from Post / CNC-Info / Spindles dialog, to select main or sub spindle. Returns code from Post / CNC-Info / Feeds & Speeds dialog, to engage applicable speed range. Returns the time when the NC code was posted. Returns the user input comment from Tool properties / Overides: dialog. Returns the tool ID from tool mapping dialog box. Returns the name of the current tool from Tool Manager dialog. Returns the tool orientation prefix from the <TOOL-NAME> for turning tools only (e.g., SW, NE). Returns the applicable code from Post / CNC-Info / Turrets dialog, for a CW or CCW turret rotation. Corresponds to the Turret Direction parameter from the Feature Properties / Tool Usage dialog.

<COOLANT> <DATE> <EOB> <FM-NAME> <F-UNITS>

<FIXTURE> <MACH-TIME> <MCSID> <MOTION> <OP-PASS> <OP-TYPE> <P1>...<P9> <PRO-COMP>

<PROFUNITS> <PROGNAME> <REGIONDATE> <SEG-CMT> <SEGM-ID> <SPINDLE> <SPNDLESEL> <SP-RANGE> <TIME> <TOOL-CMT> <TOOL-ID> <TOOL-NAME> <TOOLORIENT> <TRT-TURN>

61

XBuild Reference Manual

<TURRET> <UDFCOMMENT> <UDF-TEXT>

Selects the programmed turret. Corresponds to the Turret parameter from the Feature Properties / Tool Usage dialog. Used in the UDF Text format to return a comment from an add in macro which creates a user defined feature. Used in the UDF Text format to return a specific code from an add in macro which creates a user defined feature.

Relationship between FeatureTURN and XBUILD


Roughing and Profiling Cycles
Post applies the offset and other cycle data parameters that are appropriate to the cycle. XBuild provides the <X-COORD> and <Z-COORD> Reserved Words to receive the path coordinate data. Additional Reserved Words: <ARC-X>, <ARC-Z>, <X-CEN>, <Z-CEN>, <RADIUS> and <S-RAD> are provided by XBuild to receive the circular interpolation modifiers that are needed for arc moves.

START/END POINTS
If start or endpoints have been defined in FeatureTURN, they become part of the path's definition. Post generates a rapid move from a start point to the first part of the machining operation, and a rapid move from the last move of the operation to the endpoint is also generated.

OTHER RESERVED WORDS


Optional sequence numbering is defined in Post, and is placed at the beginning of any block that contains the Reserved Word, <SEQ>. The end of block character (a control code that signals a completed line) is defined by the <EOB> Reserved Word (GENERAL INFO).

Computed tapping cycles in turning


For computed tapping cycle to work correctly, the Spindle format in XBUILD has to be completed. The <SPINDLE> keyword also needs to be added to the Linear format. Example Spindle format: {N<SEQ>}<SPINDLE><EOB> Example Linear format: {N<SEQ>}{<F-UNITS>}{<COMP-STAT>}{<MOTION>}{X<XCOORD>}{Z<Z-COORD>} {F<FEED>}{<SPINDLE>}<EOB> See also Turning canned cycles

62

Chapter 4 Turn/Mill
Handling Turn/mill program formats
General Structure
For program start, tool change, rapid and Z rapid formats the general logical flow is to handle turning and milling in separate sections. For milling use the <ROTARYX> variable to distinguish between face milling and OD milling <IF><TURNING><THEN> [* Do turning tasks} <ENDIF> <IF><MILLING><THEN> <IF><ROTARYX><THEN> [* Do OD milling tasks] <ENDIF> <IFNOT><ROTARYX><THEN> [* Do Face milling tasks] <ENDIF> <ENDIF>

Program Start Format and Tool Change Format


For milling moves, you must enable the C-axis and orient the C-axis in both of these formats. Here is an example for the Acramatic 850 TC: <IF><MILLING><THEN> {N<SEQ> }M21<EOB> {N<SEQ> }S<SPEED> <SPINDLE> <EOB> {N<SEQ> }C<ROT1-WIND><EOB> <ENDIF>

Rapid Move
Rapid moves should include the C axis move as shown below. {N<SEQ> }{<MOTION> }{X<X-COORD> }{Z<Z-COORD> } <IF><MILLING><THEN> {C<ROT1-WIND>} <ENDIF>

Linear Move
For machines in which FeatureCAM is doing the interpolation the formats must be conditional on whether it is a turning or milling move. In the milling case the C-axis rotation and the angular feedrate must be output. The following is an example from the Acramatic 850TC: <IF><TURNING><THEN> {X<X-COORD> }{Z<Z-COORD> }F<FEED><EOB> <ENDIF> <IF><MILLING><THEN> {X<X-COORD> }{Z<Z-COORD> }{C<ROT1-WIND> }{F<ANG-FPM>}<EOB> <ENDIF>

63

XBuild Reference Manual For machines in which the controller performs the interpolation, make sure to set Polar interpolation done by machine tool in the General Information dialog box. This changes the toolpaths as they are output from FeatureCAM into the post. Here is an example for a Fanuc 16, 18 or 21. <IF><TURNING><THEN> {X<X-COORD> }{Z<Z-COORD> }F<FEED><EOB> <ENDIF> <IF><MILLING><THEN> {X<X-COORD> }{C<Y-Coord>}{Z<Z-COORD> }{F<FEED>}<EOB> <ENDIF>

Rapid Format
For posts where the machine tool is performing the polar interpolation, the post will still have to perform the polar interpolation for positioning. In the example below, the C and X coordinates are calculated using the anglexy and radiusxy functions. <IF><MILLING><THEN> <IFNOT><ROTARYX><THEN> {<MOTION> }C[anglexy(<X-COORD>, <Y-COORD>)] X[radiusxy(<X-COORD>, <YCOORD>)*2] {Z<Z-COORD>}<EOB> <ENDIF>

TURN / MILL logical variables


The following logical variables are only available in turn/mill posts. True if current feature is a milling feature. <MILLING> <ROTARY-OD> True if active tool is a rotary x tool. Applies to drilling and milling. <TURNING> True if current feature is a turning feature. <ZFACE-YAXIS> True if cut feature using Y coordinates check box in feature properties dialog is checked. Machine must have Y axis to use this option.

TURN / MILL Keywords


In general, milling keywords are available in turn/mill mode when a milling feature is being processed. The same thing is true for turning keywords. The following are some exceptions: 1. The milling keywords <CYCLE>, <PLANE>, <XY-PLANE>, <ZX-PLANE>, and <YZPLANE> are also available for turning features in turn/mill mode. 2. The turning keywords <SP-RANGE>, <F-UNITS>, and <RANGE-CH> are also available for milling features in turn/mill mode. 3. The milling keywords <X-VECTOR>, <Y-VECTOR>, and <USE-FIXTURE> are not available in turn/mill mode. 4. The turning keywords <X-VECTOR> and <Z-VECTOR> are not available in turn/mill mode. 5. When XBUILD is in the turn/mill mode, the Reserved Words dialog is color-coded to indicate the availability of the keywords.

64

Chapter 5 Multi-turret Turning


Multi-turret Keywords
<SYNCH-NUM1> through <SYNCH-NUM5> <SYNCH-SPEED> Numeric These are the synchronization codes associated with the current operation. Note that these variables are blank, they will not be output. For use in Okuma style multi-turret posts only, this variable contains the synchronization code for a change in spindle speed. The synch code must be output on the same line as the spindle speed. The number of the turret that is active for the current operation.

Numeric

<TURRET-NUM>

Numeric

Multi-turret Posts
Synchronization codes that are associated with an operation must be output at the beginning of the operation. FeatureCAM allows up to five synchronization codes to be associated with a single operation. The following lines must appear in the Program Start, Tool Change, Segment Start and Program End program formats: {M<SYNC-NUM1>}<EOB> {M<SYNC-NUM2>}<EOB> {M<SYNC-NUM3>}<EOB> {M<SYNC-NUM4>}<EOB> {M<SYNC-NUM5>}<EOB> Theses variable are specially programmed so that they are not output if the variable is blank.

Synchronizing Spindle Speed Changes on Okuma Lathes


For Okuma lathes, the Program Start, Tool Change, and Segment Start programs must output a special synch code along with a change in spindle speeds. A sample from a Segment Start format for an Okuma post is shown below. <IF><CSS-ON><THEN G96 S<CSS-SPEED><32> <ENDIF> <IFNOT><CSS-ON><THEN> G97 S<CALC-SPEED><32> <ENDIF> <SPINDLE> <COOLANT>{ P<SYNC-SPEED>}<EOB> <MOTION> X<X-COORD> Z<Z-COORD><EOB> <ENDIF>

65

XBuild Reference Manual

Pinch and Follow Turning


For pinch and follow turning, the Linear program format and Canned Cycle formats must be altered. To support inserting wait codes at every scan line, you must output the synch code in the Linear program format as follows. <IF><TCAN-START><THEN> Z<Z-COORD> F<PRO-FEED>{M<SYNC-NUM1>} <EOB> <ENDIF> To support the output of synch codes at the start of the canned cycle the synch code must be output in the Canned Cycle Start as shown below for a Mori Seiki with a Mitsubishi control: <IFNOT><FACE-BFACE><THEN> {M<SYNC-NUM1>}<EOB> G71 U<DEPTH> R<RTR-LENGTH><EOB> G71 P<SEQ-START> Q<SEQ-END> U<X-ALLOW> W<Z-ALLOW> {F<FEED>}<EOB> <ENDIF> The Canned Cycle Start format must be altered to support outputting a synchronization code at the beginning of the canned cycle as shown below. Only one synchronization code is possible, so you need to only print out a single wait code. {M<SYNC-NUM1> }<EOB> G70 P<SEQ-START> Q<SEQ-END><EOB>

66

Chapter 6 Wire EDM


EDM CNC info menu
General information
All of the general options for turning are the same as the milling general options with the addition of Iso taper arc.

Iso taper arc


These settings control the output of arcs for tapered corners in the iso-style. Omit arc: In this case, line of g-code for the arc is left out. Instead a modifier is added to the end of the linear move indicating that a fillet should be added. This is primarily for Sodick machines. Keep arc: This is the normal case where g-code is output for the arc move.

NC Codes
Motions
This portion of the dialog box describes motion types that are required by the NC machine. All of these codes must be specified. For example, Linear is generally defined as G1, but may be changed to G01, or any other string (up to 11 characters). All motion commands are passed to Post via the string-type reserved word <MOTION>.

Compensation
Cutter diameter compensation may be generated in the output when turned On in FEATUREWIRE, and if it is built into the CNC data file. Compensation selections use the stringtype reserved word , <COMP-STAT> for one of the three options listed here, or an empty string is assigned if Compensation was not turned On in FEATUREWIRE.

Taper
Wire taper may be generated in the output when Left or Right is selected in FEATUREWIRE and built into the CNC Build file. The Reserved Word <TAP-STAT> is assigned to one of these strings. The most common commands for taper cutting are assigned below. Of course there may be other strings as well, depending on the type of control. Cancel G50 Left G51 Right G52

Machine Constants
Machine Constants
Guide span is distance between the wire guides. Table is distance between the wire guides.

67

XBuild Reference Manual Arm Stroke is upper guide travel distance.

EDM reserved words


Reserved Word <ARC-X> Word type Numeric Definition Used in the circular interpolation block to specify the signed X distance from the start point of the arc, to the center of the arc along the X axis Used in the circular interpolation block to specify the signed Y distance from the start point of the arc, to the center of the arc along the Y axis Reproduces the upper arm position from FEATUREWIRE The upper guide travel distance Reproduces the additional work table height from FEATUREWIRE True if the move represents the end section for compensation (last element, or move of path), otherwise <COMP-END> is false True if cutter diameter compensation is ON, otherwise <COMP-ON> is false True if the move represents the middle section for compensation (between the first and last moves of path), otherwise <COMP-MID> is false Compensation number passed from FeatureCAM True if wire radius compensation status (on or off) or value (0.15) or register number (1) has changed. True if the move represents the start section for compensation (first element, or move of path), otherwise <COMP-START> is false When cutter diameter compensation status is selected, <COMP-STAT> establishes a right/left tool relationship with the part, and outputs the cutter compensation code at the first feed move of the profile path Copies the wire compensation value from FEATUREWIRE. True if the move is the last move on a contour. True if the move is the first move on a contour. Copies the curve ID from FEATUREWIRE. Identifies the pass number for multi-pass contouring. Reproduces the date that the part program was postprocessed Reproduces the dwell value passed from FeatureCAM True if dwell is greater than 0.0 Last element in a conditional statement (must be on a line by itself) Specifies the end of block code for each line of a program format Feed rate value identifier passed from FeatureCAM Reproduces the taper angle at the motion start from FEATUREWIRE

<ARC-Y>

Numeric

<ARM-POS> <ARM-STR> <AWTH> <COMP-END>

Numeric Numeric Numeric Logical

<COMP-ON> <COMP-MID>

Logical Logical

<COMP-NUM> Numeric <COMP-NUMLogical CH> <COMP-START> Logical

<COMP-STAT> String

<COMP-VAL> Numeric <CONT-END> Logical <CONT-START> Logical <CURVID> String <CUT-NUMBER> Numeric <DATE> String <DWELL> Numeric <DWELL+> Logical <ENDIF> System <EOB> <FEED> <FIRST-ANG> Other Numeric Numeric

68

Wire EDM <FIRST-CUT> <G-SPAN> <IF> <IFNOT> <IS-DIE> <IS-PUNCH> <IS-TAPER> <IS-XYUV> <ISO-ON> <ISO-RAD> <MACRO#> Logical Numeric System System Logical Logical Logical Logical Logical Numeric Numeric True for the first pass of multi-pass contouring. The distance between the wire guides First element in a conditional statement, always followed by a logical-type Reserved Word to verify that a condition is true First element in a conditional statement, always followed by a logical-type Reserved Word to verify that a condition is false True for die features. True for punch features True for tapered features True for 4-axis xyuv features features True is iso tapering is on. The radius of an iso taper arc. Macro number identifier (system-generated). Macros are not user definable, however some Macros are generated automatically, especially with multiple fixture parts and for repeated features. This number starts at 00 and increments automatically up to the Max Macros number that is contained on the General Information dialog box. The name of the current setup. Produces the correct motion-type (i.e., RAPID, LINEAR, CIRCULAR CW/CCW) for the various program formats (<MOTION> is specified via the MOTION COMMANDS option, CNC INFO top menu in BUILD) Reproduces the output file name. It is set in the Setup dialog box in FeatureCAM. Angle between wire and Z-Axis in the plane perpendicular to wire motion. Angle between wire and Z-Axis in the plane parallel to wire motion. Reproduces arc radius in a circular block Generates the signed arc radius value in a circular block, +R<180 degrees and R>180 degrees Comment on an operation. This is set under post variables. For controls that require comments to be a single line, SET-CMT must be only one line. Provides the option to output the Seg ID (Segment Identifier) passed from FeatureCAM This is a line sequence number identifier (when the word appears in a line, it is substituted with the current sequence number, and is subsequently incremented by the sequence step value) True if the stop commands needs to be output Reproduces the suffix string passed from FEATUREWIRE The distance between the wire guides. Reproduces the taper angle at the motion end from FEATUREWIRE Reproduces the taper register number from FEATUREWIRE True if a taper angle status (on or off) or value (3.7) or register 69

<MCSID> <MOTION>

String String

<PROG-NAME> String <Q-ANGLE> <R-ANGLE> <RADIUS> <S-RAD> <SEG-CMT> Numeric Numeric Numeric

String

<SEGM-ID> <SEQ>

String Numeric

<STOP> <SUFFIX> <TAB-HT> <TAP-ANG>

Logical STRING Numeric Numeric

<TAP-REG> Numeric <TAP-REG-CH> Logical

XBuild Reference Manual number (1) has changed. When taper function is used, <TAP-STAT> reproduces the right or left wire relationship with the part specified in FEATUREWIRE Copies the taper register number from FEATUREWIRE Second element in a conditional statement, placed after a logical-type Reserved Word U axis absolute coordinate identifier Result from <X-COORD> - <U-COORD> = Incremental distance fom X-position of lower contour. V axis absolute coordinate identifier Result from <Y-COORD> - <V-COORD> = Incremental distance fom Y-position of lower contour Reproduces the water value identifier from FEATUREWIRE True if the Wire Change parameter is set to Cut in FEATUREWIRE True if the Wire Change parameter is set to Thread in FEATUREWIRE The polar angle of the upper toolpath point in the YZ plane. Reproduces the absolute X coordinate position from the X axis origin to the arc's center in a circular block X axis coordinate identifier The polar angle of the upper toolpath point in the XZ plane Reproduces the absolute Y coordinate position from the Y axis origin to the arc's center in a circular block. Y axis coordinate identifier

<TAP-STAT>

STRING

<TAP-VAL> <THEN> <U-COORD> <U-RELAT> <V-COORD> <V-RELAT> <WATER> <WIRE-CUT> <WIRE-THRD> <X-ANGLE> <X-CEN> <X-COORD> <Y-ANGLE> <Y-CEN> <Y-COORD>

Numeric System Numeric Numeric Numeric Numeric Numeric Logical Logical Numeric Numeric Numeric Numeric Numeric Numeric

EDM program formats


Program formats
Program Start
POST outputs the lines defined in PROGRAM START at the beginning of the program. In PROGRAM START, general preparatory functions are placed to define the dimensional system, absolute, or incremental modes, etc..In this block X and Y start locations( G92) must also be preset. Other functions, such as machine constants can be passed to the POST output as well as the first positioning move using the <X-COORD> and <YCOORD> reserved words .

Segment Start
A SEGMENT START is output between segments. SEGMENT START should contain any commands that may change between segments such as UPPER ARM POS, AD TABLE HT, and parameters P1 through P9, for example: N<SEQ>{E<ARM-POS>Z01}<EOB> N<SEQ>{E<AWTH>Z02}<EOB> or 70

Wire EDM <IF><STOP><THEN>M00 <ENDIF ( = output of programm stop command between segments ) The following words should not be used in SEGMENT START: <XCOORD>, <Y-COORD>, <TAP-REG>, <TAP-VAL>, <TAP-ANG>, <COMP-STAT>, <COMP-REG>, <COMP-VAL>, <SUFFIX>.

Program End
This block is normally used to output the rewind command and to reset the control to some standard settings after program completion.

File End
FILE END specifies the format of a line(s) to be placed at the end of a file. This is generally used with the END OF PROG specification (GENERAL INFO, MACRO TYPE).

Move formats
Rapid
RAPID MOVE defines the output format for rapid positioning moves. Generally, modality delimiters ({ }) are placed around the <X-COORD> and <Y-COORD> Reserved Words to allow the POST processor to strip X or Y from the line when a coordinate is redundant. In motion blocks (rapid, linear, and circular), the Reserved Word <MOTION> receives the path definition parameter from FEATUREWIRE (RAPID, LINEAR, ARC CW, or ARC C-CW).

Linear
The LINEAR MOVE defines the output format for linear moves. The Reserved Words <MOTION>, <X-COORD>,and <Y-COORD> must be defined in this block. Wire diameter compensation can be turned ON/OFF in this format line with the Reserved Word <COMP STAT>. Also other commands like <TAP-STAT> for taper cutting, <TAP-ANG> as taper angle, Wire thread and cut, Register settings, etc. maybe used here.

Circular
The CIRCULAR MOVE defines the output format for arc moves. The following reserved words are provided as arc modifiers for I, J, or R values: <ARC-X>, <ARC-Y>, <RADIUS>, <S-RAD>, <X-CEN>, or <Y-CEN>.

XY, UV
The XY,UV MOVE defines the linear output format for a four axis moves. The Reserved Words <MOTION>, <X-COORD>,and <Y-COORD> must be defined together with the third ( U ) and fourth ( V ) axis commands <U-RELATIV> , <V-RELATIV> , <U-COORD> , <VCOORD>.

71

XBuild Reference Manual Wire diameter compensation can be turned ON/OFF in this format line with the Reserved Word <COMPSTAT>. Also other commands like Wire thread and cut, Register settings, etc. maybe used here.

Start XY, UV
This section is output before the first XY,UV move and normally used to activate special machine settings which maybe necessary for the control to machine a four axis part.

End XY, UV
This section is output after the last XY,UV move and normally used to deactivate or reset special machine settings which may have been necessary for the control to machine a four axis part.

Macro formats
In-Macro Linear
This format is similar to the LINEAR MOVE format, but it is only used within a macro definition (without the <Z-COORD> reserved word). Note IN_MACRO MOVE program formats can be set to generate absolute, or incremental output. For incremental output, Post does not duplicate path data for translations. Post positions to the translated location and "calls" the original incremental macro. See also : Incremental Programming Rules

In-Macro Circular
This format is similar to the CIRCULAR MOVE format, but it is only used within a macro definition. Note IN_MACRO Move program formats can be set to generate absolute, or incremental output. For incremental output, Post does not duplicate path data for translations. Post positions to the translated location and "calls" the original incremental macro. See also : Incremental Programming Rules

Open Macro
OPEN MACRO specifies the format of the line(s) preceding the macro definition (start delimiter). The <MACRO#> reserved word must be used. A preparatory function code (e.g., incremental, for defining incremental macros) can also be used.

Close Macro
CLOSE MACRO specifies the format of the line(s) following a macro (end delimiter) definition. A preparatory function code may be used to redefine the absolute specification (that is, if the main program starts in the absolute mode).

72

Wire EDM

Macro Call
MACRO CALL specifies the format of a line for "calling" a macro. The reserved word, <MACRO#> must be used to identify the macro.

Using FeatureWIRE and XBuild


Input Dimension
The coordinate data dimension system is defined during an FEATUREWIRE programming session (View menu, Setup dialog box). The Inch, or Metric dimension system is saved as a "flag" in the CNC data file. When Post is executed, it compares the input dimension system that was saved in the part program with the output dimension system that was selected in EBuild (CNC-Info menu, General dialog box). If they differ, a conversion factor is automatically applied. Therefore, a CNC data file that was created in EBuild must be built in accordance with the desired output dimension system.

Path Definition
MOTION COMMANDS in XBuild are used to define appropriate command strings (e.g., G0, G1, G2, G3). Each type of motion block is formatted in program formats using the <MOTION> reserved word. Coordinate data is formatted using the following reserved words: <X-COORD>, <Y-COORD>, <Z-COORD>, <ARC-X>, <ARC-Y>, <X-CEN> and <Y-CEN>. Arc specifications are established in the CIRCULAR MOVE program format.

Other Reserved Words


Optional sequence numbering is defined in Post, and is placed at the beginning of any block that contains the reserved word, <SEQ>. The end of block character (a control code that signals a completed line) is defined by the Reserved Word <EOB>, defined in GENERAL INFO. OTHER PARAMS P1 through P9 can also be used.

Handling Macros
Macros (sub-programs) that were previously defined inside, or outside of the main program can be "called" to reproduce a set of operations. Calling these macros saves CNC memory when duplicated, or repeated. Post automatically generates macros in the NC file when the FEATUREWIRE Macro selection (Uni-dir (uses macro) on the feature strategy tab) is On and the postprocessor is configured for macros Important There are that many options and user requests, that its simply not possible to ship a standard post for macro support. In most of the cases some customizing and testing will be needed before using macro support.

Handling Wire Compensation


Wire compensation is handled by EBuild and can be configured several ways, depending on the CNC control requirements. The most common configuration is with Compensation ON in the

73

XBuild Reference Manual first linear X, Y feed move of the wire path, and Compensation OFF in the last linear X, Y feed move of the path. If this is the required configuration, then define the LINEAR format as follows:
LINEAR BLOCK: {N<SEQ>}{<COMP-STAT>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}{F<FEED>}<EOB>

In the example shown above, you see the use of the modal delimiters {X<X-COORD>} and {Y<Y-COORD>}. They prevent the software from outputting repeated coordinates to shorten the NC Programm code. When using cutter compensation, some controls require the output of both X and Y coordinates when Compensation is turned ON. To achive this, it is necessary to set up a conditional statement so that these coordinates are both output:
LINEAR BLOCK: <IF><COMP-START><THEN> {N<SEQ>} <MOTION> <COMP-STAT> X<X-COORD> Y<Y-COORD><EOB> <ENDIF> <IFNOT><COMP-START><THEN> {N<SEQ>} {<MOTION>} {<COMP-STAT>} {X<X-COORD>} {Y<Y-COORD>} <EOB> <ENDIF>

The first <IF> <COMP-START> . . . <ENDIF> conditional statement is TRUE on the first linear move when Compensation is turned ON. In that case the corresponding linear move section without modal delimiters is used and all coordinates are output, no matter if they are identical to the last position or not. For all other moves, when the <COMP-START> condition is not TRUE, the second statements section with modal delimiters is used.

Handling Tapers
Taper is handled by EBuild and can be configured several ways, depending upon the CNC control's requirements. The Reserved Words <FIRST-ANG> , <TAP-ANG> and <TAP VAL> are available to represent the various possible taper settings that might be used by the controls. The Word <FIRST-ANG> represents the taper angle at the beginning of the move, <TAP-ANG> at the end of the move and <TAP-VAL> outputs a taper register. All these words are defined in the Curves Contour manager or in case of a continuous taper on the Toolpath Options page in the Segment Data Dialog. The following example of a linear move block is used for FANUC controls:
{N<SEQ>} {T<FIRST-ANG >}<EOB> {N<SEQ>} {<COMP-STAT>} {<MOTION>} {X<X-COORD>} {Y<Y-COORD>} {T<TAP-ANG>}<EOB>

Handling XY UV
The XYUV selection in FEATUREWIRE is used to define part programs for independent XYUV cutting. The two curves, defined for upper and lower contour in FEATUREWIRE, are translated into XY and UV moves, which are output using the corresponding EPOST sections. In EBuild's MOTION COMMANDS menu, the G code for XYUV cutting is specified using setting XY, UV MOVE. The following Program Format sections control the XYUV ouput :

74

Wire EDM Start XY, UV End XY, UV XY, UV Heres a sample XYUV block for Fanuc controls:
{N<SEQ>} {<MOTION>} {X<X-COORD>} {Y<Y-COORD>} {U<U-RELAT>} {V<V-RELAT>}<EOB>

Tip ! If you use standard incremental output for the words <U-RELAT> and <V-RELAT>, make sure that the FACTOR setting in the Words dialog. is set to 1.

Cycle Type
POST calculates the wire path based on the type of cycle. These calculations are accomplished by applying the offset and other cycle data parameters appropriate to the current cycle.

Outputting 4-axis wire EDM arc moves


For arc moves in XYUV, you can enable it by setting Circ. Interpolation to Multi Quad. (Single in XYUV) in the General Information dialog of Xbuild. Arc moves will be output when both the upper and the lower moves are arcs. Tthe XYUV format should look similar to: <IF><ISO-ON><THEN> N<SEQ>{ <MOTION>}{ X<X-COORD>}{ Y<Y-COORD> }I<ARC-X> J<ARC-Y> U<URELAT> V<V-RELAT> K<X-CEN> L<Y-CEN><EOB> <ENDIF> <IFNOT><ISO-ON><THEN> N<SEQ>{ <MOTION>}{ X<X-COORD>}{ Y<Y-COORD> } U<U-RELAT> V<VRELAT><EOB> <ENDIF> The <ISO-ON> keyword will be true when outputting arc moves. The <ARC-X> and <ARC-Y> keywords will be the vector from the start point of the lower arc to the center. <X-CEN> and <YCEN> are for the upper arc.

75

Chapter 7 Tutorials
Understanding Milling Formats General Tutorial Description
We will now start building a post processor starting with a blank template. This exercise provides a basic understanding the correspondence between toolpath moves and program formats. You will create a milling post, but the concepts are applicable to all types of post processors. This tutorial is in metric units.

Specific Instructions
1. Open 001.fm from the training CD. 2. Generate toolpaths and single step through the program. You can see that this simple program rapids performs the following moves Rapids from the tool change position to the Z Rapid Plane above the slot. Rapids in Z to the Plunge Clearance Plane Feeds down in Z into the slot. Feeds across in X. Rapids to the Z Rapid Plane. Rapids to the tool change position. 3. Select the TEXT.CNC post processor from the training CD. This is a post processor the simply outputs the name of each program format that is called. This shows you the order in which the program formats are called for this program. 4. Click on the NC Code tab. The following code is displayed: Program_Start (Begin the program, grab the first tool and rapid above the part.) Z_Rapid (Rapid to plunge clearance plane) Linear_Move (Feeds down into the slot) Linear_Move (Feeds across in X) Z_Rapid (Rapids to the Z Rapid Plane) Program_End (End program, turn off coolant, rewind program ...) File_End (End file, usually just a "%" to end the transmission) 5. Note that tool is never explicitly positioned to the tool change location as the simulation might lead you to believe. 6. Uncheck slot2 in the tree view and generate the NC code. 7. The following program is created. Program_Start Z_Rapid Linear_Move Linear_Move Z_Rapid Rapid_Move Z_Rapid Linear_Move Linear_Move Z_Rapid

77

XBuild Reference Manual Program_End File_End Since both features use a 5mm tool all that is required between the features is to move to the new location and cut another slot. The program accomplishes this with the new Rapid Move format. This format performs a rapid move in X and Y. Edit slot2 to have a width of 10mm and regenerate the code. This will force a tool change from a 5mm tool to a 10mm tool. The following code is created: Program_Start Z_Rapid Linear_Move Linear_Move Z_Rapid TOOL_CHANGE Z_Rapid Linear_Move Linear_Move Z_Rapid Program_End File_End Tool_change is the new program format. This format changes the tool and rapids to the next location in X and Y. Edit slot2 to return the width to 5mm and change its speed to 1000 rpm. Regenerate the NC code. The Tool_Change segment has been replaced by the Segment_Start format. If there is a change in fixture IDs or a change in speed this format is called instead of the Tool_change format.

8.

9.

8. 9.

Summary of new formats


Rapid Move A rapid move in X and Y. If there is no change in the tool, fixture ID or speed rate, this format is called to move between cutting locations. If the tool changes this format is called. If only the speed or fixture ID changes this format is called.

Tool Change Segment Start

Understanding Drilling Formats


General Tutorial Description This tutorial is designed to give you an understanding of drilling formats. You will create programs that use explicit linear moves and canned cycles. This tutorial is in metric units. Specific Instructions 1. Open 001.fm from the training CD. This is just a simple hole that is spot-drilled and drilled. 2. Generate toolpaths and single step through the program. You can see that this simple program spot drills in a single move, changes tools and peck drills the hole. The spot drilling is performed by the Drill_Cycle format and the peck drilling is performed by the Deep_Hole cycle. Program_Start

78

Tutorials Z_Rapid Drill_Cycle Cycle_Cancel Z_Rapid TOOL_CHANGE Z_Rapid Deep_Hole Cycle_Cancel Z_Rapid Program_End File_End 3. Edit the hole. Click on the hole operation and change the drill cycle to chip break on the Cycle tab. 4. Regenerate the code. You will see that the call to the Deep_Hole cycle has been changed to a call to the Chip_break cycle. 5. If the .cnc file does not contain NC codes for drilling cycles, then FeatureCAM will create explicit moves. Open the post TEXTNODRILLCYCLES.cnc and create the code. The following code (without canned cycles) is created. Program_Start Z_Rapid Linear_Move Z_Rapid TOOL_CHANGE Z_Rapid Linear_Move Z_Rapid Linear_Move Z_Rapid Linear_Move Z_Rapid Program_End File_End

Creating Program Formats


General Tutorial Description While you will normally base a new post on an existing post, in this tutorial, you will create program formats from scratch. The formats you create would be applicable to a Fanuc0 control. Specific Instructions 1. Open the 001.fm file. 2. Open the TEXT.cnc file (instructions are listed above). 3. Click on the Formats menu, select the Move sub-menu and select Linear. 4. The simple program editor is launched and the contents of the Linear program format is displayed. 5. At this point the format only has the literal, Linear_Move. This means that every time this program format is called the string, Linear_Move is output to the NC file. 6. Our goal is to create the following line: {N<SEQ>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}{Z<ZCOORD>}{F<FEED>}<EOB> 7. Select all of the text in the format and hit the BACKSPACE key to remove it.

79

XBuild Reference Manual 8. Now lets create the collection of reserved words and then add the literals. 9. Select Word list from the File menu. The list of FeatureCAM reserved words is displayed. 10. Click the Modal Delimiters checkbox so that all of the reserved words will be surrounded by {}s. 11. Find SEQ in the Word list and click on it. The string {<SEQ>} will be inserted into the format. 12. Insert the MOTION, X-COORD, Y-COORD, Z-COORD, FEED and EOB reserved words resulting in the string shown below. {<SEQ>}{<MOTION>}{<X-COORD>}{<Y-COORD>}{<ZCOORD>}{<FEED>}{<EOB>} 13. Now type, N, before the <SEQ> reserved word. Enter the X, Y, Z and F literals to result in the following strings. {N<SEQ>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}{Z<ZCOORD>}{F<FEED>}<EOB> 14. Select Quit from the File menu, Yes in the Confirm menu. 15. Select Save from the File menu and click Save and Yes. 16. Generate toolpaths for slot1. 17. Now the following lines of real G-code have replaced the Linear_Move strings: N25G1Z-5.0F105. N35X52.5F209. 18. Now use the same steps to modify the following program formats: Program %<EOB> Start :<PROG-NAME><EOB> {N<SEQ>}G17G21G40G49G80G90G94<EOB> {N<SEQ>}T<TOOL>M6<EOB> {N<SEQ>}<MOTION>G90G<FIXTURE>X<X-COORD>Y<YCOORD>S<SPEED><SPINDLE><EOB> {N<SEQ>}G43Z<Z-COORD>H<TOOL><COOLANT><EOB> Rapid {N<SEQ>}{<MOTION>}{X<X-COORD>}{Y<Y-COORD>}<EOB> Z Rapid {N<SEQ>}{<MOTION>}{Z<Z-COORD>}<EOB> Program {N<SEQ>}G28G91Y0Z0M9<EOB> End {N<SEQ>}M30<EOB> File End %<EOB> 19. Save your changes to the post and regenerate the NC code to create the following program: % :001 N25G17G21G40G49G80G90G94 N35T1M6
N45G0G90G54X32.5Y0.S5200M3

N55G43Z15.862H1M8 N65Z2.54 N75G1Z-5.0F105. N85X52.5F209. N95G0Z15.862 N105G28G91Y0Z0M9 N115M30 % 80

Chapter 8 Index
4 4-axis wire EDM arcs................................77 5 5-axis machine types .................................21 C CNC info menu .........................................15 Computed tapping cycles in turning..........64 Creating Program Formats ........................81 Cycle Type ................................................77 E EDM CNC info menu................................69 EDM program formats ..............................72 EDM reserved words.................................69 Entering mixed printable ASCII and nonprintable codes.......................................14 F Formats editor Edit menu ............................7 Formats Menu............................................53 Fourth and fifth axis support .....................44 G General ......................................................16 H Handling Macros .......................................75 Handling Tapers ........................................76 Handling Wire Compensation ...................76 Handling XY UV.......................................77 Hole canned cycles in Xbuild....................33 I Input dimension.........................................75 L LOGICAL RESERVED WORDS FOR CONDITIONAL STATEMENTS.........61 M Making reserved words modal.................. 14 Mbuild Fixture ID..................................... 20 MBuild program formats .......................... 29 Milling macros.......................................... 38 MILLTURN Keywords ............................ 66 MILLTURN logical variagles .................. 66 Multi-turret post advise ............................ 67 N NC-Codes ................................................. 19 Numeric reserved words ........................... 58 O Other Reserved Words.............................. 75 Overview of Post Processing in FeatureTURN ......................................... 1 P Path Definition.......................................... 75 R Relationship between FeatureTURN and TBUILD................................................ 63 Reserved word table ................................. 27 Reserved words........................................... 3 T TBUILD CNC Info Menu ........................ 51 TBUILD File Menu .................................... 2 TBUILD String-type reserved words ....... 62 Turn/mill program formats ................. 48, 65 U Understanding Drilling Formats ............... 80 Understanding Milling Formats................ 79 Using expressions in formats...................... 8 Using EZFeatureMILL and MBuild......... 34

Chapter 9

Chapter 10

81

You might also like