Вы находитесь на странице: 1из 368

UNIGRAPHICS

POST BUILDING TECHNIQUES

STUDENT GUIDE
March 2004
MT11060 - Unigraphics NX 2 / Post Builder V3.2

EDS Inc.

Proprietary & Restricted Rights Notices

Copyright
Proprietary right of Unigraphics Solutions Inc., its subcontractors, or its suppliers are included in this
software, in the data, documentation, or firmware related thereto, and in information disclosed
therein. Neither this software, regardless of the form in which it exists, nor such data, information, or
firmware may be used or disclosed to others for any purpose except as specifically authorized in writing
by Unigraphics Solutions Inc. Recipient by accepting this document or utilizing this software agrees
that neither this document nor the information disclosed herein nor any part thereof shall be
reproduced or transferred to other documents or used or disclosed to others for manufacturing or any
other purpose except as specifically authorized in writing by Unigraphics Solutions Inc.
E2004 Electronic Data Systems Corporation. All rights reserved.
Restricted Rights Legend
The commercial computer software and related documentation are provided with restricted rights.
Use, duplication or disclosure by the U.S. Government is subject to the protections and restrictions as
set forth in the Unigraphics Solutions Inc. commercial license for the software and/or documentation
as prescribed in DOD FAR 227-7202-3(a), or for Civilian Agencies, in FAR 27.404(b)(2)(i), and any
successor or similar regulation, as applicable. Unigraphics Solutions Inc., 10824 Hope Street, Cypress,
CA 90630.
Warranties and Liabilities
All warranties and limitations thereof given by Unigraphics Solutions Inc. are set forth in the license
agreement under which the software and/or documentation were provided. Nothing contained within
or implied by the language of this document shall be considered to be a modification of such warranties.
The information and the software that are the subject of this document are subject to change without
notice and should not be considered commitments by Unigraphics Solutions Inc.. Unigraphics
Solutions Inc. assumes no responsibility for any errors that may be contained within this document.
The software discussed within this document is furnished under separate license agreement and is
subject to use only in accordance with the licensing terms and conditions contained therein.
Trademarks
EDS, the EDS logo, I-DEAS, UNIGRAPHICS SOLUTIONSR, UNIGRAPHICSR, GRIPR,
PARASOLIDR, UGR, UG/...R, UG SOLUTIONSR, iMANR are trademarks or registered
trademarks of Electronic Data Systems Corporation or its subsidiaries. All other logos or trademarks
used herein are the property of their respective owners.

Post Building Techniques Student Guide Publication History:


Version 17.0 . . . . . . . . . . . . . . . . . . . . . . . .
Version 18.0 . . . . . . . . . . . . . . . . . . . . . . . .
Unigraphics NX . . . . . . . . . . . . . . . . . . . .
Unigraphics NX 2 . . . . . . . . . . . . . . . . . . .

February 2001
May 2002
February 2003
March 2004

Table of Contents

Table of Contents

Course Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Course Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Class Standards for UG/Post Files . . . . . . . . . . . . . . . . . . . . .
Class File Naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How to Use This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Postprocessor Development Project Overview . . . . . . . . . .
Classroom System Information . . . . . . . . . . . . . . . . . . . . . . .

-1
-1
-1
-1
-2
-3
-3
-4
-5
-5

The UG/Post Postprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Postprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UG/Post Execute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Manufacturing Output Manager (MOM) . . . . . . . . . . . . . .
Post Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1-1
1-2
1-2
1-4
1-4

Building a Postprocessor with Post Builder . . . . . . . . . . . . . . . . . .


Post Builder Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Activity 2-1: Preparation for using the Post Builder . . . . .
Post Builder Menu and Tool Bars . . . . . . . . . . . . . . . . . . . . .
Using the Post Builder to create a New Postprocessor . . . .
Customizing the User Interface . . . . . . . . . . . . . . . . . . . . . . .
Activity 2-2: Introduction to the Post Builder . . . . . . . . . . .
UG/Post Builder Parameters . . . . . . . . . . . . . . . . . . . . . . . . .
Machine Tool Property Page . . . . . . . . . . . . . . . . . . . . . . . . .
Activity 2-3: Machine Tool Parameter Selections . . . . . . . .
Program and Tool Path Property Page . . . . . . . . . . . . . . . . .
Activity 2-4: Word Summary . . . . . . . . . . . . . . . . . . . . . . . . .
Program and Tool Path Property Page (continuation) . . . .
Activity 2-5: Program and Tool Path Parameters . . . . . .
NC Data Definitions Property Page . . . . . . . . . . . . . . . . . . .
Activity 2-6: NC Data Definition . . . . . . . . . . . . . . . . . . . . .
Creating New M or G code groups . . . . . . . . . . . . . . . . . . . .
Activity 2-7: Creating a New MCode Group . . . . . . . . . . .
Output Settings Property Page . . . . . . . . . . . . . . . . . . . . . . . .

2-1
2-3
2-4
2-7
2-11
2-13
2-14
2-22
2-22
2-24
2-26
2-28
2-37
2-46
2-54
2-57
2-68
2-69
2-72

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

Table of Contents

ii

Activity 2-8: Output Settings . . . . . . . . . . . . . . . . . . . . . . . .


Post Files Preview Property Page . . . . . . . . . . . . . . . . . . . . . .

2-77
2-80

Post Builder for Wire EDM Applications . . . . . . . . . . . . . . . . . . . .


Using Post Builder to create 2axis and 4axis Wire EDM
Post Processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Activity 3-1: Creating a 2axis Wire EDM post . . . . . . . . .

3-1

Post Builder for 5Axis Mill Applications . . . . . . . . . . . . . . . . . . . .


Using Post Builder to create 5axis Mill Post Processors . .
Activity 4-1: Creating a 5Axis Mill post with Post Builder

4-1
4-2
4-8

Post Builder for Lathe Applications . . . . . . . . . . . . . . . . . . . . . . . . .


Using Post Builder to create Lathe Post Processors . . . . . .
Activity 5-1: Creating a Lathe post with Post Builder . . . .

5-1
5-2
5-5

Tcl Basics for Post Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Tcl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation of Tcl For Window and Unix Platforms . . . . . .
Tcl Command Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tcl Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tcl Control of Word Structure . . . . . . . . . . . . . . . . . . . . . . . .
Tcl Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tcl Mathematical Expressions . . . . . . . . . . . . . . . . . . . . . . . .
Variable Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tcl Variable Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Variable Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Variable Substitution Examples . . . . . . . . . . . . . . . . . . . . . . .
Activity 6-1: Tcl Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tcl Procedures and Functions . . . . . . . . . . . . . . . . . . . . . . . .
Tcl I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tcl Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Activity 6-2: Constructing a simple procedure . . . . . . . . . .
Tcl Flow Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . .
Activity 6-3: Tcl flow constructs . . . . . . . . . . . . . . . . . . . . . .
Tcl Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tcl and Unigraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tcl Reference Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6-1
6-2
6-2
6-3
6-4
6-4
6-5
6-5
6-6
6-6
6-6
6-7
6-8
6-10
6-11
6-12
6-13
6-16
6-20
6-24
6-24
6-24

Creating MillTurn Postprocessors . . . . . . . . . . . . . . . . . . . . . . . . . .


MillTurn Centers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MillTurn and the Post Builder . . . . . . . . . . . . . . . . . . . . . . . .
Heads for Millturn centers . . . . . . . . . . . . . . . . . . . . . . . . . .

7-1
7-2
7-3
7-3

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

3-2
3-5

Unigraphics NX 2
Post Builder V3.2

Table of Contents

Activity 7-1: Creating a MillTurn Postprocessor . . . . . . . .


5 Axis MillTurn Centers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5Axis MillTurns and the Post Builder . . . . . . . . . . . . . . . . .
Activity 7-2: Creating a 5Axis MultiLink MillTurn Post

7-4
7-15
7-16
7-17

Customizing a Postprocessor with Post Builder . . . . . . . . . . . . . . .


Customizing a postprocessor by using the Post Builder . . .
The Custom Command Property Page . . . . . . . . . . . . . . . . .
Activity 8-1: Custom Commands . . . . . . . . . . . . . . . . . . . .

8-1
8-3
8-5
8-8

User Defined Events (UDEs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


User Defined Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User Defined Event Syntax . . . . . . . . . . . . . . . . . . . . . . . . . .
Activity 9-1: Creating User Defined Events . . . . . . . . . . . .
Activity 9-2: Modify the Coolant UDE for ThruSpindle .

9-1
9-2
9-3
9-6
9-16

Virtual NC Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Integrated Simulation and Verification Overview . . . . . . . .
Machine Tool Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Activity 10-1: Using Post Builder to create a VNC . . . . . . .

10-1
10-2
10-3
10-5

A Guide to Best Practices of Building a Postprocessor . . . . . . . . .


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11-1
11-1

MOM VARIABLES, EVENTS, COMMANDS . . . . . . . . . . . . . . . . .

A-1

Custom Command Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Examples of some useful Custom Commands . . . . . . . . . . .

B-1
B-1

Advanced Post Building Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Guide to modifying and customizing existing postprocessors
Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Activity C-1: Modifying an Event Handler . . . . . . . . . . . .
Definition File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Activity C-2: Modifying a Definition File . . . . . . . . . . . . . .
Machine Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Advanced Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rotary Axes Designations . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4th Axis Center Offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5th Axis Center Offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Axis Rotation (Standard or Reverse) . . . . . . . . . . . . . . . . . .
Zero Position Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

C-1
C-2
C-2
C-4
C-7
C-9
C-14
C-15
C-16
C-17
C-18
C-18
C-18
C-20

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

iii

Table of Contents

Pivot Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dual Table Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Case 5Axis Dual Table . . . . . . . . . . . . . . . . . . . . . . .
UG/Post Postprocessing using Runugpost . . . . . . . . . . . . . .

C-22
C-24
C-26
C-28

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GL-1
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

iv

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

IN-1

Unigraphics NX 2
Post Builder V3.2

Course Overview

Course Overview

Course Description
UG/Post Building Techniques is a course that will focus on creating, modifying,
and customizing UG/Post postprocessors. You will use the Post Builder to
accomplish this task.
Success in creating a UG/Post postprocessor is through the understanding of
the components of the Post Builder and their interaction. These components
will be discussed in detail, along with their relationships and examples of use.

Intended Audience
This course is intended for Manufacturing Engineers, NC/CNC Programmers
and or System administrators responsible for the creation and maintenance of
postprocessors. In addition, anyone wishing to gain an understanding of
creating UG/Post postprocessors or utilization of the Post Builder module
would also benefit.

Prerequisites
The required prerequisites for this course are:
D

Mill Manufacturing Process Course or CAST equivalent

Working knowledge of NC/CNC programming principles

Working knowledge of NC/CNC machine control functionality

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

-1

Course Overview

Objectives
After successfully completing this course, you will be able to perform the
following activities related to UG/Post:

-2

Build postprocessors using the Post Builder

Modify and customize postprocessors using the Post Builder

Debugging UG/Post Postprocessors

UG/Post Postprocessing from Unigraphics

UG/Post Postprocessing from the Operating System

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Course Overview

Class Standards for UG/Post Files


The following standards will be used in this class. All work should be
performed in accordance with these standards.
Class File Naming
This class utilizes the following filenaming standard:
user's initials
(3 characters)

file name
(1 - 120 characters)

def
lpt
pui
* * * _ x x x x x x x x x x x x x x x x x x x x tcl
dat
ptp
underscore delimiter

extension
(4 characters)

Event Handler files use the tcl" extension

Definition files use the def" extension

Configuration files use the dat" extension

Output files use the ptp" extension

Post Builder files use the pui" extension

Listing files use the lpt" extension

When you are requested to save a file for later use, the initials of your name, middle
name, and surname replace the course identifier ***" in the new filename with the
remainder of the filename matching the original. These files should reside in your
personal directory.

TIP Currently up to 128 total characters are valid for file names. A four
character extension (.tcl, for example) defines the file type. This means
the maximum number of user defined characters for the file name is
actually 124.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

-3

Course Overview

How to Use This Manual


It is important that you use the Student Manual in the sequence presented
because later lessons assume you have learned concepts and techniques taught
in an earlier lesson. If necessary, you can always refer to any previous activity
where a method or technique was originally taught.
The format of the activities is consistent throughout this manual. Steps are
labeled and specify what will be accomplished at any given point in the activity.
Below each step are action boxes which emphasize the individual actions that
must be taken to accomplish the step. As your knowledge of UG/Post building
increases, the action boxes may seem redundant as the step text becomes all
that is needed to accomplish a given task.
Step 1 This is an example of a step.
-

This is an example of an action box.

The general format for lesson content is:


D

lecture

activity

project

summary

One or more
included in most
lessons

It is recommended that students who prefer more detail from an Instructor Led
Course ask questions, confirm with restatement, and more importantly, attend
and pay attention to the instruction as it is given.
Obviously, it is always necessary for students to consider the classroom situation
and be considerate of other students who may have greater or lesser needs for
instruction. Instructors cannot possibly meet the exact needs of every student.
At the start of each class day you will be expected to log onto your workstation
and start Unigraphics, being ready to follow the instructor's curriculum. At the
end of the day's class you should always quit Unigraphics and log off the
workstation.

-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Course Overview

Postprocessor Development Project Overview


The Postprocessor Development project is an ongoing activity that allows you
to apply the Post Builder functionality that you have been taught. You will be
instructed to work on a portion of the postprocessor project after lecture and
reinforcement activities of lessons.
The postprocessor development project will provide general direction as what
to do but will not give explicit button pushes. It is the intent of this project to
allow the student to apply the skills taught in this course. However, the time
constraint of this course is a factor, at any point when progress is not being
made, solicit the help of your instructor.

Classroom System Information


Your instructor will provide you with the following items for working in the
classroom:
Student Login:

Username:
Password:

Work Directory:
Parts Directory:
Instructor:
Date:

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

-5

Course Overview

(This Page Intentionally Left Blank)

-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

The UG/Post Postprocessor

The UG/Post Postprocessor


Lesson 1

PURPOSE

This lesson describes the postprocessing function of


Unigraphics and the various components of a
UG/Post postprocessor. An overview of the Post
Builder module is also presented.

OBJECTIVES

Upon completion of this lesson, you will be able to:


D

Understand the terminology and interrelationships


of the various components of UG/Post.

Understand the use of the Post Builder as a tool to


build postprocessors.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

1-1

The UG/Post Postprocessor

Postprocessing
You use the Manufacturing applications of Unigraphics to generate tool paths.
The tool path consists of GOTO points and other information that controls the
movement of the tool with respect to the part which is being machined. This
unmodified tool path usually cannot be used for machining since each machine
tool/controller combination has different requirements based on hardware
configuration, tool change requirements, and software characteristics, such as
the sequence of G codes which are permitted on a line of output.
The tool path must be formatted to match the unique characteristics of the
machine tool/controller combination. The procedure of modifying this generic
tool path to a form that can be understood and used by the machine tool
controller is called postprocessing.
Two elements are required for postprocessing. They are:
D

tool path A Unigraphics internal tool path.


Note: Pre V16 legacy data must be imported into the current
version of Unigraphics in order to be postprocessed using
UG/Post.

postprocessor this is a computer program that reads, converts


and reformats tool path information for a particular machine
tool/controller combination.

UG/Post Execute
Unigraphics provides a postprocessor, UG/Post, which utilizes Unigraphics tool
path data as input, and outputs machine controller readable NC/CNC code.
UG/Post is customizable through the use of user created Event Handler and
Definition files. These files, in conjunction with UG/Post, are used to generate
output for the simplest to the very complex of machine tool/controller
combinations.
The UG/Post processor is highly scalable and can be used to generate output
for simple milling machines and lathes to ultra complex multiaxis (4+ axis)
machining and production centers (a production center is considered to be a
milling/turning type machine). The extensibility of UG/Post is achieved through
the scripting language Tcl and the use of the Unigraphics concept of Definition
files.

1-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

The UG/Post Postprocessor

The following flowchart illustrates the steps required to process (postprocess)


tool path data in an acceptable format for a machine tool/controller using the
UG/Post postprocessor:

The UG/Post execute module consists of the following components:


D

Event Generator sends Events and variables to UG/Post when


you postprocess. An Event is a collection of data which is
processed by UG/Post, creating data which causes a specific
action(s) by the machine tool/controller.

Event Handler is a file containing a specific set of instructions,


written in the Tcl scripting language, dictating how each event
type is to be processed.

Definition file is a file containing specific information about


machine tool/controller format.

Output file is a machine tool readable file generate by


UG/Post, passed to the machine tool/controller, that executes
specific machine tool instructions.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

1-3

The UG/Post Postprocessor

The Event Generator, Event Handler, and the Definition file are
interdependent and together convert the internal tool path into a set of
instructions that can be read and executed by the specific machine
tool/controller combination.

Manufacturing Output Manager (MOM)


The Manufacturing Output Manager, referred to as MOM, is a utility program
used by UG/Post for generating output based upon data that is stored within
the internal tool path. UG/Post uses the MOM to start, add data and specify
functions to the interpreter, and to load Event Handlers and Definition files.

Post Builder
The UG/Post mechanism uses Tcl (Tool Command Language) scripts and files
for postprocessing. These files extract information from the part file, process
this information according to defined rules, formats the information for output
and then outputs the data to a file which is later used by the machine control
for machining a part. These files are highly customizable, and if manually
edited, require the working knowledge of the Tcl scripting language.
Post Builder provides a graphical User Interface for building posts. The design
intent of the Post Builder is to create all the necessary files needed for
postprocessing without detailed knowledge of the file structure or Tcl.
The Post Builder is very flexible and allows for the definition of various types of
output blocks and word addresses. Sequence of output in the NC output file is
very easy to control for blocks involving the start of program, start of operation,
end of operation, end of program, tool changes and canned cycles.
Post Builder currently configures postprocessors for the following:

1-4

3axis milling machines

3axis millturn centers (XZC)

multiaxis millturn centers

4axis milling machines with a rotary table or a rotary head

5axis milling machines with dual rotary heads or rotary tables

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

The UG/Post Postprocessor


D

5axis milling machines with rotary head and rotary table

2axis lathes

2 and 4axis Wire EDM machines

The following flowchart illustrates the process of building a postprocessor using


the Post Builder.

For functionality not included


in the Post Builder

Wire EDM

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

1-5

The UG/Post Postprocessor

SUMMARY
In this lesson you were introduced to:

1-6

The postprocessing function of UG/Post.

Interrelationships and functionality of the


various UG/Post components.

An overview of the Post Builder.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Building a Postprocessor with Post Builder


Lesson 2

PURPOSE

This lesson describes the procedures of building


postprocessors through the use of the Post Builder.

OBJECTIVES

Upon completion of this lesson, you will be able to:


D

Understand the various components of Post


Builder.

Use the Post Builder to build a 3axis mill


postprocessor.

This lesson contains the following activities:


Activity

Page

2-1
2-2
2-3
2-4
2-5
2-6
2-7
2-8

2-4
2-14
2-24
2-28
2-46
2-57
2-69
2-77

Preparation for using the Post Builder . . . . . . . . .


Introduction to the Post Builder . . . . . . . . . . . . . .
Machine Tool Parameter Selections . . . . . . . . . . . .
Word Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program and Tool Path Parameters . . . . . . . . . . .
NC Data Definition . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a New MCode Group . . . . . . . . . . . . . . .
Output Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . .

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-1

Building a Postprocessor with Post Builder

Unigraphics Postprocessor Development Process using the Post Builder

For functionality not included


in the Post Builder

Wire EDM

2-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Post Builder Overview


Post Builder provides an easy to use interface for creating and modifying
postprocessors. Drag and drop functions allows the creation of formats,
addresses, sequences and blocks. The Post Builder creates the definition of
output blocks, formats for addresses and controls the sequence of output for
the start and end of program, start and end of operation and tool path Events.
The Post Builder works in conjunction with three files. The first file, called the
Definition file, with .def extension, contains specific information about the
machine tool/controller functionality and specific format requirements. The
second file, referred to as the Event Handler, with .tcl extension, contains a
specific set of instructions of how each Event type is to be processed. The third
file,referred to as the Post Builder parameter file, with .pui extension, contains
all the parameters that are used by Post Builder for an individual post. This file
is referenced whenever you would edit or customize a postprocessor using the
Post Builder.
The activities, in this lesson, will use a copy of the main CAM Mach\resource
directory. The logic behind this concept is that you can experiment with various
ideas and techniques without the worry of corrupting any system files that
would normally be used by UG/Post or Post Builder. You will also create a
postprocessor, to use for testing purposes, and turn on the Post Review Tool,
which will aid in debugging the postprocessor created by Post Builder. The
Review Tool will display a window of three columns showing in sequence, all the
Events, variables and output blocks which were processed.
You will assume that the CAM Mach\resource directory has not been copied to
your home directory (unless instructed otherwise by your instructor).
The following activity will take you through the process of creating a copy of the
mach\resource directory structure to your home directory.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-3

Building a Postprocessor with Post Builder

Activity 2-1: Preparation for using the Post Builder


In this activity you will make a copy of the Mach\resource directory structure in
your home directory and modify the directories for read/write access.
Instructions are presented for Windows and Unix separately.
Windows:

Step 1 Copy the Mach\resource directory.


-

Start Unigraphics.

On the Unigraphics Main Menu Bar, select


Help  Unigraphics NX Log File to verify the
Mach\resource directory being used. Search for the
environment variable UGII_CAM_RESOURCE_DIR.

Open an Windows Explorer window and locate the directory


from the previous action item.

Highlight the Mach\resource directory, right click on Mach


\resource directory and select Copy.

Highlight your home directory, right click on your home


directory and select Paste.

Step 2 Copy the UG environment file, ugii_env.dat to your home


directory.

2-4

From the Explorer window locate the ugii_env.dat file in the


\NXxx0\UGII directory (note: xx represents current version).

Highlight the ugii_env.dat file, right click on the ugii_env.dat


file and select Copy.

Highlight your home directory, right click on your home


directory and select Paste.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Step 3 Edit the ugii_env.dat file to redefine your Mach\resource


directory location.
-

Highlight the ugii_env.dat file from your home directory,


right click on the ugii_env.dat file and select Open with
Wordpad (note: prior to editing this file, you may have to
associate the file with either Wordpad or Notepad).

Scroll down the file until you find the following line:
UGII_CAM_RESOURCE_DIR=${UGII_C AM_BASE_DIR}resource\

change the line to

and

UGII_CAM_RESOURCE_DIR=${HOMEDRIVE}${HOMEP ATH}\resource\

where HOMEDRIVE is the letter designator of the disk drive


where your home directory is located and HOMEPATH is
the directory structure.
-

Save the file and exit from the editor.

Step 4 Restart Unigraphics.


-

Log off Unigraphics and then log back on.

On the Unigraphics Main Menu bar, select


Help  Unigraphics NX Log File to verify the updated
\Mach\resource directory is being used.

UNIX:
Step 1 Copy the Mach/resource directory.
-

On the Unigraphics Main Menu Bar, select


Help  Unigraphics NX Log File to verify the mach/resource
directory being used. Search for the environment variable
UGII_CAM_RESOURCE_DIR.

Open a terminal window, making sure that your default


directory is set to your home directory.

Copy the mach/resource directory to your home directory.


The directory path for the file will be the path obtained from
the UGII_CAM_RESOURCE from the previous action item.
The format for the copy will be similar to the following:
cp R $UGII_BASE_DIR/mach/resource $HOME

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-5

Building a Postprocessor with Post Builder

Step 2 Copy the UG environment file, .ugii_env to your home


directory.
-

Copy the .ugii_env file from the $UGII_ROOT_DIR


directory to your home directory. The format will be similar
to the following:
cp $UGII_ROOT_DIR/.ugii_env $HOME

Step 3 If necessary, change the Readonly protection on your just


created local /mach/resource directory to rwed.

Change the directory protection by typing the following


command:
chmod R 777 ${HOME}/resource

Change the file protection on the .ugii_env file by typing the


following command:
chmod 777 .ugii_env

Step 4 Edit the .ugii_env file to redefine your /resource directory


location.
-

Edit the .ugii_env file from your home directory using the vi
or other UNIX editor (alternately, highlight the file, in the
File Manager window, right click and select open; the file
will be opened in DTPAD, a full screen editor).

Find the following line in the .ugii_env file:

UGII_CAM_BASE_RESOURCE=${UGII_CAM_BASE_DIR}resource/

and change the line to:

UGII_CAM_BASE_RESOURCE=${HOME}/resource/
-

Save the changes and exit from the editor.

Step 5 Restart Unigraphics.


-

Log off Unigraphics and then log back on.

On the Unigraphics Main Menu bar, select


Help  Unigraphics NX Log File to verify the updated
resource directory is being used.

This completes this activity.

2-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Post Builder Menu and Tool Bars


Post Builder is started by choosing from the desktop menu bar, Start 
Programs  Unigraphics  Post Tools  Post Builder.

When you initially enter the Post Builder you will see the Post Builder Menu
Bar. The Menu Bar contains a Cue Line and two Tool Bars.
Post Builder Menu Bar

Filing Tool Bar

Help Tool Bar

The Cue line displays prompt messages on expected input by the current
option. These messages indicate the next action which you need to take.

Cue Line

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-7

Building a Postprocessor with Post Builder

The Post Filing Tool bar contains three command buttons associated with
creating new, opening and saving postprocessors.
Open Existing

Create New

Save

Create New option allows for creation of a new postprocessor.


Open Existing option allows for modification or editing of an
existing postprocessor.
Save option allows for saving the postprocessor currently being
worked upon.
The Help tool bar contains command buttons associated with help options.

User's Manual
Balloon Tip
Context Help

Balloon Tip option, when turned on, displays a message balloon that contains
descriptions concerning the functionality of the widget, whenever the cursor
stops at a widget on the dialog.

Balloon
Tip

2-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Context Help option when turned on, changes the pointer into a question mark.
You can then click on an icon or item on the display that you are in question
about and will see an explanation of the function of the icon or item. Click on
the explanation window to close.

Context
Help

User's Manual is a complete online manual on the Post Builder. The User's
Manual also contains MOM events and variables.

User's Manual

Pull Down menus are also available for File, Options, Utilities and Help.

Utilities Pull Down


File Pull Down

Options Pull Down

Help Pull Down

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-9

Building a Postprocessor with Post Builder

The File pull down menu allows for the creation, opening, saving and closing of
postprocessor files. It also allows you to access a list of the most recently
opened posts as well as exiting from the Post Builder program.
The Options pull down menu allows for the validation of the syntax, addresses,
blocks and formats used in Custom Commands as well as the number of backup
files created.
The Utilities pull down menu allows for modification of the Template_post.dat
data file and the addition of MOM variables.

The Help pull down menu allows for the activation of Balloon Tips, Context
Sensitive Help, access to the User's Manual, Release Notes and specific
information concerning the version of the Post Builder being utilized.

2-10

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Using the Post Builder to create a New Postprocessor


To create a new postprocessor, the New option (or Create New command
button from the Post Filing Tool Bar) from the File pull down menu is selected.
The Create New Post Processor menu is displayed which allows for
postprocessor naming and description, output units and machine tool and
controller type.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-11

Building a Postprocessor with Post Builder

The Post Name field is the name of the postprocessor being created. Spaces are
not allowed. Suggestions would be a name including the manufacturer of the
machine and controller, number of axis and type of machine, e.g.
maz_vmc_fanuc_m16_3ax_in, would represent a Mazak 3axis Vertical
Machining Center with Fanuc M16 controller with inch output (it is
recommended that the name be all upper or lowercase letters).
The Description field allows for text describing machine tool/controller
characteristics and any other miscellaneous information.

Post Output Units selection buttons allow for inch or metric output.
Machine Tool allows the selection of various milling (multiaxis) machine, lathe
configurations and Wire EDM type machines.
Controller allows the selection of generic, library or User's machine controllers.
D

Generic controller contains defaults for a generic control

Library allows the selection of controller from a Unigraphics


supplied list

User's allows the selection of postprocessors by browsing for


specific postprocessors

NOTE: You can select a previously created postprocessor.


The Machine Tool and Controller selections determine base files used to create
the postprocessor which contains various Events, commands and procedures.
The Ok button enables acceptance of specifications for the machine tool and
controller and advances you to the main editor portion of the user interface.
The Cancel button will dismiss the current menu, terminates the process of
creating a new postprocessor and returns you to the Post Builder menu bar.
When you create a new postprocessor, you must add the name of the post to
the template_post.dat file. This file contains a list of postprocessors for
UG/Post to use. It defines a list of postprocessors that are available in the Post
Process dialog. The name of the postprocessor can be added by using the
Utilities pull down menu from the main tool bar.

2-12

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Customizing the User Interface


Two files, ui_pb_resource.tcl and ui_pb_user_resource.tcl, located in the
POSTBUILD\app\ui directory, can be modified to allow selection of the
location of the Post Builder online help manual, backup method, font
specifications, posts history pulldown menu items and the display of debugging
messages. Copy these files to your home directory and make the necessary
modifications, as required. The file pb_session.log contains a list of previously
opened postprocessors. This file is located in your home directory and should
not be deleted.
The following activity will introduce you to the basic concepts and use of the
Post Builder module.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-13

Building a Postprocessor with Post Builder

Activity 2-2: Introduction to the Post Builder


In this activity you will start the Post Builder and begin the creation process for
a 3axis milling machine postprocessor with a Generic controller. You will then
save this postprocessor in your home resource directory and add it to the
template_post.dat file.
Step 1 Start the Post Builder.

On the desktop menu bar, choose Start  Programs 


Unigraphics  Post Tools  Post Builder.

Select the New option in the File pull down menu and in the
Name field, name the postprocessor ***_my_post, where ***
stands for your initials.

***_my_post

Note: Use lower case characters only and no spaces.

2-14

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Step 2 Select various initial options.


For Post Output Unit you will accept the default of inches.
For Machine Tool you will accept the default of Mill.
Notice the 3axis button bar.
-

Select the 3axis button bar and notice the choices available.
You will accept the default for 3axis.

Dismiss the 3axis button bar.


For Controller you will accept the default of generic. Some
common controllers are already provided. If you were to
select the library option, a list of available controllers would
be available for selection as a template in building your post.

Select OK.
The Main Editor property page (tab) is displayed.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-15

Building a Postprocessor with Post Builder

Step 3 Save your newly created postprocessor to your home


directory.
-

Select the File pull down menu from the main menu bar and
then select Save As.

Filter to your home postprocessor directory.

Visually check the File name box, if the file name shown is
the same as the file name of your postprocessor, select OK,
otherwise type in the correct name and then select OK.

When you save your file, three files are actually saved. The
files have the extension .pui, .tcl, and .def.
The .pui file is used by the Post Builder to read and write
parameters for a specific postprocessor.
The .def file is the definition file that is used by UG/Post to
format the output and the .tcl file is the Event Handler
which contains a detailed set of instructions for processing
each Event type.

2-16

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Note: If you edit either the .tcl file or .def file outside of the
Post Builder, the association of those files with the Post
Builder can be broken. Editing of the .tcl file or .def file
should only be done if absolutely necessary and only after
doing everything that can be done using the Post Builder. Be
sure to make a copy of the .tcl and .def file before beginning
the editing process, then edit the copied files.
In order for your newly created postprocessor to be included
in the Unigraphics Postprocessing window, you must save
the post to your home postprocessing directory and modify
the template_post.dat file to include the new postprocessor.
This file is also located in the home postprocessor directory.
This file is added to the template_post.dat file by using the
Utilities function from the main menu bar.
Step 4 Add your newly created postprocessor to the
template_post.dat file.
-

Choose the Utilities option and then choose Edit Template


Posts Data File from the pull down menu.

The Install Posts dialog is displayed.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-17

Building a Postprocessor with Post Builder


-

Highlight the TOOL LIST line as shown below, then select


the NEW button.

The Open dialog is displayed.

***

2-18

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

Filter to your home directory and select the postprocessor


which you previously saved.

***

***_my_post.pui

Choose the Open button.

The path and name of the file are inserted into the
Template_post.dat file.

***

***

***
***_my_post${UGII_CAM_POST_DIR}***_my_post.tcl,${UGII_CAM_POST_DIR}***_my_post.def

afile (.def)
-

Choose the OK button at the bottom of the dialog.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-19

Building a Postprocessor with Post Builder

The Save As dialog appears.

If necessary, select the file name template_post.dat.

Choose the Save button.

Choose Yes to the Save As warning message to replace the


template_post.dat file.

Choose Cancel.

Step 5 Verify the postprocessor has been added to the Post


Process dialog.
-

2-20

Return to a Unigraphics session and retrieve the part file


pbt_mill_test.prt from your student_home\parts directory.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

Verify the postprocessor by entering the Manufacturing


Application in Unigraphics and selecting the postprocessing
icon.

You will see your postprocessor,***_ my_post, under


Available Machines on the Post Process dialog.

***

Choose Cancel.

Return to the Post Builder main dialog.


This concludes the activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-21

Building a Postprocessor with Post Builder

UG/Post Builder Parameters


As you proceed to build a postprocessor using the Post Builder, the user
interface takes on the appearance of a tabbed notebook. There are five major
tabs (also referred to as property pages) which are displayed. They are:
Machine Tool, Program and Tool Path, NC Data Definition, Output Settings
and Post Files Preview. When a major property page is selected, menus and or
sub property pages are displayed which allows for the setting of various
parameters used in creation of your postprocessor.

Machine Tool Property Page

50

The Machine Tool property page allows the selection of output to include
Circular Records or to output linear motion only. You can also specify Linear
Axis Travel Limits, Home Position, Linear Motion Step Size and Traversal Feed
Rate. The Display Machine Tool button gives a simple, generic, representation
of the motions of the machine tool being configured.

2-22

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

50

The Default button returns you to the state when the post was last saved for the
current screen".
The Restore button returns you to the state when you entered the current
screen".

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-23

Building a Postprocessor with Post Builder

Activity 2-3: Machine Tool Parameter Selections


In this activity you will examine and modify some of the various Machine Tool
Parameters located within the Machine Tool section of the Post Builder and will
then restore them to their original state.
Step 1 Examine the various Machine Tool Parameters.

Select Display Machine Tool.

Notice the display of a simple 3axis mill.

Close Window
button

2-24

Clear the display of the machine tool by selecting the close


button on the Machine Tool title bar.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

Set the linear travel limits to the following: X=60, Y=50 and
Z=40.

Select the Restore button.

Notice that the X, Y and Z axis limits are returned to their


original settings.
This concludes the activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-25

Building a Postprocessor with Post Builder

Program and Tool Path Property Page

The Program and Tool Path property page allows for creation, modification and
customization of the Event Handlers for all Events which occur by the use of
multiple function property pages. These functions, presented in the tab format,
are:
Program allows the addition, modification and customization of
Program Start Sequences, Operation Start Sequences, Tool Path
Events including Machine Control Events, Motion Events, Canned
Cycles Events, Operation End Sequences and Program End
Sequences.
G Codes property page will allow you to specify default Gcodes used
throughout the postprocessor. Changing any of the Gcodes in this list
will update the Gcodes globally.
M Codes property page will allow you to specify default Mcodes used
throughout the postprocessor. Changing any of the M codes in this list,
will update the Mcodes globally.

2-26

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Word Summary property page provides a summary of all addresses


and allows the individual modification of the various elements used in
data definition of the address. This property page allows the
modification of groups of words that use the same format and also
allows modification of the format itself. If you want to specify a
different format for only one of the words, you would go to the Format
section of NC Data Definitions property page to make the change.
The following parameters are available in Word Summary:
D

Word is the same that you will find in the word section of the
NC Data Definitions section.

Leader/Code allows you to modify the leader for any word.


The leader is the character than precedes the numeric
information. For example, if the word is X20.0000, then the
leader is X. You can either enter a new leader or right click on
the existing leader and choose from the list.

Data Type can be either numeric or text. Specify text when the
code needed cannot be formatted from a number directly into a
word address and a value. If, for example, you need a G84.1 for
tapping and G81 (without a decimal) for drilling, you would
make the Gmotion word text and change all of the G codes to
G81 instead of 81 with a leader of G. You may also go to the
format property page in NC Data Definitions to change only the
Gmotion word to text.

Plus (+) allows a plus sign for all positive numbers. If set to no
the (+) sign is not generated. A minus sign (-) is generated for
all numeric data if the value is negative.

Lead Zero will allow the output of leading zeroes.

Integer controls number of digits output to the left of the


decimal point. An error is generated if the numeric data exceeds
the format specified.

Decimal (.) controls whether or not numeric data has a


decimal point. An error is generated if the decimal is
suppressed and leading or trailing zeroes are not output.

Fraction determines how many digits are output to the right of


the decimal point.

Trail Zero will allow the output of trailing zeroes.

To change how the postprocessor will output a value of zero for coordinate
data, select either the zero_int or zero_real option for formats in the NC Data
Definitions section under the Format property page. This will output a zero in
front of the decimal point.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-27

Building a Postprocessor with Post Builder

Activity 2-4: Word Summary


In this activity you will modify some of the various word formats and change the
sequence number. You will find these items in the Program and Tool Path and
Word Summary section of the Post Builder.
Step 1 Enter the Word Summary subsection of the Program and
Tool Path section of Post Builder.

2-28

Select the Program and Tool Path property page from the
Post Builder selection menu.

Select the Word Summary property page.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Step 2 Change the X, Y, and Zaxis word format to 3.3.


-

Scroll down the Word column until you reach the X address.

In the row of the X address, locate the integer column and


change the value from 4 to 3.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-29

Building a Postprocessor with Post Builder


-

In the row of the X address, locate the fraction column and


change the value from 4 to 3.

Notice that changing the X address word format also changes all
other axis word formats.
Step 3 Change the F address format to 3.1.
-

2-30

Scroll down the Word column until you reach the F address.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

In the row of the F address, locate the integer column and


change the value from 7 to 3. The fraction column is set to 2,
change the value to 1.

Step 4 Change the S address format to 4.


-

In the row of the S address, locate the integer column and


change the value from 5 to 4. The fraction column is set to 0
and does not need to be changed.

Step 5 Allow for maximum tool offset of 999 by changing the D


address to 3.0.
-

Scroll down the Word column until you reach the D address.

Notice that the range for the offset is from 0 to 99. The
maximum number allowable since the format for the word is
Digit_2. By changing the format to Digit_4, you can then
allow for the maximum desired tool offset of 999.
-

Click on the D word, under the Word column heading.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-31

Building a Postprocessor with Post Builder

The Word D: property page is displayed.

2-32

Change the format from 2 to 4 by selecting the drop down


arrow and selecting Digit_4.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Change the number of available offsets from 99 to 999 by


changing the Maximum value parameter from 99 to 999.

Choose OK.

Step 6 Change the sequence number to start at 5 and increment


by 5 for each block afterwards.
-

Select Other Data Elements from the Word Summary


property page.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-33

Building a Postprocessor with Post Builder

The Other Data Elements property page is displayed.


-

Change the Sequence Number Start from 10 to 5, then


change the Sequence Number Increment from 10 to 5.

Choose OK.

Step 7 Save the post and run it against the test part,
pbt_mill_test.prt.
-

2-34

If necessary, enter the Manufacturing Application in


Unigraphics .

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

With the Operation Navigation Tool, expand the T12345A


parent and select the FACE_MILLING operation.

Select the postprocessing icon.

Highlight your postprocessor which you have modified and


select OK.

***

The default directory is write protected, you will need to change


the output directory to your home directory.
-

Change the default for Output File to your home directory


and then select OK.

Verify the output.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-35

Building a Postprocessor with Post Builder

Your output will be similar to the following:

Return to the Post Builder.


This completes the activity.

2-36

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Program and Tool Path Property Page (continuation)


Word Sequencing allows the customization of the order of output of words
comprising a block of NC data. The sequence order of the words will prevail
throughout the postprocessor. If for example, the X and Y words were
reversed, it will be reflected in all of the blocks generated by all Events. You can
also suppress or make any word active. If Balloon Help is active, each word will
display the context of that word. By default, a representative code is used to
display that word, for example, the G17 word can also be G18 or G19. In other
cases a D or T represents the adjust register or tool number register.
Custom Command allows the addition of user created custom commands.
These are Tcl procedures that are executed by an Event. When creating a
custom command, the Post Builder will place all of the correct syntax around
the body of the procedure that you are creating. The first line of the Custom
Command will be: proc PB_CMD_name_of_proc {} { and the last line will be }.
The Custom Command procedure will be processed in the sequence where it
was placed. The Post Builder will check the validity of the syntax of Custom
Commands. Numerous Custom Commands, designed for common special
applications", are supplied with every release of the Post Builder. Advanced
users only should modify existing or create new Custom Commands.
Linked Posts allows you to specify posts that can be linked to your current post.
Linked Posts would be applicable in situations where separate posts have been
developed for special machine options such as right angle milling heads,
specialized millturn centers, machining centers having more than two rotary
axis or any application that requires multiple postprocessors.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-37

Building a Postprocessor with Post Builder

About the interface


Under the Program property page, you will see two distinct windows displayed.
The left most window, also referred to as the Component Window, contains a
list of components that make up a program, displayed in a tree format. When a
component is selected, the parameters associated with the component is
displayed in the right most window, also referred to as the Parameter Window.

"Parameter Window"

2
4

Sequence Window
Sequence components 6
Block components 7
Component Window

A detailed explanation of the above numbered components follows:


The Component Window

Sequences that comprise


an N/C Program:
1) Program Start Sequence
2) Operation Start Sequence
3) Tool Path Sequence
4) Operation End Sequence
5) Program End Sequence

2-38

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

An NC program has a beginning and an end with a number of operations or


steps in between. Collectively, the program is considered to be composed of a
sequential order of Events. Due to the way that tool paths are created within
Unigraphics, certain Events, such as Tool Change, Spindle Start or Approach
Motion Events can occur at the start and end of an NC program and for each
operation. At the markers (designated as yellow rectangular blocks) of these
predetermined Events, you can force certain instruction blocks to be output.
This is referred to as a sequence. Understanding the sequences and the events
that trigger them allow you to properly place custom commands and blocks to
obtain the desired output.

Three types of components can be attached to the markers of the various


sequences. They are identified by the following icons:
D

Cube: a normal block

Hand: a custom or MOM command

Page: an operator message

lightblue
background

Marker

Cube

(yellow background)
white background

Hand

Page

When a rectangular block appears lightblue in color, it designates the


component as being used by more than one marker. Changing one instance will
affect all instances of that component.
When a rectangular block appears white in color, it designates the component
as being used only once.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-39

Building a Postprocessor with Post Builder

From the postprocessor's view, an NC program consists of five sequences and a


collection of Events that can occur in each operation. They are as follows:

Program Start Sequence which determines which blocks are output


when this particular Event occurs before the tool path is read. This
Event occurs before any other Event is processed.

Operation Start Sequence contains Events and actions that will occur
from the start of an operation to the first cut motion. Every operation
will have a first tool change, automatic tool change, manual tool
change or no tool change.

Tool Path Sequence consist of Events and actions that pertain to


machine control, motion control and canned cycles.
Machine Control options control items such as coolant,
spindle, tailstocks and clamps. They can also be used to
change modes such as incremental or absolute, inverse time,
feed per minute/per revolution and constant surface speed.
Information can be passed to a postprocessor by parameter
data which is available at the Start of Operation. This
includes feeds and speeds and any cutting parameters such
as stepover and tolerances. Information can also be passed
by way of User Defined EventsUDEs (sometimes referred
to as post commands). UDEs specified as Start of Post come
out after the Start of Operation in the order specified by
Operation Markers (a marker indicates Events that may
occur). UDEs associated with the tool, program, method, or
any other parent group are output before the Start of
Operation Event. The recommended method of output for
the Start of Operation NC code is to organize all of the data
(spindle speed, spindle direction, coolant status, length
compensation, tool number) and then output this data as
part of the Operation Start Sequence.
For legacy operations with UDEs being used to specify all of
the machine control information, the information can be
output by the method specified in the UDE.

2-40

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Motion options describe how the postprocessor will process


GOTO records in the tool path. All motion generated with a
feed rate of zero is processed by the Rapid Move Event. If
any motion types have a nonzero feed rate, the Linear Move
Event will be used. Motion types included in this Event type
are cut, engage, first cut, stepover and side cut. Circular
motion is handled by the Circle Move Event. An Event type
for Nurbs is currently handled by the Post Builder for Fanuc
6M, Siemens and Heidenhain controls.
Canned Cycle options describe how the postprocessor will
handle canned cycles. You can define and or modify the
Gcode, associated parameters, and output blocks that will
be used with predefined cycles.
D

Operation End Sequence contains Events and actions that occur


from the final retract motion to the end of the operation. These
are items like returning to a home position or turning off the
spindle and or coolant. If the same End of Operation function is
always going to be performed at the end of every operation you
can enter it into this sequence instead of programming UDEs.

Program End Sequence contains Events and actions that occur


from the end of the last operation to the end of the program.

By activating the Add Block button, you can drag and drop a block component
into the location desired. The block component can be placed above, below or
next to an existing block component. Block components which are available are
listed in the Add Block component available option menu.
Add Block Component

Activating the Display Combined N/C Code Blocks toggle button will display all
block components in the form of NC codes. By default, block components are
displayed in terms of their descriptions.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-41

Building a Postprocessor with Post Builder


Display all block components showing NC Code

Display Combined NC Code Blocks "off "

Display Combined NC Code Blocks "on"

2-42

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

The Add Block component option menu describes the blocks which are
available. You can create a new block component and apply it to a sequence.
You may also select one of the predefined block components.
Add Block Component option menu

The Trash bin is used to delete any unwanted block component by dragging the
block component to the trash bin icon.
Trash Bin Button

You can also delete the component by right clicking on the component and
selecting delete from the drop down menu.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-43

Building a Postprocessor with Post Builder

The Operation Start sequence is one of the sequences which can occur with
each operation (one of the five sequences, Program Start, Operation Start, Tool
Path, Operation End and Program End). Yellow colored blocks always
represent the sequence blocks (also referred to as markers).

You can neither add or delete Event blocks.

2-44

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

A block component can be placed above, below or next to an existing block.

Block Components

If you right click on the block component, a popup menu appears which allows
you to Cut, Copy As or Delete a custom command block. If a block contains NC
data, your options are Edit, Force Output, Cut, Copy As or Delete.

Popup Menu of a Block


Component without NC Data

Popup Menu of a Block


Component with NC Data

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-45

Building a Postprocessor with Post Builder

Activity 2-5: Program and Tool Path Parameters


In this activity you will examine and modify some of the various Program and
Tool Path Parameters located within the Program and Tool Path section of the
Post Builder.
Step 1 Enter the Program and Tool Path section of Post
Builder.

Select the Program and Tool Path property page from the
Post Builder selection menu.

If necessary select the Program property page.

Step 2 Create a Program Start Sequence with a Rewind Stop


Code of (#).
-

2-46

Select the Program Start Sequence from the Component


Window.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

Double click the block component containing the % from the


Sequence Window.
Prior to selecting this particular component, notice the
lightblue color of the block component. This indicates that
this particular block is used again in either the same or
another sequence. In this particular example, this block
component appears again in the Program End sequence.

The Block:rewind_stop_code property page is displayed.

Highlight the selection box containing


the %, then select Change Element, and then
User Defined Expression

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-47

Building a Postprocessor with Post Builder


-

Highlight the selection box containing the %", using MB3,


select Change Element, then select User Defined Expression.
The Expression Entry text box is displayed.

Change the %" to #".

Choose OK from the Expression Entry text box.

Choose OK from the Block: rewind_stop_code property


page.
As mentioned earlier in this activity, this block component
also appears in the Program End sequence. A change to one
block component will change all like components, regardless
of their location.

Step 3 Create a Program Start sequence with a


G70G90G40G17G94 block by modifying the Word
sequence (NOTE: list the G codes in the order shown).
-

2-48

Select the Word Sequencing property page from the menu.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

Select the G" block with MB1 and drag" it to the beginning
of the line.

Select the G90" block with MB1 and drag" it between the
G" and G40" block.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-49

Building a Postprocessor with Post Builder


-

Select the G01" block and position it between the G17"


and G43" block.

Step 4 Suppress the output of selected words.


-

Position the mouse over the G97" block and click once to
suppress the G97" output (turns from pink to blue).

Repeat the previous action and suppress the following:


G99", the three P" words and the E" word.

Step 5 Change the order of the D" and H" words.


-

Move the D" word behind the H" word.

Step 6 Change the tool parameter number to a maximum of 999


and minimum of 1.

2-50

Position the mouse over the T" block and with MB3 select
Edit.

Change the maximum value from 99 to 999.

Change the minimum value from 0 to 1.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

Change the Tcode output format by selecting Edit under


Format and change the output field from 2 to 3.

Choose, OK twice.

Save the postprocessor.

Step 7 Save the post and run it against the test part,
pbt_mill_test.prt.
-

If necessary, enter the Manufacturing Application.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-51

Building a Postprocessor with Post Builder

With the Operation Navigation Tool, expand the T12345A


parent and select the FACE_MILLING operation.

Select the postprocessing icon.

Highlight your postprocessor which you have modified and


select OK.

***

2-52

Accept the default for Output File and then select OK.

Verify the output.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Your output should be similar to the following:

Return to the Post Builder.


This completes this activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-53

Building a Postprocessor with Post Builder

NC Data Definitions Property Page


The NC Data Definitions property page allows the definition of output formats
for NC data.

Data definitions are broken down into four sub classifications, also represented
in tabular format. These sub classes are:
D

Block defines the format sequence of the instruction data that appears
as output. Blocks are made up of word elements, each being defined
by an address and variable.
There are two methods used to create a block. From the sequence or
event property page you may drag a blank block and drop it into a
sequence or event. You can also edit any existing block with the
sequence, event or NC Data Definitions block property page. You may
then edit or build your block of data.

2-54

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


D

Word defines the address, output format and the structure of the
words that comprise the instructions. Parameters associated with
address are format, maximum and minimum values, modality and
leading and trailing characters.
A word is composed of an address leader, a number or text and a
trailer. An address leader may be any character. The address leader is
usually a single character such as G, M, X, Y, Z, etc. The trailer is
usually a blank character. You can specify the format for current word
from an existing list of formats or edit one of the existing formats. You
can also create a new format from the Format section of this property
page.

Format for data output can be defined as a real, integer or character


string. Parameters for Format vary according to the data type selected.

Real numbers are generally used for coordinate values; integers are
used for registers and character strings are used for commentary
messages and special output.

Other Data Elements allow for the control of sequence number


output, the use of special characters for word separation, end of block
and message start and end codes.

You have probably noticed that block word address icons have symbols
associated with them. These various icon symbols are switched on when you
pass the mouse over the word address icon and select the pull down menu with
MB3. Choosing Optional, No Word Separator, Force Output or any combination
of the three from the pull down menu will turn the various symbols on.

Word Address Icon


Pull Down Menu

No options selected
"Optional"
"No Word Separator" selected
"Force Output" selected
All options selected

A checkmark before the option is an indicator of the option being turned on.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-55

Building a Postprocessor with Post Builder

2-56

Force Output forces the selected code for output within the current
block only. This is useful, for example, to force out a T or some other
code for each tool change. By default all words are modal and will
output only if the value changes from one block to the next. Force
Output can only be specified within the context of an Event or
sequence.

No Word Separator results in the separator character being suppressed


following the word on output. This is used mainly for CLS output.

Optional will test to see if the address has a variable defined, if


defined, it will be used; if the variable is not defined, the address will
be suppressed. Note that this option takes priority over the Force
Output" option.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Activity 2-6: NC Data Definition


In this activity you will modify a word address to force out a G91" code and
then modify the existing G84 tapping code to produce a G84.1 code used in a
rigid tapping cycle.
Step 1 Enter NC Data Definition section of the Post Builder.
-

Select the NC Data Definition from the Post Builder


selection menu.

If necessary, choose the Block property page.

Step 2 Change the incremental mode block address variable to


force out a G91 code.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-57

Building a Postprocessor with Post Builder


-

Scroll down the component window and highlight the


incremental_mode variable.

Pass the cursor over the new changed block address, select
MB3 and then select Force Output.

Pass the cursor over this block address

Notice the white bar, indicating Force Output, that appears


on the block address icon.

2-58

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Step 3 Create a G84.1 Rigid tapping sequence.


You will now modify the existing G code that will be output
for a tapping cycle. You will change the standard G84 code to
G84.1 used in a rigid tapping sequence.
-

If necessary choose the N/C Data Definition property page.

Choose the Word property page.

Highlight the G block, using MB3, select Create.


The G_1 block is created.

The standard tap code is G84 which represents a two digit


integer. You will be creating a new tap code, G84.1, which
represents a three digit, real number. You will now create a
new format to represent the new tapping code of G84.1.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-59

Building a Postprocessor with Post Builder


-

Choose New under Format.

The Format: user_fmt property page is displayed.

Enter Digit_2_1 in the Format Name text box.

digit_2_1

2-60

Select the Numeric radio button under Data Type.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

The Format: user_fmt property page displayed is expanded.

Change the output to two places to the left of the decimal


and one place to the right.

Check the Output Decimal Point box.

Choose OK.
You have just completed setting the format for the G84.1
code. You must now set the parameters to allow
customization of the tapping code.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-61

Building a Postprocessor with Post Builder


-

Choose the Program and Tool Path property page.

If necessary, choose the Program Property page.

Highlight Canned Cycles and then click on Common


Parameters.

The Event: Cycle Parameters property page is displayed.

2-62

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

Under the G Code and Customization section, scroll down to


Customize Tap and check the box.

Choose OK.

You must now discard the previous tapping word block and
create a tapping word block that allows for the G84.1 word.
-

Choose the N/C Data Definitions property page.

Choose the Block property page.

Highlight cycle_tap.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-63

Building a Postprocessor with Post Builder

2-64

Drag the G84 block to the trash bin.

Choose G_1 from the Add Word pull down menu, then
choose GUser Defined Expression.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder


-

Choose the Add Word button and drag the block to the
beginning of the line.

The Expression Entry dialog box is displayed.


-

Key in 84.1 into the Expression Entry box.

Choose OK.

Step 4 Save the post and run it against the test part,
pbt_mill_test.prt.
-

If necessary, enter the Manufacturing Application in


Unigraphics .

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-65

Building a Postprocessor with Post Builder

With the Operation Navigation Tool, expand the T12345A


parent and select the TAP_.5_13UNC operation.

Select the postprocessing icon.

Highlight your postprocessor which you have modified and


select OK.

***

2-66

Accept the default for Output File and then select OK.

Verify the output.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Your output should be similar to the following:

Return to the Post Builder.

This completes this activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-67

Building a Postprocessor with Post Builder

Creating New M or G code groups


M and G codes are normally classified into logical groups. One such group is
the Motion group. This group consists of the words G00 for rapid, G01 for
linear feed, G02 for circular interpolation CW, G03 for circular interpolation
CCW and G80 thru G89 codes that represent drill cycles. Only one word from
this group can be active at any given time, i.e. it is illogical for a machine to be
moving in the G00 mode (rapid) while making a G01 move (linear feed)
simultaneously.

As a general rule, Post Builder supports all common M and G code groups. In
some instances however, certain machine tool/controller combinations support
functions that are unique and require custom M or G codes. Post Builder
allows you to create these new M or G code groups as will be shown in the
following activity.

2-68

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Activity 2-7: Creating a New MCode Group


In this activity, you will create a new Mcode group to support a machine tool
feature of coolant through the tool. In a later activity, you will modify the
coolant UDE (User Defined Event) to support this function within
Unigraphics.
Step 1 Continue using ***_my_post in Post Builder.
-

If necessary open ***_my_post using the Post Builder.

Step 2 Create the new Mcode word group.


-

Choose the NC Data Definitions property page.

Choose the Word property page.

You will now create the new Mcode word group by copying
an existing group. It is recommended, as a best practice, to
copy a group that is as similar as possible to the desired
group. This will utilize the existing settings of the formats
and word characteristics.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-69

Building a Postprocessor with Post Builder


-

Scroll down and then highlight the M_coolant word.

Choose the Create button.

2-70

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

The M_coolant _1 word is created.


Step 3 Change the name of the new word group.
-

Highlight the M_coolant_1 word.

Change the name to M_coolant_thru.

Save the postprocessor.

This completes this activity.


In support of the creation of the new word M_coolant_thru, you will need to
build a UDE to turn on the coolant through the tool, create a custom command
to detect and interpret the coolantthrough the tool UDE and then output the
appropriate Mcode. These steps will be performed in future activities.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-71

Building a Postprocessor with Post Builder

Output Settings Property Page


The Output Settings property page allows the generation and control of output
used in a listing file. Items for output are X, Y and Z coordinates, 4th and
5thaxis angle, and feeds and speeds. You can also specify file extensions for
listing and NC output. Tabs are present for Listing File control and for Other
Options.

2-72

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Under Other Options, the Output Control Elements section, Generate Group
Output allows the definition of how the postprocessor will process Groups.
Operations may be organized into groups in order to create more than one NC
program in a part file. Each group is considered to be a separate program. The
default setting for this option is OFF. This option should only be used when you
want to postprocess more than one NC program at a time. Selecting more than
one Group with this option turned ON will result in one file containing all the
Groups which have been selected. The file naming convention will be the name
of your file with the name of the group appended. For example, if the base file
name is 1234" and the group is called finish_mill", then the name of the file
will be 1234_finish_mill.ptp. When Group output is set to ON, you should not
mix operations in groups with operations outside of groups. This will result in
unpredictable output. When the group output setting is OFF, you will only get a
single NC output file called 1234.ptp. All operations in any selected group will
be output in a single file. Any group organization will be ignored.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-73

Building a Postprocessor with Post Builder

The name of the group or program in Unigraphics can be used as the program
name in the Start of Program Event. This will be passed as the variable name
mom_group_name. By changing the name of the PROGRAM in the Operation
Navigator, and by creating a custom command, you can create the equivalence
of a PARTNO statement.
Output Warning Messages will result in warnings generated to a log file.
Display Verbose Error Messages will result in detailed error messages being
displayed as your job is being postprocessed.

Activate Review Tool initiates the Review Tool which aides in the debugging of a
postprocessor.
The Review Tool consists of three list boxes, each having horizontal and vertical
scroll bars to assist in viewing the information.

The left most list box displays all the MOM events in sequential order that have
been created during the postprocessing cycle. Each MOM event is displayed
with the appropriate MOM event number. Selection of an event in this box will
highlight the corresponding generated output code in the right list box.

2-74

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Selecting a MOM event in this column highlights the


corresponding output in the Post Output column

The middle list box displays the MOM generated variables and addresses
associated with a particular Event in alphabetical order.
The right list box displays the output generated by the postprocessor.
Note: Extensions defined inside of Post Builder will be superceded by the
output file name displayed in the postprocessor dialog. Default extensions for
listing output are .lpt, for machine output, the default is .ptp.
Under User Tcl Source, the Source User's Tcl file option allows the use of an
existing Tcl source program.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-75

Building a Postprocessor with Post Builder

The Generate Virtual NC Controller (VNC) option, when checked, creates a


Virtual NC Controller which is used by the Integrated Simulation and
Verification (IS&V) module of NX.

2-76

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

Activity 2-8: Output Settings


In this activity you will modify the data which is select for output to a listing file.
Step 1 Enter the Output Settings section of Post Builder.
-

Select the Listing File & Output Control section from the Post
Builder selection menu.

Check the Generate Listing File box.

Uncheck the 4th and 5th axis angle box.

If necessary, uncheck the Activate Review Tool box.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-77

Building a Postprocessor with Post Builder

Step 2 Save the post and run it against the test part,
pbt_mill_test.prt.
-

If necessary, enter the Manufacturing Application in


Unigraphics .

With the Operation Navigation Tool, expand the T12345A


parent and select the FACE_MILLING operation.

Select the postprocessing icon.

Highlight your postprocessor which you have modified and


select OK.

***

2-78

Accept the default for Output File and then select OK.

Verify the listing file. The listing file will be located in your
home directory and will have a .lpt extension. Open the file
with the Notepad editor (vi editor if Unix) and examine the
contents.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

The contents of the listing file should be similar to the


following:

Return to the Post Builder.

This completes this activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-79

Building a Postprocessor with Post Builder

Post Files Preview Property Page

The Post Files Preview property page allows you to examine the Definition file
(.def) and the Event Handlers (.tcl) before output generation. Newly defined
code appears in the top window while the original code is displayed in the
bottom window.

2-80

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Building a Postprocessor with Post Builder

SUMMARY

The Post Builder is an efficient and robust


tool that can be used to build the majority of
the postprocessors that are required in
today's manufacturing environment. The
following functions were used in conjunction
of building a postprocessor with the Post
Builder:
D

Created a directory structure for testing


postprocessors developed with the Post
Builder.

Creation, modification and customization of


Event handlers with the Program and Tool
path function.

Defined output formats.

Modified listing and output options.

Verified the output of your postprocessor


using the Post Review Tool.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

2-81

Building a Postprocessor with Post Builder

(This Page Intentionally Left Blank)

2-82

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Wire EDM Applications

Post Builder for Wire EDM Applications


Lesson 3

PURPOSE

This lesson describes the procedures for building


postprocessors for Wire EDM applications through
the use of the Post Builder.

OBJECTIVES

Upon completion of this lesson, you will be able to:


D

Use the Post Builder to build 2 or 4axis Wire


EDM postprocessors.

This lesson contains the following activities:


Activity

Page

3-1 Creating a 2axis Wire EDM post . . . . . . . . . . . . . 3-5

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

3-1

Post Builder for Wire EDM Applications

Using Post Builder to create 2axis and 4axis Wire EDM Post
Processors
There are two different selections, available in the Post Builder for creating
Wire EDM postprocessors. They are:
D

2axis

4axis

3-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Wire EDM Applications

Once you make the selection of a 2axis or 4axis Wire EDM, you will then need
to select the type of controller. Your choices available are:
D

Generic

Library

User's

Generic controller defaults to a generic template that uses generic features


common to most machine tool controllers.
Library controller allows the selection of templates for Agie, Charmilles and
Mitsubishi (the main Wire EDM manufactures). These custom templates
contain the basic codes required for the most common Wire EDM functions
such as threading, start and end of cut and power settings required by the
various controllers.
User's controller allows the selection, as a template, of a previous post that you
have created. Selection is accomplished by choosing the Browse button and
then selecting the previously created postprocessor from a specific directory.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

3-3

Post Builder for Wire EDM Applications

When you choose the option for the controller that you will be using as a
template, choosing OK will display the Machine Tool property page. This allows
you to choose various parameters from the component window that are
necessary for your postprocessor.

Selection of the Display Machine Tool button, displays a generic view of the
machine tool that corresponds to the type of machine selected.
The majority of the options/parameters available are selfexplanatory.
The following activity will familiarize you with the functions and parameters
that are available when creating a Wire EDM postprocessor.

3-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Wire EDM Applications

Activity 3-1: Creating a 2axis Wire EDM post


In this activity you will create a 2axis Wire EDM post processor using the Post
Builder.
Step 1 If necessary, start the Post Builder.
-

On the Windows desktop menu bar, choose Start 


Programs  Unigraphics  Post Tools  Post Builder.

Step 2 Create a new 2axis Wire EDM post.


-

Select the New option in the File pull down menu and in the
Name field, name the postprocessor ***_wire_edm_post,
where *** stands for your initials.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

3-5

Post Builder for Wire EDM Applications

Note: Use lower case characters only and no spaces.

***_wire_edm_post

3-6

Under Machine Tool , select Wire EDM and accept the


default of 2axis.

Under Controller, select Library.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Wire EDM Applications


-

Select the down arrow and then select Charmilles from the
pull down menu.

Select OK.

You will accept all defaults to create the post, however,


before you save your post, explore the various options
available.
-

Close the Machine Tool property page window.

Save the post to your home postprocessing directory by


selecting File, Save As and then specifying your home
directory location.

Step 3 Add your newly created postprocessor to the


template_post.dat file.
In order for your newly created postprocessor to be included in the
Unigraphics Postprocessing window, you must modify the template_post.dat
file to include the new postprocessor. This is accomplished through the Utilities
 Edit Template Posts Data File option from the main menu bar.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

3-7

Post Builder for Wire EDM Applications


-

From the main menu bar choose the Utilities option and
then choose Edit Template Posts Data File from the pull
down menu.

The Install Posts dialog is displayed.


-

Highlight the TOOL LIST line as shown below, then select


the NEW button.

3-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Wire EDM Applications

The Open dialog is displayed.

***
***

If necessary, filter to your home directory and select the


postprocessor which you previously saved.

***_wire_edm_post.pui
***

***_wire_edm_post.pui

Choose the Open button.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

3-9

Post Builder for Wire EDM Applications

The path and name of the file are inserted into the
Template_post.dat file.

3-10

Choose the OK button at the bottom of the dialog.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Wire EDM Applications

The Save As dialog appears.

If necessary, select the file name template_post.dat.

Choose the Save button.

Choose Yes to the Save As warning message to replace the


template_post.dat file.

Choose Cancel.

Step 4 Verify the postprocessor has been added to the Post


Process dialog.
-

Return to a Unigraphics session and retrieve the part file


pbt_wedm_2_4_axis.prt from your student_home\parts
directory.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

3-11

Post Builder for Wire EDM Applications


-

Verify the postprocessor by entering the Manufacturing


Application in Unigraphics and selecting the postprocessing
icon.

You will see your postprocessor, ***_wire_edm_post, under


Available Machines on the Post Process dialog.

***
***

Choose Cancel.

Step 5 Run the post against the test part,


pbt_wedm_2_4_axis.prt.
-

3-12

From the Program View of the Operation Navigator, select


the PROGRAM parent.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Wire EDM Applications


-

Select the Post Process icon from the Manufacturing


Operations tool bar.

Choose the ***_wire_edm_post that you previously created.

Choose OK.

***
***

Your output will be similar to the following:

This completes this activity and the lesson.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

3-13

Post Builder for Wire EDM Applications

SUMMARY

The flexibility and robustness of the Post


Builder allows you to easily generate
postprocessors for 2 and 4 axis Wire EDM
machines. In this lesson you were
introduced to:
D

Creating a 2axis Wire EDM postprocessor


using the Post Builder tool.

3-14

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications

Post Builder for 5Axis Mill Applications


Lesson 4

PURPOSE

OBJECTIVES

This lesson describes the procedures for building


postprocessors for 5axis mills through the use of the
Post Builder.

Upon completion of this lesson, you will be able to:


D

Use the Post Builder to build 5axis mill


postprocessors.

This lesson contains the following activities:


Activity

Page

4-1 Creating a 5Axis Mill post with Post Builder . . . . 4-8

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-1

Post Builder for 5Axis Mill Applications

Using Post Builder to create 5axis Mill Post Processors


There are currently, five different selections, available in the Post Builder for
creating 4 and 5axis postprocessors. They are:
D

4Axis with rotary table

4Axis with rotary head

5Axis with dual rotary heads

5Axis with dual rotary tables

5Axis with rotary head and table

4-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications

Once you make the selection of the type of multiaxis machine, the Machine
Tool property page is displayed, allowing you to choose General, Fourth Axis
and Fifth Axis parameters from the component window of the property page.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-3

Post Builder for 5Axis Mill Applications

Selection of the Display Machine Tool button, displays a generic view of the
machine tool that corresponds to the type of machine selected.

4-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications

Selecting the 4th or 5th axis from the component window of the Machine Tool
property page results in a rotary axis configuration property page being
displayed. This property page allows you to configure the various parameters
for each axis of rotary motion.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-5

Post Builder for 5Axis Mill Applications

Parameters in this dialog are:


Rotary Axis selection of the configure button results in the Rotary
Axis Configuration dialog displayed. This dialog allows the selection of
plane of rotation, axis word address designation, default linearization
tolerance and the method of handling Axis Limit violations.

Machine Zero to Rotary Axis Center allows the definition of the


center of the 4th and or 5th axis in relation to the machine zero.
Rotary Motion Resolution allows the specification of accuracy of
rotation in degrees.

Maximum Feed Rate allows the specification of the maximum


degrees of rotation per minute.
Pivot Distance specifies the distance from the head or table rotation
pivot point to the spindle gage point. This option is not valid for dual
rotary type machine tools.
Angular Offset this offset adjusts the rotary angle motion and is
generally used when the tool axis of 0,0,1 does not result in angular
positions of 0 for the fourth and or fifth axis.
Axis Rotation specifies the rotation of the 4th and or 5th axis
according to the righthand rule.

4-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications

Axis Direction determines clockwise or counterclockwise direction of


rotary motion. Two options are available to determine axis direction.
The first option, Magnitude Determines Direction, determines that the
sign is used to determine the angular position. B90 and B90 are
different positions and are 180 degrees apart. Rotation to a larger
angle is always clockwise, to a smaller angle, counterclockwise. The
second option, Sign Determines Direction, signifies that the sign only
is used for direction. B90 and B90 are the same position on the rotary
table. B90 designates that the table will rotate counterclockwise to
B90. The reverse is true for B90 to B90, the table will rotate
clockwise.
Axis Limits allows for control of the minimum and maximum angles
that can be programmed for the fourth and or fifth axis. If the range of
travel is limited to less than 360 degrees, the travel is measured
clockwise. If there is no range of travel limits, there are then two
possible choices for minimum and maximum angles. If sign determines
direction, 0 degrees is the minimum and 360 is the maximum. If
magnitude determines direction, the minimum is 359.999 and the
maximum is 359.999.
Rotary Axis Can be Incremental this check box allows rotary output
to be incremental with respect to the previous rotation.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-7

Post Builder for 5Axis Mill Applications

Activity 4-1: Creating a 5Axis Mill post with Post Builder


In this activity you will create a 5Axis post processor using the Post Builder.
Step 1 If necessary, start the Post Builder.
-

On the Windows desktop menu bar, choose Start 


Programs  Unigraphics  Post Tools  Post Builder.

Step 2 Create a new 5axis mill post with dual rotary tables.

4-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications


-

Select the New option in the File pull down menu and in the
Name field, name the postprocessor ***_5_axis, where ***
stands for your initials.
Note: Use lower case characters only and no spaces.

***_5_axis

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-9

Post Builder for 5Axis Mill Applications


-

Under Machine Tool , select the blue button and then select
5axis with dual rotary tables.

Choose OK.
The Property Pages dialog is displayed.

4-10

Select the Machine Tool property page.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications

You will accept all defaults to create the post, however,


before you save your post, explore the various options
available under 4th and 5th axis located in the Component
Window.
-

Close the Machine Tool property page window.

Save the post by selecting File, Save.

Step 3 Save the post and run it against the test part,
pbt_5_axis_test.prt
In order for your newly created postprocessor to be included in the
Unigraphics Postprocessing window, you must save the post to your home
postprocessing directory and modify the template_post.dat file to include the
new postprocessor. This file is also located in the home postprocessor directory.
The template_post.dat is modified by use of the Utilities function of the Post
Builder.
Step 4 Add your newly created postprocessor to the
template_post.dat file.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-11

Post Builder for 5Axis Mill Applications


-

Choose the Utilities option and then choose Edit Template


Posts Data File from the pull down menu.

The Install Posts dialog is displayed.


-

Highlight the TOOL LIST line as shown below, then select


the NEW button.

***
***

4-12

***

Post Building Techniques


Student Guide

***

***

EEDS
All Rights Reserved

***

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications

The Open dialog is displayed.

***

***
***

Filter to your home directory and select the postprocessor


which you previously saved.

***
***

***

Choose the Open button.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-13

Post Builder for 5Axis Mill Applications

The path and name of the file are inserted into the
Template_post.dat file.

afile (.def)
-

Choose the OK button at the bottom of the dialog.

4-14

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications

The Save As dialog appears.

If necessary, select the file name template_post.dat.

Choose the Save button.

Choose Yes to the Save As warning message to replace the


template_post.dat file.

Choose Cancel.

Step 5 Verify the postprocessor has been added to the Post


Process dialog.
-

Return to a Unigraphics session and retrieve the part file


pbt_5_axis_test.prt from your student_home\parts directory.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-15

Post Builder for 5Axis Mill Applications


-

Verify by entering the Manufacturing Application in


Unigraphics and selecting the postprocessing icon.

You will see your postprocessor,***_5_axis, under Available


Machines on the Post Process dialog.

***
***
***

Step 6 Run the post against the test part, pbt_5_axis_test.prt.

4-16

Select ***_5_axis from the Post Process dialog.

Choose OK.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for 5Axis Mill Applications

Your output will be similar to the following:

This completes this activity and the lesson.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

4-17

Post Builder for 5Axis Mill Applications

SUMMARY

The flexibility and robustness of the Post


Builder allows you to easily generate
postprocessors for 4 and 5 axis machining
centers. In this lesson you were introduced
to:
D

Creating a 5axis mill postprocessor using


the Post Builder tool.

4-18

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Lathe Applications

Post Builder for Lathe Applications


Lesson 5

PURPOSE

OBJECTIVES

This lesson describes the procedures for building


postprocessors for 2axis lathes through the use of the
Post Builder.

Upon completion of this lesson, you will be able to:


D

Use the Post Builder to build 2axis lathe


postprocessors.

This lesson contains the following activities:


Activity

Page

5-1 Creating a Lathe post with Post Builder . . . . . . . . 5-5

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

5-1

Post Builder for Lathe Applications

Using Post Builder to create Lathe Post Processors

There is currently, one selection, available in the Post Builder for creating lathe
postprocessors. That selection is:
D

2Axis

Controller allows the selection of Generic, Library or User's machine


controllers. Generic controller contains defaults for a generic control. Library
allows the selection of controller from a Unigraphics supplied list, currently for
a Fanuc and Haas controller and User's allows the selection of postprocessors
by browsing for specific postprocessors.

NOTE: You can select a previously created postprocessor.

5-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Lathe Applications

The Machine Tool and Controller selections determine base files used to create
the postprocessor which contains various Events, commands and procedures.
The OK button enables acceptance of specifications for the machine tool and
controller and advances you to the main editor portion of the user interface.
The Cancel button will dismiss the current menu, terminates the process of
creating a new postprocessor and returns you to the Post Builder menu bar.
When you create a new postprocessor, you must add the name of the post to
the template_post.dat file. This file contains a list of postprocessors for
UG/Post to use. It defines a list of postprocessors that are available in the Post
Process dialog. The name of the postprocessor can be added by using the
Utilities pull down menu from the main tool bar.
Once you make the selection of 2axis lathe, general parameters for a lathe are
available for selection from the Machine Tool property page.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

5-3

Post Builder for Lathe Applications

The majority of the options/parameters available are selfexplanatory. Those


that need an expanded explanation are:
Turret this option allows selection for machines having more than
one turret. This option currently affects machines having turrets which
do not move independently and are a fixed distance apart. When
selecting this option, specify the names of the turrets, from a pull down
list, and specify the distance between them. Currently six names are
selectable.

Output Method defines the basic tool tracking method. There are
two options available with this method:
Tool Tip X and Z values in the output file represent the
tool tip location. With this option, the following is required:
D

A FROM command at the beginning of the program to


define the initial turret reference position.

A G92 block with each tool change to allow for changes in


the offsets.

A GOHOME command to return back to a common


turret reference position.

Turret Reference X and Z values in the output file


represent the turret reference location.

5-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Lathe Applications

Activity 5-1: Creating a Lathe post with Post Builder


In this activity you will generate a lathe postprocessor using the Post Builder.
Step 1 If necessary, start the Post Builder and create a new
2axis lathe postprocessor.
-

On the desktop menu bar, choose Start  Programs 


Unigraphics  Post Tools  Post Builder.

Select the New option in the File pull down menu and in the
Name field, name the postprocessor ***2_axis_lathe, where
*** represents your initials.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

5-5

Post Builder for Lathe Applications

Note: Use lower case characters only and no spaces.

***2_axis_lathe

The Create New Post Processor dialog is displayed.


-

Under Machine Tool, select lathe.

Choose OK.
The Machine Tool property page is displayed.

If necessary, choose the Machine Tool tab.


You will accept all defaults to create the post, however,
before you save your post, explore the various options
available with lathe.

Close the Machine Tool tab window.

Save the post by selecting File, Save.

In order for your newly created postprocessor to be included in the


Unigraphics Postprocessing window, you must save the post to your home
postprocessing directory and modify the template_post.dat file to include the
new postprocessor. This file is also located in the home postprocessor directory.
The template_post.dat is modified by use of the Utilities function of the Post
Builder.

5-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Lathe Applications

Step 2 Add your newly created postprocessor to the


template_post.dat file.
-

Choose the Utilities option and then choose Edit Template


Posts Data File from the pull down menu.

The Install Posts dialog is displayed.


-

Highlight the TOOL LIST line as shown below, then select


the NEW button.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

5-7

Post Builder for Lathe Applications

The Open dialog is displayed.

***
***

***
***

Filter to your home directory and select the postprocessor


which you previously saved.

***
***

***
***

***2_axis_lathe.pui

5-8

Choose the Open button.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Lathe Applications

The path and name of the file are inserted into the
Template_post.dat file.

***2

***

***

afile (.def)

Choose the OK button at the bottom of the dialog.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

5-9

Post Builder for Lathe Applications

The Save As dialog appears.

If necessary, select the file name template_post.dat.

Choose the Save button.

Choose Yes to the Save As warning message to replace the


template_post.dat file.

Choose Cancel.

Step 3 Verify the postprocessor has been added to the Post


Process dialog.

5-10

Return to a Unigraphics session and retrieve the part file


pbt_lathe_test.prt from your student_home\parts directory.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Lathe Applications


-

Verify by entering the Manufacturing Application in


Unigraphics and selecting the postprocessing icon.

You will see your postprocessor,***2_axis_lathe, under


Available Machines on the Post Process dialog.

***
***
***
***

Step 4 Run the post against the test part, pbt_lathe_test.prt.


-

With the Operation Navigator Tool, expand and highlight the


P9876A program group object.

Select ***2_axis_lathe from the Post Process dialog.

Choose OK.

Verify the output.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

5-11

Post Builder for Lathe Applications

The contents should be similar to the following:

Return to the Post Builder.

This completes this activity and the lesson.

5-12

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Post Builder for Lathe Applications

SUMMARY

The flexibility and robustness of the Post


Builder allows you to easily generate
postprocessors for 2axis lathes. In this
lesson you were introduced to:
D

Creating a 2axis lathe postprocessor using


the Post Builder tool.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

5-13

Post Builder for Lathe Applications

(This Page Intentionally Left Blank)

5-14

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

Tcl Basics for Post Builder


Lesson 6

PURPOSE

This lesson describes the basics of the Tcl scripting


language that is used by Post and Post Builder.

OBJECTIVES

Upon completion of this lesson, you will be able to:


D

Understand the basic structure and syntax of the


Tcl scripting language.

Write simple Tcl programs.

Activity

Page

6-1 Tcl Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8


6-2 Constructing a simple procedure . . . . . . . . . . . . . . 6-13
6-3 Tcl flow constructs . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-1

Tcl Basics for Post Builder

Tcl
Tcl (pronounced teeceeel), which stands for Tool Command Language, is an
interpretive scripting language that is the official Unigraphics language for user
supplied rules and is used in Post, Process Assistants, Shop Documentation, clsf
file creation and the Post Builder.
Tcl has an additional component, Tk. Tk, which stands for Tool kit, is
considered to be an extension of Tcl and provides basic user graphic interface
elements such as buttons, check boxes, and scroll bars.
Tcl was originally developed by John K. Ousterhout while at the University of
California, Berkeley. Tcl is public domain software and is currently supported
by the Scriptix Corporation.
The following information will aid you in obtaining and installing Tcl on
Window or Unix platforms:
Tcl can be activated by executing ugwish from the \mach\auxilary directory or
optionally can be installed by the following procedure:

Installation of Tcl For Window and Unix Platforms

6-2

Use your current web browser (Internet Explorer, Netscape,


etc.) and navigate to the web site:
www.scriptics.com/software/tcltk

Select the Tcl8.3 hyperlink and follow the


directions for downloading (make sure that you
download the image for your particular hardware
platform).

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

Tcl Command Structure


One of the basic building blocks of Tcl is the command. Commands instruct the
Tcl interpreter to perform some type of task.
Commands are made up of words that include the name of the command and
may also include options and or arguments.
D

options give the interpreter detailed instructions of the task that the
command must perform

arguments are any type of information that can be processed, changed,


or used in some way by the command

In summary, a command is an instruction consisting of three parts: name,


option, and argument.
A typical command syntax is:
command name

optionargument 1 argument 2 argument n

Examples of commands with options and argument components


Command Name

Command Name

Argument

clock format

puts "UG/POST Building Techniques"

Argument

[clock seconds]

Option
Command Name

expr

( 9 * 5 ) / 2
Argument
Argument
Argument
Argument
Argument
Argument
Argument

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-3

Tcl Basics for Post Builder

Tcl Scripts
A Tcl script consists of a sequence of commands separated by either anew
line" or a semicolon.
Comments are preceded by the #". The following example illustrates the use
of a comment and the concept of a script:
#If the value of X is less than 3, then print
#the following message: X is too small"

Comment

if { $X < 3} {

Script

puts stdout X is too small"


set X 3
}

Tcl Control of Word Structure


Tcl words break at white space(s)", tabs and semicolons, except in the
following situations:
D

double quotes prevent breaks and must be used in strings that have
spaces:
set X this is a word which has spaces"

curly braces prevent breaks and substitutions:


set Y {nested {}braces}

Backslashes quote special characters:


set Z word\ with\ \]$\ and\ space

Substitutions do not change word structure:


set abc two words"
set b $abc
b is now equal to the string two words"

6-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

Tcl Variables
A Tcl variable can be thought of as a named place holder of information. A
variable can store either numbers or strings. A number can be thought of as an
item that can be equated or has value. A string can be considered to be a
sequence of characters consisting of alphabetic letters, numbers or symbols, or
any combination of the three.
A Tcl variable name must start with an alphabetic letter and can consist of
alphanumeric characters. Spaces are not allowed in the variable name. The
variable name is case sensitive as well.
All variable values are stored as strings. Special functions exist to perform
calculations on numerical represented strings.
Tcl allows for local and global variables. Local variables are used inside of a
proc (also called a procedure which is like a subroutine and will be discussed
later). When the proc is called, the variable is created. When the proc is
completed, the variable is removed. A global variable is just the opposite of the
local variable. It allows the storage of information between calls to a proc. The
global variable has the same name regardless of location in the program,
whether in the main part of the program or within various procs.

Tcl Mathematical Expressions


Tcl mathematical expressions are performed by the expr command. Basic
operators used in expressions are:
D

addition

subtraction

division

multiplication

More complex operators, such as trigonometric and logarithmic functions are


also available.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-5

Tcl Basics for Post Builder

Variable Examples
Variable name
X
x
this_is_a_Variable
pre_drill
PRE_DRILL
Tcl Variable Definitions
In most computer languages such as FORTRAN or C", variables are set by the
use of the =" sign, i.e. XYZ=49 or XX=5*5. With Tcl, variables are defined
by using the set command.
Tcl Variable definition example:
set XYZ 49
set XX [ expr 5*5 ]
Variable Substitution
Variable substitution will cause a command to use the value of the variable
instead of the variable name in the command. For example, if A=2 and you
want to multiply A by 10 you would write the expression as expr A*10. This
would be interpreted by Tcl as multiply the string A by 10 rather than multiple
the contents of A by 10. In order for Tcl to use the value of the variable instead
of the name, the $" character must precede the variable's name. The correct
way to write the expression would be expr $A*10.

6-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

Variable Substitution Examples


Sample Command

Result

set a Uni

a=Uni

set b graphics

b=graphics

set c $a$b

c=$a$b=Unigraphics

set b 32

b=32

set a b

a=b

set a $b

a=32

set a $b+$a+$b

a=$b+$a+$b=32+32+32

set a $b.3

a=$b.3=32.3

set a $b9
defined variable

invalid since b9 is not a

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-7

Tcl Basics for Post Builder

Activity 6-1: Tcl Basics


In this activity you will start the Tcl Shell creating a window that will let you
create and test Tcl commands.
Step 1 Start the Tcl Shell.
-

From the toolbar choose


Start  Programs  Tcl  Tclsh

The Tcl Shell window is displayed.

The Tcl Shell may be used for executing simple one line commands or
multiple line programs, stored as a text file. Notice the %" as the
prompt.

6-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

Step 2 Create the command(s) to evaluate the following:


4 + (5*6)/2 + (7*28)/4.
-

In the Tcl Shell window type the following:


expr (4 +(5*6)/2+(7*28)/4)
followed by a carriage return. The result is 68.

Step 3 Set the following variables:


mom_sys_zaxis_max_limit =9999.9999
-

In the Tcl Shell window type the following:


set mom_sys_zaxis_max_limit 9999.9999
followed by a carriage return.

PI = 3.1415926536
-

In the Tcl Shell window type the following:


set PI 3.1415926536
followed by a carriage return.

DEGRAD = PI/180
-

In the Tcl Shell window type the following:


set DEGRAD [expr $PI/180]
hint: remember that you want to evaluate the contents of PI,
hence the $" character must precede the variable's name.
The result is 0.01745329252.

This concludes this activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-9

Tcl Basics for Post Builder

Tcl Procedures and Functions


Procedures are the same basic routines in different contexts that can be used
throughout a program. Procedures are analogous to subroutines and make
programs easier to create and modify.
The structure of a procedure follows:
proc procedure name

arguments body

the proc command defines the procedure, for example in the


command, proc sub1 x {expr $b1}, sub1 is the procedure

arguments within procedures may have defaults

arguments may also contain local as well as global variables

As previously stated, Tcl allows for local and global variable usage. Local
variables are used inside of a procedure. When the procedure is called, the
variable is created. When the procedure is complete, the variable is removed. A
global variable is the opposite of the local variable. It allows the storage of
information between calls to a procedure. The global variable has the same
name regardless of location in the program, whether in the main part of the
program or whether contained within various procedures.
Hint: When naming procedures, it is suggested that you name the procedure
with capital letters. This will make the procedure easier to locate when writing
scripts.

6-10

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

Example of a procedure:
#==================================
proc PB_CMD_ptp_size { } {
#==================================
# Output the current size of the ptp output file.
# Add this to the end of the End of Program event.
global ptp_file_name
global mom_sys_control_out
global mom_sys_control_in
set ci $mom_sys_control_in
set co $mom_sys_control_out
# Check the file size
MOM_close_output_file $ptp_file_name
set ptp_size [file size $ptp_file_name]
MOM_open_output_file $ptp_file_name
# Put a message for the file size in the ptp file
set ptp_feet [expr $ptp_size/120.]
MOM_output_literal "$co PTP file size = $ptp_size bytes\
[format "%5.1f" $ptp_feet] feet $ci"
}
Functions have the same functionality as a procedure, but they create a result
and return a value. A return command must be used prior to the last command
in the program.
Tcl I/O
Output of a string to the runtime window of Tcl is achieved by using the puts
command. For example, puts stdout  Post Processor" outputs the following on
your screen: Post Processor". To output the value of a variable, use the $"
character prior to the variable name. An example would be the following: puts
stdout $name.
To input a string value from the runtime window of Tcl, use the gets command.
For example, gets stdin var will read the string value from the variable var".

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-11

Tcl Basics for Post Builder

Tcl Special Characters


Use the '\' preceding the character for the output of special characters such as
$, \, tab, LF.

6-12

puts stdout \\"

puts stdout \$"

tab

puts stdout \t"

LF

puts stdout \013"

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

Activity 6-2: Constructing a simple procedure


In this activity, you will create and test a simple procedure that will calculate
the circumference of a circle. You will then output the results in the Tcl Shell
window. You will use the Notepad or Wordpad editor to create your procedure
as a text file and will then source" the procedure into the Tcl Shell window.
Step 1 Use the Notepad or Wordpad editor to create a text file.
-

Open a Notepad or Wordpad editor window.

Step 2 Create a Tcl procedure that will calculate the


circumference of a circle and output the results.
-

Create the start of the procedure. You will call the procedure
CIRCUMFERENCE. Type the following at the beginning of
text file:
#================
proc CIRCUMFERENCE { } {
#================
#
#Output the circumference based on the input diameter
#

Create the global variable diameter. This variable is global so


that it may be used outside of the procedure. Type the
following after the last line from the previous step action
item:
global diameter

Create a variable, PI, for the value of pi; then create a


variable circ, that represents the circumference. Type the
following after the last line from the previous step action
item:
set PI 3.1415926536
set circ [expr $PI * $diameter]

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-13

Tcl Basics for Post Builder

Note that the $" precedes the variable PI and diameter since
you want to use the value of those two variables.
-

Output the circumference value. Type the following after the


last line from the previous step action item:
puts Circumference is $circ"

End the procedure, create an inquiry for the diameter of the


circle and execute the procedure. Type the following after
the last line from the previous step action item:
#end the procedure
}
#inquire for diameter value
puts stdout  Enter Diameter Value"
#Get input from the keyboard
gets stdin diameter
#execute the procedure
CIRCUMFERENCE

Step 3 Save the file and execute the procedure from the Tcl Shell
window.
Your procedure should be similar to the following:
#===================================
proc CIRCUMFERENCE { } {
#===================================
# Output the circumference based on input diameter.
global diameter
set PI 3.1415926536
set circ [expr $PI * $diameter]
puts "Circumference is $circ"
#End the procedure
}
puts stdout " Enter Diameter Value"
gets stdin diameter
CIRCUMFERENCE
-

6-14

From the Notepad tool bar, File  Save the file in your
home directory with the name circum.tcl.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder


-

Execute the procedure from the Tcl Shell by typing the


following at the prompt:
source pathname filename"
where pathname is the directory specification (use \\" for
every \" occurrence) and the filename is circum.tcl

At the prompt for Enter Diameter Value", key in 15.


The value returned is 47.123889804

Now edit the circum.tcl file to shorten the answer to show


only three places to the right of the decimal and edit the puts
command to output The circumference is...."
This completes this activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-15

Tcl Basics for Post Builder

Tcl Flow Control Structures


Flow control structures (also referred to as conditionals and looping) are
special Tcl commands that allow control of the program execution. Using
conditional structures, the program decides which commands are executed and
which commands are bypassed. With looping structures, commands can be
repeated for repetitive tasks or functions. Control structures test a statement to
see if it is true or false. If the statement is true then a designated instruction or
group of instructions will be executed. If false, an alternate designated
instruction or group of instructions will be executed or bypassed. You can
generally use control structures to handle just about any set of conditions that
you may encounter in writing postprocessors.
The conditional if" structure uses the following basic equivalence operators:
D

= = equal

!=

not equal to

>

greater than

>=

greater than or equal to

<

less than

<=

less than or equal to

Example of if" construct:


if {$mom_sys_cir_vector == "Vector - Arc Center to Start"} {
set mom_prev_pos($cir_index) 0.0
set mom_pos_arc_center($cir_index) $pitch
} elseif {$mom_sys_cir_vector == "Vector - Arc Start to Center"}{
set mom_prev_pos($cir_index) $pitch
set mom_pos_arc_center($cir_index) 0.0
} elseif {$mom_sys_cir_vector == "Unsigned Vector - Arc Center \
to Start"} {
set mom_prev_pos($cir_index) 0.0
set mom_pos_arc_center($cir_index) $pitch
} elseif {$mom_sys_cir_vector == "Absolute Arc Center"} {
set mom_pos_arc_center($cir_index) $pitch
}
}

6-16

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

The for" command consists of:


D

command name

initialization statement which initializes the counter that keeps


track of the number of loops

test statement decides whether to execute the body of the loop

reinitialization statement keeps track of the counter

body of loop contains commands that are executed when the


test statement is true

Example of for" construct:


#==============================
proc VMOV { n p1 p2 } {
#==============================
#
# n, p1 and p2 are variables that are passed through to the proc
# when the procedure is called
#
upvar $p1 v1 ; upvar $p2 v2
#
#"upvar" substitutes the value of p1 to the v1 variable
#
for {set i 0} {$i < $n} {incr i} {
set v2($i) $v1($i)
}
}
The while" command consists of three parts:
D

command name

test statement

the body of loop

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-17

Tcl Basics for Post Builder

Example of while" construct:


#===============================
proc ROTSET { angle prev_angle dir kin_leader sys_leader} {
#===============================
#This procedure will take an input angle and format for a specific
#machine.
#angle = angle to be output.
#prev_angle = previous angle out. It should be mom_out_angle_pos
#dir can be either MAGNITUDE_DETERMINES_DIRECTION
#or SIGN_DETERMINES_DIRECTION
#kin_leader = leader (usually A, B or C) defined by postbuilder
#sys_leader = leader that is created by rotset. It could be C-.
#
upvar $sys_leader lead

6-18

while {$angle < 0.0} {set angle [expr $angle+360.0]}


while {$angle >= 360.0} {set angle [expr $angle-360.0]}
if {$dir == "MAGNITUDE_DETERMINES_DIRECTION"} {
while {[expr abs($angle-$prev_angle)] > 180.0} {
if {[expr $angle-$prev_angle] < -180.0} {
set angle [expr $angle+360.0]
} elseif {[expr $angle-$prev_angle] > 180.0} {
set angle [expr $angle-360.0]
}
}
} elseif {$dir == "SIGN_DETERMINES_DIRECTION"} {
set del [expr $angle-$prev_angle]
if {($del < 0.0 && $del > -180.0) || $del > 180.0} {
set lead "$kin_leader-"
} else {
set lead $kin_leader
}
}
return $angle

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

The switch" command consists of five parts:


D

command name

command options

a string to be matched

a collection of strings that is compared with the first string

a set of instructions for each compared string; the instructions


being executed if the string is matched

Example of switch" construct:


switch $mom_rotation_mode {
NONE {
set angle $mom_rotation_angle
set mode 0
}
ATANGLE {
set angle $mom_rotation_angle
set mode 0
}
ABSOLUTE {
set angle $mom_rotation_angle
set mode 1
}
INCREMENTAL {
set angle [expr $mom_pos($axis) + $mom_rotation_angle]
set mode 0
}
}

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-19

Tcl Basics for Post Builder

Activity 6-3: Tcl flow constructs


In this activity you will write a script that consists of a main program and two
(procedures) subprograms. The main program asks the user to calculate the
area of either a rectangle or a circle. The first procedure pertains to the
rectangle and requires the input of the length and width and subsequentially
calculates the area. The second procedure pertains to the circle, requires the
radius as input, defines Pi and then calculates the area of the circle.
Step 1 Use the Notepad or Wordpad editor to create a text file.
-

Open a Notepad or Wordpad editor window.

Step 2 Create the procedure, named RESULTS which will output


the results.
-

Create the procedure. You will call the procedure RESULTS.


Type the following at the beginning of the text file:
#================
proc RESULTS { } {
#================
#
global area
#
if {$area > "0" } {
puts stdout " Area is [format "%2.2f" $area]"
} else {
puts stdout "Invalid Entry!"
}
}

6-20

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

Create the procedure for calculating the area of a circle. You


6
will call the procedure CIRCLE. Begin typing the procedure
with a new line immediately after the }" from the previous

Step 3 Create the procedure for calculating the area of the circle.
-

step action item.

proc CIRCLE { } {
#================
#
#Calculate the area of a circle
#
global area
#
#set the variable for PI
#
set PI [expr 2.0 * asin(1.0)]
#
#input the radius value
#
set radius 0
puts stdout  Enter the radius value"
gets stdin radius
set area [expr $PI * $radius * $radius]
RESULTS
}

Step 4 Create the procedure to calculate the area of a rectangle.


-

Create the procedure for calculating the area of a rectangle.


You will call the procedure RECTANGLE. Begin typing the
procedure with a new line immediately after the }" from the
previous step action item.
#================
proc RECTANGLE { } {
#================
#
#Calculate the area of a rectangle
#
global area

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-21

Tcl Basics for Post Builder

#
#set variables for length and width; input values for
#the variables
#
set length 0
set width 0
puts stdout  Enter length 
gets stdin length
puts stdout  Enter width 
gets stdin width
set area [expr $length * $width]
RESULTS
}

Step 5 Create the Main program.


-

Create the Main program, that asks the type of area to


calculate.
set in ""
puts stdout " Select c for circular area, or r for \
rectangular area"
gets stdin in
if {$in == "Q" || $in == "q" || $in == quit"} exit
switch $in {
r { RECTANGLE }
c { CIRCLE }
R { RECTANGLE }
C { CIRCLE }
default { puts stdout  Invalid Entry!"}
}

Step 6 Save the file and execute the procedure from the Tcl Shell
window.
-

6-22

From the Notepad tool bar, File  Save the file in your
home directory with the name results.tcl.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder


-

Execute the procedure from the Tcl Shell window by typing


the following at the prompt:
source pathname filename"
where pathname is the directory specification (use \\" for
every \" occurrence) and the filename is results.tcl

At the prompt Select c for circular area, or r for rectangular


area", key in c, followed by a carriage return.

At the prompt Enter the radius value", key in 15.5, followed


by a carriage return.
The value returned is 754.767635025.
This completes this activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-23

Tcl Basics for Post Builder

Tcl Formats
Tcl provides numerous commands for processing lists. A list is a way of
categorizing items or objects and then giving them a single name. Commands
are available to add objects to a list, access elements in the list, access
information concerning lists, to search for items in an list, and finally to sort
lists.
To create a list, use the list command. To add elements to a list use the lappend
command. To access elements in a list, use the lindex command. To replace
elements in a list use the lreplace command. To insert elements in a list use the
linsert command.
Tcl and Unigraphics
Extensions of Tcl were developed for specific applications such as POST, Shop
Documentation, Process Assistants, Libraries and User Defined Features.
Tcl can call UFUNC routines and UFUNC routines can call GRIP routines. Tcl
is easy to use and is extensible using the C" language. Tcl currently can be
accessed through the CAM modules such as POST or Shop Documentation.
The Custom Command feature of the Post Builder allows the insertion of your
own custom Tcl procedures into the postprocessor or procedures that are
provided in the Custom Command library. The Post Builder provides the
procedure name and correct syntax prior to and after the body of the
procedure.
Common procedures are provided, and new procedures are added to each
release of the Post Builder, however, you may be required to construct your
own procedure to output specific formats required for special applications.
Tcl Reference Manuals
Practical Programming in Tcl and Tk by Brent B. Welch ISBN
0-13-616830-3
SAMS Teach Yourself Tcl/Tk by Venkat V.S.S. Sastry & Lakshmi Sastry IBSN
0-672-31749-4
Tcl/Tk Programmer's Reference by Chistopher Nelson ISBN 0-07-212004-5

6-24

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Tcl Basics for Post Builder

SUMMARY

Tcl is a scripting language that is extensively


used in Post and Post Builder. The Custom
Command feature of the Post Builder allows
the insertion of custom Tcl procedures that
can be created for applications such as
custom output formats or specific custom
machine tool/controller functionality.
The following Tcl functionality is used in the
creation of Custom Commands:
D

Variables

Mathematical expressions

Procedures

Input/Output statements

Flow control structures

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

6-25

Tcl Basics for Post Builder

(This Page Intentionally Left Blank)

6-26

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

Creating MillTurn Postprocessors


Lesson 7

PURPOSE

OBJECTIVES

This lesson describes the procedures required to build


MillTurn postprocessors through the use of the Post
Builder.

Upon completion of this lesson, you will be able to:


D

Construct postprocessors used in millturn


applications.

This lesson contains the following activities:


Activity

Page

7-1 Creating a MillTurn Postprocessor . . . . . . . . . . . . 7-4


7-2 Creating a 5Axis MultiLink MillTurn Post . . . . 7-17

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-1

Creating MillTurn Postprocessors

MillTurn Centers
The basic millturn center, along with turning tools, uses a rotary cutting tool
that is mounted in one or more pockets on the millturn center's turret. Various
attachments, including right angle heads, allow cutting along the Xaxis while
standard heads cut along the Zaxis of travel. On these types of machines, any
milling or drilling from the machine's center line is not feasible because of the
twoaxis limitation of the turning center. The rotary Caxis is normally an
orientation axis; rotation is normally inhibited when milling, drilling or tapping.

More complex millturn centers have contouring and positioning control of the
rotary Caxis, which allows for complex spiral and contour milling cuts. Many of
these types of machines also have an additional spindle, mounted on its own set
of slides, which gives the ability to machine the opposite side of the part in one
setup.

Typical millturn application

As can be determined by the general complexity of such machines,


postprocessors could become quite complex to handle the various
turning/milling/drilling combinations that can be encountered.
An easy approach to programming such machines would be to segregate and
then postprocess the various turning and milling (drilling, as well) operations. A
postprocessor would be created for the turning functions, a separate post would
be created for the drilling and milling functions.
A millturn postprocessor can be considered to be a separate mill and lathe
post which are linked together. When executed, this linked post will check the
machine mode and either loads the lathe or the mill post.

7-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

MillTurn and the Post Builder


Creating a millturn post using the Post Builder is relatively simple. Use the
following as a guideline:
D

Create a new 2axis lathe post, save the post and then close the file

Create a new mill post, selecting the millturn option (XZC)

Set necessary parameters

Save the millturn post

Verify that you have used the MCS_SPINDLE group object for all
lathe tool paths

Verify that you have used the MCS_MILL group object for all milling
tool paths

Postprocess your tool paths

Heads for Millturn centers


Some of the more sophisticated millturn centers use special Heads that are
used for turning, zaxis, xaxis, yaxis or 5axis work. These heads can be utilized
by the HEAD User Defined Event:

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-3

Creating MillTurn Postprocessors

Activity 7-1: Creating a MillTurn Postprocessor


In this activity you will create a simple millturn postprocessor by using an
existing lathe post and then by using existing parameters for a mill post. Finally,
you will test you postprocessor using existing turning and milling operations to
verify your output.

Step 1 Start the Post Builder.


-

On the desktop menu bar, choose Start  Programs 


Unigraphics  Post Tools  Post Builder.

Step 2 Create a millturn postprocessor.

7-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

Select the New option in the File pull down menu and in the
Name field, name the postprocessor ***_mill_turn, where
*** represents your initials.

***_mill_turn

***_mill_turn_5ax_zhead

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-5

Creating MillTurn Postprocessors


-

Select Mill under Machine Tool; select the 3Axis MillTurn


(XZC) from the button bar.

Select OK.

The Machine Tool property page is displayed.

By default, the mill post of the millturn is the current post that
you are creating. The lathe post defaults to the lathe_tool_tip
post in the postprocessor directory. If you have a special lathe
post that you would like to use, you would browse and then
select that post. You will accept the current defaults.

7-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

In the Machine Mode area of the dialog, turn Simple


MillTurn ON.

Choose the Coordinate Mode as Polar.

Select Rotary Axis from the Machine Tool property page.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-7

Creating MillTurn Postprocessors


-

Examine the various parameters which are available. You


will accept the defaults.

7-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

Step 3 Save your newly created postprocessor to your home


directory.
-

Select the File pull down menu from the main menu bar and
then select Save As.

***_mill_turn

Filter to your home postprocessor directory.

Visually check the File name box, if the file name shown is
the same as the file name of your postprocessor, select OK,
otherwise type in the correct name and then select OK.
***_mill_turn

You have just created the mill postprocessor required for the
millturn center. You will now test your postprocessor to
verify the output.
In order for your newly created postprocessor to be included
in the Unigraphics Postprocessing window, you must modify
the template_post.dat file to include the new postprocessor.
This file is located in the home postprocessor directory.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-9

Creating MillTurn Postprocessors

Step 4 Add your newly created postprocessor to the


template_post.dat file.
-

Choose the Utilities option and then choose Edit Template


Posts Data File from the pull down menu.

The Install Posts dialog is displayed.


-

7-10

Highlight the TOOL LIST line as shown below, then select


the NEW button.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

The Open dialog is displayed.

***
***

Filter to your home directory and select the postprocessor


which you previously saved.
***
***_mill_turn.pui
***

***
***

***_mill_turn.pui

Choose the Open button.

The path and name of the file are inserted into the
Template_post.dat file.
-

Choose the OK button at the bottom of the dialog.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-11

Creating MillTurn Postprocessors

The Save As dialog appears.

If necessary, select the file name template_post.dat from the


listing window and then choose the Save button.

The Save As dialog is displayed.

7-12

Choose Yes to the Save As warning message to replace the


template_post.dat file.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

Step 5 Verify the output.


-

Return to a Unigraphics session and retrieve the part file


pbt_millturn_mfg.prt from your student_home\parts
directory.

Verify the postprocessor by entering the Manufacturing


Application in Unigraphics and selecting the postprocessing
icon.

You will see your postprocessor,***_ mill_turn, under


Available Machines on the Post Process dialog.

***_mill_turn

Select the ***_mill_turn.

Choose OK.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-13

Creating MillTurn Postprocessors


-

Verify the output.


Your output will be similar to the following:

Turning Output

%
N0010 G40 G17 G94 G90 G70
N20 G92 X0.0 Z0.0
N30 T01 H01 M06
N40 G97 S0 M03
N50 G94 G00 G90 X5.6 Z13.
N60 X5.6938 Z12.7024
N70 G92 S0
N80 G96 S356 M03
N90 G95 G01 X5.6469 F.03
N100 X0.0
N110 X-.0469 F.05
N120 G94 G00 Z12.8024
N130 X5.6938
N140 Z12.4579
N150 G95 G01 X5.6469 F.03
N160 X0.0
N170 X-.0469 F.05
N180 G94 G00 Z12.5579
N190 X5.6938

Milling Output

N2970 G94 G00 X4.5398


N2980 X5.5
N2990 Z12.9
N3000 G91 G28 Z0.0
:3010 T08 M06
N3020 T25
N3030 G12.1
N3040 G00 G90 X-7.0711 Y0.0
C-8.13 S2712 M03
N3050 G43 Z14.4 H08
N3060 X-4.2759 C3.352
N3070 Z12.9
N3080 Z11.5
N3090 G94 G01 Z11.4 F7. M08
N3100 X-4.1128 C3.485
N3110 X-3.9765 C3.605
N3120 X-3.8245 C3.748 F6.
N3130 X-3.6781 C3.897
N4650 G84 X3. Y0.0 Z10.4557
R11.5 F3.3
N4660 X-3.
N4670 G80
N4680 G00 Z12.9
N4690 Z15.9
N4700 X0.0
N4710 M02
%

Save and Close the current post processor.


This completes this activity.

7-14

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

5 Axis MillTurn Centers


The combination of heavy duty turning centers with a high performance
machining center on one base has resulted in a 5axis millturn center with X,
Z, C, B and Y axes movement. This type of multitasking machine
revolutionizes the traditional concept of turning centers. They enable the
integration of part manufacturing for complete machining in one setup. They
also eliminate work inprocess and reduces throughput time since parts no
longer move from machine to machine with multiple setups, offering the benefit
of cost reductions in labor and fixtures, with the additional benefit of part
dimensional accuracy.
These machines are generally configured where the spindle head holds the
chuck for Caxis turning, the turret is mounted on a slide, providing for X and
Zaxis movement, while synchronous turret movement provides travel in the Y
axis. The turret has Baxis movement. The addition of Yaxis turret travel
provides for offcenter drilling and tapping as well as crosscut milling. The
Baxes movement of the turret also allows the machining of inclined surfaces
and oblique holes as well as precision contour and helical milling. Contouring
and positioning control of the rotary Caxis, allows for complex spiral and
contour milling cuts. Many of these types of machines also have an additional
spindle, mounted on its own set of slides, which gives the ability to machine the
opposite side of a part in one setup.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-15

Creating MillTurn Postprocessors

As previously mentioned due to the general complexity of such machines,


postprocessors could become very complex to handle the various
turning/milling/drilling combinations that can be encountered.
The same approach used for programming simple millturn centers would also
be used for 5axis applications (segregate and then postprocess the various
turning, milling and drilling, operations). A postprocessor would be created for
the turning functions, a separate post would be created for the drilling and
milling functions.

5Axis MillTurns and the Post Builder


Creating a 5axis multilinked millturn post using the Post Builder is relatively
simple using the following guidelines:
D

Create a new 2axis lathe post, save the post and then close the file

Create a new 5axis mill post, with rotary head and rotary table

Create a new mill XZC post which calls all other posts; use the 3axis
mill turn option.

Set necessary parameters

Save the millturn post

Create the necessary methods for turning operations, zhead mill


operations, zhead drill operations, xhead mill operations and xhead
drill operations

Move all lathe, mill and drill operations to their suitable method
parent

Create and assign Head UDE's to each of the newly created method
parents

Postprocess your tool paths

The following activity will take you through the process of creating and using a
5axis multilinked mill turning postprocessor.

7-16

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

Activity 7-2: Creating a 5Axis MultiLink MillTurn Post


In this activity, you will create a 5axis multilinked millturn post. This
particular post is representative of a millturn with one spindle (CAxis) and
two tooling heads, one in the XAxis and one in the ZAxis. The XAxis also is
capable of BAxis rotation. Three post processors are required and are linked
together:
D

a turning post, used for all turning utilizing the front spindle

a post for the XHEAD, used for all milling and drilling in the
Xaxis

a post for the ZHEAD, used for all milling and drilling in the
Zaxis

You must also assign the proper UDE to each Method parent.
You will first create the necessary postprocessors and then modify existing
operations to coincide with the functionality of the postprocessors.
Step 1 If necessary, start the Post Builder.
-

On the desktop menu bar, choose Start  Programs 


Unigraphics  Post Tools  Post Builder.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-17

Creating MillTurn Postprocessors

Step 2 Create a 2axis lathe postprocessor.


-

Select the New option in the File pull down menu, select the
Lathe radio button, and in the Name field, name the
postprocessor ***_mill_turn_5ax_turn, where *** represents
your initials.

***_mill_turn_5ax_turn

Select OK.
Save and Close the lathe post.

Choose File and then Save.

Choose Close.
You will now create the necessary mill post.

7-18

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

Step 3 Use Post Builder to create a new mill 5axis head table
postprocessor for the XAxis head.
-

Select the New option in the File pull down menu, select the
Mill radio button, select the 5Axis with Rotary Head and
Table from the pull down menu and in the Name field, name
the postprocessor ***_mill_turn_5ax_xhead, where ***
represents your initials.

***_mill_turn_5ax_xhead

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-19

Creating MillTurn Postprocessors


-

Select OK.
The Machine Tool property page is displayed.

7-20

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

Select the Program and Tool Path property page, then select
the Program tab, the Canned Cycle component and then add
the fourth and fifth axis angles to the Common parameters
block.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-21

Creating MillTurn Postprocessors


-

Add the 4th and 5th axis addresses.

Select OK.

Save and Close the ***_mill_turn_5ax_xhead post.

You will now create the postprocessor for the ZAxis head.

7-22

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

Step 4 Use Post Builder to create a new mill 5axis head table
postprocessor for the ZAxis head.
-

Select the New option in the File pull down menu, select the
Mill radio button, then select 3Axis MillTurn (XZC) from
the pull down menu and in the Name field, name the
postprocessor ***_mill_turn_5ax_zhead, where ***
represents your initials. This is the main post that will call all
others.

***_mill_turn_5ax_zhead

Select OK.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-23

Creating MillTurn Postprocessors


-

On the Machine property page, General Parameters, verify


the Spindle Axis is set to ZAxis.

7-24

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

Choose the Program and Tool Path property page and then
select the Linked Posts tab.

Turn on the Link Other Posts to This Post check box and
enter ZHEAD in the Head text field.

Note that if there are any special G or M codes for needed


for the beginning or end for your particular controller, add
them here.
-

Choose OK.
You will now specify the additional linked post for turning.

Choose NEW.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-25

Creating MillTurn Postprocessors


-

Key in TURN for the Head name and then choose the Select
Name button and browse for the turning post which you
created in STEP 2 (***mill_turn_5ax_turn.pui).

***mill_turn_5ax_turn

Choose OK.
You will now specify the additional linked post for the
XHEAD.

Choose NEW.

Key in XHEAD for the Head name and then choose the
Select Name button and browse for the XHEAD post which
you created in STEP 3 (***mill_turn_5ax_xhead.pui).

XHEAD
***mill_turn_5ax_xhead

7-26

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

Choose OK.
You will now add the parameters for the 4th axis.

Select the Program and Tool Path property page, then select
the Program tab, the Canned Cycle component and then add
the fourth axis angle to the Common parameters block.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-27

Creating MillTurn Postprocessors


-

Add the 4th axis addresses.

Drag and Drop the fourth axis address into the block.

7-28

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

If necessary, go to the Word Sequencing tab and suppress the


YAxis.

Choose OK.

Save the ***_mill_turn_5ax_zhead post.


You have created and linked the necessary posts for your
5axis millturn center. You will now create the necessary
Methods and then assign the Head UDE's as required.

Step 5 Retrieve an existing part file and create the necessary


Method parent objects.
-

Open the part file pbt_millturn5ax_mfg.prt.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-29

Creating MillTurn Postprocessors


-

Create the following Method group objects:


D

TURNING_POST

MILL_ZHEAD_POST

MILL_XHEAD_POST

DRILL_ZHEAD_POST

DRILL_XHEAD_POST

by choosing the Create Method icon and keying in the


proper group object name.

7-30

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

Move the existing turning tool paths to the TURNING_POST


method parent.

Move all the ZHEAD MILL operations to MILL_ZHEAD


method parent.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-31

Creating MillTurn Postprocessors


-

Move all the XHEAD MILL operations to MILL_XHEAD


method parent.

Move all the ZHEAD DRILL operations to DRILL_ZHEAD


method parent.

7-32

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

Move all the XHEAD DRILL operations to DRILL_XHEAD


method parent.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-33

Creating MillTurn Postprocessors

Step 6 Assign the HEAD UDE to the Method parents.


-

Highlight the MILL_ZHEAD_POST method, using MB3,


choose Object and then Start Post.

The User Defined Events dialog is displayed.

7-34

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

Highlight Head and then choose the Add button.

The Head dialog is displayed.


-

Turn on Name Status and type in the name of the


appropriate head, in this case ZHEAD.

Choose OK.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-35

Creating MillTurn Postprocessors


-

Repeat the process for MILL_XHEAD_POST,


DRILL_ZHEAD_POST, DRILL_XHEAD_POST and
TURNING_POST. Use XHEAD for the name for
MILL_XHEAD and DRILL_XHEAD; use ZHEAD for the
name DRILL_ZHEAD and use TURN for the
TURNING_POST.
You have just created the all the postprocessors required for
the millturn center and have assigned the UDE's to the
proper heads. You also segregated your operations to
coincide with the various methods which you have
established. You will now test your postprocessor to verify
the output.

In order for your newly created postprocessor to be included


in the Unigraphics Postprocessing window, you must modify
the template_post.dat file to include the new postprocessor.
This file is located in the home postprocessor directory.
Step 7 Postprocess all tool paths.

7-36

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors


-

Change to the Program Order view of the Operation


Navigator and expand all operations.

Highlight the T3498233 and then choose the postprocess


icon and browse for your postprocessor
(***_mill_turn_5ax_zhead).

***
***_mill_turn_5ax_zhead
***

***
***
***_mill_turn_5ax_zhead

Choose the postprocessor and then the OK button on the


Open Postprocessor dialog.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-37

Creating MillTurn Postprocessors


-

Choose the Apply button at the bottom of the Postprocess


dialog.
Your ouput will be similar to the following:

This concludes the activity and the lesson.

7-38

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Creating MillTurn Postprocessors

SUMMARY

The ability to perform milling, drilling and


turning operations, utilizing a millturn
center, affords substantial productivity and
cost savings in todays manufacturing
environment. The ability to generate
postprocessors for these types of machines,
utilizing the Post Builder:
D

Substantially reduces the time required to


develop a postprocessor.

Is easy to customize through the use of


Custom Commands.

Allows for multitudes of types of


configurations.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

7-39

Creating MillTurn Postprocessors

(This Page Intentionally Left Blank)

7-40

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

Customizing a Postprocessor with Post Builder


Lesson 8

PURPOSE

This lesson describes the procedures of customizing


postprocessors through the use of the Post Builder.

OBJECTIVES

Upon completion of this lesson, you will be able to:


D

Use the Post Builder to customize postprocessors


through the use of the Custom Command feature.

This lesson contains the following activities:


Activity
8-1

Page

Custom Commands . . . . . . . . . . . . . . . . . . . . . . . . . 8-8

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-1

Customizing a Postprocessor with Post Builder

Unigraphics Postprocessor Customization


Using the Post Builder
Obtain Machine Tool / Controller data
from Machine Tool Builder's Operator
and Programmer Manuals

Post
Builder
(.tcl, .def, .pui files)

Test
Output

ERROR

Machine Type

multiaxis milling
3axis milling
Lathe
Mill Turn
Wire EDM

8-2

Customize by the use of"Custom Commands"


Create / Modify
Under the "Program and Tool Path"
Property page of
Event
the Post
Handler
Builder

Post Building Techniques


Student Guide

Create / Modify
Definition File

Special

Test
Output

ERROR

OK

OK

Functional
Postprocessor

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

Customizing a postprocessor by using the Post Builder


In the majority of cases, Post Builder allows you to generate the data which is
necessary for your machine tool/controller. However, you may find that in some
situations, such as generating a custom header at the beginning of a program,
the Post Builder will not be able to give you the specific type of output that you
may need.
When this type of situation is encountered, the Custom Commands feature
found in the Program and Tool Path property page of the Post Builder, will
allow you to generate the output that is required.
Custom Commands showing Start of Operation and T ool Change dialogs

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-3

Customizing a Postprocessor with Post Builder

The Custom Command feature allows the insertion of your own custom Tcl
procedures into the postprocessor or procedures that are provided in the
Custom Command library. The Post Builder provides the procedure name and
correct syntax prior to and after the body of the procedure. Post Builder checks
the syntax of the user created custom command and displays syntax errors as
found.
Note that the Post Builder checks the correctness of the syntax of the proc's
body automatically. You can, as an option check for unknown commands,
unknown blocks, unknown addresses and unknown formats for validation
through selecting, Options  Validate Custom Commands.

8-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

The Custom Command Property Page

Procedure name
and
starting syntax

Body" of procedure is
inserted here

Closing
syntax

The Import button allows the importing of useful existing procedures that may
be added to the various Event markers. These existing procedures normally
have instructions including how the procedure functions.

When you select the Import button, the Select a File dialog is displayed. The
default directory is custom_command, which contains numerous existing
procedures. You may also browse to any directory to import any of your own
files containing Custom Commands. Any file that is imported is checked for Tcl
errors based on the options that have been previously set for syntax checking.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-5

Customizing a Postprocessor with Post Builder

Files located in the custom command directory begin with pb_cmd and have a
.tcl extension.

The Export button allows you to export custom commands that have been
created or modified to a specific file. This is a convenient method of saving
frequently used procedures that you create as you are building your
postprocessor.

8-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

You can also develop your Custom Command as a text file and then cut and
paste the procedure in the Custom Command window. Note that to paste text,
use MB3  Paste.

Cut the contents of a text


file containing the body of
a procedure

And paste the contents here

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-7

Customizing a Postprocessor with Post Builder

Activity 8-1: Custom Commands


In this activity you will:
D

Import a Custom Command that outputs the current size of the


machine code output file at the end of the file

Cut and paste text from a text file, that creates a Custom
Command to create blocks of header information at the
beginning of your posted output file

Position the Custom Commands which you created to output


the information requested at the beginning and end of the
output file

Export the Custom Command that creates a block of header


information as a file into the Custom Command directory

You will be using the post processor, ***_my_post that you created in a
previous activity.

Step 1 Enter the Program and Tool Path and then Custom
Command section of Post Builder.
-

If necessary, open ***_my_post, where *** represents your


initials.

Select the Program and Tool Path property page from the
Post Builder dialog.

Select the Custom Command property page.

Step 2 Import a Custom Command that outputs the current size


of the machine code output file.

8-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder


-

Choose the Import button from the Custom Command


property page.

The Select a file dialog is displayed.


-

Highlight the pb_cmd_tape_utils.tcl file name.

Choose Open.

pb_cmd_tape_utils.tcl

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-9

Customizing a Postprocessor with Post Builder

The Import Custom Commands dialog is displayed.

Note that this file contains the procedures,


PB_CMD_output_tape_per_operation and
PB_CMD_ptp_file_size. Both procedures have a check marked
box, which implies that they will both be placed into your post.
Since you only want to use the PB_CMD_ptp_file_size
procedure, you will need to uncheck the procedure
PB_CMD_output_tape_per_operation.
-

Double click on the procedure


PB_CMD_output_tape_per_operation to deslect.

The procedure, PB_CMD_output_tape_per_operation is


deselected.
-

8-10

Choose OK.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

The procedure name is displayed, highlighted in the Component


Window of the Custom Command property page. The contents
are displayed in the Parameter Window.

Step 3 Create a Custom Command which will create blocks of


header information at the beginning of your program
using cut and paste procedures.
Another method of adding a custom command is by use of the
Program tab of the Program and Tool Path property page Add
Block feature. With this method you are able to cut and paste
the contents of an existing text file into the custom command
block.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-11

Customizing a Postprocessor with Post Builder


-

If necessary, select the Program and Tool Path property


page, and then select the Program tab.

Since the block of information desired is at the beginning of the


program, you will want to insert the custom command at the
beginning of the Program Start Sequence,
-

8-12

If necessary, highlight the Program Start Sequence, select


Custom Command from the pull down menu and then select
the Add Block button.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder


-

Drag and then drop the Custom Command block prior to the
MOM_set_seq_off block.

The Custom Command dialog is displayed.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-13

Customizing a Postprocessor with Post Builder


-

Rename the Custom Command to header by highlighting


custom_command (1) in the proc name box and keying in the
name header (2).

(1)
(2)

Step 4 Select the data for the Custom Command from the file
pbt_custom_command_1.txt from the Student Parts
directory.
In Windows, double click on the file
pbt_custom_command_1.txt, select the entire contents of the
file and then select CtrlC to copy.
In Unix, using the file manager, highlight the
pbt_custom_command_1.txt, MB3 and select Open. Select the
contents of the file; under the Edit pull down menu; then select
copy.

8-14

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

Step 5 Insert the text into the Custom Command.


-

Using MB3  Paste the contents of the text file into the
Parameter Window.

The contents of the paste buffer is inserted into the


Parameter Window.
-

Choose OK.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-15

Customizing a Postprocessor with Post Builder

You have just created a Custom Command that will calculate


the physical file size and another that creates header
information, using two different methods of creation. The
header information has already been placed in the proper
location for output. The Custom Command that calculates
the physical file size needs to be placed at the end of the
program for output.
Step 6 Add the previously created Custom Command for
specifying file size to your postprocessor.
You will now place the Custom Command used to calculate
the file size of the output file at the end of the program (note
that if you placed this Custom Command before or after a
previous block component, the calculation of the file size of
the output file would not be accurate since it is not located
after the last block component).

Highlight the Program End Sequence in the component


window.

Select the PB_CMD_ptp_file_size, from the Add Block


Component Available option menu, drag and drop the
command after the last block component.

Drag and drop the


PB_CMD_ptp_file_size
Component block

8-16

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

You have just insert the Custom Command for calculating


file size into the proper location of your postprocessor. You
will now verify those commands by running the postprocessor
against your test part and then verifying the results.
Step 7 Save the post and run it against the test part,
pbt_mill_test.prt.
-

If necessary, enter the Manufacturing Application in


Unigraphics .

With the Operation Navigation Tool, expand the T12345A


parent and select the FACE_MILLING operation.

Select the postprocessing icon.

Highlight your postprocessor which you have modified and


select OK.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-17

Customizing a Postprocessor with Post Builder

***
***
***
***

Accept the default for Output File and then select OK.

Verify the output.


Your output should be similar to the following:
===========================================
PARTNO
( PART NAME
: PBT_MILL_TEST.PRT )
( CREATED BY
:
( CREATION DATE :
( CREATION TIME :
( UGPOST NAME
: ***_MY_POST )
( OUTPUT FILE
: ......\PBT_MILL_TEST.PTP )
%
N0010 G40 G17 G90 G70
N0020 G91 G28 Z0.0
:0030 T30 M06
N0040 G00 G90 X19.5 Y.2 S456 M03
N0050 G43 Z4. H30
N0060 Z2.2
N0070 Z2.1
N0080 G01 Z2. F13. M08
N0090 X17.
..............
N0350 G01 Z2.
N0360 X17.
N0370 X3.
N0380 G00 X5.25
N0390 Z4.
N0400 Z7.
N0410 X1. Y4.
N0420 Z20.
N0430 X10. Y10.
N0440 M02
%
( PTP file size = 969 bytes 8.1 feet )

8-18

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

Step 8 Export the Custom Command that created header


information as a file to the Custom Command directory.
-

Select the Custom Command property page.

Choose the Export button from the Custom Command


property page.

The Export Custom Commands dialog is displayed.

You will notice that all Custom Commands listed in the


parameter window are selected (checked). You only want to
export the PB_CMD_header custom command. You will
therefore want to Deselect All and then select just the
PB_CMD_header command.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-19

Customizing a Postprocessor with Post Builder


-

Choose the Deselect All button.

All Custom Commands are deselected.

You will now select the PB_CMD_header Custom Command


for Export.
-

Doubleclick, in the Parameter window, the Custom


Command, PB_CMD_header.

The PB_CMD_header Custom Command is selected.

8-20

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder


-

Choose OK.

The Select a file dialog is displayed.

Key in pb_cmd_header in the File name field.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-21

Customizing a Postprocessor with Post Builder


-

Choose the Save button.

The Custom Command, pb_cmd_header is saved in the


Custom Command directory and can be used when creating
other postprocessors.
This completes the activity and the lesson.

8-22

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Customizing a Postprocessor with Post Builder

SUMMARY

The Custom Command feature of the Post


Builder provides an easy method for the use
of predefined or user created procedures
that allow for custom output.
Custom Commands can be:
D

Retrieved from a Unigraphics provided


Custom Command library.

Created to meet individual machine tool


custom output.

Created, modified and saved for use in the


building of other postprocessors.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

8-23

Customizing a Postprocessor with Post Builder

(This Page Intentionally Left Blank)

8-24

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)

User Defined Events (UDEs)


Lesson 9

PURPOSE

This lesson describes the function, modification and


creation of User Defined Events.

OBJECTIVES

Upon completion of this lesson, you will be able to:


D

Create, modify and use User Defined Events


(UDEs).

This lesson contains the following activities:


Activity

Page

9-1 Creating User Defined Events . . . . . . . . . . . . . . . . 9-6


9-2 Modify the Coolant UDE for ThruSpindle . . . . . 9-16

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-1

User Defined Events (UDEs)

User Defined Events


User Defined Events (UDEs) provide a mechanism of having Machine Control
Events become user definable. Machine Control Events are used to convey
information concerning the physical state of the machine tool to the
postprocessor. This may include spindle speed and direction, coolant on or off,
and clamping of the work piece. Numerous Machine Control Events are
supplied as standard with Unigraphics.
Machine Control Events have been renamed to User Defined Events with UG
V16. The architecture used to define Machine Control Events is the same
architecture used to define UDEs. Machine Control Events can be considered
as User Defined Events and can be created and modified in the same fashion.
UDEs can be specified at the start of path, end of path, in path or can be
attached to any CAM parent object (Program, Method, Machine Tool,
Geometry) using the User Defined Events dialog.
UDEs generate Events with all Event data being passed to the postprocessor as
a MOM event and as mom variables.
The description of the UDEs and the data associated with them are defined in
the file ude.cdl located in the UGII_BASE_DIR\mach\resource\user_def_event
directory. This file is referenced by the configuration file. Parameters that are
set in the UDE are converted to the corresponding mom variable. A
corresponding procedure in the postprocessor Tcl file is a requirement for
output. UDEs can be included in the definition file.

9-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)

User Defined Event Syntax


EVENT <name>
{
POST_EVENT <post_name>
UI_LABEL <ui_name>
CLASS Type, subtype, subtype; Type, subtype, subtype;
CATEGORY Mill | Drill | Lathe | WEDM
PARAM <param_name1>
{
TYPE b | i | d | s | o | p |v
DEFVAL <default value as string>
TOGGLE Off | On
OPTIONS <string1, string2, string3.......>
UI_LABEL <ui_name>
}
PARAM <param_name2>
PARAM <param_name3>
}
}

EVENT <name> defines the Event name".


POST_EVENT <post_name> specifies that the Event name" will be output to
the Postprocessor as an Event called MOM_post_name". This attribute of the
EVENT is optional and if not specified, the Event will be output to the
Postprocessor as an Event called name".
UI_LABEL <ui_name> specifies that ui_name" is a string used for the title of
the dialog. This attribute of the EVENT is optional and if not specified the
Event name itself is used as the ui_name".
CLASS attribute specifies the operation subtypes in which the EVENT is valid.
The type and subtype get the same meaning as in the context of templates. This
is an optional attribute and when not specified implies that the EVENT is valid
for all types and subtypes.
CATEGORY attribute specifies the machining type (mill, lathe, WEDM, etc.) in
which the Event is relevant. This attribute is optional. The Event can be
specified to be relevant in more than one machining mode. When this attribute
is not specified the Event becomes relevant in all machining modes.
PARAM <param_name1> specifies a parameter of the Event. The parameter
has a name mom_param_name1".

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-3

User Defined Events (UDEs)

TYPE is an attribute of the PARAM and specifies the parameter type. The
possible values for TYPE are:
b - binary
i - an integer
d - a real number
s - a string
o - one of a possible set of options
p - a point
v - vector
DEFVAL <default value as a string> specifies the default value of the
parameter. This is an optional attribute (TYPE o) and if not specified the
following will be the defaults according to the TYPE of the parameter:
b - the value can be 0 or 1
i - default value is 0
d - default value is 0.0
s - default value is an empty string
o - default value is the first one of the list of options
provided
p - default value does not apply
v - vector of 0, 0, 1
TOGGLE is an attribute of the parameter which specifies a default value, the
default value is either On or Off. The TOGGLE attribute is optional and if not
specified the parameter is mandatory.

OPTIONS is a required attribute of the parameter when the TYPE is `o'. This
provides all the possible values that the parameter can have. The values are
specified as comma separated strings.
UI_LABEL <ui_name> specifies that ui_name" will be the text displayed in
the dialog presented. This is an optional attribute and if not specified the
param_name1" will be used as the ui_name".

9-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)

The following illustrates the Tool Change UDE with corresponding dialog.
EVENT mill_tool_change
{
POST_EVENT "load_tool"
UI_LABEL "Tool Change"
CATEGORY Mill Drill
PARAM command_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive","User Defined"
UI_LABEL "Status"
}
PARAM load_tool_number
{
TYPE i
DEFVAL "0"
TOGGLE On
UI_LABEL "Tool Number"
}
# Toggle button applies to only one parameter
# You need Z offset only for Mill Post
# commands.
#
PARAM tool_z_offset
{
TYPE d
DEFVAL "0.0000"
TOGGLE Off
UI_LABEL "Tool Z Offset"
}
#You do not need Tool Angle/Radius for Mill
# You do not need head_type for Mill
# Post Commands
PARAM tool_adjust_register
{
TYPE i
DEFVAL "0"
TOGGLE Off
UI_LABEL "Adjust Register"
}
PARAM manual_tool_change
{
TYPE b
DEFVAL "FALSE"
UI_LABEL "Manual Tool Change"
}
PARAM tool_holder
{
TYPE i
DEFVAL "0"
TOGGLE Off
UI_LABEL "Holder"
}
PARAM tool_text
{
TYPE s
TOGGLE Off
UI_LABEL "Text"
}
}

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-5

User Defined Events (UDEs)

Activity 9-1: Creating User Defined Events


In this activity you will create a generic postprocessor used for testing purposes
in your home directory using the Post Builder. You will then create and test
various User Defined Events.
Step 1 Create the postprocessor for testing purposes.
-

If necessary, activate the Post Builder.

Open the mill3ax postprocessor located in your home


postprocessor directory.

Using the Save as option under File of the Post Builder, save
the file with the name ***_test_post, where *** represents
your initials.

Step 2 Add your newly created postprocessor to the


template_post.dat file.

Choose the Utilities option and then choose Edit Template


Posts Data File from the pull down menu.

Add your newly created postprocessor to the


template_post.dat file.

If necessary open the part file, pbt_mill_test.prt.

Verify, by entering the Manufacturing Application, that your


postprocessor, ***_test_post, is available on the Post Process
dialog.

Choose Cancel from the Post Process dialog.

Step 3 Change the User Defined Event for coolant from the
default of Flood to Mist.
-

9-6

Edit the ude.cdl file, located in your home


\resource\user_def_event directory (/resource/user_def_event
if Unix), locate the Event Coolant, and change the current
default value for the parameter coolant_mode from Flood to
Mist.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)


EVENT coolant
{
POST_EVENT "coolant_on"
UI_LABEL "Coolant On"
PARAM command_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive","User Defined
UI_LABEL "Status"
}
PARAM coolant_mode
{
TYPE o
DEFVAL "Flood"
OPTION "On","Flood","Mist","Tap"
UI_LABEL "Type"
}
PARAM coolant_text
{
TYPE s
TOGGLE Off
UI_LABEL "Text"
}
}

Step 4 Create a new User Defined Event to Load a new


coordinate system to output a G59 code.
-

Add the following lines of code at the end of ude.cdl file,


following the #":
#
# Event for coordinate offset
#
EVENT sys_offset
{
POST_EVENT csys_load"
UI_LABEL Coordinate Offset"
PARAM command_status
{
TYPE o
DEFVAL Inactive"
OPTIONS Active","Inactive"

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-7

User Defined Events (UDEs)

}
{

}
}

UI_LABEL Offset"
PARAM csys_register
TYPE o
DEFVAL 54"
OPTIONS 54","55","56","57","58","59"
UI_LABEL Coordinate System"

#
#End of coordinate system event
#
-

Save the file.

Step 5 Reload the revised ude.cdl file


-

From the Unigraphics tool bar, select Preferences 


Manufacturing.

Select the Configuration property page; under Configuration


File, select the Reset button, then choose OK to reload the
ude.cdl file.
If the contents of the ude.cdl file are correct, the file will
reload with no error messages. If error messages appear,
check to make sure the syntax is as specified previously, fix
the errors and repeat the above process.

Step 6 Add a Custom Command to the ***_test_post


postprocessor to utilize the newly created User Defined
Event.
Using the Custom Command feature of the Post Builder, add
the Custom Command PB_CMD_coordinate_offset to the
operation Start Sequence.
-

9-8

If necessary, using the Post Builder, open the file


***_test_post.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)


-

Choose the Program and Tool property page, then select the
Program property page.

If necessary, highlight the Operation Start Sequence.

Select the Custom Command property page; then if


necessary highlight the PB_CMD_linearize_motion Custom
Command.

Select the Create button.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-9

User Defined Events (UDEs)

The PB_CMD_linearize_motion_1 component is created.

You will now rename this block component to


PB_CMD_coordinate_offset.
-

With MB1, Select the block component which you just


created (PB_CMD_linearize_motion_1), to the right of
PB_CMD_.

Select anywhere to the right of this area with MB1


-

Type in the name coordinate_offset. After entering the name


coordinate_offset, select the Enter key from the keyboard.
coordinate_offset

The block component is renamed to


PB_CMD_coordinate_offset and is highlighted.

9-10

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)


-

Add the following text to the Custom Command:

}
}

#
# custom command to output a G54 thru G59 coordinate
# offset
#
uplevel #0 {
proc MOM_csys_load { } {
global mom_csys_register
MOM_output_literal G$mom_csys_register"

#
# custom command to output a G54 thru G59 coordinate
# offset
#
uplevel #0 {
proc MOM_csys_load { } {
global mom_csys_register
MOM_output_literal "G$mom_csys_register"
}
}

Step 7 Add this newly created custom command to the Program


Start Sequence in your postprocessor.
-

Select the Program property page and highlight the Program


Start Sequence in the component window.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-11

User Defined Events (UDEs)


-

Select the PB_CMD_coordinate_offset, from the Add Block


Component Available option menu, drag and drop the
command before the G40G17G90G70 block displayed.

Drag and drop the


PB_CMD_coordinate_offset
Component block

PB_CMD_coordinate_offset
PB_CMD_coordinate_offset
PB_CMD_coordinate_offset
PB_CMD_coordinate_offset
PB_CMD_coordinate_offset

PB_CMD_coordinate_offset
PB_CMD_coordinate_offset
PB_CMD_coordinate_offset
PB_CMD_coordinate_offset

You have insert the PB_CMD_coordinate_offset custom


command in the proper location of your post. You will now
verify this custom command by running the post against your
test part and then verifying the results.
-

Save the postprocessor.

Step 8 Use the newly created User Defined Event.

9-12

If necessary, open the test part file, pbt_mill_test.prt.

Change the Operation Navigator view to the Geometry view.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)


-

Highlight the MCS_MILL Group object, using MB3, select


OBJECT  Start Post.
The User Defined Events dialog is displayed.

Select Coordinate Offset from the Available list items, then


choose the Add button.
The Coordinate Offset dialog is displayed.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-13

User Defined Events (UDEs)


-

Activate the Event, by selecting Active from the Offset pull


down list and then select 59 from the Coordinate System
pull down list.

Choose OK from the Coordinate Offset dialog.

Double click on the Coolant On command from the User


Defined Events dialog.

Notice the default has changed to Mist from Flood (this was
changed in Step 3).

9-14

Choose Cancel from the Coolant On dialog.

Choose OK from the User Defined Events dialog.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)


-

Highlight and post the FACE_MILLING operation, using the


postproccessor created in Step 1.

Verify the output (check for the G59 code).

.........
..........
...........

This ends the activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-15

User Defined Events (UDEs)

Activity 9-2: Modify the Coolant UDE for ThruSpindle


In this activity, you will modify the existing coolant UDE in the ude.cdl file to
allow coolant thru the spindle. You will then use this modified UDE with the
previously created Mcode group, created in Lesson 2, to enable thru the
spindle coolant.
Step 1 Modify the existing coolant UDE to allow coolant thru the
spindle.
-

Using a text editor, open the ude.cdl file located in the


\resource\user_def_event directory.

Locate the coolant Event (similar to the following):

EVENT coolant
{
POST_EVENT "coolant_on"
UI_LABEL "Coolant On"
CATEGORY MILL DRILL LATHE
PARAM command_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive","User Defined"
UI_LABEL "Status"
}
PARAM coolant_mode
{
TYPE o
DEFVAL "Flood"
OPTIONS "On","Flood","Mist","Tap"
UI_LABEL "Type"
}
PARAM coolant_text
{
TYPE s
TOGGLE Off
UI_LABEL "Text"
}
}

9-16

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)


-

Add a Thru" option to the coolant_mode variable.

PARAM coolant_mode
{
TYPE o
DEFVAL "Flood"
OPTIONS "On","Flood","Mist","Tap","Thru"
UI_LABEL "Type"
}
-

Save the ude.cdl file.

Step 2 Modify the postprocessor to recognize the UDE


coolantthru.
-

If necessary, in Post Builder, open the ***_my_post


postprocessor.

Choose the Program and Tool path property page.

Choose the Program property page.

Highlight the Motion sequence.

Select the Rapid Move box.


The Event Rapid Move dialog is displayed. You will now
insert a block just after the Rapid Move event to load the
coolant M code. The new block will output with the Z" axis
rapid move.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-17

User Defined Events (UDEs)


-

Next to the Add Word button, from the pull down menu
choose More  M_coolant  M08 Coolant Code
(FLOOD/MIST/ON...) as the item to add.

Drag the Add Word button down and release it just below
the last motion block.

Choose OK.

9-18

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)

Step 3 Create a Custom Command, coolant_thru_checker which


will add the coolant thru the spindle option.
You will now create a custom command for coolant thru the
spindle.
-

If necessary select the Custom Command property page.

Select PB_CMD_linearize_motion from the Component


Window.

Select the Create button.


The PB_CMD_linearize_motion_1 component is created.

You will now rename this block component.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-19

User Defined Events (UDEs)


-

With MB1, Select the block component which you just


created, to the right of PB_CMD_.

Select anywhere to the right of this area with MB1


-

Type in the name coolant_thru_checker.


coolant_thru_checker

After entering the name coolant_thru_checker, select the


Enter key from the keyboard.
The block component is renamed to
PB_CMD_coolant_thru_checker and is highlighted.

Add the following text to the Custom Command:


uplevel #0 {
set mom_sys_coolant_code (THRU) 13"
}

You have just created the custom command for coolant thru
the spindle.
Step 4 Add the newly created custom command,
PB_CMD_coolant_thru_checker to the Program event.

9-20

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)


-

Choose the Program tab and then Motion under the


Program and Tool Path event.

Click on the Linear Move block.

The Event: Linear Move dialog is displayed.


-

Choose Command and then Coolant_thru_checker from the


pull down menu.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-21

User Defined Events (UDEs)


-

Drag and drop the PB_CMD_coolant_thru_checker to the


M08 word.

Choose OK from the Event: Linear Move dialog.

Save the postprocessor.

Test the postprocessor against a current operation.


When testing, be sure to test against all possible conditions
(i.e. coolant UDE not active, coolant UDE active but not set
to coolant thru, and so on). Verify that the coolant is turned
off at the end of the operation.

In summary:

9-22

the programmer choose coolantthru the spindle by


turning on the UDE which you just modified.

the Custom Command, just prior to the Linear Move


event determines whether or not the coolantthru UDE is
active. If it is active, then the Custom Command executes
the coolant_thru_on" block.

the coolant_thru_on" block outputs the M_coolant_thru


word which is set to a value of 13".

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

User Defined Events (UDEs)

You could have also designed a Custom Command that


would obtain the actual coolant value from the UDE or
allow the programmer to specify which coolant code was
desired. It would also be possible to determine from the type
of tool, if coolant thru capability was allowed, and if it were
to automatically insert the proper code.
This concludes the activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

9-23

User Defined Events (UDEs)

SUMMARY

User Defined Events provide a mechanism of


allowing Machine Control Events to be defined
by the user. Machine Control Events
(considered to be UDEs) are used to convey
information concerning the physical state of the
machine tool, such as spindle speed, coolant
status, etc., to the postprocessor. User Defined
Events are:
D

Used to describe the format of all APT style


postprocessor commands.

Specified at the start or end of path or can


be attached to any CAM object.

Defined in the ude.cdl file that is referenced


by the configuration file.

9-24

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Virtual NC Controller

Virtual NC Controller

Lesson 10

PURPOSE

OBJECTIVES

In this lesson, you will learn how to create a Virtual


NC Controller, used by the Integrated Simulation and
Verification module for tool path simulation.

Upon completion of this lesson, you will be able to:


D

Create a Virtual NC Controller.

This lesson contains the following activities:


Activity

Page

10-1 Using Post Builder to Create a VNC . . . . . . . . . . . 10-5

10

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

10-1

Virtual NC Controller

Integrated Simulation and Verification Overview


The Integrated Simulation and Verification module (IS&V) allows the
simulation of a machine tool with an actual piece part. The simulation process
animates the exact machine tool motions, taking into account controller
functions and cutting tool configurations.
IS&V features collision checking, allowing collision detection between machine
components, fixtures, tools, parts and the inprocess work piece. You may also
view machine controller functions such as macros, subroutine calls, cycles and
function M, G and H commands.
IS&V improves the quality of machining processes by allowing the comparison
of the designed part to the part which is being manufactured. Reduction in cost
can be obtained by the elimination of expensive and time consuming dry runs;
reduced manual operator intervention; and the reduced risk of expensive
damage to machine tools, fixtures and parts by elimination of collisions.
IS&V consists of the following components:
D

Visualize

Simulation

Advanced Simulation

Machine Tool Builder

Machine Tool Driver

Setup Configurator

10

10-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Virtual NC Controller

Machine Tool Driver


D

generates motion control program and emulates the CNC


controller

accurate path based on machine tool configuration

handles specific machine tool features including macros,


cycles and subroutines

can be customized using Tcl scripting language

text and graphics feedback initiated by Events

10

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

10-3

Virtual NC Controller

The Machine Tool Driver (MTD), also referred to as the Virtual NC controller,
creates the CNC program that emulates the CNC controller. This is a
programmable interface that instructs the machine tool model on actual
movements and how those movements are displayed. Any motion and feedback
displayed during machine tool simulation is controlled by the dedicated MTD.
For comparison purposes, the MTD is analogous to the machine tool simulator
as the CNC controller is analogous to the machine tool that it controls. For
each machine tool in the machine tool library, there is a MTD driver available
(eleven generic MTD's come standard with NX 2). For creating an MTD for a
new machine tool, you can modify a generic driver to work with that machine or
use the Post Builder to generate the Virtual NC controller (MTD and Virtual
NC controller refer to the same object). MTD's are written in the Tcl scripting
language but may also be developed in higher level languages such as C++.
MTD's can emulate special cycles, User Defined Events (UDE's), macros and
other CNC controller dependent functions that the Manufacturing application
does not support.

10

10-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Virtual NC Controller

Activity 10-1: Using Post Builder to create a VNC


In this activity you will use the Post Builder to create a Virtual NC controller
used with the Integrated Simulation and Verification module.
Step 1 Start the Post Builder.
-

On the desktop menu bar, choose Start  Programs 


Unigraphics  Post Tools  Post Builder.

Select the New option in the File pull down menu and in the
Name field, name the postprocessor ***_vnc_post, where
*** stands for your initials.

***_vnc_post

Step 2 Create a generic 3axis milling post processor.


For Post Output Unit you will accept the default of inches.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

10-5

10

Virtual NC Controller

For Machine Tool you will accept the default of Mill.


You will accept the default for 3axis.
For Controller you will accept the default of generic.
-

Select OK.

Step 3 Set the Virtual CNC Controller option.


-

Select the Output Settings tab, then choose the Other


Options tab.

You may designate that the current post is a standalone or


master of a linked post or specify it as a subordinate post of a
linked post.
-

10

Save your postprocessor.


Files created for the Virtual NC controller will have a VNC_
prefix and a .tcl extension. As you can see, it is very easy to
create the Virtual NC controller by just turning on the
option.

10-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Virtual NC Controller

SUMMARY

The Integrated Simulation and Verification


module (IS&V) allows you to simulate a
machine tool with an actual piece part, giving
you an overview of the entire machining
process. The simulation process animates the
exact machine tool motions, taking into account
controller functions and cutting tool
configurations.
In this lesson you:
D

Reviewed the components that comprise the


Integrated Simulation and Verification
module.

Used the Post Builder to generate a Virtual


NC controller used in machine tool
simulation.

10

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

10-7

Virtual NC Controller

(This Page Intentionally Left Blank)

10

10-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

A Guide to Best Practices of Building a Postprocessor

A Guide to Best Practices of Building a Postprocessor


Lesson 11

Overview
As you gain experience with the various Post components, you will find yourself
experimenting with numerous methods and techniques as you go through the
post development cycle. Eventually, you will settle on methods that you have
become familiar and comfortable with.
The following suggestions and procedures will aid you in the creation of
postprocessors.
D

Use the following flow chart as a tool to decide if a postprocessor can


be created through Post Builder, by creating and modifying Event
Handlers and Definition files or a combination of both.

For functionality not included


in the Post Builder

Wire EDM

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

11-1

11

A Guide to Best Practices of Building a Postprocessor

11

11-2

When adding multiple custom commands, add and test each custom
command individually. This will make the process of debugging easier
and less confusing when you encounter Tcl syntax or Post errors.

Use the Review Tool always when debugging a postprocessor. Although


the Review Tool increases the time required for processing, it is an
invaluable aid in the debugging process. The Review Tool may also be
used to review MOM Events, MOM variables per Event, find missing
procedures and find MOM variable names.

Always make a copy of the main CAM mach directory for testing and
debugging purposes. The idea behind this concept is that you can
experiment with various ideas and techniques without the worry of
corrupting any system files that would normally be used by UG/Post or
the Post Builder.

If using the Post Builder to create a post and you find that you may
need to edit the Event Handler or Definition file, make sure that you
perform all edits and modifications that you can do within the Post
Builder. Once you manually" edit the files, which Post Builder
creates, the link between those files and Post Builder are lost. This
prevents you from using the Post Builder on that particular post again.

Use ugpost_base.tcl to define common G & M codes, common


addresses, frequently called procedures and common routines.

UDE defined variables can be retrieved in MOM_start_of_program or


MOM_start_of_path by use of Tcl command, upload.

Manufacturing attributes cannot be retrieved in


MOM_start_of_program.

Expression variables can be retrieved at any time.

Additional Tcl or Tk programs can be sourced and run from within the
machine tool Tcl file.

To remove a file in MOM use MOM_remove_file <filename>.

Post Builder is independent of the core release of Unigraphics. You


can take the latest version of the Post Builder and install it
independently of the release.

If you are using the MILL_ORIENT functionality of Coordinate


System Purpose (Local and Main coordinate system), the custom
command, pb_cmd_coordinate_system_rotation must be incorporated
into your postprocessor.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS

MOM VARIABLES, EVENTS, COMMANDS

Appendix A

MOM Events always have the prefix MOM capitalized. Variables and
commands have the prefix mom in lower case.

Mom Variable

Class

Description

mom_auxfun

Post Commands

The value entered in AUXFUN Any number greater


UDE.
than or equal to zero.

Integer

mom_auxfun_text

Post Commands

The appended text entered in the Any string 66 charac


AUXFUN UDE.
ters or less.

String

mom_auxfun_text_defined

Post Commands

Flag defining if AUXFUN ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_axis_position

Post Commands

The axis value for set_axis UDE.

String

mom_axis_position_value

Post Commands

The position for the SET/ZAXIS,n or SET/WAXIS,n in the


set_axis UDE.

Numeric Value

mom_axis_position_value_defined Post Commands

Flag defining if the set_axis posi 0 (no text), 1 (text de


tion has been defined.
fined)

Integer

mom_clamp_axis

Post Commands

The axis option selected from XAXIS, YAXIS, ZAXIS,


CLAMP UDE. The AUTO option AAXIS, BAXIS, CAXIS,
will initiate auto-clamping in AUTO
Postbuilder created four axis
posts.

String

mom_clamp_status

Post Commands

Clamping status of the selected ON, OFF, AXISON, AX


axis.
ISOFF

String

mom_clamp_text

Post Commands

The appended text entered in the Any string 66 charac


COOLANT UDE.
ters or less.

String

mom_clamp_text_defined

Post Commands

Flag defining if COOLNT ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_coolant_mode

Post Commands

Defines the type of coolant de ON, FLOOD, MIST, TAP


sired.

String

mom_coolant_text

Post Commands

The appended text entered in the Any string 66 charac


COOLNT UDE.
ters or less.

String

mom_coolant_text_defined

Post Commands

Flag defining if COOLNT ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_coordinate_output_mode

Post Commands

For mill turn only. Defines the sta ON or OFF


tus of the UDE SET/POLAR. ON
means that the output will be in
polar coordinates. OFF means
the output will be in normal Car
tesian coordinates.

String

mom_cut_wire_text

Post Commands

The appended text entered in the Any string 66 charac


CUT/WIRE UDE.
ters or less.

String

mom_cut_wire_text_defined

Post Commands

Flag defining if CUT/WIRE ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_cutcom_adjust_register

Post Commands

The value of the cutcom adjust Any number greater


register in CUTCOM UDE.
than or equal to zero.

Integer

EEDS
All Rights Reserved

Possible Values

ZAXIS or WAXIS

Data
Type

Post Building Techniques


Student Guide

Default

ZAXIS

ON

A-1

MOM VARIABLES, EVENTS, COMMANDS


mom_cutcom_adjust_register_de
fined

Post Commands

Flag defining if the cutcom adjust 0 (no ), 1 (yes)


register has been specified in
CUTCOM UDE.

Integer

mom_cutcom_angle

Post Commands

Angle specified for Engage/Retract cutcom method in the


machine control dialog in the operation.

Numeric
Value

10

mom_cutcom_distance

Post Commands

Cutcom distance specified for Any number greater


Engage/Retract cutcom method than or equal to zero.
in the machine control dialog in
the operation.

Numeric
Value

0.1

mom_cutcom_mode

Post Commands

Defines the cutcom direction in LEFT, RIGHT, ON


the CUTCOM UDE.

String

ON

mom_cutcom_plane

Post Commands

Defines the cutcom plane in the NONE, XYPLAN, YZ


CUTCOM UDE.
PLAN, ZXPLAN

String

NONE

mom_cutcom_plane_output_flag

Post Commands

Flag defining if the cutcom plane 0 (no text), 1 (text de


has been specified in CUTCOM fined)
UDE.

Integer

mom_cutcom_register

Post Commands

The cutcom register defined in Any number greater


the machine control dialog in the than or equal to zero.
operation. May be overridden by
the cutcom register on the tool.

Integer

mom_cutcom_register_out
put_flag

Post Commands

Flag defining if the cutcom regis 0 (no text), 1 (text de


ter has been specified in ma fined)
chine control dialog in the opera
tion..

Integer

mom_cutcom_text

Post Commands

The appended text entered in Any string 66 charac


CUTCOM UDE.
ters or less.

String

mom_cutcom_text_defined

Post Commands

Flag defining if CUTCOM ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_cutcom_type

Post Commands

The type of cutter compensation 1 Retract/Engage, 2


requested in the machine control Wall.
dialog.

Integer

mom_def_sequence_frequency

Post Commands

The initial value of the frequency Any number greater


parameter for the SEQUENCE than zero.
command in the definition file.

Integer

mom_def_sequence_increment

Post Commands

The initial value of the increment Any number greater


parameter for the SEQUENCE than zero.
command in the definition file.

Integer

10

mom_def_sequence_maximum

Post Commands

The initial value of the maximum Any number greater


sequence number parameter for than zero.
the SEQUENCE command in the
definition file.

Integer

mom_def_sequence_start

Post Commands

The initial value of the start se Any number greater


quence number for the SE than zero.
QUENCE command in the defini
tion file.

Integer

10

mom_delay_mode

Post Commands

Defines the mom variable that will SECONDS or


be used for the delay UDE. Sec OLUTIONS
onds will use mom_delay_value,
revolutions
will
use
the
mom_delay_revs

REV

Integer

mom_delay_revs

Post Commands

The delay value in revolutions for Any number greater


revolutions mode in the DELAY than zero.
UDE..

Integer

mom_delay_text

Post Commands

The appended text entered in Any string 66 charac


DELAY UDE.
ters or less.

String

mom_delay_text_defined

Post Commands

Flag defining if DELAY ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

A-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_delay_value

Post Commands

The delay value in seconds for Any number greater


seconds mode in the DELAY than zero.
UDE.

Numeric Value

mom_flush_guides

Post Commands

For Wire EDM only, setting of the NONE, UPPER, LOW


FLUSH guide parameter.
ER, ALL

String

mom_flush_pressure

Post Commands

For Wire EDM only, setting of the NONE, LOW, MEDIUM, String
FLUSH pressure parameter.
HIGH, REGISTER

mom_flush_register

Post Commands

For Wire EDM only, setting of the Any number greater


FLUSH register parameter.
than or equal to zero.

Integer

mom_flush_tank

Post Commands

For Wire EDM only, setting of the IN, OUT


FLUSH/TANK parameter.

String

mom_flush_tank_text

Post Commands

The appended text entered in Any string 66 charac


FLUSH/TANK UDE.
ters or less.

String

mom_flush_tank_text_defined

Post Commands

Flag defining if FLUSH/TANK ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_head_name

Post Commands

This value is used to switch be Any string 66 charac


tween posts for linked posts.
ters or less.

String

mom_head_name_defined

Post Commands

Flag defining if HEAD has been 0 (no ), 1 (yes)


programmed.

Integer

mom_head_text

Post Commands

The appended text entered in Any string 66 charac


SELECT/HEAD UDE.
ters or less.

String

mom_head_text_defined

Post Commands

Flag defining if SELECT/HEAD 0 (no text), 1 (text de


appended text has been entered fined)

Integer

mom_head_type

Post Commands

Value of the head for the SE FRONT,REAR,RIGHT,L


LECT/HEAD UDE.
EFT,SIDE,SADDLE

String

mom_load_tool_number_defined

Post Commands

Flag defining if the tool number 0 (no text), 1 (text de


has been specified in the LOAD fined)
or TURRET UDE.

Integer

mom_lock_axis

Post Commands

The axis to be locked for the SET/ XAXIS, YAXIS, ZAXIS,


LOCK UDE. The post will convert AAXIS, BAXIS, CAXIS,
the FOURTH and FIFTH parame FOURTH, FIFTH
ters into the applicable rotary
axis (A,B or C).

String

mom_lock_axis_plane

Post Commands

The plane to be locked for the XYPLAN,


YZPLAN,
SET/LOCK UDE. You must enter ZXPLAN, NONE.
a valid plane for five axis ma
chines. You do not need to enter
an axis for four axis machines.

String

mom_lock_axis_value

Post Commands

The position or angle to lock the axis or plane.

Numeric
Value

mom_lock_axis_value_defined

Post Commands

Flag defining if the lock axis value 0 (no ), 1 (yes)


has been entered

Integer

mom_modes_text

Post Commands

The appended text entered in the Any string 66 charac


SET/MODE UDE.
ters or less.

String

mom_modes_text_defined

Post Commands

Flag defining if SET/MODE ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_number_of_ranges

Post Commands

You can use this variable do de 0-9


fine the maximum number of
ranges for the custom com
mands
PB_CMD_spindle_sfm_range_s
elect
or
PB_CMD_spindle_rpm_range_s
elect.

Integer

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

0.0.

A-3

MOM VARIABLES, EVENTS, COMMANDS


mom_operator_message

Post Commands

The text of the operator mes Any string 66 charac


sage. The post will add a control ters or less.
out string to the beginning and a
control out string to the end. You
can specify these in Post Builder.

String

mom_operator_message_defined

Post Commands

Flag defining if the operator mes 0 (no ), 1 (yes)


sage text has been entered

Integer

mom_opskip_text

Post Commands

The appended text entered in the Any string 66 charac


OPSKIP UDE.
ters or less.

String

mom_opskip_text_defined

Post Commands

Flag defining if OPSKIP ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_opstop_text

Post Commands

The appended text entered in the Any string 66 charac


OPSTOP UDE.
ters or less.

String

mom_opstop_text_defined

Post Commands

Flag defining if OPSTOP ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_origin

Post Commands

For four and five axis posts, defines the distance from the
origin of the MCS to center of the rotary table. For other
posts, an offset from the MCS origin to the machine tool
coordinate center.

Numeric
Array(3)

mom_origin_text

Post Commands

The appended text entered in the Any string 66 charac


ORIGIN UDE.
ters or less.

String

mom_origin_text_defined

Post Commands

Flag defining if ORIGIN ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_parallel_to_axis

Post Commands

The value of the SET/MODE UDE ZAXIS, WAXIS or VAX


to control how parallel axes will IS.
be output in the post.

String

mom_power_text

Post Commands

The appended text entered in the Any string 66 charac


POWER UDE.
ters or less.

String

mom_power_text_defined

Post Commands

Flag defining if POWER ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_power_value

Post Commands

For Wire EDM only, the power Any number greater


setting for wire EDM operations. than or equal to zero.

Numeric Value

mom_pprint

Post Commands

The text of the PPRINT UDE. The Any string 66 charac


post will replace the first '(' with a ters or less.
control out string to the begin
ning and the next ')' with a control
out string. You can specify the
control out and control in strings
in Post Builder.

String

mom_pprint_defined

Post Commands

Flag defining if the PPRINT UDE 0 (no ), 1 (yes)


text has been entered

Integer

mom_prefun

Post Commands

The value of the PREFUN UDE.

Integer

mom_prefun_text

Post Commands

The appended text entered in the Any string 66 charac


PREFUN UDE.
ters or less.

String

mom_prefun_text_defined

Post Commands

Flag defining if PREFUN ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_rotate_axis_type

Post Commands

Defines the axis to be rotated for TABLE, HEAD, AAXIS,


ROTATE UDE.
BAXIS, CAXIS

String

mom_rotation_angle

Post Commands

Defines the angle to rotate to for the ROTATE UDE. The val Numeric Value
ue may be incremental, absolute or to a modulo 360 angle.

mom_rotation_angle_defined

Post Commands

Flag defining if the ROTATE 0 (no ), 1 (yes)


angle has been entered.

A-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Any number greater


than or equal to zero.

(0,0,0).

Integer

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS

mom_rotation_direction

Post Commands

Defines the direction to rotate the CLW, CCLW, NONE


table for the ROTATE UDE.

String

mom_rotation_mode

Post Commands

Defines how the mom_rota NONE, ABSOLUTE, IN


tion_angle will be applied.
CREMENTAL, ANGLE.

String

mom_rotation_reference_mode

Post Commands

Defines the status of ROTREF. ON or OFF


Currently not used.

String

mom_rotation_text

Post Commands

The appended text entered in the Any string 66 charac


ROTATE UDE.
ters or less.

String

mom_rotation_text_defined

Post Commands

Flag defining if ROTATE ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_seqnum

Post Commands

The current sequence number.

Any number greater


than zero.

Integer

mom_sequence_frequency

Post Commands

The value of the frequency pa Any number greater


rameter for the SEQNO UDE.
than zero.

Integer

mom_sequence_increment

Post Commands

The value of the increment pa Any number greater


rameter for the SEQNO UDE.
than zero.

Integer

10

mom_sequence_mode

Post Commands

Defines how the sequence num ON, OFF, N, AUTO.


ber will be output. ON will rein
state the output of the sequence
number. OFF will suppress se
quence numbers. N will turn on
sequence numbers starting with
N. AUTO is currently not used.

String

OFF

mom_sequence_number

Post Commands

The value for the next sequence Any number greater


number for the SEQNO UDE.
than zero.

Integer

10

mom_sequence_text

Post Commands

The appended text entered in the Any string 66 charac


SEQNO UDE.
ters or less.

String

mom_sequence_text_defined

Post Commands

Flag defining if SEQNO ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_spindle_direction

Post Commands

Defines the direction of the CLW, CCLW or NONE


spindle. With the preference up
date post from tool turned on,
this value comes from the tool.
Otherwise the direction comes
from the SPINDL UDE.

String

mom_spindle_maximum_rpm

Post Commands

Defines the maximum spindle Any number greater


rpm allowed in an operation. than zero.
This value can only be output
with the SPINDL UDE. It is not
available on the feeds and
speeds dialog.

Numeric Value

mom_spindle_maximum_rpm_de
fined

Post Commands

Flag defining if the SPINDL 0 (no ), 1 (yes)


MAXRPM parameter has been
entered

Integer

mom_spindle_mode

Post Commands

Defines the output mode of the RPM or SFM


spindle. With the preference up
date post from tool turned on,
this value comes from the tool.
Otherwise the direction comes
from the SPINDL UDE.

String

mom_spindle_range

Post Commands

Defines a spindle range. This 1 through 9


value can be output with the
SPINDL UDE. You can use a cus
tom command in Post Builder to
automatically derive the spindle
range from the rpm.

String

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-5

MOM VARIABLES, EVENTS, COMMANDS


mom_spindle_range_defined

Post Commands

Flag defining if the SPINDL 0 (no ), 1 (yes)


RANGE parameter has been en
tered

Integer

mom_spindle_rpm

Post Commands

Defines the rpm of the spindle Any number greater


when in RPM mode. In SFM than or equal to zero.
mode represents the equivalent
rpm at the first cut radius.

Numeric Value

mom_spindle_speed

Post Commands

The value of either SFM or RPM. Any number greater


than or equal to zero.

Numeric Value

mom_spindle_speed_defined

Post Commands

Flag defining if the SPINDL 0 (no ), 1 (yes)


speed parameter has been en
tered

Integer

mom_spindle_text

Post Commands

The appended text entered in the Any string 66 charac


SPINDL UDE.
ters or less.

String

mom_spindle_text_defined

Post Commands

Flag defining if SPINDL ap 0 (no text), 1 (text de


pended text has been entered
fined)

Integer

mom_stop_text

Post Commands

The appended text entered in the Any string 66 charac


STOP UDE.
ters or less.

String

mom_stop_text_defined

Post Commands

Flag defining if STOP appended 0 (no text), 1 (text de


text has been entered
fined)

Integer

mom_tool_adj_reg_defined

Post Commands

Flag defining if the adjust register 0 (no ), 1 (yes)


parameter has been entered in
the tool dialog.

Integer

mom_tool_adjust_register

Post Commands

Value of the tool length adjust Any number greater


register. Used only if update post than or equal to zero.
from tool preference is set to on.

Integer

mom_tool_change_type

Post Commands

Defines the type of tool change. AUTO or MANUAL.


If type is AUTO, then the auto tool
change event marker will be exe
cuted. If type is MANUAL, then
the manual tool change event
marker will be executed.

String

mom_tool_number

Post Commands

Defines the tool to be loaded. Any number greater


With the preference update post than or equal to zero.
from tool turned on, this value
comes from the tool. Otherwise
the direction comes from the
LOAD or TURRET UDE.

Numeric Value

mom_tool_use

Post Commands

Defines an array that contains Any number greater


the tool number and machine than or equal to zero.
time for each tool. Where 'tn' rep
resent the tool number and
'mtime' represents the machin
ing
time
in
mom_tool_use(tn,mtime)

Numeric Array (n,t)

mom_work_coordinate_number

Post Commands

Value output by the ZERO/N 0-6


UDE. This value can be added to
53 to generate the Fanuc coordi
nate system codes.

Integer

mom_cycle_cam

Cycle

Value of the cam parameter in Any number greater


canned cycles. Can be used to than or equal to zero.
output the cam code in a canned
cycle.

Integer

mom_cycle_clearance_plane

Cycle

Same as mom_cycle_rapid_to

Numeric Value

mom_cycle_clearance_pos

Cycle

Same as mom_cycle_rapid_to_pos

Numeric Array(3)

mom_cycle_counter_sink_dia

Cycle

Represents the diameter of the countersunk hole. Only Numeric Value


used during countersinking canned cycles to calculate the
mom_cycle_rapid_to.

A-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_cycle_delay

Cycle

The value in seconds of the dwell Any number greater


parameter on cycles that have a than or equal to zero.
DWELL minor word pro
grammed.

Numeric
Value

mom_cycle_delay_mode

Cycle

Mode of dwell in a canned cycle. REVS or SECONDS.

String

mom_cycle_delay_revs

Cycle

The value in revolutions of the Any number greater


dwell parameter on cycles that than zero.
have a DWELL minor word pro
grammed.

Numeric
Value

mom_cycle_feed_rate

Cycle

The current cycle feed rate mode Any number greater


in IPM or MMPM mode.
than or equal to zero.

Numeric Value

mom_cycle_feed_rate_mode

Cycle

The current output mode of the IPM, IPR,


canned cycle.
MMPR

String

mom_cycle_feed_rate_per_rev

Cycle

The current cycle feed rate mode Any number greater


in IPR or MMPR mode.
than or equal to zero.

mom_cycle_feed_to

Cycle

The feed to depth value of the canned cycle. This value is Numeric Value
measured from the top of hole along the cycle spindle axis
to the bottom of the hole.

mom_cycle_feed_to_pos

Cycle

This is the bottom of the hole position. It is a 3D point. When Numeric Array(3)
the
cycle
spindle
axis
is
(0,0,1),
mom_cycle_feed_to_pos(2) represents the bottom of hole.

mom_cycle_hole_dia

Cycle

Represents the entrance diameter of the canned cycle.


Only used during countersinking canned cycles to calcu
late the mom_cycle_rapid_to..

Numeric Value

mom_cycle_option

Cycle

Parameter that can be assigned Any string 66 charac


to any canned cycle. Currently ters or less.
not used by Postbuilder.

String

mom_cycle_orient

Cycle

Value that is used by the no drag cycle only. Represents


the orientation angle for repositioning the boring tool prior
to retraction.

Numeric Value

mom_cycle_rapid_to

Cycle

The rapid clearance value of the canned cycle. This value


is measured from the top of hole along the cycle spindle
axis to the rapid clearance point above the hole.

Numeric Value

mom_cycle_rapid_to_pos

Cycle

This is the rapid clearance position of the canned cycle. It is Numeric Array(3)
a 3D point. When the cycle spindle axis is (0,0,1),
mom_cycle_rapid_to_pos(2) represents the rapid clear
ance position.

mom_cycle_retract_mode

Cycle

Determines how the retraction AUTO or MANUAL.


will take place on the machine
with a Fanuc controller. If the op
tion is set up in the post to output
G98/G99, then AUTO will output
a G98 and MANUAL will output a
G99.

mom_cycle_retract_to

Cycle

The retract point of the canned cycle. This value is mea Numeric Value
sured from the top of hole along the cycle spindle axis to the
retract point above the hole.

mom_cycle_retract_to_pos

Cycle

This is the retraction clearance position of the canned Numeric Array(3)


cycle. It is a 3D point. When the cycle spindle axis is (0,0,1),
mom_cycle_retract_to_pos(2) represents the final clear
ance position.

mom_cycle_spindle_axis

Cycle

Value used by the post to deter XY plane is 2, ZX plane


mine how work plane changes is 1, YZ plane is 0.
will take place.

Integer

mom_cycle_step1

Cycle

Value that can be used for deep and break chip canned
cycles. This is first of three possible step values. It is up to
users discretion on how to use this parameter.

Numeric
Value

EEDS
All Rights Reserved

MMPM,

0.0.

0.0.

Numeric Value

String

Post Building Techniques


Student Guide

MANUAL.

A-7

MOM VARIABLES, EVENTS, COMMANDS


mom_cycle_step2

Cycle

Value that can be used for deep and break chip canned Numeric
cycles. This is second of three possible step values. It is up Value
to users discretion on how to use this parameter.

mom_cycle_step3

Cycle

Value that can be used for deep and break chip canned Numeric
cycles. This is third of three possible step values. It is up to Value
users discretion on how to use this parameter.

mom_cycle_text

Cycle

This is appended text that can be Any string 66 charac


added to any cycle. You will have ters or less.
to parse this text if you want to do
anything with it.

String

mom_cycle_text_defined

Cycle

Flag defining if CYCLE text has 0 (no text), 1 (text de


been entered
fined)

Integer

mom_cycle_tool_angle

Cycle

Represents the tool angle of the 0-360


drilling tool of the canned cycle.
Only used during countersinking
canned cycles to calculate the
mom_cycle_rapid_to.

Numeric Value

mom_sys_cycle_bore_back_code

Cycle

Defines the G code for cycle bore Any number greater


back.
than or equal to zero.

Numeric
Value

87

mom_sys_cycle_bore_code

Cycle

Defines the G code for cycle Any number greater


bore.
than or equal to zero.

Numeric
Value

85

mom_sys_cycle_bore_drag_code

Cycle

Defines the G code for cycle bore Any number greater


drag.
than or equal to zero.

Numeric
Value

86

mom_sys_cycle_bore_dwell_code Cycle

Defines the G code for cycle bore Any number greater


dwell.
than or equal to zero.

Numeric
Value

89

mom_sys_cycle_bore_manu
al_code

Cycle

Defines the G code for cycle bore Any number greater


manual.
than or equal to zero.

Numeric
Value

88

mom_sys_cycle_bore_manu
al_dwell_code

Cycle

Defines the G code for cycle bore Any number greater


manual dwell.
than or equal to zero.

Numeric
Value

89

mom_sys_cycle_bore_no_drag_c
ode

Cycle

Defines the G code for cycle bore Any number greater


nodrag.
than or equal to zero.

Numeric
Value

76

mom_sys_cycle_drill_break
chip_code

Cycle

Defines the G code for cycle drill Any number greater


break chip.
than or equal to zero.

Numeric
Value

73

mom_sys_cycle_drill_code

Cycle

Defines the G code for cycle drill. Any number greater


than or equal to zero.

Numeric
Value

81

mom_sys_cycle_drill_deep_code

Cycle

Defines the G code for cycle drill Any number greater


deep.
than or equal to zero.

Numeric
Value

83

mom_sys_cycle_drill_dwell_code

Cycle

Defines the G code for cycle drill Any number greater


dwell.
than or equal to zero.

Numeric
Value

82

mom_sys_cycle_feed_mode

Cycle

Defines the feed rate output IPM, MMPM, IPR or


mode that will be used for MMPR
canned cycles. It can be either
IPM/MMPM or IPR/MMPR. This
value is set in the feed rate dia
logs in Postbuilder.

String

IPM/
MMPM

mom_sys_cycle_off

Cycle

Defines the G code for cycle off.

Any number greater


than or equal to zero.

Numeric
Value

80

mom_sys_sim_cycle_bore

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_bore_back

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_bore_drag

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_bore_dwell

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

A-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_sim_cycle_bore_manu
al

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_bore_manu
al_dwell

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_bore_no
drag

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_drill

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_drill_break_c Cycle
hip

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_drill_deep

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_drill_dwell

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_sys_sim_cycle_tap

Cycle

Defines whether the cycle has Standard is 0, Custom


been customized.
ized is 1.

Numeric
Value

mom_feed_approach_unit

Feed Rate

Defines the mode for the mom ipm, mmpm, ipr, mmpr
variable
mom_feed_ap
proach_value.

String

mom_feed_approach_value

Feed Rate

The feedrate for approach Any number greater


moves. This value will be in the than or equal to zero.
current part units. It will also be
either in per minute or per revolu
tion mode depending on the vari
able mom_feed_approach_unit.

Numeric Value

mom_feed_cut_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable
mom_cut_ap
proach_value.

String

mom_feed_cut_value

Feed Rate

The feedrate for cut moves. This Any number greater


value will be in the current part than or equal to zero.
units. It will also be either in per
minute or per revolution mode
depending on the variable
mom_feed_cut_unit.

Numeric Value

mom_feed_departure_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable
mom_feed_ap
proach_value.

String

mom_feed_departure_value

Feed Rate

The feedrate for departure Any number greater


moves. This value will be in the than or equal to zero.
current part units. It will also be
either in per minute or per revolu
tion mode depending on the vari
able mom_feed_departure_unit.

Numeric Value

mom_feed_engage_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable
mom_feed_en
gage_value.

String

mom_feed_engage_value

Feed Rate

The feedrate for engage moves. Any number greater


This value will be in the current than or equal to zero.
part units. It will also be either in
per minute or per revolution
mode depending on the variable
mom_feed_engage_unit.

Numeric Value

mom_feed_first_cut_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable
mom_feed_first_cut_value.

String

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-9

MOM VARIABLES, EVENTS, COMMANDS


mom_feed_first_cut_value

Feed Rate

The feedrate for first cut moves. Any number greater


This value will be in the current than or equal to zero.
part units. It will also be either in
per minute or per revolution
mode depending on the variable
mom_feed_first_cut_unit.

Numeric Value

mom_feed_per_tooth

Feed Rate

Used for converted SFM (or Any number greater


SMM) data into RPM data in the than or equal to zero.
feeds and speeds dialog.

Numeric Value

mom_feed_rapid_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable mom_feed_rapid_val
ue.

String

mom_feed_rapid_value

Feed Rate

The feedrate for rapid moves. Any number greater


This value will be in the current than or equal to zero.
part units. It will also be either in
per minute or per revolution
mode depending on the variable
mom_feed_rapid_unit.

Numeric Value

mom_feed_rate

Feed Rate

The current feed rate. Will always Any number greater


be the IPM or MMPM equivalent. than or equal to zero.
Will be the rapid traverse feed
rate for rapid moves.

Numeric Value

mom_feed_rate_dpm

Feed Rate

For four and five axis mills, the Any number greater
rate at which the rotary axis are than or equal to zero.
moving for a rotary axis feed rate
move or a combined linear and
rotary feed rate move.

Numeric Value

mom_feed_rate_mode

Feed Rate

The programmed feed rate Any number greater


mode. This will be the output than or equal to zero.
mode is SET/MODE,OFF is in ef
fect. For cycles, this will be the
output mode if cycle output
mode is AUTO.

String

mom_feed_rate_number

Feed Rate

Inverse time feed rate. Calcu Any number greater


lated as Feed Rate / Distance.
than or equal to zero.

Numeric Value

mom_feed_rate_output_mode

Feed Rate

Current feed rate output mode. If IPM, MMPM,


SET/MODE,OFF is in effect, then MMPR, INVERS.
the output mode is the mode
specified by the input mode.

String

mom_feed_rate_per_rev

Feed Rate

For Lathes, the programmed or Any number greater


calculated IPR or MMPR feed than or equal to zero.
rate.

Numeric Value

mom_feed_retract_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable mom_feed_retract_val
ue.

String

mom_feed_retract_value

Feed Rate

The feedrate for retract moves. Any number greater


This value will be in the current than or equal to zero.
part units. It will also be either in
per minute or per revolution
mode depending on the variable
mom_feed_retract_unit.

Numeric Value

mom_feed_return_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable mom_feed_return_val
ue.

String

A-10

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

IPR,

Feed Rate
mode
from the
GOTO
feed rate.

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_feed_return_value

Feed Rate

The feedrate for return moves. Any number greater


This value will be in the current than or equal to zero.
part units. It will also be either in
per minute or per revolution
mode depending on the variable
mom_feed_return_unit.

Numeric Value

mom_feed_set_mode

Feed Rate

The feed rate mode specified by IPM, MMPM,


the SET/MODE command.
MMPR, INVERS.

String

mom_feed_stepover_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable
mom_feed_step
over_value.

String

mom_feed_stepover_value

Feed Rate

The feedrate for stepover moves. Any number greater


This value will be in the current than or equal to zero.
part units. It will also be either in
per minute or per revolution
mode depending on the variable
mom_feed_stepover_unit.

Numeric Value

mom_feed_traversal_unit

Feed Rate

Defines the mode for the mom ipm,mmpm,ipr,mmpr


variable
mom_feed_travers
al_value.

String

mom_feed_traversal_value

Feed Rate

The feedrate for traversal moves. Any number greater


This value will be in the current than or equal to zero.
part units. It will also be either in
per minute or per revolution
mode depending on the variable
mom_feed_traversal_unit.

Numeric Value

mom_kin_max_dpm

Feed Rate

For four and five axis posts only. Any number greater
Defines the maximum degrees than zero.
per minute that the rotary table
can move. The feedrate will be
reduced to insure that the maxi
mum DPM will not be exceeded.

Numeric
Value

10

mom_kin_max_frn

Feed Rate

Defines the maximum feed rate Any number greater


number (FRN) that can be output than zero.
when in inverse time output
mode. FRN is calculated as Pro
grammed Feedrate / Distance.

Numeric
Value

99999.99
9.

mom_kin_max_ipm

Feed Rate

Defines the maximum feed rate Any number greater


that can be output. Note that this than zero.
maximum may be different than
the maximum that is assigned to
the F address. A violation of this
maximum will output a warning
to the warning file. This variable
is also used to define th

Numeric
Value

.1 for inch
posts and
1.0
for
metric
posts.

mom_kin_max_ipr

Feed Rate

Defines the maximum IPR or Any number greater


MMPM feedrate that can be out than zero.
put. Note that this maximum may
be different than the maximum
assigned to the F address. A
violation of this maximum will out
put a warning to the warning file.
Although the IPR or MMPR value
may b

Numeric
Value

.0001 for
inch post
and .01 for
metric
posts.

mom_kin_min_arc_radius

Feed Rate

Defines smallest arc radius that Any number greater


can be programmed. Any arc than zero.
with a radius smaller than the
minimum will output as linear go
tos.

Numeric
Value

.0001 for
inch posts
and .001
for metric
posts.

EEDS
All Rights Reserved

IPR,

Post Building Techniques


Student Guide

OFF

A-11

MOM VARIABLES, EVENTS, COMMANDS


mom_kin_min_dpm

Feed Rate

For four and five axis posts only. Any number greater
Defines the minimum degrees than or equal to zero.
per minute that the rotary table
can move.

Numeric
Value

mom_kin_min_frn

Feed Rate

Defines the minimum feed rate Any number greater


number (FRN) that can be output than or equal to zero.
when in inverse time output
mode. FRN is calculated as Pro
grammed Feedrate / Distance.

Numeric
Value

.001.

mom_kin_min_ipm

Feed Rate

Defines the minimum feed rate Any number greater


that can be output. Note that this than or equal to zero.
minimum may be different than
the minimum that is assigned to
the F address. A violation of this
maximum will output a warning
to the warning file.

Numeric
Value

.1 for inch
posts and
1.0
for
metric
posts.

mom_kin_min_ipr

Feed Rate

Defines the minimum IPR or Any number greater


MMPM feedrate that can be out than or equal to zero.
put. Note that this minimum may
be different than the minimum
assigned to the F address. A
violation of this minimum will out
put a warning to the warning file.
Although the IPR or MMPR value
may b

Numeric
Value

.0001 for
inch post
and .01 for
metric
posts.

mom_programmed_feed_rate

Feed Rate

Value of the programmed feed Any number greater


rate. It may be per minute or per than or equal to zero.
revolution.

Numeric Value

mom_sys_con
tour_feed_mode(LINEAR)

Feed Rate

This mom variable allows the IPM/MMPM or FRN


user to define the feed rate out
put mode (IPM/MMPM, FRN) for
linear motion. This variable is set
within the feed rate dialog in
Postbuilder.

String
Array

IPM/
MMPM

mom_sys_con
tour_feed_mode(LIN
EAR_ROTARY)

Feed Rate

For four and five axis posts only. IPM/MMPM, FRN or


This mom variable allows the DPM
user to define the feed rate out
put mode (IPM/MMPM, FRN or
DPM) for combined rotary and
linear motion. This variable is set
within the feed rate dialog in
Postbuilder.

String
Array

IPM/
MMPM

mom_sys_con
tour_feed_mode(ROTARY)

Feed Rate

For four and five axis posts only. IPM/MMPM, FRN or


This mom variable allows the DPM
user to define the feed rate out
put mode (IPM/MMPM, FRN or
DPM) for rotary motion. This vari
able is set within the feed rate dia
log in Postbuilder.

String
Array

IPM/
MMPM

mom_sys_feed_param(FRN,for
mat)

Feed Rate

Defines the format in the defini Any format defined in


tion file that will be used when in the definition file of the
FRN feed rate mode. The format post.
can be edited in the Feed Rate
dialog of Postbuilder.

Numeric
Value

Feed_FR
N

mom_sys_feed_param(IPM,for
mat)

Feed Rate

Defines the format in the defini Any format defined in


tion file that will be used when in the definition file of the
IPM feed rate mode. The format post.
can be edited in the Feed Rate
dialog of Postbuilder.

Numeric
Value

Feed_IPM

A-12

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_feed_param(IPR,for
mat)

Feed Rate

Defines the format in the defini Any format defined in


tion file that will be used when in the definition file of the
IPR feed rate mode. The format post.
can be edited in the Feed Rate
dialog of Postbuilder.

Numeric
Value

Feed_IPR

mom_sys_feed_param(MMPM,for
mat)

Feed Rate

Defines the format in the defini Any format defined in


tion file that will be used when in the definition file of the
MMPM feed rate mode. The for post.
mat can be edited in the Feed
Rate dialog of Postbuilder.

Numeric
Value

Feed_MM
PM

mom_sys_feed_param(MMPM,for
mat)

Feed Rate

Defines the format in the defini Any format defined in


tion file that will be used when in the definition file of the
MMPM feed rate mode. The for post.
mat can be edited in the Feed
Rate dialog of Postbuilder.

Numeric
Value

Feed_MM
PM

mom_sys_feed_rate_mode_code(
FRN)

Feed Rate

Defines the feed rate mode G code that will be used when in Numeric
FRN feed rate mode. This code may be edited on the G Value
code dialog in Postbuilder.

93

mom_sys_feed_rate_mode_code(I Feed Rate


PM)

Defines the feed rate mode G code that will be used when in Numeric
IPM feed rate mode. This code may be edited on the G Value
code dialog in Postbuilder.

94

mom_sys_feed_rate_mode_code(I Feed Rate


PR)

Defines the feed rate mode G code that will be used when in Numeric
IPR feed rate mode. This code may be edited on the G Value
code dialog in Postbuilder.

95

mom_sys_feed_rate_mode_code(
MMPM)

Feed Rate

Defines the feed rate mode G code that will be used when in Numeric
MMPM feed rate mode. This code may be edited on the G Value
code dialog in Postbuilder.

94

mom_sys_feed_rate_mode_code(
MMPR)

Feed Rate

Defines the feed rate mode G code that will be used when in Numeric
MMPR feed rate mode. This code may be edited on the G Value
code dialog in Postbuilder.

95

mom_sys_frn_factor

Feed Rate

Defines a factor that may be applied to every FRN number


calculated by the UG Post. It is located in the custom com
mand PB_CMD_FEEDRATE_NUMBER.

Numeric
Value

mom_sys_rapid_feed_mode(LIN
EAR)

Feed Rate

This mom variable allows the IPM/MMPM or FRN


user to define the feed rate out
put mode (IPM/MMPM, FRN) for
rapid motion. This variable is set
within the feed rate dialog in
Postbuilder.

String
Array

IPM/
MMPM

mom_sys_rapid_feed_mode(LIN
EAR_ROTARY)

Feed Rate

For four and five axis posts only. IPM/MMPM, FRN or


This mom variable allows the DPM
user to define the feed rate out
put mode (IPM/MMPM, FRN or
DPM) for combined rapid rotary
and linear motion. This variable is
set within the feed rate dialog in
Postbuilder.

String
Array

IPM/
MMPM

mom_sys_rap
id_feed_mode(ROTARY)

Feed Rate

For four and five axis posts only. IPM/MMPM, FRN or


This mom variable allows the DPM
user to define the feed rate out
put mode (IPM/MMPM, FRN or
DPM) for rapid rotary motion.
This variable is set within the feed
rate dialog in Postbuilder.

String
Array

IPM/
MMPM

mom_sys_delay_param(REVOLU
TIONS,format)

Feedrate

Defines the format that will be used when the dwell is output String
in revolutions format.

Dwell_RE
VOLU
TIONS

mom_sys_delay_param(SEC
ONDS,format)

Feedrate

Defines the format that will be used when the dwell is output String
in seconds format.

Dwell_SE
CONDS

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-13

MOM VARIABLES, EVENTS, COMMANDS


mom_cutting_time

General

The portion of machine time that Any number greater


is cutting.
than or equal to zero.

Numeric Value

mom_date

General

The current date. For example: String that represents


Mon Jul 22 11:35:00 2002.
the date and time.

String

mom_definition_file_name

General

Full path name of the definition file being used to postpro


cess.

String

mom_event_handler_file_name

General

Full path name of the event handler file being used to post
process.

String

mom_event_number

General

Event number used by the re Any number greater


view tool. Used only by the re than zero.
view tool.

Integer

mom_event_time

General

Machine time for the current Any number greater


event.
than zero.

Numeric Value

mom_field_count

General

The number of fields in a User Any number greater


Defined UDE
than zero.

Integer

mom_group_name

General

The name of the current group or program name.

String

mom_load_event_handler

General

Used to define the name a new event handler file. This file
will overwrite the current event handler file. Any duplicate
variable or procedure names will be overwritten. The
change will take affect after control is return to UG Post.

String

mom_logname

General

Your user ID that you used to log onto the system.

String

mom_machine_mode

General

Defines the basic motion output MILL, TURN or WIRE.


type. If MILL, the output will be
x,y,z,i,j,k. The x,y,z represents
the output in the Cartesian coor
dinate system. If TURN, the out
put is x,0,z. The x represents the
diameter coordinate and the z
represents the centerl

String

mom_machine_name

General

The name of the machine in the definition file.

String

mom_machine_time

General

The total machine time. Includes Any number greater


cutting, non-cutting and other than or equal to zero.
additional times such as tool
change time.

Numeric Value

mom_msys_matrix

General

Three by three matrix generated Real numbers


by UG for output to the CLSF for
display purposes only. Can be
used to locate the current MCS
with respect to the Absolute
Coordinate System.

Numeric Array(9)

mom_msys_origin

General

The origin of the MSYS. Defines Real numbers


the relationship between the cur
rent MCS (machine coordinate
system) and the ACS (absolute
coordinate system).

Numeric Array(3)

mom_o_buffer

General

The block of text that will be the next block output in the
event MOM_before_output. This text string may be edited
before output.

String

mom_operation_name

General

The name of the current operation.

String

mom_operation_type

General

Name of the current type of machining or an index specific


to the current operation.

String

mom_output_file_basename

General

Name of the NC output file without extension or directory


path. For example: test .

String

mom_output_file_directory

General

Name of the directory path to NC output file. For example:


c:\tape_files\.

String

A-14

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_output_file_full_name

General

Full name of the NC output file.


c:\tape_files\test.ptp

For example:

String

mom_output_file_suffix

General

The name of the extension used for the NC output file. For
example: ptp.

String

.ptp

mom_output_mode

General

Defines how the coordinates will ABSOLUTE and IN


output, absolute or incremental. CREMENTAL

String

ABSO
LUTE. .

mom_output_unit

General

Defines the units that will be in the IN or MM


NC output file. This value can be
either inch or metric, but must
agree with formats and coordi
nate units in your post. This val
ue may be different than the part
units.

String

mom_parent_group_name

General

The name of the parent group or operation. Will be the


same as mom_group_name if there is only a single pro
gram.

String

mom_part_name

General

Full directory pathname of the current part.

mom_part_unit

General

Defines the units of the part file. IN or MM


May be different than the output
units of the post.

mom_record_fields

General

A string array containing the text fields of the User Defined String Array
text UDE. The first field the major word. The following fields
are the minor words and scalars.

mom_record_text

General

A string containing the entire text of a User Defined UDE.


The mom variable mom_record_fields contains the parsed
strings for each field.

mom_sys_commentary_output

General

Not Used

mom_sys_current_cutting_time

General

Used by the custom command pb_cmd_auto_re


tract_time.tcl.

Numeric Value.

mom_sys_ptp_output

General

Defines whether a NC tape file ON or OFF


will be created while postproces
sing.

String

ON

mom_system_tolerance

General

Tolerance used for computations Any number greater


involving equalities in Tcl.
than zero.

Numeri
cal Value

mom_tool_head

Post Commands

Defines the name of the current FRONT,REAR,RIGHT,L


head used by a two turret lathe. EFT,SIDE,SADDLE

String

mom_translate

Post Commands

The values from the TRANS UDE command.

Numeric
Array(3)

mom_ug_version

General

Current version of UG. For example: Unigraphics NX


1.0.0.21

String

mom_up
date_post_cmds_from_tool

General

Defines if the system will use the 0 or 1


tool and spindle information (tool
number, xoff, yoff, zoff, rpm, di
rection) from the SPINDLE and
LOAD or TURRET post com
mands (=0) or use the informa
tion from the tool in the operation
(=1).

Integer

mom_user_defined_text

General

Defines the text after the '/' when handling a MOM_text


event.

String

mom_warning_info

General

The text used to generate warnings to the warning file. To


output an error message, assign the text required for an er
ror message to mom_warning_info and call
MOM_catch_warning.

String

mom_kin_4th_axis_ang_offset

Kinematics

Defines an angular value that is added to fourth axis rotary


angle. This is used when a tool axis of (0,0,1) does not re
sult in a position of zero position.

Numeric
Value

EEDS
All Rights Reserved

String

String

Post Building Techniques


Student Guide

(0,0,0)

0.0.

A-15

MOM VARIABLES, EVENTS, COMMANDS


mom_kin_4th_axis_center_offset

Kinematics

For four and five axis milling machines. Defines the dis
tance from the center of the rotary table to machine tool
zero position.

Numeric
Array(3)

mom_kin_4th_axis_direction

Kinematics

Defines how the fourth axis rotary


positions will be output. The
mom
variable
mom_out_angle_pos(0) will con
tain the rotary value. For exam
ple move table or head from 90 to
45 degrees. MAGNITUDE_DE
TERMINES_DIRECTION would
output: Shortest 45, CLW 405,

String

mom_kin_4th_axis_incr_switch

Kinematics

Determines whether the fourth ON (incremental) or


axis rotary coordinates will be in OFF (absolute)
cremental or absolute. This val
ue is toggled ON or OFF in the
machine tool dialog in Postbuild
er.

String

mom_kin_4th_axis_leader

Kinematics

The leader for the fourth axis. This is typically A, B or C.

String

mom_kin_4th_axis_limit_action

Kinematics

Defines the action that takes Warning or Retract /


place when there is a rotary axis Reengage
violation for the fourth axis. The
options are to output a warning
or to retract to a clearance plane,
rotate the axis, and re-engage
to the part.

String

Warning

mom_kin_4th_axis_max_limit

Kinematics

The maximum rotary position of the fourth axis.

Numeric
Value

999.999

mom_kin_4th_axis_min_incr

Kinematics

Defines the resolution of your Any number greater


table or head. Enter one if your than zero.
table or head positions to one de
gree increments. For full con
touring axis, enter .001.

Numeric
Value

0.001

mom_kin_4th_axis_min_limit

Kinematics

The minimum rotary position of the fourth axis.

Numeric
Value

-999.999

mom_kin_4th_axis_plane

Kinematics

Defines the plane of rotation of XY, ZX, YZ


the rotary axis.

String

mom_kin_4th_axis_rotation

Kinematics

Defines the direction of rotation STANDARD, REVERSE


of the rotary axis. Occasionally
tables are installed incorrectly.
The setting allows you to com
pensate for tables that rotate in a
non-standard manner. In the
XY plane, looking down the Z
axis from positive to negative.

String

mom_kin_4th_axis_type

Kinematics

Defines how the rotary axis ro Head or Table


tates. If Head, then tool itself tilts
about a pivot point. If Table, then
the part rotates.

String

mom_kin_4th_axis_zero

Kinematics

Defines an offset that will be added the rotary position. This Numeric
offset is used when a (0,0,1) tool axis results in angle other Value
than zero.

mom_kin_5th_axis_ang_offset

Kinematics

Defines an angular value that is added to fifth axis rotary


angle. This is used when a tool axis of (0,0,1) does not re
sult in a position of zero position.

0.0.

mom_kin_5th_axis_center_offset

Kinematics

Defines the distance from the center or rotation of the fourth Numeric
axis to the center of rotation of the fifth axis. If the axis vector Array(3)
of the fourth axis passes through the center of the fifth axis,
then this distance is zero.

A-16

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

MAGNITUDE_DETER
MINES_DIRECTION,
SIGN_DETER
MINES_DIRECTION

Numeric
Value

(0,0,0)

OFF

(0,0,0)

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


Kinematics

Defines how the fifth axis rotary


positions will be output. The
mom
variable
mom_out_angle_pos(1) will con
tain the C208rotary value. For ex
ample move table or head from
90 to 45 degrees.
MAGNI
TUDE_DETERMINES_DI
RECTION would output: Short
est 45, CLW 40

mom_kin_5th_axis_incr_switch

Kinematics

Determines whether the fifth axis ON (incremental) or


rotary coordinates will be incre OFF (absolute)
mental or absolute. This value is
toggled ON or OFF in the ma
chine tool dialog in Postbuilder.

String

mom_kin_5th_axis_leader

Kinematics

The leader for the fourth axis. This is typically A, B or C.

String

mom_kin_5th_axis_limit_action

Kinematics

Defines the action that takes Warning or Retract /


place when there is a rotary axis Reengage
violation for the fifth axis. The op
tions are to output a warning or to
retract to a clearance plane, ro
tate the axis, and re-engage to
the part.

String

Warning

mom_kin_5th_axis_max_limit

Kinematics

The minimum rotary position of Any number greater


the fifth axis.
than zero.

Numeric
Value

-999.999

mom_kin_5th_axis_min_incr

Kinematics

Defines the resolution of your Any number greater


table or head. Enter one if your than zero.
table or head positions to one de
gree increments. For full con
touring axis, enter .001.

Numeric
Value

0.001

mom_kin_5th_axis_min_limit

Kinematics

The maximum rotary position of the fifth axis.

Numeric
Value

999.999

mom_kin_5th_axis_plane

Kinematics

Defines the plane of rotation of XY, ZX, YZ


the rotary axis.

String

mom_kin_5th_axis_rotation

Kinematics

Defines the direction of rotation STANDARD, REVERSE


of the rotary axis. Occasionally
tables are installed incorrectly.
The setting allows you to com
pensate for tables that rotate in a
non-standard manner. In the
XY plane, looking down the Z
axis from positive to negative.

String

mom_kin_5th_axis_type

Kinematics

Defines how the rotary axis ro Head or Table


tates. If Head, then tool itself tilts
about a pivot point. If Table, then
the part rotates.

String

mom_kin_5th_axis_zero

Kinematics

Defines an offset that will be added the rotary position. This Numeric
offset is used when a (0,0,1) tool axis results in angle other Value
than zero.

mom_kin_arc_output_mode

Kinematics

Defines how circles will be output FULL_CIRCLE, QUAD


by the post. Only circles gener RANT, LINEAR
ated in the operation can be out
put as circles. LINEAR will output
linear moves based on the toler
ances defined on the arc in the
operation. QUADRANT will out
put circles only on quadrant

FULL_CIR
CLE

EEDS
All Rights Reserved

MAGNITUDE_DETER
MINES_DIRECTION,
SIGN_DETER
MINES_DIRECTION

mom_kin_5th_axis_direction

String

String

Post Building Techniques


Student Guide

OFF

A-17

MOM VARIABLES, EVENTS, COMMANDS


mom_kin_arc_valid_planes

Kinematics

Defines the planes that arcs will XYZ, XY, YZ, ZX, ANY
be output. XYZ means XY, YZ or
ZX. Lathe posts can only output
in the XZ plane. ANY is not cur
rently available from UG.

String

mom_kin_caxis_rotary_pos

Kinematics

Used for mill turns to establish a 0-360


base C axis position.

Numeric
Value

mom_kin_clamp_time

Kinematics

Defines the time to be used in Any number greater


time calculations for clamping than or equal to zero.
operations.

Numeric
Value

2
sec
onds.

mom_kin_dependent_head

Kinematics

For lathe only. Defines the name FRONT, REAR, RIGHT,


of the dependent head. This LEFT, SIDE, SADDLE,
name is specified on the TUR NONE
RET UDE or the machine dialog
in the operation. When the de
pendent head is specified in the
operation the distance from the
dependent head to the indepen
dent head

String

NONE

mom_kin_holder1_offset_x

Kinematics

Defines the X value of the offset for the right angle head de
fined by HOLDER,1

Numeric
Value

mom_kin_holder1_offset_y

Kinematics

Defines the Y value of the offset for the right angle head de
fined by HOLDER,1

Numeric
Value

mom_kin_holder1_offset_z

Kinematics

Defines the Z value of the offset for the right angle head de
fined by HOLDER,1

Numeric
Value

mom_kin_holder1_orientation

Kinematics

Defines the orientation of the POSX, POSY, POSZ,


right angle head. The right angle NEGX, NEGY, NEGZ
head may be defined along any
of the principal axes. Up to six
holders may be defined. Use the
mom variables mom_kin_hold
er1_offset_x,
mom_kin_hold
er1_offset_y
and
mom_kin_holder1_offset_z

String

mom_kin_holder2_offset_x

Kinematics

Defines the X value of the offset for the right angle head de
fined by HOLDER,2

Numeric
Value

mom_kin_holder2_offset_y

Kinematics

Defines the Y value of the offset for the right angle head de
fined by HOLDER,2

Numeric
Value

mom_kin_holder2_offset_z

Kinematics

Defines the Z value of the offset for the right angle head de
fined by HOLDER,2

Numeric
Value

mom_kin_holder2_orientation

Kinematics

Defines the orientation of the POSX, POSY, POSZ,


right angle head. The right angle NEGX, NEGY, NEGZ
head may be defined along any
of the principal axes. Up to six
holders may be defined. Use the
mom variables mom_kin_hold
er1_offset_x,
mom_kin_hold
er1_offset_y
and
mom_kin_holder1_offset_z

String

mom_kin_holder3_offset_x

Kinematics

Defines the X value of the offset for the right angle head de
fined by HOLDER,3

Numeric
Value

mom_kin_holder3_offset_y

Kinematics

Defines the Y value of the offset for the right angle head de
fined by HOLDER,3

Numeric
Value

mom_kin_holder3_offset_z

Kinematics

Defines the Z value of the offset for the right angle head de
fined by HOLDER,3

Numeric
Value

A-18

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS

mom_kin_holder3_orientation

Kinematics

Defines the orientation of the POSX, POSY, POSZ,


right angle head. The right angle NEGX, NEGY, NEGZ
head may be defined along any
of the principal axes. Up to six
holders may be defined. Use the
mom variables mom_kin_hold
er1_offset_x,
mom_kin_hold
er1_offset_y
and
mom_kin_holder1_offset_z

String

mom_kin_holder4_offset_x

Kinematics

Defines the X value of the offset for the right angle head de
fined by HOLDER,4

Numeric
Value

mom_kin_holder4_offset_y

Kinematics

Defines the Y value of the offset for the right angle head de
fined by HOLDER,4

Numeric
Value

mom_kin_holder4_offset_z

Kinematics

Defines the Z value of the offset for the right angle head de
fined by HOLDER,4

Numeric
Value

mom_kin_holder4_orientation

Kinematics

Defines the orientation of the POSX, POSY, POSZ,


right angle head. The right angle NEGX, NEGY, NEGZ
head may be defined along any
of the principal axes. Up to six
holders may be defined. Use the
mom variables mom_kin_hold
er1_offset_x,
mom_kin_hold
er1_offset_y
and
mom_kin_holder1_offset_z

String

mom_kin_holder5_offset_x

Kinematics

Defines the X value of the offset for the right angle head de
fined by HOLDER,5

Numeric
Value

mom_kin_holder5_offset_y

Kinematics

Defines the Y value of the offset for the right angle head de
fined by HOLDER,5

Numeric
Value

mom_kin_holder5_offset_z

Kinematics

Defines the Z value of the offset for the right angle head de
fined by HOLDER,5

Numeric
Value

mom_kin_holder5_orientation

Kinematics

Defines the orientation of the POSX, POSY, POSZ,


right angle head. The right angle NEGX, NEGY, NEGZ
head may be defined along any
of the principal axes. Up to six
holders may be defined. Use the
mom variables mom_kin_hold
er1_offset_x,
mom_kin_hold
er1_offset_y
and
mom_kin_holder1_offset_z

String

mom_kin_holder6_offset_x

Kinematics

Defines the X value of the offset for the right angle head de
fined by HOLDER,6

Numeric
Value

mom_kin_holder6_offset_y

Kinematics

Defines the Y value of the offset for the right angle head de
fined by HOLDER,6

Numeric
Value

mom_kin_holder6_offset_z

Kinematics

Defines the Z value of the offset for the right angle head de
fined by HOLDER,6

Numeric
Value

mom_kin_holder6_orientation

Kinematics

Defines the orientation of the POSX, POSY, POSZ,


right angle head. The right angle NEGX, NEGY, NEGZ
head may be defined along any
of the principal axes. Up to six
holders may be defined. Use the
mom variables mom_kin_hold
er1_offset_x,
mom_kin_hold
er1_offset_y
and
mom_kin_holder1_offset_z

String

mom_kin_ind_to_depen
dent_head_x

Kinematics

For Lathe only, the distance from the independent head to


the dependent head along the X axis.

Numeric
Value

mom_kin_ind_to_depen
dent_head_z

Kinematics

For Lathe only, the distance from the independent head to


the dependent head along the X axis.

Numeric
Value

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-19

MOM VARIABLES, EVENTS, COMMANDS


mom_kin_independent_head

Kinematics

For lathe only. Defines the name FRONT, REAR, RIGHT,


of the independent head. This LEFT, SIDE, SADDLE,
name is specified on the TUR NONE
RET UDE or the machine dialog
in the operation. When the inde
pendent head is specified in the
operation the distance from the
dependent head to the indepen
dent h

mom_kin_linearization_flag

Kinematics

Defines whether linearization will be on by default. This can String


be changed during post runtime with the LINTOL UDE.

mom_kin_linearization_tol

Kinematics

The default linearization toler Any number greater


ance used when LINTOL/ON is than or equal to zero.
specified or linearization is
turned on by default.

Numeric
Value

.001.

mom_kin_machine_resolution

Kinematics

Defines the resolution used for Any number greater


rounding all coordinate data. By than or equal to zero.
default this value is synchronized
with the number of digits, if you
change the number of digits, you
must also change this value.

Numeric
Value

.0001 or
inch posts
and .001
for metric
posts.

mom_kin_machine_type

Kinematics

Defines the basic machine type.


The type of machine determines
how motion and post commands
will be processed and output.

String

3_axis_mil
l

mom_kin_max_arc_radius

Kinematics

Defines largest arc radius that Any number greater


can be programmed. Any arc than zero.
with a radius larger than the max
imum will output as linear gotos.

Numeric
Value

999.9999

mom_kin_max_fpm

Kinematics

Defines the maximum IPM or Any number greater


MMPM allowed.
than zero.

Numeric
Value

600 IPM
and
15000
MMPM for
mills and
400 IPM
and
10000
MMPM for
lathes.

mom_kin_max_fpr

Kinematics

Defines the maximum IPR or Any number greater


MMPR allowed.
than zero.

Numeric
Value

100 IPR
and 100
MMPR.

mom_kin_min_arc_length

Kinematics

Defines the smallest arc that can Any number greater


be output before the post de than zero.
faults to linear interpolation.

Numeric
Value

.0001 for
inch and
.001 for
metric.

mom_kin_min_fpm

Kinematics

Defines the minimum IPM or Any number greater


MMPM that can be output.
than zero.

Numeric
Value

.1 IPM and
.01
MMPM for
mills and
.1 IPM and
1.0
MMPM for
lathes.

A-20

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

3_axis_mill,
3_axis_mill_turn,
4_axis_head,
4_axis_table,
5_axis_dual_table,
5_axis_dual_head,
5_axis_head_table,
2_axis_wedm,
4_axis_wedm,
2_axis_lathe.

String

NONE

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_kin_min_fpr

Kinematics

Defines the minimum IPR or Any number greater


MMPR that can be output.
than zero.

Numeric
Value

mom_kin_nurbs_output_type

Nurbs

Defines output format for nurbs BSPLINE,


HEIDEN
output. BSPLINE is for Fanuc HAIN_POLY,
SIE
controls, HEIDENHAIN_POLY is MENS_POLY
for Heidenhain controls and SIE
MENS_POLY is for Siemens con
trols. These basic output formats
may also work for other control
types.

String

mom_kin_output_unit

Kinematics

Defines the units for all coordi IN or MM


nate and feed rate output. UG
Post will convert the input coordi
nates and feed rates units into
the mom_kin_output_unit if they
are different.

String

mom_kin_pivot_gauge_offset

Kinematics

For four and five axis tilting head machine tools only. De Numeric
fines the distance from the pivot point of the tilting rotary Value
axis to gage point. This value can be negative. This value is
added to the tool length to determine the effective length of
the tool

mom_kin_pivot_guage_offset

Kinematics

Same as mom_kin_pivot_gauge_offset.

mom_kin_pivot_to_gauge_dist

Kinematics

Same as mom_kin_pivot_gauge_offset.

mom_kin_rapid_feed_rate

Kinematics

Defines the rapid traverse for the Any number greater


machine tool. This value is used than or equal to zero.
for time calculations for all rapid
and positioning moves.

Numeric
Value

400 posts
for inch
and
10000 for
metric
posts.

mom_kin_read_ahead_next_mo
tion

Kinematics

Defines whether the post will read ahead for the next mo
tion. If this variable is defined to any value, the read ahead
will take place. The read ahead will also keep track of all
post commands encountered while reading ahead. See
the variables in the c

String

Unset

mom_kin_reengage_distance

Kinematics

Used by the function that auto Any number greater


matically retracts and re-en than or equal to zero.
gages when a rotary limit is vio
lated. Establishes the distance
above the part along the spindle
axis to re-engage.

Numeric
Value

.1.

mom_kin_retract_plane

Kinematics

Used by the function that auto Any number greater


matically retracts and re-en than or equal to zero.
gages when a rotary limit is vio
lated. Establishes either a cylin
drical clearance for four axis or a
spherical clearance for five axis
distance above the part for the
tool to retract.

Numeric
Value

10.0.

mom_kin_rotary_reengage_fee
drate

Kinematics

Used by the function that auto Any number greater


matically retracts and re-en than zero.
gages when a rotary limit is vio
lated. Establishes the feed rate
used to re-engage the part after
the retraction has taken place.

Numeric
Value

10 IPM.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

.01
IPR
and .001
MMPR.

A-21

MOM VARIABLES, EVENTS, COMMANDS


mom_kin_spindle_axis

Kinematics

Defines a vector that establishes Unit vector.


the spindle axis of the machine
tool. For three axis posts it is al
ways (0,0,1). May be set to
(1,0,0) or (-1,0,0) for mill turns.
Otherwise it is set to (0,0,1). Is
used for simulated cycles, rotary
axis re-engage an

Numeric
Array(3)

(0,0,1).

mom_kin_tool_change_time

Kinematics

Defines the time to be added to Any number greater


total machine time for tool than or equal to zero.
changes.

Numeric
Value

12
sec
onds.

mom_kin_tool_tracking_height

Kinematics

For four or five axis milling ma Any number greater


chines only. Defines the height than or equal to zero.
on the tool where distance cal
culations will be made. This is
very useful when swarfing. The
default value is zero, which rep
resents the tool tip.

Numeric Value

mom_kin_track_center_of_ball

Kinematics

Defines whether the post will out TRUE or FALSE.


put the tool tip locations or the
center of the ball. For bull end
tools, center of ball will be the
center of the corner radius along
the center of the tool axis.

String

mom_kin_wire_tilt_output_type

Kinematics

Defines how the post will output ANGLES or COORDI


four axis wire EDM. If ANGLES, NATES
then
mom_pos(3)
and
mom_pos(4) will represent the Q
and R words for the Agie type
machines. If COORDINATES,
then
mom_pos(3)
and
mom_pos(4) will represent the U
and V for the Mitsubishi type.

String

mom_kin_x_axis_limit

Kinematics

Maximum travel for the X axis. Any number greater


Use the custom command than or equal to zero.
pb_cmd_check_travel_limits.tcl
to generate warnings.

Numeric
Value

40 (inch)
and 1000
(metric).

mom_kin_y_axis_limit

Kinematics

Maximum travel for the Y axis. Any number greater


Use the custom command than or equal to zero.
pb_cmd_check_travel_limits.tcl
to generate warnings.

Numeric
Value

40 (inch)
and 1000
(metric).

mom_kin_z_axis_limit

Kinematics

Maximum travel for the Z axis. Any number greater


Use the custom command than or equal to zero.
pb_cmd_check_travel_limits.tcl
to generate warnings.

Numeric
Value

35 (inch)
and 1000
(metric).

mom_alt_pos

Motion

The alternate machine tool coordinates (X,Y,Z,fourth Numeric Array(5)


axis,fifth axis) for the current goto. This value is different
than mom_pos if the kinematics of the machine tool is five
axis. Otherwise, mom_alt_pos will be the same as
mom_pos.

mom_arc_angle

Motion

The total number of degrees for 0-360


the current arc.

Numeric Value

mom_arc_axis

Motion

The circle axis vector.

Numeric Array(3)

mom_arc_center

Motion

The center of the circle.

mom_arc_direction

Motion

The direction of the circle.

mom_arc_intol_fraction

Motion

The percentage of the tolerance 0 to 1.0


that is intol. A value of .5 defines
the intol equal to the outtol.

A-22

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unit vector.

FALSE.

Numeric Array(3)
CLW or CCLW

String
Numeric Value

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_arc_mode

Motion

The value of the SET/MODE UDE LINEAR, CIRCULAR


to control how arcs will be output
in the post.

String

mom_arc_radius

Motion

Radius of the current arc.

Any number greater


than zero.

Numeric Value

mom_arc_tolerance

Motion

Total tolerance that was used to Any number greater


generate the current arc.
than zero.

Numeric Value

mom_arc_tool_diameter

Motion

The diameter of the tool used to Any number greater


drive the arc.
than zero.

Numeric Value

mom_arc_tool_radius

Motion

The radius of the tool used to Any number greater


drive the arc.
than zero.

Numeric Value

mom_current_motion

Motion

Same as mom_motion_event.

mom_from_alt_pos

Motion

The alt_pos coordinate values of the FROM position. See


mom_alt_pos for a general description of alt_pos.

Numeric Array(5)

mom_from_pos

Motion

The mom_pos coordinate values of the FROM position.

Numeric Array(5)

mom_from_ref_pos

Motion

For Lathe only, the FROM position in machine coordinates


that represented without the XOFF and YOFF being ap
plied.

Numeric Array(5)

mom_gohome_alt_pos

Motion

The alt_pos coordinate values of the GOHOME position.


See mom_alt_pos for a general description of alt_pos.

Numeric Array(5)

mom_gohome_pos

Motion

The mom_pos coordinate values of the GOHOME position. Numeric Array(5)

mom_gohome_ref_pos

Motion

Defines the position of the GOHOME in reference point


coordinates.

Numerical Array(3)

mom_helix_pitch

Motion

Defines the pitch of the helix for a helix_move event.

Numeric Value

mom_last_pos

Motion

The previous tool position. Not the same mom_prev_pos. Numeric Array(3)
The retractor position will be used following canned cycles.

mom_last_z_pos

Motion

Equivalent to mom_last_pos(2). The previous Z position.

Numeric Value

mom_lathe_spindle_axis

Motion

Defines the meaning of the input MCSX or MCSZ


coordinates. The standard out
put mode and mode used by
Postbuilder is MCSZ.

String

mom_mcs_goto

Motion

The tool path goto point as it would be output to a CLSF.


The position is output with respect to current MCS pro
grammed in the operation.

Numeric Array(3)

mom_motion_distance

Motion

Distance from the previous point Any number greater


to current point.
than or equal to zero.

Numeric Value

mom_motion_event

Motion

The current motion type. For


each of these motion types, an
event is generated by the sys
tem. For example, if the current
motion type is linear_move, the
event that is generated is
MOM_linear_move.

String

EEDS
All Rights Reserved

initial_move,
rap
id_move, linear_move,
circular_move,
drill_move,
drill_dwell_move,
drill_deep_move,
drill_break_chip_move
,
tap_move
,
bore_move,
bore_dwell_move,
bore_drag_move,
bore_no_drag_move,
bore_manual,
bore_manu
al_dwell_move,
thread_move

Post Building Techniques


Student Guide

MCSZ

A-23

MOM VARIABLES, EVENTS, COMMANDS


mom_motion_type

Motion

Motion type from the operation.

mom_out_angle_pos

Motion

For four and five axis machine tools only. Formatted angles
for the fourth and fifth axes. These values may contain a
negative value or a value greater than 360 or less than 0.
mom_out_angle_pos(0) is the fourth axis and
mom_out_angle_pos(1) is the fifth.

Numeric Array(2)

mom_pos

Motion

The machine tool coordinates of the goto point. For Lathes,


this is the X and Z positions of the tool tip. For four and five
milling machines, mom_pos(3) and mom_pos(4) repre
sent the fourth and fifth axis rotary positions.

Numeric Array(5)

mom_pos_arc_axis

Motion

The circle axis vector in the machine tool coordinate sys


tem.

Numeric Array(3)

mom_pos_arc_center

Motion

The circle center in the machine tool coordinate system.

Numeric Array(3)

mom_pos_arc_plane

Motion

Principal plane of the arc in the XY, ZX, YZ


machine tool coordinate system.
The circle in the MCS may not
have been in a principal, but after
rotation for a four or five axis post,
the resulting circle must be in a
principal plane.

String

mom_prev_alt_pos

Motion

The machine tool coordinates of the previous goto point.


This is the previous version of mom_pos.

Numeric Array(3)

mom_prev_mcs_goto

Motion

The previous goto point in MCS output mode. The pre


vious version of mom_mcs_goto.

Numeric Array(3)

mom_prev_out_angle_pos

Motion

The
previous
values
of
mom_out_angle_pos.
mom_prev_out_angle_pos(0) is the fourth axis and
mom_prev_out_angle_pos(1) is the fifth axis.

Numeric Array(2)

mom_prev_pos

Motion

The previous values of mom_pos.

Numeric Array(5)

mom_prev_ref_pos

Motion

For Lathe only. The previous version of mom_ref_pos.

Numeric Array(3)

mom_prev_rot_ang_4th

Motion

Same as mom_prev_out_angle_pos(0)

Numeric Value

mom_prev_rot_ang_5th

Motion

Same as mom_prev_out_angle_pos(1)

Numeric Value

mom_prev_tool_axis

Motion

The
previous
mom_tool_axis.

Numeric Array(3)

mom_ref_pos

Motion

For Lathe only. The turret reference gotos. These coordi


nates will be output without resetting the machine zero on
every tool change like the tool tip output method requires.
The mom_ref_pos(0) coordinate is the mom_pos(0) plus
mom_tool_x_offset and th

Numeric Array(3)

mom_ref_pos_arc_center

Motion

For Lathe only. The arc center in reference position coordi


nates.

Numeric Array(3)

mom_rotary_delta_4th

Motion

The angular difference between mom_out_angle_pos(0)


and mom_prev_out_angle_pos(0)

Numeric Value

mom_rotary_delta_5th

Motion

The angular difference between mom_out_angle_pos(1)


and mom_prev_out_angle_pos(1)

Numeric Value

A-24

Post Building Techniques


Student Guide

version

EEDS
All Rights Reserved

UNDEFINED, RAPID, String


ENGAGE, CUT, RE
TRACT, FIRST_CUT,
APPROACH,
STEP
OVER, DEPARTURE,
RETURN,
TRA
VERSAL,
SIDECUT,
FROM, GOHOME, GO
HOME_DEFAULT,
CYCLE.

of Unit vector.

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_lathe_x_double

Motion

For lathe only. Defines the factor 1.0 or 2.0


used to produce radius or diam
eter programming. If the value is
2.0, the X and I coordinates will
represent diameter values.

Numeri
cal Value

mom_sys_lathe_x_factor

Motion

For lathe only. Defines the factor 1.0 or -1.0


used to mirror the X axis. A value
of -1.0 will mirror the X and I
words.

Numeri
cal Value

mom_sys_lathe_z_factor

Motion

For lathe only. Defines the factor 1.0 or -1.0


used to mirror the Z axis. A value
of -1.0 will mirror the Z and K
words.

Numeri
cal Value

mom_tool_axis

Motion

For milling machines only. De Unit vector.


fines orientation of the tool with
respect to MCS of the operation.
Is used by the post to calculate
the fourth and fifth axis rotary
positions.

Numeric
Array(3)

(0,0,1).

mom_tool_offset

Motion

The tool offsets defined in the MCS. For Lathes, the XOFF is Numeric
mom_tool_offset(0), the YOFF is mom_tool_offset(1) and Array(3)
mom_tool_offset(2) is always 0.0._ For Milling machines,
the ZOFF is mom_tool_offset(2) and mom_tool_offset(0)
and mom_tool_offset(1) are

(0,0,0)

mom_tool_offset_defined

Motion

Indicates whether the tool offsets undefined is 0, defined


have been defined in the opera is 1
tion.

Integer

mom_tool_x_offset

Motion

For Lathe, the YOFF value from the tool or TURRET UDE.
This may also contain any offset for the distance between
the independent spindle and the dependent. For Milling
machines, this is set to zero. This offset is in the machine
tool coordinate system.

Numeric Value

mom_tool_x_offset_defined

Motion

Indicates
whether
the undefined is 0, defined
mom_tool_x_offset has been is 1
specified in the operation.

Integer

mom_tool_y_offset

Motion

This offset is set to zero for both mills and lathes.

Numeric Value

mom_tool_y_offset_defined

Motion

Currently always set to zero.

Integer

mom_tool_z_offset

Motion

For Lathe, the XOFF value from the tool or TURRET UDE.
This may also contain any offset for the distance between
the independent spindle and the dependent. For Milling
machines, this is the ZOFF value from the tool or LOAD
UDE. This offset is in the ma

Numeric Value

mom_tool_z_offset_defined

Motion

Indicates
whether
the undefined is 0, defined
mom_tool_z_offset has been is 1
specified in the operation.

Integer

mom_nurbs_co_efficient_0

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_co_efficient_1

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_co_efficient_2

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_co_efficient_3

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_co_efficient_4

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_co_efficient_5

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

EEDS
All Rights Reserved

undefined is 0, defined
is 1

Post Building Techniques


Student Guide

A-25

MOM VARIABLES, EVENTS, COMMANDS


mom_nurbs_co_efficient_6

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_co_efficient_7

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_co_efficient_8

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_coefficients

Nurbs

For Siemens and Heidenhain nurbs only. Defines the coef


ficients of the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_knot_count

Nurbs

For Fanuc nurbs only. Defines the number of knot points to Numerical Value
output.

mom_nurbs_knots

Nurbs

For Fanuc nurbs only. Defines an array of knot points to


output.

Numerical Array(num
ber of knots)

mom_nurbs_order

Nurbs

For Fanuc nurbs only. Defines the order of the nurbs. Out
put as Pn.

Numerical Value

mom_nurbs_point_count

Nurbs

For Fanuc, Siemens and Heiden Any number greater


hain nurbs only. Defines the than zero.
number of points..

Integer

mom_nurbs_point_x

Nurbs

For Siemens nurbs only. Defines the point coefficients of


the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_point_y

Nurbs

For Siemens nurbs only. Defines the point coefficients of


the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_point_z

Nurbs

For Siemens nurbs only. Defines the point coefficients of


the polynomial representation of the nurbs.

Numerical Value

mom_nurbs_points

Nurbs

For Fanuc, Siemens and Heidenhain nurbs only. Defines


the representation of the nurbs.

Numerical Value

mom_nurbs_points_x

Nurbs

For Heidenhain nurbs only. Defines the coefficients of the


polynomial representation of the nurbs.

Numerical Value

mom_nurbs_points_y

Nurbs

For Heidenhain nurbs only. Defines the coefficients of the


polynomial representation of the nurbs.

Numerical Value

mom_nurbs_points_z

Nurbs

For Heidenhain nurbs only. Defines the coefficients of the


polynomial representation of the nurbs.

Numerical Value

mom_face_stock

Operation

For lathe operations only. Defines the stock applied to face Numeri
or z axis.
cal Value

mom_finish_stock

Operation

For finishing operations. The amount of stock left after the


finishing operation.

Numeri
cal Value

mom_fixture_offset_value

Operation

The value entered in fixture offset dialog in MCS dialog in


Geometry View.

Integer

mom_from_point

Operation

If mom_from_status = 1, then the values entered in opera


tion avoidance control to define the FROM position.

Numeri
cal
Array(3)

(0,0,0)

mom_from_status

Operation

Defines whether the FROM has 0 not defined, 1 defined


been specified in the operation.

Integer

mom_from_tool_axis

Operation

For mill posts only. If mom_from_tool_axis_status = 1, then


the values represent the tool axis for the from position.

Numeri
cal
Array(3)

mom_from_tool_axis_status

Operation

For mill posts only. Defines 0 not defined, 1 defined


whether the tool axis for the
FROM has been specified in the
operation.

Integer

mom_gohome_axis

Operation

For mill posts only. If mom_gohome_axis_status = 1, then


the values represent the tool axis for the GOHOME posi
tion.

Numeri
cal
Array(3)

A-26

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

(0,0,1)

(0,0,1)

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_gohome_axis_status

Operation

For mill posts only. Defines 0 not defined, 1 defined


whether the tool axis for GO
HOME has been specified in the
operation.

Integer

mom_gohome_point

Operation

If mom_gohome_status = 1, then the values entered in op


eration avoidance control to define the GOHOME position.

Numeri
cal
Array(3)

mom_gohome_status

Operation

Defines whether GOHOME has 0 not defined, 1 defined


been specified in the operation.

Integer

mom_minimum_clearance

Operation

Minimum clearance used in the operation.

Numeric
Value

mom_path_name

Operation

Name of the operation as it appears in operation navigator.

String

mom_radial_stock

Operation

For lathe operations only. Defines the stock applied to x


axis.

Numeri
cal Value

mom_return_point

Operation

If mom_return_status = 1, then the values entered in opera


tion avoidance control to define the RETURN point.

Numeri
cal
Array(3)

(0,0,0)

mom_return_status

Operation

Defines whether the return point 0 not defined, 1 defined


has been specified in the opera
tion.

Integer

mom_spindle_direction_automatic Operation

Defines how the spindle direc 0 or 1


tion for turning operations will be
derived. If the Automatic option
is selected in Feeds dialog for
turning operations, this value will
be 1, otherwise 0.

Integer

mom_start_point

Operation

If mom_start_status = 1, then the values entered in opera


tion avoidance control to define the START point.

Numeri
cal
Array(3)

(0,0,0)

mom_start_status

Operation

Defines whether the start point 0 not defined, 1 defined


has been specified in the opera
tion.

Integer

mom_surface_speed

Operation

The surface speed as entered in the feeds and speeds dia


log in the operation.

Numeric Value

mom_template_subtype

Operation

Name of the template subtype used to create the current


operation.

String

mom_template_type

Operation

Name of template part used to create the current operation. String

mom_part_material_code

Part

Libref of part material used for the current setup.

String

mom_part_material_description

Part

Description of the part material used in the current setup.

String

mom_part_material_hardness

Part

Hardness value for the part material used in the current op


eration.

String

mom_nxt_arc_angle

Read Ahead

The total number of degrees for 0-360


the arc if the next motion is an
arc.

Numeric Value

mom_nxt_arc_axis

Read Ahead

The circle axis vector for the arc if Unit vector.


the next motion is an arc.

Numeric Array(3)

mom_nxt_arc_center

Read Ahead

The center of the circle if the next motion is an arc.

Numeric Array(3)

mom_nxt_arc_direction

Read Ahead

The direction of the circle if the CLW or CCLW


next motion is an arc.

String

mom_nxt_arc_tolerance

Read Ahead

Total tolerance that was used to generate the next arc.

Numeric Value

mom_nxt_arc_tool_diameter

Read Ahead

The diameter of the tool used to drive the arc if the next mo
tion is an arc..

Numeric Value

mom_nxt_arc_tool_radius

Read Ahead

The radius of the tool used to drive the arc if the next motion Numeric Value
is an arc.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

(0,0,0)

0.1

A-27

MOM VARIABLES, EVENTS, COMMANDS


mom_nxt_event

Read Ahead

An array containing the names of the machine events that


occurred between the current motion and the next motion.

String Array

mom_nxt_event_count

Read Ahead

The count of events in the array Any number greater


mom_nxt_event.
than zero.

Integer

mom_nxt_feed_rate_mode

Read Ahead

Defines the feed rate input mode IPM, MMPM,


for the next goto.
MMPR

IPR,

Numeric Value

mom_nxt_feed_rate_output_mode Read Ahead

Defines the feed rate output IPM, MMPM,


mode for the next goto.
MMPR

IPR,

Numeric Value

mom_nxt_feed_rate_per_rev

Read Ahead

Defines the feed rate if the input Any number greater


mode was IPR or MMPR.
than zero.

Numeric Value

mom_nxt_intol_arc_fraction

Read Ahead

Percentage of tolerance that is in 0-1


tol used to generate the next arc.

Numeric Value

mom_nxt_invert_arc_center

Read Ahead

Same as mom_nxt_arc_center.

mom_nxt_mcs_coord_mode

Read Ahead

Defines the next mcs goto as ei GOTO or GODLTA


ther an absolute move or a delta
move.

String

mom_nxt_mcs_go_delta

Read Ahead

The value of the mcs goto in delta coordinates.

Numeric Array(3)

mom_nxt_mcs_goto

Read Ahead

The value of the next mcs goto in absolute goto coordi


nates.

Numeric Array(3)

mom_nxt_motion_event

Read Ahead

The next motion event.

String

mom_nxt_motion_type

Read Ahead

Motion type from the operation UNDEFINED, RAPID, String


for next motion.
ENGAGE, CUT, RE
TRACT, FIRST_CUT,
APPROACH,
STEP
OVER, DEPARTURE,
RETURN,
TRA
VERSAL,
SIDECUT,
FROM, GOHOME, GO
HOME_DEFAULT,
CYCLE.

mom_nxt_pos_arc_axis

Read Ahead

If the next motion is an arc, the arc center axis for the next
circle.

Numeric Array(3)

mom_nxt_pos_arc_center

Read Ahead

If the next motion is an arc, the circle center of the next


circle.

Numeric Array(3)

mom_nxt_ref_pos_arc_center

Read Ahead

For lathe only. If the next motion is an arc, the circle center
in reference point coordinates.

Numeric Array(3)

mom_nxt_tool_axis

Read Ahead

The tool axis of the next goto.

Numeric Array(3)

mom_spindle_orient_code

Spindle

For use in pb_cmd_simulated_cycles.tcl. Defines the ori Integer


ent M code for cycle bore nodrag at the bottom of the hole.

19

mom_sys_spindle_axis

Spindle

For milling machines only. De Unit vector.


fines the spindle axis for work
plane changes. Currently only
applies to simulated cycles.

(0,0,1)

A-28

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

initial_move,
rap
id_move, linear_move,
circular_move,
drill_move,
drill_dwell_move,
drill_deep_move,
drill_break_chip_move
,
tap_move
,
bore_move,
bore_dwell_move,
bore_drag_move,
bore_no_drag_move,
bore_manual,
bore_manu
al_dwell_move,
thread_move

Unit vector.

Numeric
Array(3)

GOTO

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_spindle_can
cel_sfm_code

Spindle

For lathes only. Defines a code that can be used to override Numeric
SFM for a single block.
Value

93

mom_sys_spindle_direc
tion_code(CCLW)

Spindle

Defines the M code that turns the spindle on in a clockwise Numeric


direction.
Value

mom_sys_spindle_direc
tion_code(CLW)

Spindle

Defines the M code that turns the spindle on in a counter


clockwise direction.

Numeric
Value

mom_sys_spindle_direc
tion_code(OFF)

Spindle

Defines the M code that turns the spindle off.

Numeric
Value

mom_sys_spindle_max_rpm_cod
e

Spindle

Defines the G code that is used to establish the maximum


rpm allowed. Usually output with an S code.

Numeric
Value

92

mom_sys_spindle_mode_code(R
PM)

Spindle

Defines the G code that establishes spindle rpm output


mode.

Numeric
Value

97

mom_sys_spindle_mode_code(S
FM)

Spindle

Defines the G code that establishes constant surface


speed spindle mode.

Numeric
Value

96

mom_sys_spindle_param(1,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 1. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(1,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 1. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(2,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 2. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(2,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 2. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(3,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 3. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(3,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 3. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-29

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_spindle_param(4,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 4. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(4,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 4. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(5,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 5. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(5,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 5. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(6,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 6. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(6,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 6. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(7,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 7. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(7,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 7. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(8,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 8. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

A-30

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_spindle_param(8,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 8. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(9,max)

Spindle

Defines the maximum spindle Any number greater


speed for spindle range 9. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_param(9,min)

Spindle

Defines the minimum spindle Any number greater


speed for spindle range 9. Post than zero.
builder creates this variable for
use in custom commands to
check for spindle limits. If no
ranges are specified then this
variable is not created.

Numeric
Value

mom_sys_spindle_range_code(1)

Spindle

Defines the M code for spindle Any number greater


range 1. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected. If the op
tion for plus and minus S codes
for ranges then this variable
would have a value +1.

Numeric
Value

41 for the
M code
option
and -1 for
the Hig/
Low op
tion

mom_sys_spindle_range_code(2)

Spindle

Defines the M code for spindle Any number greater


range 2. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected. If the op
tion for plus and minus S codes
for ranges then this variable
would have a value -1.

Numeric
Value

42 for the
M code
option
and +1 for
the Hig/
Low op
tion

mom_sys_spindle_range_code(3)

Spindle

Defines the M code for spindle Any number greater


range 3. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected.

Numeric
Value

43

mom_sys_spindle_range_code(4)

Spindle

Defines the M code for spindle Any number greater


range 4. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected.

Numeric
Value

44

mom_sys_spindle_range_code(5)

Spindle

Defines the M code for spindle Any number greater


range 5. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected.

Numeric
Value

45

mom_sys_spindle_range_code(6)

Spindle

Defines the M code for spindle Any number greater


range 6. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected.

Numeric
Value

46

mom_sys_spindle_range_code(7)

Spindle

Defines the M code for spindle Any number greater


range 7. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected.

Numeric
Value

47

mom_sys_spindle_range_code(8)

Spindle

Defines the M code for spindle Any number greater


range 8. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected.

Numeric
Value

48

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-31

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_spindle_range_code(9)

Spindle

Defines the M code for spindle Any number greater


range 9. The variable is created than zero.
by Postbuilder only if ranges with
M codes are selected.

Numeric
Value

49

mom_sys_spindle_ranges

Spindle

Defines the number of ranges 0, 2 or 9


Postbuilder has created.

Numeric
Value

2 for High/
Low op
tion, 9 for
range
codes.

mom_sys_adjust_cancel_code

System

G code used to cancel the tool Any number greater


length offset code.
than zero.

Integer

49

mom_sys_adjust_code

System

G code used to apply the tool Any number greater


length offset code.
than zero.

Integer

43

mom_sys_adjust_code_minus

System

G code used to apply the tool Any number greater


length offset code in the minus than zero.
direction.

Integer

44

mom_sys_auto_clamp

System

Defines the status of auto clamp ON or OFF


ing. Is set to ON by the UDE
CLAMP/AUTO,ON. Can be set to
OFF by the UDE CLAMP/
AUTO,OFF.

String

OFF

mom_sys_automatic_reen
gage_distance

System

Defines the re-engage distance after the tool has been re Numeric
tracted due to tape length or cutting time. This parameter is Value
used by the custom commands pb_cmd_tape_break.tcl
and pb_cmd_auto_retract_time.tcl.

0.1

mom_sys_automatic_reen
gage_feedrate

System

Defines the re-engage feed rate after the tool has been re Numeric
tracted due to tape length or cutting time. This parameter is Value
used by the custom commands pb_cmd_tape_break.tcl
and pb_cmd_auto_retract_time.tcl.

10.0.

mom_sys_automatic_retract_dis
tance

System

Defines the retract distance when the tool is retracted due Numeric
to tape length or cutting time. This parameter is used by the Value
custom
commands
pb_cmd_tape_break.tcl
and
pb_cmd_auto_retract_time.tcl.

10.0.

mom_sys_cartesian_arc_out
put_mode

System

Defines the arc output mode LINEAR, CIRCULAR


while in Cartesian mode of a mill
turn. If LINEAR, all circular
moves will be output linearly and
will be linearized if needed. If
CIRCULAR, then arcs will output
as arcs. It is assumed that the
control has the ability to cu

String

CIRCU
LAR

mom_sys_change_mach_opera
tion_name

System

Used by the custom command pb_cmd_tool_list.tcl.

String

mom_sys_cir_vector

System

Defines how the circle center is Vector - Arc Center to String


defined by the I, J and K words in Start, Vector - Arc Start
circular output blocks.
to Center, Unsigned
Vector - Arc Center to
Start, Absolute Arc
Center

Vector Arc Cen


ter to Start

mom_sys_circle_code(CCLW)

System

The G code for counterclockwise Any number greater


circular interpolation.
than or equal to zero.

Integer

mom_sys_circle_code(CLW)

System

The G code for clockwise circular Any number greater


interpolation.
than or equal to zero.

Integer

mom_sys_clamp_code(AXISOFF)

System

Defines the M code that can be Any number greater


used to turn off clamping for a than or equal to zero.
specific axis.

Integer

11

mom_sys_clamp_code(AXISON)

System

Defines an M code that can be Any number greater


used to turn on clamping for a than or equal to zero.
specific axis.

Integer

10

A-32

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_clamp_code(OFF)

System

Defines the M code that can be Any number greater


used to turn off clamping.
than or equal to zero.

Integer

11

mom_sys_clamp_code(ON)

System

Defines the M code that can be Any number greater


used to turn on clamping.
than or equal to zero.

Integer

10

mom_sys_commentary_list

System

A list of possible fields that can be x, y, z, 4axis, 5axis, feed String


output for the commentary list or speed
List
ing. This list is generated by
Postbuilder.

{x y z
4axis
5axis feed
speed}

mom_sys_control_in

System

Defines the character string the post will use for operator
message end. The variable can be defined in Postbuilder.

String

mom_sys_control_out

System

Defines the character string the post will use for operator
message start. The variable can be defined in Postbuilder.

String

mom_sys_coolant_code(FLOOD)

System

Defines the M code used for the Any number greater


UDE COOLNT/FLOOD. The vari than or equal to zero.
able may be set in Postbuilder.

Integer

mom_sys_coolant_code(MIST)

System

Defines the M code used for the Any number greater


UDE COOLNT/MIST. The vari than or equal to zero.
able may be set in Postbuilder.

Integer

mom_sys_coolant_code(OFF)

System

Defines the M code used for the Any number greater


UDE COOLNT/OFF. The vari than or equal to zero.
able may be set in Postbuilder.

Integer

mom_sys_coolant_code(ON)

System

Defines the M code used for the Any number greater


UDE COOLNT/ON. The variable than or equal to zero.
may be set in Postbuilder.

Integer

mom_sys_coolant_code(TAP)

System

Defines the M code used for the Any number greater


UDE COOLNT/TAP. The variable than or equal to zero.
may be set in Postbuilder.

Integer

mom_sys_coordinate_out
put_mode

System

For mill turns only. Defines POLAR or CARTESIAN


whether the initial output mode
will be POLAR or CARTESIAN.
POLAR mode will output in xzc
mode and CARTESIAN will out
put in xyz mode. The mode may
be changed with the UDE SET/
POLAR,ON for POLAR mode or
SET/POLAR,OFF for CA

String

POLAR

mom_sys_current_head

System

Used by the linked post functionality to keep track of the


current head.

String

mom_sys_cut_motion_types

System

This list contains the cut types that will be used to increment String
the cutting time for the custom command List
pb_cmd_auto_retract_time.tcl .

{CUT
FIRST
CUT
STEP
OVER
CYCLE}

mom_sys_cutcom_code(LEFT)

System

Defines the G code used for cut Any number greater


ter compensation left of the tool than or equal to zero.
path.

Integer

41

mom_sys_cutcom_code(ON)

System

Defines the G code used to turn Any number greater


on cutter compensation.
than or equal to zero.

Integer

40

mom_sys_cutcom_code(RIGHT)

System

Defines the G code used for cut Any number greater


ter compensation right of the tool than or equal to zero.
path.

Integer

42

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-33

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_cutcom_off_type

System

For PQ cutcom only. Defines the NORMAL or TANGENT String


how the cutcom off sequence will
be output. NORMAL defines the
cutcom vector to be perpendicu
lar to the last direction of motion.
TANGENT defines the cutcom
vector to be normal to the last di
rection of motion.

NORMAL

mom_sys_cutcom_on_type

System

For PQ cutcom only. Defines the NORMAL or TANGENT String


how the cutcom on sequence will
be output. NORMAL defines the
cutcom vector to be perpendicu
lar to the next direction of motion.
TANGENT defines the cutcom
vector to be normal to the next di
rection of motion.

NORMAL

mom_sys_cut
com_plane_code(XY)

System

Defines the G code used to define the XY plane of cutcom


or circular interpolation for the current motion.

String

17

mom_sys_cut
com_plane_code(YZ)

System

Defines the G code used to define the YZ plane of cutcom


or circular interpolation for the current motion.

String

19

mom_sys_cut
com_plane_code(ZX)

System

Defines the G code used to define the ZX plane of cutcom


or circular interpolation for the current motion.

String

18

mom_sys_cutcom_status

System

For PQ cutcom only. Determines ON, OFF, START, END


the current status of PQ cutcom.
ON means output normal PQ
codes. OFF means don't output
PQ codes. START means output
PQ
codes
based
on
mom_sys_cutcom_on_type.
END means output PQ codes
based
on
mom_sys_cut
com_off_type.

String

OFF

mom_sys_cutcom_type

System

Defines the type of cutcom for G_CODES or PQ


Cincinnati acramatic controls in
the pb_cmd_cincinnati_pq_cut
com.tcl custom command.

String

mom_sys_cycle_ret_code(AUTO)

System

Defines
the
G
code
CYCLE/..,RTRCTO,AUTO

to

be

output

for

Numeric
Value

98

mom_sys_cycle_ret_code(MANU
AL)

System

Defines
the
G
code
CYCLE/..,RTRCTO,MANUAL

to

be

output

for

Numeric
Value

99

mom_sys_cycle_start_code

System

Defines the G code used for canned cycles requiring a defi


nition block and execution block. The cycle start code nor
mally outputs a G79 X Y Z to define the location where a
pre-defined cycle will take place.

Numeric
Value

79

mom_sys_cycle_tap_code

System

Defines the G code for cycle tap.

Numeric
Value

84

mom_sys_cycle_z_pos

System

Used by the custom command pb_cmd_zw-axis.tcl.

Numeric
Value

mom_sys_delay_code(REVOLU
TIONS)

System

For lathe only. Defines the G code for use to output a dwell
in seconds mode.

Numeric
Value

mom_sys_delay_code(SEC
ONDS)

System

For lathe only. Defines the G code for use to output a dwell
in revolutions mode.

Numeric
Value

mom_sys_delay_output_mode

System

For Lathe only. Defines output SECONDS or


mode for the delay code. Used OLUTIONS
with mom_sys_delay_code to
define the G code.

REV

String

SEC
ONDS

mom_sys_delay_param(REVOLU
TIONS,format)

System

Defines the format in the definition file that will be used for
revolutions mode output. This format can be modified in
the Delay section in Postbuilder.

String

Dwell_RE
VOLU
TIONS

A-34

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_delay_param(SEC
ONDS,format)

System

Defines the format in the definition file that will be used for
seconds mode output. This format can be modified in the
Dealy section in Postbuilder.

String

Dwell_SE
CONDS

mom_sys_end_of_program_code

System

Defines the M code that can be output with the end of pro
gram marker in Postbuilder.

Numeric
Value

mom_sys_feed_param(DPM,for
mat)

System

For machine with rotary axis only. Defines the format in the Numeric
definition file that will be used when in DPM feed rate mode. Value
Te format can be edited in the Feed Rate dialog of Post
builder.

Feed_DP
M

mom_sys_group_output

System

For programs that contain more ON or OFF


than one group, this variable de
fines whether you will get a single
output file all selected operations
or you will get one file for all
groups and another file for each
individual group.

String

OFF

mom_sys_head_code(DE
PENDENT)

System

Defines the M code that can be used to select the depen


dent turret for indexing.

Integer

22

mom_sys_head_code(INDEPEN
DENT)

System

Defines the M code that can be used to select the indepen


dent turret for indexing.

Integer

21

mom_sys_header_output

System

Defines whether or not the sys ON or OFF


tem will output a header with the
listing commentary output. Does
not output unless the listing file is
being output.

String

ON

mom_sys_helix_pitch_type

System

Defines the type helix that will be rise_radian, rise_revo


output. The pitch will be out as lution, none, other
the K word for an XY helix, J for an
XZ helix and I for a YZ helix. If you
select other, you will need to write
your own code.

String

rise_ra
dian

mom_sys_home_pos

System

Defines a home position in the machine tool coordinate


system. This can be used to position the tool at a home
position.

Numeri
cal
Array(3)

(0,0,0)

mom_sys_inch_code

System

Defines the G code for establishing the machine in inch


mode.

Numeri
cal Value

70

mom_sys_lathe_postname

System

For simple mill turns only. Defines the name of the lathe
postprocessor that is paired with a mill turn mill.

String

mom_sys_leader

System

Defines a string array used for allowing the leader to


changed during postprocessor runtime. For example,
mom_sys_leader(fourth_axis)
and
mom_sys_lead
er(fifth_axis) are variable leaders that can take on the val
ues B or B- to cause the desired rotational

String Array

mom_sys_linear_code

System

Defines the G code for linear motion

Numeri
cal Value

mom_sys_list_file_columns

System

Determines where the eyewash Not Changeable


information starts. The system
uses a hard coded value of 100
for consistency.

Integer

100

mom_sys_list_file_suffix

System

The string that will be appended to every commentary list


ing file. This string may be set in Postbuilder.

String

.lpt

mom_sys_list_output

System

Determines whether the com ON or OFF


mentary listing file will be output.

String

OFF

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-35

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_lock_axis

System

Defines the selected axis for the XAXIS, YAXIS, ZAXIS,


lock_axis UDE. The selected axis AAXIS, BAXIS, CAXIS,
will be locked and the motion will FOURTH, FIFTH
be compensated by the remain
ing axis. This is often used to fa
cilitate polar coordinate output.

String

mom_sys_lock_plane

System

Defines the plane to be locked for XYPLAN, ZXPLAN, YZ


the lock_axis UDE. The locked PLAN, NONE
axis must lie in the plane of the
lock plane. This parameter is re
quired for five axis posts.

String

mom_sys_lock_status

System

Defines whether the lock_axis ON or OFF


function is active.

String

OFF

mom_sys_lock_value

System

The value of the axis to be locked.

Numeri
cal Value

mom_sys_max_cut_time_per_tool

System

Defines the maximum cutting time for each tool in the cus
tom command pb_cmd_auto_retract_time.tcl.

Numeri
cal Value

60

mom_sys_max_tape_bytes

System

Defines the maximum length of the nc file in bytes in the


custom command pb_cmd_tape_break.tcl

Numeri
cal Value

100000

mom_sys_max_travel

System

A numeric array created when the custom command


PB_CMD_check_travel_limits is used. Records the maxi
mum x, y and z values in the current nc file.

Numerical Array(3)

mom_sys_metric_code

System

Defines the G code for establishing the machine in metric


mode.

Numeri
cal Value

mom_sys_mill_postname

System

For mill turn only. The name of the mill part.

String

mom_sys_mill_turn_type

System

For mill turn only. Defines the SIMPLE_MILL_TURN


how the mill part of the mill turn is or XZC_MILL.
used.
If
it
is
SIM
PLE_MILL_TURN, it will use the
machine mode, TURN or MILL,
to decide which post to use. If it is
XZC_MILL, it is not tied to a spe
cific lathe post, but uses the HEA

String

SIM
PLE_MILL
_TURN

mom_sys_millturn_yaxis

System

For mill turn only. Defines if the y TRUE or FALSE


axis can be positioned in the mill
turn. If FALSE, all motion on the
circumference
must
pass
through the centerline. If TRUE,
the post will calculate a y position
when needed.

String

FALSE.

mom_sys_min_cut_time_per_tool

System

Defines the minimum cutting time for each tool in the cus
tom command pb_cmd_auto_retract_time.tcl.

Numeri
cal Value

30

mom_sys_min_tape_bytes

System

Defines the minimum length of the nc file in bytes in the cus


tom command pb_cmd_tape_break.tcl

Numeri
cal Value

90000

mom_sys_min_travel

System

A numeric array created when the custom command


PB_CMD_check_travel_limits is used. Records the mini
mum x, y and z values in the current nc file.

Numerical Array(3)

mom_sys_opskip_block_leader

System

Defines the character used for


OPSKIP.

String

mom_sys_optional_stop_code

System

Defines the M code used for OPSTOP

String

mom_sys_output_code(ABSO
LUTE)

System

Defines the G code to establish absolute coordinate output


mode.

Numeri
cal Value

90

mom_sys_output_code(INCRE
MENTAL)

System

Defines the G code to establish incremental coordinate out


put mode.

Numeri
cal Value

91

mom_sys_output_file_suffix

System

Defines the extension the will appended to the nc output


file.

String

.ptp

A-36

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

71

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS

mom_sys_output_mode

System

For mill turn only. The current POLAR or CARTESIAN


output mode either, POLAR or
CARTESIAN.

mom_sys_postname

System

For linked posts only. Defines the posts and the UDE that String
will load and execute it. This variable is of the form
mom_sys_postname(UDE name). The variable is as
signed the name of a post. UDE_name is the head name in
the HEAD UDE. This UDE must be atta

mom_sys_program_stop_code

System

Defines the M code used for STOP.

String

mom_sys_quill_leader

System

Defines the leader for the quill (z-axis) for the custom com
mand pb_cmd_zw_axis.tcl.

String

mom_sys_quill_pos

System

Defines the current position of the quill (z-axis) for the cus
tom command pb_cmd_zw_axis.tcl.

Numeric
Value

mom_sys_radius_output_mode

System

Defines how the radius (X) value SHORTEST_DIS


will be output when in polar coor TANCE, ALWAYS POS
dinate mode in mill turns. T
ITIVE or ALWAYS NEG
ATIVE

String

SHORT
EST_DIS
TANCE

mom_sys_rapid_code

System

Defines the G code used for rapid traverse.

Numeric
Value

mom_sys_reset_code

System

Defines the G code for reset. Used for resetting the tool tip
in lathe tool tip programming.

Numeric
Value

92

mom_sys_return_code

System

Defines the G code for the return to home position.

Numeric
Value

28

mom_sys_rewind_code

System

Defines the M code for end of program rewind.

Numeric
Value

30

mom_sys_rewind_stop_code

System

Defines the character string for rewind stop.

String

mom_sys_rotary_error

System

For four and five axis posts only.


Determines if the tool path had a
discontinuity that the post needs
to handle. If so the rotary axis
auto retract function will be
called.

mom_sys_table_leader

System

Defines the leader for the quill (z-axis) for the custom com
mand pb_cmd_zw_axis.tcl.

String

mom_sys_table_pos

System

Defines the current position of the table (w-axis) for the


custom command pb_cmd_zw_axis.tcl.

Numeric
Value

mom_sys_tool_change_code

System

Defines the M code used to change tools or index the turret. Numeric
Value

mom_sys_tool_change_mo
tion_types

System

This list contains the cut types that will NOT be used for au
tomatic retract and tool change for the custom command
pb_cmd_auto_retract_time.tcl. If you know that your step
overs will be off the part, you may want to remove STEP
OVER from this list.

{CUT
FIRST
CUT
STEP
OVER
CYCLE}

mom_sys_tool_number

System

This list controls the tool numbers that will be used for the String
replacement tools for the custom command List
pb_cmd_auto_retract_time.tcl. This list may be as short or
long as you need it. If you only want to load tool 1 every time
then you could use {1}.

mom_sys_tool_time

System

For use in the custom command pb_cmd_tool_list.tcl. A


numeric array that can be used to output the time for each
tool . For example, mom_sys_tool_time(name_of_tool).

mom_sys_turret_index(DE
PENDENT)

System

Defines a value that can be placed in front of the face num Numeric
ber to designate which turret is to be indexed. This value is Value
used only when the turret index is used in the T code con
figuration dialog in Postbuilder.

EEDS
All Rights Reserved

String

ROTARY CROSSING String


LIMIT.
Or
secon
dary_rotary_axis_posi
tion

String
List

{1 2 3 4 5
6}

String Array

Post Building Techniques


Student Guide

A-37

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_turret_index(INDEPEN
DENT)

System

Defines a value that can be placed in front of the face num Numeric
ber to designate which turret is to be indexed. This value is Value
used only when the turret index is used in the T code con
figuration dialog in Postbuilder.

mom_sys_uni_dir

System

For use in the custom pb_cmd_cycle_unipositioning.tcl to


define the constant direction of motion prior to a cycle

Numeric
Array(2)

(.2,.2)

mom_sys_uni_feed

System

For use in the custom pb_cmd_cycle_unipositioning.tcl to


define the feed rate in IPM or MMPM for the directional
move prior to the cycle.

Numeric
Value

mom_sys_unit_code(IN)

System

Defines the G code to define the nc file as inch.

Numeric
Value

70

mom_sys_unit_code(MM)

System

Defines the G code to define the nc file as metric.

Numeric
Value

71

mom_sys_warning_output

System

Defines whether the warning file ON or OFF


is created. If created, it will have
the name of base_name_war
ning.out where base_name is
the name of the nc file.

String

OFF

mom_sys_waxis_home

System

Defines the home position of the table (waxis) for the cus
tom command pb_cmd_zw_axis.tcl.

Numeric
Value

mom_sys_waxis_max_limit

System

Defines the maximum travel of the table (waxis) for the cus
tom command pb_cmd_zw_axis.tcl.

Numeric
Value

9999.999
9

mom_sys_waxis_min_limit

System

Defines the minimum travel of the table (waxis) for the cus
tom command pb_cmd_zw_axis.tcl.

Numeric
Value

-9999.99
99

mom_sys_zaxis_home

System

Defines the home position of the quill (z-axis) for the cus
tom command pb_cmd_zw_axis.tcl.

Numeric
Value

mom_sys_zaxis_max_limit

System

Defines the maximum travel of the quill (z-axis) for the cus
tom command pb_cmd_zw_axis.tcl.

Numeric
Value

9999.999
9

mom_sys_zaxis_min_limit

System

Defines the minimum travel of the quill (z-axis) for the cus
tom command pb_cmd_zw_axis.tcl.

Numeric
Value

-9999.99
99

mom_sys_zaxis_pos

System

Defines the current W or Z value that will be output in the


block template.

Numeric Value

mom_sys_zero

System

Defines the value that will be output to cancel tool length


compensation.

Integer

mom_sys_zw_mode

System

Defines the output mode for par Z or W


allel axis for the custom com
mand pb_cmd_zw_axis.tcl.

String

mom_lathe_thread_advance_type

Threading

Defines the type of threading. 1, 2 or 3


The values are 1 for constant
lead, 2 for increasing lead and 3
for decreasing lead.

Integer

mom_lathe_thread_increment

Threading

For increasing or decreasing lead threads, the incremental


change.

Numerical Value

mom_lathe_thread_lead

Threading

The lead specified for the current threading pass.

Numerical Value

mom_lathe_thread_lead_i

Threading

The pitch or lead along the X axis.

Numerical Value

mom_lathe_thread_lead_k

Threading

The pitch or lead along the Z axis.

Numerical Value

mom_lathe_thread_pitch

Threading

The pitch specified for the current threading pass.

Numerical Value

mom_lathe_thread_tpi

Threading

The pitch or lead in units of TPI. (1/pitch).

Numerical Value

mom_lathe_thread_type

Threading

Defines
the
units
that 2,3,4
mom_lathe_thread_value will be
expressed in. 2 - pitch, 3 - lead,
4 - TPI.

Integer

mom_lathe_thread_value

Threading

The pitch, lead or TPI value. The units are defined in


mom_lathe_thread-type

Numerical Value

A-38

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_sys_lathe_thread_ad
vance_type(1)

Threading

Defines the G code for constant lead threading.

Numeri
cal Value

33

mom_sys_lathe_thread_ad
vance_type(2)

Threading

Defines the G code for increasing lead threading.

Numeri
cal Value

34

mom_sys_lathe_thread_ad
vance_type(3)

Threading

Defines the G code for decreasing lead threading.

Numeri
cal Value

35

mom_lead_angle

Tool

Defines the first clearance angle for turning inserts.

Numeric Value

mom_next_tool_name

Tool

The name of the next tool to be loaded.

String

mom_next_tool_number

Tool

The number of the next tool to be loaded. Can be used to


pre-select the next tool.

Integer

mom_next_tool_status

Tool

Defines the status of the next NEXT or FIRST


tool. It will either be NEXT or
FIRST. If FIRST, it means that you
at end of the program and the
next tool is the first tool. NEXT
means that the there is a next tool
in the program.

String

mom_pocket_id

Tool

If the pre-loaded tool option is used within UG CAM, this is Integer


the pocket number where the tool is located.

mom_thread_forming_method_t

Tool

This defines the types/methods of thread forming. Drill


tools only.

Integer

mom_tool_barrel_center_y

Tool

This parameter specifies the height of the center of the arc


defining the profile of the outside edge of the cutter. Barrel
tools only.

Numeric Value

mom_tool_barrel_radius

Tool

This parameter specifies the radius of the arc defining the


profile shape of the sides of the cutter. Barrel tools only.

Numeric Value

mom_tool_button_diameter

Tool

This parameter specifies the diameter of the button tool. (


ISO R, Round ). Button tools only.

Numeric Value

mom_tool_catalog_number

Tool

This parameter specifies the catalog number or a tool track


ing number.

Numeric Value

mom_tool_corner1_center_x

Tool

This index is a part of the definition of the center of the arc Numeric Value
representing the lower radius of the tool profile. It is the hori
zontal distance between the center of the lower corner arc
and the tool axis; it can be positive (lower arc and its center
on

mom_tool_corner1_center_y

Tool

This index is a part of the definition of the center of the arc


representing the lower radius of the tool profile. It is the ver
tical distance between the center of the lower corner arc
and the tool end. Its value must be non-negative. Seven
Parameter Mi

Numeric Value

mom_tool_corner1_radius

Tool

This parameter specifies the radius of the lower corner arc


of the tool. The lower radius of a tool. Mill and Drill tools
only.

Numeric Value

mom_tool_corner2_center_x

Tool

This index is a part of the definition of the center of the arc Numeric Value
representing the upper radius of the tool profile. It is the hor
izontal distance between the center of the upper corner arc
and the tool axis. It can be positive (upper arc and its center
on

mom_tool_corner2_center_y

Tool

This index is a part of the definition of the center of the arc


representing the upper radius of the tool profile. It is the ver
tical distance between the center of the upper corner arc
and the tool end. Its value must be non-negative. Ten Pa
rameter Mill

Numeric Value

mom_tool_cut_edge_length

Tool

This parameter specifies the cutting edge length of the


turning tool insert. Turning tools only.

Numeric Value

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-39

MOM VARIABLES, EVENTS, COMMANDS


mom_tool_cutcom_register

Tool

This parameter specifies the register number value on the


controller which contains the value that the system uses to
adjust the tool path to allow for variation due to an under
sized or oversized cutter or tool.

mom_tool_diameter

Tool

Specifies the diameter of the tool. Mill, Drill, Barrel, T Cutter Numeric Value
tools only.

mom_tool_direction

Tool

This parameter specifies the direction of rotation of the


spindle.

mom_tool_edge_length_a

Tool

This parameter describes the shape of a turning form tool in Numeric Array
parametric form. It represents an array holding the tool
edge length information (see manufacturing turning help
for more information). Turning tools only.

mom_tool_flute_length

Tool

This parameter specifies the measured distance between


the beginning and end teeth of the flute. The flute length
does not necessarily indicate the length of cut. Mill, Drill,
Barrel, T Cutter tools only.

Numeric Value

mom_tool_flutes_number

Tool

This parameter specifies the number of flutes in the tool.


Mill, Drill, Barrel, T Cutter tools only.

Numeric Value

mom_tool_heel_angle

Tool

Defines the second clearance angle for turning inserts.


Turning tools only.

Numeric Value

mom_tool_height

Tool

Specifies the actual height of the tool. Mill, Drill, Barrel, T


Cutter tools only.

Numeric Value

mom_tool_holder_angle

Tool

This parameter specifies the holder angle of the button tool


holder (radians). Button tools only.

Numeric Value

mom_tool_holder_width

Tool

This parameter specifies the width of the button tool holder.


Button only.

Numeric Value

mom_tool_insert_angle

Tool

This parameter specifies the polar angle of the first edge of Numeric Value
a Form turning tool (radians). Turning tools only.

mom_tool_insert_length

Tool

This parameter specifies the total length of the insert of


grooving and threading tools. Groove or Thread tools only.

Numeric Value

mom_tool_insert_position

Tool

This parameter specifies the 0 Topside, spindle


spindle direction for machining. turns clockwise, 1 Un
derside, spindle turns
counterclockwise.

Numeric Value

mom_tool_insert_type

Tool

This parameter specifies the insert shapes for standard


turning, grooving and threading tools. For standard turning
tools, parallelogram, diamond, hexagon, parallelogram,
rectangle, octagon, pentagon, round, square, triangle, tria
gon or user defined inser

Numeric Value

mom_tool_left_adjust_reg

Tool

This parameter specifies the register number value on the Integer


controller which contains the tool offset coordinates for the
left cutter.

mom_tool_left_adjust_reg_t

Tool

This index has to be turned on, if 0 = inactive, 1 = active


you want to use parameter
UF_PARAM_TL_LEFT_AD
JUST_INDEX.

mom_tool_left_angle

Tool

This index defines the left clearance angle of grooving and Numeric Value
threading asymmetrical tools (radians). Groove or Thread
tools only.

mom_tool_left_corner_radius

Tool

This index defines the left corner radius of grooving asym


metrical tools. Groove tools only.

Numeric Value

mom_tool_left_cutcom_reg

Tool

This parameter specifies the register number value on the


controller which contains the value that the system uses to
adjust the tool path to allow for variation due to an under
sized or oversized cutter or tool (left cutter).

Integer

A-40

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Integer

Numeric Value

Integer

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_tool_left_cutcom_reg_t

Tool

This index has to be turned on, if 0 = inactive, 1 = active


you want to use parameter
UF_PARAM_TL_LEFT_CUT
COM_INDEX.

Integer

mom_tool_left_tracking_point

Tool

This parameter specifies the 0-8


tracking point of the left cutter of
the grooving tool.

Integer

mom_tool_left_x_offset

Tool

This parameter specifies the left x offset, which is the x coor


dinate of the distance between the tool's reference point
and it's left tracking point. Parameter UF_PA
RAM_TL_LEFT_XOFF_TOG_INDEX has to be turned on.
Groove tools only.

Numeric Value

mom_tool_left_y_offset

Tool

This parameter specifies the left y offset, which is the y coor


dinate of the distance between the tool's reference point
and it's left tracking point. Parameter UF_PA
RAM_TL_LEFT_YOFF_TOG_INDEX has to be turned on.
Groove tools only.

Numeric Value

mom_tool_length_adjust_register

Tool

This parameter specifies the register number value on the


controller which contain the tool offset coordinates.

Integer

mom_tool_lower_corner_radius

Tool

This parameter specifies the lower corner radius of the pro


file of the tool. Barrel or T Cutter tools only.

Numeric Value

mom_tool_max_depth

Tool

This parameter describes the maximum depth of cut which


the tool insert can achieve. This is dependant upon the ge
ometry of the insert. Turning tools only.

Numeric Value

mom_tool_max_facing_diameter

Tool

This parameter describes the maximum admissible diame


ter for facing operations with grooving and form turning
tools.

Numeric Value

mom_tool_max_facing_diameter_t Tool

This index has to be turned on, if 0 = inactive, 1 = active


you want to use parameter
UF_PARAM_TL_MAX_FAC
ING_DIA_INDEX.

Integer

mom_tool_max_toolreach

Tool

This parameter describes the maximum distance which a


tool and its holder can travel into a part. This is dependant
upon the geometry of a part and the tool holder. The pur
pose of this parameter is to prevent collision of the tool
holder with the part.

Numeric Value

mom_tool_min_boring_diameter

Tool

This parameter describes the minimum distance needed to Numeric Value


prevent a tool and its holder from colliding with the part. For
instance, when drilling a hole of one centimeter, a tool hold
er that is wider than 1 centimeter cannot be used if the hold
er is expecte

mom_tool_min_facing_diameter

Tool

This parameter describes the minimum admissible diame


ter for facing operations with grooving and form turning
tools.

Numeric Value

mom_tool_min_facing_diameter_t

Tool

This index has to be turned on, if 0 = inactive, 1 = active


you want to use parameter
UF_PARAM_TL_MIN_FAC
ING_DIA_INDEX.

Integer

mom_tool_name

Tool

The name of the current tool.

String

mom_tool_nose_angle

Tool

This parameter specifies the angle caused by the intersec


tion of the two edges of the turning tool insert (radians).
Turning tools only.

Numeric Value

mom_tool_nose_angle_a

Tool

This parameter describes the shape of a turning form tool in Numeric Array
parametric form. It represents an array holding the tool
edge length information (see manufacturing turning help
for more information). Turning tools only.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-41

MOM VARIABLES, EVENTS, COMMANDS


mom_tool_nose_angle_a

Tool

This parameter describes the shape of a turning form tool in Numeric Array
parametric form. It represents an array holding the tool
nose angle (radians) information (see manufacturing turn
ing help for more information). Turning tools only.

mom_tool_nose_radius

Tool

This parameter specifies the radius of the inscribed circle at Numeric Value
the cutter tip of the turning tool insert. Turning tools only.

mom_tool_nose_radius_a

Tool

This parameter describes the shape of a turning form tool in Numeric Array
parametric form. It represents an array holding the tool
nose radii information (see manufacturing turning help for
more information).

mom_tool_nose_width

Tool

This parameter describes the nose width of a turning tool. It Numeric Value
represents the width of the tool cutting surface of either a
Ring Type Joint grooving tool or a Trapezoidal threading
tool.

mom_tool_number_of_noses

Tool

This index contains the number of noses of a Form turning


tool. Turning tools only.

Integer

mom_tool_orientation

Tool

This parameter specifies the angle between the cutting


edge and the cutting surface of the turning tool insert (ra
dians). Turning tools only.

Numeric Value

mom_tool_pitch

Tool

This is the distance from one cutting point to an adjacent


cutting point. Drill tools only.

Numeric Value

mom_tool_point_angle

Tool

This parameter specifies the angle of the point of the tool.


Drill tools only

Numeric Value

mom_tool_preset_cutter

Tool

Defines which sides of the cutter 0 Left, 1 Left & Right, 2


are available for tracking on the Right
machine (left, right or both). For
each preset cutter there are three
attributes available to be speci
fied: Cutter Tracking Point, X Off
set, Y Offset.

Integer

mom_tool_radius

Tool

This parameter specifies the radius of the inscribed circle at Numeric Value
the cutter tip. The Standard tool Radius assumes the tool's
left and right nose radii are equal. You may define a left and
right Radius in User Defined tool types.

mom_tool_relief_angle

Tool

This parameter specifies the angle caused by the slope of


the cutter away from the cutting edge of the turning tool in
sert (degrees). Turning tools only.

Numeric Value

mom_tool_relief_angle_o

Tool

This parameter specifies the 0-10


angle caused by the slope of the
cutter away from the cutting
edge of the turning tool insert.

Integer

mom_tool_right_adjust_reg

Tool

This parameter specifies the register number value on the Integer


controller which contains the tool offset coordinates for the
right cutter.

mom_tool_right_adjust_reg_t

Tool

This index has to be turned on, if 0 = inactive, 1 = active


you want to use parameter
UF_PARAM_TL_RIGHT_AD
JUST_INDEX.

Integer

mom_tool_right_angle

Tool

This index defines the right clearance angle of grooving


and threading asymmetrical tools (radians).

Numeric Value

mom_tool_right_corner_radius

Tool

This index defines the left corner radius of grooving asym


metrical tools.

Numeric Value

mom_tool_right_cutcom_reg

Tool

This parameter specifies the register number value on the


controller which contains the value that the system uses to
adjust the tool path to allow for variation due to an under
sized or oversized cutter or tool (right cutter).

Integer

A-42

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_tool_right_cutcom_reg_t

Tool

This index has to be turned on, if 0 = inactive, 1 = active


you want to use parameter
UF_PARAM_TL_RIGHT_CUT
COM_INDEX.

Integer

mom_tool_right_tracking_point

Tool

This parameter specifies the 0-8


tracking point of the right cutter
of the grooving tool.

Integer

mom_tool_right_x_offset

Tool

This parameter specifies the right x offset, which is the x


coordinate of the distance between the tool's reference
point and it's right tracking point. Parameter UF_PA
RAM_TL_RIGHT_XOFF_TOG_INDEX has to be turned on.
Groove tools only.

Numeric Value

mom_tool_right_y_offset

Tool

This parameter specifies the right y offset, which is the y


coordinate of the distance between the tool's reference
point and it's right tracking point. Parameter UF_PA
RAM_TL_RIGHT_YOFF_TOG_INDEX has to be turned on.
Groove tools only

Numeric Value

mom_tool_shank_diameter

Tool

This parameter specifies the diameter of the shank at the


top of the Barrel Cutter. Barrel or T Cutter tools only.

Numeric Value

mom_tool_side_angle

Tool

The side angle defines the clearance angles of a grooving


tool on the left and on the right side as equal (radians). A
narrowing insert shape represents a positive value of the
side angle, a widening insert shape a negative value. This
parameter appears o

Numeric Value

mom_tool_size_o

Tool

This parameter specifies the size


of the turning tool insert. Cut
Edge Length, Inscribed Circle or
Inscribed Circle ANSI are pos
sible. The ISO insert size defini
tion uses Cut Edge Length while
the ANSI standard uses the in
scribed circle. Depending on
whic

Integer

mom_tool_taper_angle

Tool

This parameter specifies the angle of the sides of a tapered Numeric Value
tool. The angle is measured from the tool axis. If the Taper
Angle is positive, the tool is wider at the top than it is at the
bottom. If the Taper Angle is negative, the tool is wider at the
b

mom_tool_thickness

Tool

This parameter specifies the thickness of the turning tool in


sert.

Numeric Value

mom_tool_thickness_o

Tool

This parameter specifies the 0-13


thickness of the turning tool in
sert.

Integer

mom_tool_tip_angle

Tool

This parameter specifies the angle of the tip of the tool. This Numeric Value
is a non-negative angle measured from a line through the
tool end point and perpendicular to the tool axis. If the Tip
Angle is positive, the tool * has a sharp point at the very bot
tom (lik

mom_tool_tip_offset

Tool

This parameter describes the tip offset of a threading tool. Numeric Value
For standard insert type it is the offset of the tool nose's bot
tom point to the tool's left flank. For trapezoidal insert type it
is the offset of the right end of the tool's bottom edge to the

mom_tool_tracking_a

Tool

This parameter describes the shape of a turning form tool in Numeric Array
parametric form. It represents an array holding the tracking
point location information (see manufacturing turning help
for more information). Turning tools only.

mom_tool_tracking_point

Tool

This parameter specifies the 0-8


tracking point of the turning tool.

EEDS
All Rights Reserved

Possible Values: 0 Cut


Edge Length, 1 In
scribed Circle, 2 In
scribed Circle ANSI

Integer

Post Building Techniques


Student Guide

A-43

MOM VARIABLES, EVENTS, COMMANDS


mom_tool_type

Tool

The type of the current tool.

mom_kin_flush_time

Wire EDM

Time to be added to machine time for flushing the tank.

Numeric Value

mom_lead_in_cutcom_angle

Wire EDM

The angle specified for the cut 0-360


com move in the Wire EDM op
eration. Zero would define a tan
gent transition. A value of 90 is
needed for Agie machine tools.

Numeric
Value

mom_lead_in_cutcom_distance

Wire EDM

The length of the cutcom move in Any number greater


the Wire EDM operation.
than or equal to zero.

Numeric
Value

mom_lead_in_method

Wire EDM

Defines the lead in type in a Wire 0,1,2


EDM operation. The types are di
rect 0, angular 1 or circular 2.

Integer

mom_sys_agie_cutcom_code

Wire EDM

Used to define the cutcom code 40, 42, 43, 44


for the next block of cutcom for
Agie machine tools.

Integer

mom_sys_cut_wire

Wire EDM

Defines the M code used to cut the wire. This M code is to Integer
output with the MOM_cut_wire event.

20

mom_sys_flushing_off

Wire EDM

Defines the M code used to turn off flushing.

Integer

80

mom_sys_flushing_on

Wire EDM

Defines the M code used to turn on flushing.

Integer

81

mom_sys_power_off

Wire EDM

Defines the M code used to turn on the power.

Integer

84

mom_sys_power_on

Wire EDM

Defines the M code used to off the power.

Integer

85

mom_sys_thread_wire

Wire EDM

Defines the M code used to thread the wire. This M code is Integer
used to output with the MOM_thread_wire event.

21

mom_sys_wire_off

Wire EDM

Defines the M code used to turn off wire mode.

Integer

83

mom_sys_wire_on

Wire EDM

Defines the M code used to turn on wire mode.

Integer

84

mom_wire_angle

Wire EDM

The wire angle programmed with the Wire Angles UDE to


define the tilt of the wire.

Numeric Value

mom_wire_angle

Wire EDM

Defines the constant tilt parameter for Agie controls.

Numeric Value

mom_wire_angle_text

Wire EDM

The appended text programmed with the Wire Angles


UDE.

String

mom_wire_cutcom_adjust_regis
ter

Wire EDM

The adjust register value programmed with the Cutter


Compensation UDE.

Integer

mom_wire_cutcom_mode

Wire EDM

If cutcom is ON, defines whether LEFT or RIGHT


is it is LEFT or RIGHT.

String

mom_wire_cutcom_status

Wire EDM

Defines whether cutcom is ON or ON or OFF


OFF.
If the status is ON,
mom_wire_cutcom_mode de
fines whether it is RIGHT or LEFT.

String

mom_wire_cutcom_text

Wire EDM

The appended text programmed with the Cutter Com


pensation UDE.

String

mom_wire_feed_rate

Wire EDM

The value programmed with the Feed Rate UDE.

Numeric Value

mom_wire_feed_rate_text

Wire EDM

The appended text programmed with the Feed Rate UDE.

String

mom_wire_guides_lower_plane

Wire EDM

The value of the lower wire guide as specified in the Wire


EDM operation. The distance is measured along the Z axis
of the MCS.

Numeric
Value

mom_wire_guides_text

Wire EDM

The appended text programmed with the Wire Guides


UDE.

String

mom_wire_guides_upper_plane

Wire EDM

The value of the upper wire guide as specified in the Wire


EDM operation. The distance is measured along the Z axis
of the MCS.

Numeric
Value

A-44

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Milling, Turning, Groov


ing, Drilling or Thread
ing

String

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


mom_wire_height

Wire EDM

The distance as measured from the lower wire guide to the Numeric
upper wire guide.
Value

mom_wire_slope

Wire EDM

The slope value programmed with the Wire Angles UDE.

MOM_abort

Mom Commands This function causes MOM to MOM_abort <message>


write message to the syslog and
then terminate by ERROR_rais
ing(). Example: MOM_abort ''Er
ror occurred. Postprocessing
has been aborted.''

MOM_add_to_address_buffer

Mom Commands Depending on the start/end at MOM_add_to_address_buffer


tribute specified, this extension name> <start|end> <value>+
will add ''value(s)'' to either the
address start buffer or the ad
dress end buffer. Each time that
this extension is called, it adds to
the specified buffer. When the
contents of the address

MOM_add_to_block_buffer

Mom Commands Depending on the start/end at MOM_add_to_block_buffer <block


tribute specified, this extension <start|end> <value>+
will add ''value(s)'' to either the
block start buffer or the block
end buffer. Each time that this ex
tension is called, it adds to the
specified buffer. When the block
is sent to the output

MOM_add_to_line_buffer

Mom Commands Depending on the start/end at MOM_add_to_line_buffer <start|end> <val


tribute specified, this extension ue>+
will add ''value(s)'' to either the
line's start buffer or the line's end
buffer. Each time that this exten
sion is called, it adds to the speci
fied buffer. When the contents of
the output buf

MOM_ask_address_value

Mom Commands Always returns the absolute ad MOM_ask_address_value <address name>


dress value NOT the incremental
value. Examples: MOM_ask_ad
dress_value X

MOM_ask_env_var

Mom Commands This extension allows you to de MOM_ask_env_var <variable name>


termine how environment vari
able ''variable name'' is set. Ex
ample:
set
path
[MOM_ask_env_var
UGII_CAM_POST_CON
FIG_FILE]

MOM_ask_event_type

Mom Commands Returns the name of the current event. This is the last event that the event generator
executed.

MOM_ask_ess_exp_value

Mom Commands Unigraphics NX has as an Ex MOM_ask_ess_exp_value <variable_name>


pression module. This allows us
ers to define variables and ex
pressions and then use those
variables as parameters for Uni
graphics NX entities such as
Modeling features. This MOM
function provides access to the
variables of the

MOM_close_output_file

Mom Commands This extension allows you to sus MOM_close_output_file <filename>


pend writing output to a particu
lar file until it is opened again. Ex
ample: MOM_close_output_file
$mom_output_doc_file2

EEDS
All Rights Reserved

Numeric Value

Post Building Techniques


Student Guide

<address

name>

A-45

MOM VARIABLES, EVENTS, COMMANDS


MOM_set_debug_mode

Mom Commands This will activate, deactivate, and MOM_set_debug_mode <ON | OFF>
resume the debugger. Like any
TCL extension, this command
may be called from any place in
the TCL script. If ON, the debug
ger will activate by initializing with
data entered in the debugger
dialog or stdout. If OFF, t

MOM_do_template

Mom Commands Generate output based upon the MOM_do_template <template_name> {BUFF
Block Template template_name. ER | CREATE}
BUFFER has the same meaning
as before. BUFFER will generate
the output value for Block Tem
plate template_name but does
not add it to the output buffer,
and hence, does not output it to
the outp

MOM_force

Mom Commands The next time that a block tem MOM_force <Always | Once | Off > <Ad
plate that contains a reference to dress_1 ... Address_n>
any of the input address names
is evaluated, the word that con
tains that address will be output
regardless of its modality attrib
ute. Example: MOM_force_ad
dress Once X Y Z, If both
MOM_forc

MOM_force_block

Mom Commands Example:


MOM_force_block MOM_force_block <Always | Once | Off >
Once linear
<Block_1 ... Block_n>

MOM_incremental

Mom Commands The next time that a block tem MOM_incremental <ON | OFF> <Address_1
plate contains a reference to any ... Address_n>
of the input address names is
evaluated, the deference (incre
ment) from the previous value is
output. If ON, then for each Ad
dress_i, always output incre
ment. If OFF, then for each Ad
dress_

MOM_load_definition_file

Mom Commands This will load the definition file MOM_load_definition_file <filename>
given by filename. If data in file
name (or any of its INCLUDEd
files) matches data already
loaded by previous definition
files, that duplicate data will be
overridden by the new version.
Like any TCL extension, this
comm

MOM_log_message

Mom Commands This function causes MOM to MOM_log_message <message>


write message to the syslog. Ex
ample:
MOM_log_message
''Postprocessing Terminated''

MOM_on_event_error

Mom Commands If the TCL interpreter reports an MOM_on_event_error {_debug}


error this procedure is invoked
prior to raising a system error.
The {_debug} procedure is in
voked only if DEBUG mode is
true. Example: This procedure is
invoked by Unigraphics NX

A-46

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS

MOM_on_parse_error

Mom Commands If a syntax error is found in the MOM_on_parse_error {_debug}


Definition File these procedures
are invoked prior to raising a sys
tem error. The {_debug} proce
dure is invoked only if DEBUG
mode is true. Example: This pro
cedure is invoked by Unigraph
ics NX.

MOM_open_output_file

Mom Commands This extension allows you to redi MOM_open_output_file <filename>


rect output to other output files. If
a file ''filename'' does not exist, a
new one will be created with that
file
name.
Example:
MOM_open_output_file
$mom_output_doc_file2

MOM_output_literal

Mom Commands Output a list of literals and vari MOM_output_literal ''string'' {BUFFER}
able as a single line. If BUFFER is
present then only place string in
the output buffer. Do not send it
to the output yet. Example:
MOM_output_literal ''Start of
path $mom_path_name''

MOM_output_text

Mom Commands This extension will output a list of MOM_output_text <literal> {BUFFER}
literals and variable as a single
line, just like MOM_output_literal
except that no sequence number
will be output. If BUFFER is pres
ent then only place string in the
output buffer. Do not send it to
the output yet.

MOM_output_to_listing_device

Mom Commands If running in an interactive Uni MOM_output_to_listing_device <''string''>


graphics NX session then output
string to the Unigraphics NX list
ing window, otherwise do noth
ing. Example: MOM_output to
listing_device ''Error occurred
while postprocessing.''

MOM_reload_kinematics

Mom Commands Refresh the event generator with the current values of all the kinematics variables.

MOM_reload_variable

Mom Commands Update the event generator with MOM_reload_variable [-a] variable_name
the current value of vari
able_name in the event handler.
Example: The following com
mand will load the current values
of mom_pos [0] to [4] into the
event
generator.
MOM_re
load_variable -a mom_pos

MOM_reset_sequence

Mom Commands A sequence is a block template MOM_reset_sequence <start> <increment>


that is output at the beginning of {frequency}
each line. It will typically be used
to output sequence numbers but
it may also be used to output any
block template.
Example:
MOM_reset_sequence 10 10 1

MOM_run_user_function

Mom Commands This function causes MOM to call MOM_run_user_function


the
function
named brary_name> <SR>
entry_point_name in the shared
library
named
shared_li
brary_name. That function can
then extend the translator from
which MOM_run_user_function
was called. It will do this by call
ing a User Function func

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

<shared_li

A-47

MOM VARIABLES, EVENTS, COMMANDS


MOM_set_address_format

Mom Commands This function redefines the for MOM_set_address_format <Address Name>
mat to be used for the <Address <Format Name>
Name> as <Format Name> for
outputting in a block. The <For
mat Name> must be defined in
the Definition File. Example:
MOM_set_address_format
F
F_ipm

MOM_set_line_leader

Mom Commands This function causes MOM to set MOM_set_line_leader <Always | Once | Off >
the line leader to string with the <''string''>
indicated status. If a line leader is
to be output is output as the first
characters of the output line (i.e.,
before the SEQUENCE). Exam
ple: MOM_set_line_leader Al
ways ''/''

MOM_set_seq_on

Mom Commands Allows output of the sequence number if a SEQUENCE specifier was given in the
definition file. Return the sequence setting at the time the command is executed.
Example: set current_status [MOM_set_seq_on] ... if ($current_status = = ''off'') {
MOM_set_

MOM_set_seq_off

Mom Commands Does not output a sequence number. Returns the sequence setting at the time the
command is executed. Example: set current_status [MOM_set_seq_off] ... if ($cur
rent_status = = ''on'') { MOM_set_seq_on }

MOM_suppress

Mom Commands The next time that a block tem MOM_suppress <Always | Once | Off > <Ad
plate that contains a reference to dress_1 ... Address_n>
any of the input address names
is evaluated, the word that con
tains the address will not be out
put regardless of its modality at
tribute. Example: MOM_sup
press_address Always N X Y, If
both

MOM_before_output

Setup Events

This event occurs before the data mom_o_buffer


in the global mom_o_buffer is
output.

MOM_end_of_path

Setup Events

This event occurs at the end of every path.

MOM_end_of_program

Setup Events

This event occurs at the end of program.

MOM_first_tool

Setup Events

This event occurs when the first mom_next_tool_name, mom_next_tool_num


tool in the toolpath is encoun ber
tered.

MOM_machine_mode

Setup Events

This event occurs when the ma mom_machine_mode,


chine mode changes between chine_mode
MILL, TURN, WEDM, and
PUNCH. This event may be used
to re-load the tcl and def files for
a different post that can handle
the kinematics of the new ma
chine mode. Note that MILL
mode uses x,y,z,i,j,k

MOM_msys

Setup Events

This event occurs at the begin mom_msys_origin(3), mom_msys_matrix(9)


ning of each tool path. It is used
by the CLSF output function to
describe the relationship be
tween the coordinate system
used to generate the tool path
and the absolute coordinate sys
tem in NX.

MOM_spindle_off

Setup Events

This event occurs when a spindle mom_spindle_status, mom_spindle_text


off UDE is active in End Post ma
chine control. This event is used
to turn the spindle off.

A-48

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

mom_prev_ma

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


MOM_end_of_group

Setup Events

This event occurs at the end of mom_group_name


the group. The name of the
group is the group name that is
ending. There is an end of group
paired with each start of group
events.

MOM_spindle_rpm

Setup Events

This event occurs when the


spindle UDE is active in the Start
Post machine control dialog in
the operation or attached to a
group.
Much of this data
(mom_spindle_mode,
mom_spindle_speed,
mom_spindle_direction,
mom_spindle_rpm,
mom_spindle_maximum_rpm)
wi

mom_spindle_status,
mom_spindle_range,
mom_spindle_mode,
mom_spindle_speed,
mom_spindle_direction, mom_spindle_rpm,
mom_spindle_maximum_rpm,
mom_spindle_text

MOM_spindle_css

Setup Events

This event occurs when the


spindle UDE is active in the Start
Post machine control dialog in
the operation or attached to a
group.
Much of this data
(mom_spindle_mode,
mom_spindle_speed,
mom_spindle_direction,
mom_spindle_rpm,
mom_spindle_maximum_rpm)
wi

mom_spindle_status,
mom_spindle_range,
mom_spindle_mode,
mom_spindle_speed,
mom_spindle_direction, mom_spindle_rpm,
mom_spindle_maximum_rpm,
mom_spindle_text

MOM_start_of_group

Setup Events

This event occurs at the start of mom_group_name,


the group.
ent_group_name

MOM_start_of_path

Setup Events

This event occurs at the start of


each operation. The operation
data generated will vary depend
ing on the operation type. At this
time all of the operation parame
ters, parameters of the tool used
in the operation and display pa
rameters will be output.

MOM_start_of_program

Setup Events

This event occurs at the start of mom_date,


mom_logname,
the program. Note that when this mom_next_tool_name, mom_next_tool_num
event is generated, only informa ber, mom_part_name, mom_part_unit
tion available at the program lev
el will generated. No operation
data is available.

MOM_tool_change

Setup Events

This event occurs at the begin mom_next_tool_name, mom_next_tool_num


ning of an operation if there was ber, mom_next_tool_status
a change in the tool from the pre
vious operation.

MOM_auxfun

Machine Control Machine Control Event ''AUX mom_auxfun, mom_auxfun_text, mom_aux


Events
FUN''.
fun_text_toggle

MOM_clamp

Machine Control Machine


Control
Event mom_clamp_status,
Events
''CLAMP''. You can activate auto mom_clamp_text
clamping in Postbuilder by spec
ifying
the
UDE
CLAMP/_,AUTO,ON or OFF.

MOM_coolant_on

Machine Control Machine Control Event ''Coolant mom_coolant_status,


mom_coolant_mode,
Events
On''
mom_coolant_text, mom_coolant_text_toggle

MOM_coolant_off

Machine Control Machine Control Event ''Coolant mom_coolant_status, mom_coolant_text


Events
Off''

MOM_cut_wire

Machine Control Machine Control Event ''Cut mom_cut_wire_text


Events
Wire''

EEDS
All Rights Reserved

mom_par

mom_lathe_spindle_axis, mom_next_tool_sta
tus,
mom_operation_type,
mom_tool_in
sert_width,
mom_tool_tip_offset,
mom_tool_x_imaginery_offset,
mom_tool_z_imaginery_offset,
mom_path_name,
mom_tool_name,
mom_tool_number, mom_tool_adjust_register,
mom_tool_type,

Post Building Techniques


Student Guide

mom_clamp_axis,

A-49

MOM VARIABLES, EVENTS, COMMANDS


MOM_cutcom_on

Machine Control Machine Control Event ''Cutter mom_cutcom_status,


mom_cutcom_mode,
Events
Compensation''. Note that there mom_cutcom_adjust_register,
mom_cut
are two ways to activate cutter com_plane, mom_cutcom_text
compensation. The Planar Mill
and Cavity Mill machine control
dialogs have an automatic cutter
compensation option that will
output cutcom on and off events t

MOM_cutcom_off

Machine Control Machine Control Event ''Cutter mom_cutcom_status, mom_cutcom_text


Events
Compensation''

MOM_delay

Machine Control Machine Control Event ''Dwell''


Events

mom_delay_mode,
mom_delay_value,
mom_delay_revs, mom_delay_text

MOM_flush

Machine Control Machine Control Event ''Flush''


Events

mom_flush_status,
mom_flush_pressure,
mom_flush_text

MOM_flush_tank

Machine Control Machine Control Event ''Flush mom_flush_tank, mom_flush_tank_text


Events
Tank''

MOM_length_compensation

Machine Control Machine Control Event ''Tool mom_length_comp_register,


Events
Length Compensation''
mom_length_comp_register_text

MOM_lintol

Machine Control Machine Control Event ''LIN mom_lintol_status, mom_lintol, mom_lintol_text


Events
TOL'' postprocessor command.
This event will be used by UG
Post to activate linearization for
four and five axis posts.

MOM_load_tool

Machine Control Machine Control Event ''Load/


Events
Tool'' This event will not cause a
tool change event. It is used to
pass machine information to the
post. In NX2 the MOM_load_tool
event will contain the same infor
mation
that
the
MOM_tool_change event con
tains. Prior to

MOM_operator_message

Machine Control Machine Control Event ''Opera mom_operator_message_status, mom_opera


Events
tor Message''.
tor_message

MOM_opskip

Machine Control Machine Control Event ''Opera mom_opskip_status, mom_opskip_text


Events
tional Skip''

MOM_opstop

Machine Control Machine Control Event ''Option mom_opstop_text


Events
al Stop''

MOM_origin

Machine Control Machine Control Event ''Origin''


Events

mom_origin(0), mom_origin(1), mom_origin(2),


mom_origin_text

MOM_power

Machine Control Machine Control Event ''Power''


Events

mom_power_value, mom_power_text

MOM_pprint

Machine Control Machine


Events
''PPRINT''

MOM_prefun

Machine Control Machine Control Event ''Prefun'' mom_prefun, mom_prefun_text


Events

MOM_rotate

Machine Control Machine Control Event ''Rotate''


Events

MOM_select_head

Machine Control Machine Control Event ''Select mom_head_type, mom_head_text


Events
Head''

MOM_sequence_number

Machine Control Machine Control Event ''Se mom_sequence_mode, mom_sequence_num


Events
quence number''
ber, mom_sequence_increment, mom_se
quence_frequency, mom_sequence_text

A-50

Post Building Techniques


Student Guide

Control

EEDS
All Rights Reserved

mom_flush_guides,
mom_flush_register,

mom_tool_number, mom_tool_change_type,
mom_tool_adjust_register, mom_tool_x_offset,
mom_tool_y_offset,
mom_tool_z_offset,
tool_head, mom_tool_angle, mom_tool_radius,
mom_tool_text

Event mom_pprint

mom_rotate_axis_type, mom_rotation_mode,
mom_rotation_angle, mom_rotation_direction,
mom_rotation_reference_mode,
mom_rota
tion_text

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


MOM_set_modes

Machine Control Machine Control Event ''Set mom_output_mode,


mom_arc_mode,
Events
Mode''
mom_feed_set_mode, mom_parallel_to_axis,
mom_machine_mode, mom_modes_text

MOM_stop

Machine Control Machine Control Event ''Stop''


Events

MOM_text

Machine Control Machine Control Event ''User De mom_user_defined_text,


mom_record_text,
Events
fined Text''
mom_record_fields, mom_field_count

MOM_thread_wire

Machine Control Machine Control Event ''Thread mom_thread_wire_text


Events
Wire''

MOM_tlset

Machine Control Machine Control Event ''TLSET'' mom_tool_tracking_height


Events
postprocessor command. This
event occurs when the tool track
ing height is specified. This is
used for distance and time cal
culations.

MOM_tool_preselect

Machine Control Machine Control Event ''Tool mom_tool_preselect_number, mom_tool_pre


Events
pre-select''
select_text

MOM_translate

Machine Control Machine Control Event ''TRANS'' mom_translate(0),


mom_translate(1),
Events
postprocessor command.
mom_translate(2), mom_translate_text

MOM_wire_angles

Machine Control Machine Control Event ''Wire mom_wire_slope,


Events
Angles''
mom_wire_angle_text

MOM_wire _cutcom

Machine Control Machine Control Event ''Cutter mom_wire_cutcom_status, mom_wire _cut


Events
Compensation''
com_mode, mom_wire_cutcom_adjust_regis
ter, mom_wire_cutcom_text

MOM_wire_guides

Machine Control Machine Control Event ''Wire mom_wire_guides_upper_plane,


Events
Guides''
mom_wire_guides_lower_plane,
mom_wire_height, mom_wire_guides_text

MOM_circular_move

Move Events

This event occurs at a motion on mom_arc_direction, mom_arc_intol_fraction,


an arc.
mom_arc_radius,
mom_arc_tolerance,
mom_arc_tool_diameter,
mom_arc_tool_ra
dius, mom_arc_center, mom_mom_arc_axis,
mom_pos_arc_center,
mom_pos_arc_axis,
mom_pos_arc_plane, mom_ref_pos_arc_cen
ter, plus all mom varia

MOM_from_move

Move Events

This event occurs for a motion mom_from_alt_pos,


type FROM.
mom_from_ref_pos

MOM_gohome_move

Move Events

This event occurs for a motion mom_gohome_alt_pos,


type
GOHOME
or
GO mom_gohome_ref_pos
HOME_DEFAULT.

MOM_initial_move

Move Events

This event occurs at the first mo All mom variables generated by the MOM_lin
tion after a tool change event. If ear_move event.
the first motion is a cycle move, a
MOM_initial_move event is gen
erated for the mom_cycle_rap
id_to_pos.

MOM_lathe_thread

Move Events

This event occurs for when the


threading is activated and estab
lishes the parameters for thread
motion.

EEDS
All Rights Reserved

mom_stop_text

mom_wire_angle,

mom_from_pos,
mom_gohome_pos,

mom_lathe_thread_type,
mom_lathe_thread_value,
mom_lathe_thread_advance_type,
mom_lathe_thread_increment,
mom_lathe_thread_lead,
mom_lathe_thread_lead_I,
mom_lathe_thread_lead_k,
mom_lathe_thread_tpi,
mom_lathe_thread_feed_rate,
mom_last_z_pos

Post Building Techniques


Student Guide

A-51

MOM VARIABLES, EVENTS, COMMANDS


MOM_linear_move

Move Events

This event occurs at each linear mom_alt_pos,


mom_feed_rate,
motion at programmed feedrate. mom_feed_rate_number,
mom_feed_rate_mode, mom_feed_rate_out
put_mode,
mom_feed_rate_per_rev,
mom_last_z_pos,
mom_mcs_coord_mode,
mom_mcs_go_delta,
mom_mcs_goto,
mom_motion_distance,
mom_motion_type,
mom_out_angle_pos, mom_paint_

MOM_nurbs_move

Move Events

This event occurs at each nurb


motion at the programmed fee
drate. The data varies depend
ing on the kinematics variable
mom_kin_nurbs_output_type.

MOM_rapid_move

Move Events

This event occurs at each motion All mom variables generated with the MOM_lin
at Rapid feedrate.
ear_move event.

MOM_bore

Cycle Definition This event occurs when the bore All the mom variables generated with the
Events
cycle is activated and estab MOM_drill event.
lishes the parameters for the
event MOM_bore_move.

MOM_bore_back

Cycle Definition This event occurs when the bore mom_cycle_orient, plus all the mom variables
Events
back cycle is activated and es generated in the MOM_drill event.
tablishes the parameters for the
event MOM_bore_back_move.

MOM_bore_drag

Cycle Definition This event occurs when the bore All the mom variables generated with the
Events
drag cycle is activated and es MOM_drill event.
tablishes the parameters for the
event MOM_bore_drag_move.

MOM_bore_dwell

Cycle Definition This event occurs when the bore All the mom variables generated with the
Events
dwell cycle is activated and es MOM_drill event.
tablishes the parameters for the
event MOM_bore_dwell_move.

MOM_bore_manual

Cycle Definition This event occurs when the bore All the mom variables generated with the
Events
manual cycle is activated and es MOM_drill event.
tablishes the parameters for the
event
MOM_bore_manu
al_move.

MOM_bore_manual_dwell

Cycle Definition This event occurs when the bore All the mom variables generated with the
Events
manual cycle is activated and es MOM_drill event.
tablishes the parameters for the
event
MOM_bore_manu
al_move.

MOM_bore_no_drag

Cycle Definition This event occurs when the bore mom_cycle_orient, plus all the mom variables
Events
no drag cycle is activated and es generated in the MOM_drill event.
tablishes the parameters for the
event
MOM_bore_no_drag_move.

MOM_drill

Cycle Definition This event occurs when the drill


Events
cycle is activated and estab
lishes the parameters for the
event MOM_drill_move.

MOM_drill_break_chip

Cycle Definition This event occurs when the drill mom_cycle_step1,


mom_cycle_step2,
Events
break chip cycle is activated and mom_cycle_step3 plus all the mom variables
establishes the parameters for generated in the MOM_drill event.
the
event
MOM_drill_break_chip_move.

A-52

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

mom_last_z_pos,
mom_nurbs_order,
mom_nurbs_point_count,
mom_nurbs_knot_count, mom_nurbs_points,
mom_nurbs_knots, mom_nurbs_coefficients

mom_cycle_status,
mom_cycle_feed-rate,
mom_cycle_feed_rate_per_rev,
mom_cycle_delay_mode,
mom_cycle_feed_rate_mode, mom_cycle_re
tract_mode,
mom_cycle_retract_to,
mom_cycle_feed_to,
mom_cycle_rapid_to,
mom_cycle_clearance_plane, mom_cycle_op
tion

Unigraphics NX 2
Post Builder V3.2

MOM VARIABLES, EVENTS, COMMANDS


MOM_drill_counter_sink

Cycle Definition This event occurs when the drill


Events
countersink cycle is activated
and establishes the parameters
for the event MOM_drill_count
er_sink_move.

mom_cycle_counter_sink_dia,
mom_cycle_hole_dia, mom_cycle_tool_angle,
plus all the mom variables generated in the
MOM_drill event.

MOM_drill_csink_dwell

Cycle Definition This event occurs when the drill


Events
countersink dwell cycle is acti
vated and establishes the pa
rameters
for
the
event
MOM_drill_csink_dwell_move.

mom_cycle_counter_sink_dia,
mom_cycle_hole_dia, mom_cycle_tool_angle,
plus all the mom variables generated in the
MOM_drill event.

MOM_drill_deep

Cycle Definition This event occurs when the drill mom_cycle_step1,


mom_cycle_step2,
Events
deep cycle is activated and es mom_cycle_step3, plus all the mom variables
tablishes the parameters for the generated in the MOM_drill event.
event MOM_drill_deep_move.

MOM_drill_dwell

Cycle Definition This event occurs when the drill All the mom variables generated with the
Events
dwell cycle is activated and es MOM_drill event.
tablishes the parameters for the
event MOM_drill_dwell_move.

MOM_drill_text

Cycle Definition This event occurs when the drill mom_cycle_text, plus all the mom variables
Events
text cycle is activated and estab generated in the MOM_drill event.
lishes the parameters for the
event MOM_drill_text_move.

MOM_tap

Cycle Definition This event occurs when the tap All the mom variables generated with the
Events
cycle is activated and estab MOM_drill event.
lishes the parameters for the
event MOM_tap_move.

MOM_bore_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the bore cycle is active and ear_move
event
and
the
uses the parameters established MOM_drill_move_event.
by the bore cycle for the output.

MOM_bore_back_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the bore back cycle is ac ear_move
event
and
the
tive and uses the parameters es MOM_drill_move_event.
tablished by the bore back cycle
for the output.

MOM_bore_drag_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the bore drag cycle is ac ear_move
event
and
the
tive and uses the parameters es MOM_drill_move_event.
tablished by the bore drag cycle
for the output.

MOM_bore_dwell_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the bore dwell cycle is ac ear_move
event
and
the
tive and uses the parameters es MOM_drill_move_event.
tablished by the bore dwell cycle
for the output.

MOM_bore_manual_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the bore manual cycle is ear_move
event
and
the
active and uses the parameters MOM_drill_move_event.
established by the bore manual
cycle for the output.

MOM_bore_manual_dwell_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the bore manual dwell ear_move
event
and
the
cycle is active and uses the pa MOM_drill_move_event.
rameters established by the bore
manual dwell cycle for the out
put.

MOM_bore_no_drag_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the bore no drag cycle is ear_move
event
and
the
active and uses the parameters MOM_drill_move_event.
established by the bore no drag
cycle for the output.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

A-53

MOM VARIABLES, EVENTS, COMMANDS


MOM_drill_move

Cycle
Events

Move This event occurs at the motion


when the drill cycle is active and
uses the parameters established
by the drill cycle for the output.

MOM_drill_break_chip_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the drill break chip cycle is ear_move
event
and
the
active and uses the parameters MOM_drill_move_event.
established by the drill break
chip cycle for the output.

MOM_drill_counter_sink_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the drill countersink cycle ear_move
event
and
the
is active and uses the parame MOM_drill_move_event.
ters established by the drill coun
tersink cycle for the output.

MOM_drill_csink_dwell_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the drill countersink dwell ear_move
event
and
the
cycle is active and uses the pa MOM_drill_move_event.
rameters established by the drill
countersink dwell cycle for the
output.

MOM_drill_deep_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the drill deep cycle is active ear_move
event
and
the
and uses the parameters estab MOM_drill_move_event.
lished by the drill deep cycle for
the output.

MOM_drill_dwell_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the drill dwell cycle is active ear_move
event
and
the
and uses the parameters estab MOM_drill_move_event.
lished by the drill dwell cycle for
the output.

MOM_drill_text_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the drill text cycle is active ear_move
event
and
the
and uses the parameters estab MOM_drill_move_event.
lished by the drill text cycle for the
output.

MOM_tap_move

Cycle
Events

Move This event occurs at the motion All the mom variables generated with MOM_lin
when the tap cycle is active and ear_move
event
and
the
uses the parameters established MOM_drill_move_event.
by the tap cycle for the output.

MOM_cycle_off

Other
Events

Cycle This event occurs when a pre mom_cycle_status


vious cycle is deactivated.

MOM_cycle_plane_change

Other
Events

Cycle This event is triggered when the mom_cycle_clearance_pos


current work surface is at a high
er level than the previous while in
cycle motion.

MOM_first_move

Move Events

A-54

Post Building Techniques


Student Guide

mom_cycle_clearance_plane,
mom_cycle_delay_revs,
mom_cycle_rap
id_to_pos,
mom_cycle_retract_to_pos,
mom_cycle_feed_to_pos, plus all the mom vari
ables generated with MOM_linear_move event.

This event occurs at the start of All mom variables generated by the MOM_lin
an operation that does not have a ear_move event.
tool change.

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Custom Command Examples

Custom Command Examples


Appendix B

Examples of some useful Custom Commands


=======================================
# Add the following in a custom command procedure called ATTRIBUTE
# The following lines allow the use of global variables in this procedure

global mom_tool_name mom_attr_OPER_TITLE1


mom_attr_TOOL_TOOL_TITLE1
# retrieve attribute value
MOM_output_literal "( The value for the operation attribute is\
$mom_attr_OPER_TITLE1 )"
=======================================
# Add the following lines in custom command procedure called EXPRESSION
# The following lines allow the use of global variables in this procedure
global mom_path_name MOM_ask_ess_exp_value
global mom_sys_control_in mom_sys_control_out
# call in the control in & out codes
set ci " "
set co " "
if {[info exists mom_sys_control_in] == 1 } { set ci $mom_sys_control_in }
if {[info exists mom_sys_control_out] == 1 } { set co $mom_sys_control_out }
# retrieve expression value
set exp1 [MOM_ask_ess_exp_value fixture1];#fixture 1 is the expression name
MOM_set_seq_off
MOM_output_literal "$co THE VALUE FOR EXPRESSION FIXTURE1 IS\
[format "%2.f" $exp1] $ci"
MOM_set_seq_on
=========================================

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

B-1

Custom Command Examples

=========================================
# This custom command will grab the group program name and strip off the
# first Alpha character and dump the rest at the start of the output file. To use
# this custom command, change or create a program name
# with what you want i.e. P123456789, the custom command will then drop the
# "P" and output the rest
global mom_group_name

set partno_txt " NONE "


if {[info exists mom_group_name] == 1} { set partno_txt $mom_group_name}
MOM_set_seq_off
MOM_output_literal "PARTNO [string toupper [string range $partno_txt 1
end]]"
MOM_set_seq_on
=========================================
#
# proc MOM_end_of_path {} CALLED AT THE END OF EACH PATH
#
# add a custom command to the Start_of_program and in it
# add this line set accumulated_time 0". This will start the time clock at zero
#
global mom_machine_time accumulated_time mom_operation_name
global mom_sys_control_in mom_sys_control_out
#
# call in the control in & out codes
#
set ci " "
set co " "
if {[info exists mom_sys_control_in] == 1 } { set ci $mom_sys_control_in }
if {[info exists mom_sys_control_out] == 1 } { set co $mom_sys_control_out }
set op_time [expr $mom_machine_time - $accumulated_time]
MOM_set_seq_off
MOM_output_literal "$co--------------------------$ci"
MOM_output_literal "$co[string toupper [format "Operation: %s Time: %.2f"\
$mom_operation_name $op_time]]$ci"
MOM_output_literal "$co--------------------------$ci"
MOM_set_seq_on
set accumulated_time $mom_machine_time

=========================================

B-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Custom Command Examples

========================================

#
# Add to start of path procedure
#
global mom_path_name mom_part_material_description
global mom_tool_name mom_oper_method mom_tool_catalog_number
global mom_sys_control_in mom_sys_control_out mom_tool_name
global mom_tool_number
#
# call in the control in & out codes
#
set ci " "
set co " "
if {[info exists mom_sys_control_in] == 1 } { set ci $mom_sys_control_in }
if {[info exists mom_sys_control_out] == 1 } { set co $mom_sys_control_out }
set cat_info "NONE ENTERED"
if {[info exists mom_tool_catalog_number] == 1} {set cat_info\
$mom_tool_catalog_number}
MOM_set_seq_off
MOM_output_literal "$co PATH NAME : [string toupper $mom_path_name]\
WITH TOOL NO: [string toupper $mom_tool_number] $ci"
MOM_output_literal "$co TOOL NAME : [string toupper $mom_tool_name]\
TOOL CATALOG NO. [string toupper $cat_info] $ci"
MOM_output_literal "$co METHOD : [string toupper $mom_oper_method]\
$ci"
MOM_set_seq_on

=========================================

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

B-3

Custom Command Examples

=========================================
# custom command to reset the sequence number to match the tool number
global mom_sys_seqnum_start
global mom_sys_seqnum_incr
global mom_sys_seqnum_freq
global mom_tool_number
MOM_reset_sequence $mom_tool_number $mom_sys_seqnum_incr\
$mom_sys_seqnum_freq

=========================================
#
# add this custom command to the spindle rpm event under machine control
#event
global mom_spindle_rpm
if {[info exists mom_spindle_rpm] == 1} {
if {$mom_spindle_rpm <= 450 } {
MOM_output_literal "M41"
} elseif { $mom_spindle_rpm > 450 && $mom_spindle_rpm <=900 } {
MOM_output_literal "M42"
} else { MOM_output_literal "M43"}
}
=========================================
#
# Reformat the time stamp to make it organized
#
set tmp [string range $mom_date 4 10][string range $mom_date 20 23]
MOM_output_literal "(DATE: $tmp)"
set tmp [string range $mom_date 11 15]
MOM_output_literal "(TIME: $tmp)"
=========================================

B-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Custom Command Examples

=========================================
global mom_tool_catalog_number mom_tool_number
global mom_sys_control_in mom_sys_control_out mom_tool_name
# call in the control in & out codes
set ci " "
set co " "
if {[info exists mom_sys_control_in] == 1 } { set ci $mom_sys_control_in }
if {[info exists mom_sys_control_out] == 1 } { set co $mom_sys_control_out }
set cat_info "NONE ENTERED"
if {[info exists mom_tool_catalog_number] == 1} {set cat_info
$mom_tool_catalog_number}
MOM_set_seq_off
MOM_output_literal "$co------------------------- $ci"
MOM_output_literal "$co TOOL NAME : [string toupper $mom_tool_name]\
TOOL CATALOG NO. [string toupper $cat_info] $ci"
MOM_output_literal "$co------------------------- $ci"
MOM_set_seq_on
=========================================

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

B-5

Custom Command Examples

(This Page Intentionally Left Blank)

B-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

Advanced Post Building Topics


Appendix C

PURPOSE

OBJECTIVES

This appendix describes procedures to build


advanced, complex, custom Post postprocessors,
modify existing postprocessors and discusses, in
detail, the various components which comprise
UG/Post.

Upon completion of this lesson, you will be able to:


D

Modify and customize UG/Post postprocessors.

Construct and use Definition files and Event


Handlers.

Debug a UG/Post postprocessor.

Postprocess from Unigraphics.

Postprocess from the operating system.

This lesson contains the following activities:


Activity

Page

C-1 Modifying an Event Handler . . . . . . . . . . . . . . . . . C-4


C-2 Modifying a Definition File . . . . . . . . . . . . . . . . . . C-9

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-1

Advanced Post Building Topics

Guide to modifying and customizing existing postprocessors


The key to modifying and customizing existing postprocessors is the ability to
edit and modify the Event Handler (.tcl file) and the Definition file (.def file).

Event Handler

Part File
1

Event Generator
2
Event Handler

Definition File

4
UG/POST

Output File
6

Part File

EVENT GENERATOR extracts information from the part and sends information to the postprocessor

EVENT HANDLER processes each EVENT according to instructions

EVENTS processed by the EVENT HANDLER are formated according to the Definition File

UG/POST Postprocessor controls entire sequence

Postprocessed machine control instructions are written to an Output file

C-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

The Event Handler is a set of instructions that are developed for particular
machine tool/controller combinations. Each Event Handler must contain a set
of instructions for each type of Event that UG/Post will process. These
instructions will define how the tool path data is processed and how each Event
is executed at the machine tool.
These instructions are defined by the Tcl scripting language. The Tcl scripting
language acts as the translator" for UG/Post.
For each Event that the Event Handler will process, an existing Tcl procedure
must exist. The Manufacturing Output Manager (MOM) will invoke this
procedure when an Event is executed by the Event Generator. For each
sequential event generated from the MOM, the Event Handler file will process
the Event in sequential order. If you do not want an Event Handler to process a
particular Event type, do not include the Tcl procedure for that Event in the
Event Handler.
The Tcl procedure name for each Event created must be identical to the Event
name invoked by the Event Generator. For example, the procedure name for a
start of program Event would be MOM_start_of_program, for a tool change
Event would be MOM_tool_change.
The parameters associated with each Event are passed to the Event Handler as
global variables. Appendix B, contains a description of typical Event types and
their associated variables.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-3

Advanced Post Building Topics

Activity C-1: Modifying an Event Handler


In this activity you will perform various modifications to the Event Handler,
which you created previously.
Step 1 Modify the procedure start_of_program in your
***_test_post.tcl file (an example follows the last
stepaction item).

Double click on the file ***_test_post.tcl.

Modify the start_of_program to output %4711" without a


sequence number.

Add a header line with no N".

Output the following globals: mom_date; mom_logname;


mom_part_name.

Add a command to turn the Sequence Number on.

Output the following on a separate line: G40 G80 G17"

Example: Find the line containing MOM_start_of_program.


After the line that reads:
LIST_FILE_HEADER ; #list header in commentary listing"

insert the following:


MOM_set_seq_off

;#turns off the sequence number

MOM_output_literal %4711"

;#dumps directly to output file

global mom_date mom_logname mom_part_name


MOM_output_literal "
MOM_output_literal Part Name

:[string toupper [file tail $mom_part_name]]"

MOM_output_literal Created by

:[string toupper $mom_logname]"

MOM_output_literal Creation date :[string to upper $mom_date]"


MOM_set_seq_on

;#turns sequence numbers on

MOM_output_literal G40 G80 G17";#dumps directly to output file

C-4

Save the file.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics


-

Verify the output by posting the operations listed under


T12345A" from the pbt_mill_test.prt file.

Step 2 Modify the procedure start_of_path in your


***_test_post.tcl file (an example follows).
-

Modify the start_of_path to output:


D

mom_operation_type

mom_path_name

mom_tool_name

mom_tool_type

mom_tool_number

Example: After the line that reads:


PB_CMD_start_of_operation_force_addresses"

insert the following:


global mom_operation_type mom_path_name mom_tool_name
global mom_tool_type mom_tool_number
MOM_set_seq_off

;#turns off sequence numbers

MOM_output_literal Operation Type":[string to upper $mom_operation_type]"


MOM_output_literal Path Name

:[string toupper $mom_part_name]"

MOM_output_literal Tool Name

:[string toupper $mom_tool_name]"

MOM_output_literal Tool Type

:[string to upper $mom_tool_type]"

MOM_output_literal Tool No

:[string to upper $mom_tool_number]"

MOM_set_seq_on

;#turns sequence numbers on

Save the file.

Verify the output by posting the operations listed under the


parent T12345A" from the pbt_mill_test.prt file.

Step 3 Modify the ***_test_post.tcl file to output G11 for a


linear move, G12 for CLW move and G13 for CCLW
move.
-

In the ***_test_post.tcl file, locate the line


set mom_sys_linear_code 1" and change the 1 to 11.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-5

Advanced Post Building Topics


-

In the same file, locate the line


set mom_sys_circle_code(CLW)
12.

In the same file, locate the line


set mom_sys_circle_code(CCLW)
13.

Save the file.

Verify the output by posting the operations listed under the


parent T12345A" from the pbt_mill_test.prt file.

2" and change the 2 to

3" and change the 3 to

This completes the activity.

C-6

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

Definition File
Part File
1

Event Generator
2
Event Handler

Definition File

4
UG/POST

Output File
6

Part File

EVENT GENERATOR extracts information from the part and sends information to the postprocessor

EVENT HANDLER processes each EVENT according to instructions

EVENTS processed by the EVENT HANDLER are formated according to the Definition File

UG/POST Postprocessor controls entire sequence

Postprocessed machine control instructions are written to an Output file

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-7

Advanced Post Building Topics

The Definition file contains information about the specific machine tool that
you are creating the postprocessor for.
Most NC/CNC machines use addresses to instruct a machine how to perform a
function. As an example, the addresses X, Y, and Z are used to store the value
of the X, Y, and Z coordinate of the end position of a linear move. Each
command in an NC/CNC program changes the state of the machine by changing
the state of the machine's addresses. The information in the Definition file is
used by UG/Post to format commands to a form that is understood by the
machine tool controller.
Information in the Definition file pertains to machine attributes, such as tool
changer, spindle speeds, and travel limits; addresses supported by the machine,
such as X,Y, and Z for linear motion, S for spindle and F for feed rate; the
attributes for each machine address, such as format, minimum and maximum
travel; and a set of block templates that describes how the addresses are
combined to perform an action by the machine tool. For example, a linear move
can be designated by G01 X [Xval],Y [Yval], and Z [Zval].

An example of a Definition file can be found in Appendix A.

C-8

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

Activity C-2: Modifying a Definition File


In this activity you will perform various modifications to the Definition file
which you previously created.
Step 1 Modifying your ***_test_post.def file to insert a space
between addresses.
-

Double click on the file ***_test_post.def.

Modify the file to output NC code with two spaces between


the address.

Change the value for word separator.

Save the file.

Verify the output by posting the operation T12345A" from


the pbt_mill_test.prt file.

Modify the file to output NC code without a space between


the address.

Change the value for the word separator.

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Step 2 Modifying your ***_test_post.def file to alter the sequence


number.
-

If necessary, open the file ***_test_post.def.

Modify the file to have the sequence number start at 1 and


increment by 1.

Save the file.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-9

Advanced Post Building Topics


-

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Modify the file to have the sequence number start at 5,


increment by 10 and output every other block increment.

Save the file.

Verify the output by posting the operations under


T12345A" from the pbt_mill_test.prt file.

Step 3 Modifying your ***_test_post.def file to alter the


characteristics of the sequence number word.

If necessary, open the file ***_test_post.def.

Modify the file to have the sequence number start at 10 and


increment by 10 and have no leading zeros (refer to
Appendix D for format structure).

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Modify the file to have the sequence number start at 10,


increment by 10 and output leading zeros (format for
sequence number to be 4 characters).

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Step 4 Modifying your ***_test_post.def file to alter the


characteristics of the coordinate words.
-

C-10

Modify the file to have coordinate output to contain 5 whole


digits, 3 fractional digits, no leading zeros, trailing zeros and
no decimal point.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics


-

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Modify the file to have coordinate output to contain 4 whole


digits, 4 fractional digits, leading and trailing zeros and no
decimal point.

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Step 5 Modifying your ***_test_post.def file to control word


output.
-

Modify the file to use the Y value for X and the X value for
Y for linear moves.

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Add the Z coordinate to the first move.

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-11

Advanced Post Building Topics

Step 6 Modify the output for the Event Cycle Drill.


-

Output the following for the Event type Cycle Drill:


G81 X Y E R
X Y is the start position of the drill cycle.
E is the depth of the hole (normally the Z value).
R is the rapid position.

Save the file.

Verify the output by posting a cycle operation under the


parent T12345A" from the pbt_mill_test.prt file.

Step 7 Modifying your ***_test_post.def file to change the


content of arc motion blocks.

Modify the file to output the circle center coordinates for all
arc motion blocks.

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Step 8 Alter the rapid move procedure.


-

In place of G00, output G01 with an R.


G01 X Y Z R

C-12

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

Step 9 Alter the rapid move procedure.


-

For all rapid moves, output F0.


G00 X Y Z F0

Save the file.

Verify the output by posting the operations under the parent


T12345A" from the pbt_mill_test.prt file.
This completes the activity.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-13

Advanced Post Building Topics

Machine Kinematics
Machine Kinematics apply to machine tool motions. UG/Post uses kinematic
variables which define machine tool specific information used by the Event
Generator. Kinematic variables defined by the Event Handler determine how
the Event Generator converts the x,y,z,i,j,k tool path coordinates into machine
tool coordinates. Kinematic variables are also used to define the basic type of
machine such as lathe, mill or wire EDM.
Basic types of machines are defined by the kinematic variable
mom_kin_machine_type. Current values for this variable are:

3_axis_mill

4_axis_head

4_axis_table

5_axis_dual_table

5_axis_dual_head

5_axis_head_table

2_axis_wedm

4_axis_wedm

When the machine type is set to lathe, all coordinates in the tool path are
mapped to lathe coordinates. X, Y, Z tool path data is mapped to X, Z machine
tool data.
When the machine type is set to mill, the x,y,z,i,j,k tool path coordinates are
mapped to x, y, z, 4thaxis rotary and 5thaxis rotary coordinates. X, Y, Z, I, J,
K tool path data is mapped to X,Y,Z, A, B machine tool data.
The machine tool type defines the number of axes of motion. Each rotary axis
has the following characteristics:

C-14

a plane of rotation

travel limits

direction of rotation

zero position

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

Circles
The kinematic variable, mom_kin_arc_output_mode determines the data and
number of blocks that will be generated for arcs from the tool path. Associated
with this variable is a parameter which will control arc output type. The
parameter used can be one of the following:
D

Full_Circle a circle_move Event will be generated in 360 degree


increments.

Quadrant a circle_move Event will be generated for each quadrant


boundary crossed.

linear arcs will cause the Event Generator to break the arcs into
linear GOTO events.

The kinematic variable, mom_kin_arc_valid_plane, determines what plane that


the Event Generator will use to generate circle_move events. The parameter
used can be any of the following:
D

XYZ arcs will be generated in all three principal planes

XY arcs will be generated only in the XY plane

YZ arcs will be generated only in the YZ plane

ZX arcs will be generated only in the ZX plane

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-15

Advanced Post Building Topics

Advanced Kinematics
For a 5axis machine, one of the following values is assigned to the kinematics
variable mom_kin_machine_type to designate the machine type:
D
D
D

5_axis_dual_table
5_axis_head_table
5_axis_dual_head
Center of Rotation
of 5th Axis

MCS
5th Axis
Center Offset

Center of Rotation
of 4th Axis

Machine Tool
Coordinate System

4th Axis
Center Offset

Coordinate System
Representing 4 and 5Axis

C-16

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

Rotary Axes Designations


The rotary axis is the independent axis that does not change the orientation or
plane of rotation when the second rotary axis moves. In a 5_axis_head_table
configuration, the swivel head is always the independent or 4thaxis.
The rotary axis is the dependent or 5thaxis that does change the orientation or
plane of rotation when the second rotary axis moves.
The CAxis should never be set as the 4th axis.
Independent or
4thaxis

Rotary Head - 4th Axis


Dependent or
5thaxis

Pivot Gauge Offset


Tool Length Offset
4thaxis - A Axis (Head)
5thaxis - B Axis (Table)

Rotary Table - 5th Axis


VALUE

VARIABLE
mom_kin_5th_axis_center_offset(0)
mom_kin_5th_axis_center_offset(1)
mom_kin_5th_axis_center_offset(2)

0
0
0

5Axis head table type

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-17

Advanced Post Building Topics

4th Axis Center Offsets


The variable array mom_kin_4th_axis_center_offset contains the offset values of
the machine tool's zero position to the center of the 4thaxis table. In order for
the post to correctly map the part coordinate system to the machine tool
coordinate system, the offset value must be correct. The following parameters
are used to designate these values:
D

mom_kin_4th_axis_center_offset(0)

X distance

mom_kin_4th_axis_center_offset(1)

Y distance

mom_kin_4th_axis_center_offset(2)

Z distance

5th Axis Center Offsets


The variable array mom_kin_5th_axis_center_offset (the distance from the center
of the 5thaxis to the center of the 4thaxis), contains offset values and indicates
that the 5thaxis of rotation does not intersect the 4thaxis of rotation.
Calculation of the vector is dependent on both axes being at zero degrees. The
value can be one or two coordinates, one is normally used. The perpendicular
vector is measured in the plane of the 4thaxis from the axis of rotation of the
4thaxis to the axis of rotation of the 5thaxis. The following parameters are
used to designate these values:

mom_kin_5th_axis_center_offset(0)

X distance

mom_kin_5th_axis_center_offset(1)

Y distance

mom_kin_5th_axis_center_offset(2)

Z distance

Axis Rotation (Standard or Reverse)


The axis rotation parameter, mom_kin_4th (5th)_axis_rotation, controls how
UG/POST translates the i,j,k tool axis information into rotary motion. The
following parameters are used to designate axis rotation:

C-18

mom_kin_4th_axis_rotation

Standard

mom_kin_4th_axis_rotation

Reverse

mom_kin_5th_axis_rotation

Standard

mom_kin_5th_axis_rotation

Reverse

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

The following guidelines are used to determine type of rotation:


D

Most CNC machines are Standard, with rotation or swiveling in a


clockwise direction to a larger angle (when in question use the
Standard convention, verify that the output is correct).

In the XY plane looking down the Z axis from positive to negative,


rotation clockwise to a larger angle is Standard.

In the ZX plane looking down the Y axis from positive to negative,


rotation clockwise to a larger angle is Standard.

In the YZ plane looking down the X axis from negative to position,


rotation clockwise to a larger angle is Standard.

Each of the mentioned kinematic variables, involving rotation may be set to


standard or reverse as required by the CNC controller.
For example, a dual head machine, as show in the following diagram, can orient
the tool along a (1,0,0) vector by rotation of the Aaxis and Baxis by 90
degrees. If the axis rotation of the A axis is set to reverse, then the A axis angle
will be 90 degrees for the same tool axis vector.
BAxis

AAxis

MCS

4th Axis - B axis


5th Axis - Aaxis
- Pivot Gage Length Offset
- Tool Length Offset
- 5thAxis X-Offset
- 5thAxis Y-Offset
-5thAxis Z-Offset

5Axis Dual Head Type

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-19

Advanced Post Building Topics

The following defines the tool kinematics for 5Axis Dual Head type machine
tools.
set mom_kin_machine_type
set mom_kin_4th_axis_plane
set mom_kin_4th_axis_center_offset(0)
set mom_kin_4th_axis_center_offset(1)
set mom_kin_4th_axis_center_offset(2)
set mom_kin_4th_axis_rotation
set mom_kin_4th_axis_zero_position
set mom_kin_pivot_gauge_offset
set mom_kin_5th_axis_plane
set mom_kin_5th_axis_center_offset(0)
set mom_kin_5th_axis_center_offset(1)
set mom_kin_5th_axis_center_offset(2)
set mom_kin_5th_axis_rotation
set mom_kin_5th_axis_zero_position

5_axis_dual_head
ZX
0.0
0.0
0.0
standard
0.0
100.00
YZ
XX (5th axis x-offset)
YY (5th axis y-offset)
ZZ (5th axis z-offset)
standard
0.0

The distance from the machine tool zero to the center of the 4thaxis is not
needed in this type of machine and must be set to zero.

Zero Position Offset


When both rotary angles on a machine are set to zero, the tool will be aligned
to the Zaxis of the machine tool coordinate system.
The zero position of a rotary axis on some machine tools (typically dual head
and head table machines) is set at a finite angular value.
This value may be defined as a parameter in the kinematic variable
mom_kin_4th_axis_zero_position and mom_kin_5th_axis_zero_position for the 4th
and 5thaxis respectively.

C-20

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

Referring to the following diagram, which represents a head_table 5axis


machine, the zero position for the head may be set to 90 degrees. When the
head is at 0 degrees, the tool will be aligned with the Yaxis of the machine tool
coordinate system, towards the table. The kinematic variables to perform this
function would be set as follows:
D

set mom_kin_4th_axis_zero_position

90.0

set mom_kin_5th_axis_zero_position

0.0

If the tool axis vector were (0,0,1) the output for the Aaxis rotary position
would be 90.0 since the zero position is at 90 degrees.

A Axis Head

MCS

Rotary Head 4thAxis

BAxis Table
1
2

Pivot Gauge Offset


Tool Length Offset

5Axis Head Table Type


The following defines the tool kinematics for 5Axis Head Table type machine
tools.
set mom_kin_machine_type
5_axis_head_table
set mom_kin_4th_axis_plane
YZ
set mom_kin_4th_axis_center_offset(0)
0.0
set mom_kin_4th_axis_center_offset(1)
0.0
set mom_kin_4th_axis_center_offset(2)
0.0
set mom_kin_4th_axis_rotation
standard
set mom_kin_4th_axis_zero_position
0.0
set mom_kin_pivot_gauge_offset
100.0
set mom_kin_5th_axis_plane
ZX
set mom_kin_5th_axis_center_offset(0)
XX
set mom_kin_5th_axis_center_offset(1)
YY
set mom_kin_5th_axis_center_offset(2)
ZZ
set mom_kin_5th_axis_rotation
standard
set mom_kin_5th_axis_zero_position
0.0

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-21

Advanced Post Building Topics

Pivot Point
The pivot point is defined as the point about which the rotary head tilts. On a
dual head machine this point is defined as the 4th and 5thaxis head.
For standard 5axis head table and dual head machines this point may defined
by the following kinematic variable:
D

mom_kin_pivot_gauge_offset

value

This offset is measured from the spindle gauge point to the point of rotation of the
head.
For the machine type shown in the following diagram, the pivot point is defined
by the following kinematic array variable:
D

mom_kin_gauge_to_pivot(0)

XX (XHead Offset)

mom_kin_gauge_to_pivot(1)

XX (YHead Offset)

mom_kin_gauge_to_pivot(2)

XX (ZHead Offset)

On these machines, the pivot point lies on the 4th axis rotation vector.

B-Axis Head

MCS

C-Axis Table
Rotary Head 4th Axis
Rotary Table 5th Axis
Tool Length Offset
XHead Offset
YHead Offset
ZHead Offset
Rotary Axis Vector
mom_kin_5th_axis_center_offset(0)
mom_kin_5th_axis_center_offset(1)
mom_kin_5th_axis_center_offset(2)

5-Axis Head Table Type (Deckel Maho DMCxxU)


C-22

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

For machine tools with axes which are not in principal planes you must install
the advanced kinematics library in the auxiliary directory and use Tcl
procedures to call this library. This library is an optional item.
Use the NONE value for the axis plane and direction cosines or angles to
specify the axis of rotation of the table.
set mom_kin_machine_type
5_axis_head_table
set mom_kin_4th_axis_plane
NONE
set mom_kin_4th_axis_center_offset(0)
0.0
set mom_kin_4th_axis_center_offset(1)
0.0
set mom_kin_4th_axis_center_offset(2)
0.0
set mom_kin_4th_axis_rotation
standard
set mom_kin_4th_axis_zero_position
0.0
Using direction cosines
set mom_kin_4th_axis_vector(0)
set mom_kin_4th_axis_vector(1)
set mom_kin_4th_axis_vector(2)

0.0000
1.0000
1.0000

Using two angles


set mom_kin_4th_axis_angles(0)
set mom_kin_4th_axis_angles(1)

90.0
45.0

The distance from the spindle gauge point to the pivot point (the point about
which the head rotates) is defined using the kinematics array variable
mom_kin_gauge_to_pivot.
set mom_kin_gauge_to_pivot(0) XX (Head Offset X direction)
set mom_kin_gauge_to_pivot(1) YY (Head Offset Y direction)
set mom_kin_gauge_to_pivot(2) ZZ (Head Offset Z direction)
set mom_kin_5th_axis_plane
NONE
set mom_kin_5th_axis_center_offset(0)
0
set mom_kin_5th_axis_center_offset(1)
0.0
set mom_kin_5th_axis_center_offset(2)
0.0
set mom_kin_5th_axis_rotation
standard
set mom_kin_5th_axis_zero_position
0.0
Using direction cosines :
set mom_kin_5th_axis_vector(0)
set mom_kin_5th_axis_vector(1)
set mom_kin_5th_axis_vector(2)

EEDS
All Rights Reserved

0.0000
0.0000
1.0000
Post Building Techniques
Student Guide

C-23

Advanced Post Building Topics

Using two angles:


set mom_kin_5th_axis_angles(0)
set mom_kin_5th_axis_angles(1)

0.0
0.0

Dual Table Kinematics


In the figure below, the BAxis table is mounted on the AAxis table. The MCS
is set to the center of the 5thaxis table when creating operations.
If the machine tool zero is not at the center of the BAxis table (Independent or
5thaxis), then the distance from the machine tool zero to the table center must
be entered in the 4thaxis center offsets kinematic variable.
The distance from the 4th to 5thaxis must be set in 5thaxis center offsets
kinematic variable mom_kin_5th_axis_center_offset.

MCS
B-Axis

A-Axis
1 Set the MCS at the center of the 5th axis (B-axis)
2 Set the 4th-axis (A-axis) center offsets to 0.0
3 Set the 5th-axis center offsets
X OFFSET
Y OFFSET
Z OFFSET
Note: One of the above offsets is always set to 0.0 in this type of machine

Variable

Value

mom_kin_5th_axis_center_offset(0)
mom_kin_5th_axis_center_offset(1)
mom_kin_5th_axis_center_offset(2)

Dual Table Type 5-Axis

C-24

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

The following defines the tool kinematics for 5Axis Dual Table type machine
tools:
set mom_kin_machine_type
set mom_kin_4th_axis_plane
set mom_kin_4th_axis_center_offset(0)
set mom_kin_4th_axis_center_offset(1)
set mom_kin_4th_axis_center_offset(2)
set mom_kin_4th_axis_rotation
set mom_kin_4th_axis_zero_position
set mom_kin_5th_axis_plane
set mom_kin_5th_axis_center_offset(0)
set mom_kin_5th_axis_center_offset(1)
set mom_kin_5th_axis_center_offset(2)
set mom_kin_5th_axis_rotation
set mom_kin_5th_axis_zero_position

5_axis_dual_table
YZ
0.0
0.0
0.0
standard
0.0
ZX
XX
YY
ZZ
standard
0.0

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-25

Advanced Post Building Topics

Special Case 5Axis Dual Table


For machine tools with their axes not in principal planes, you must use the
NONE value for the axis plane and either direction cosines or angles to specify
the axis of rotation of the table.

MCS

B 0.0

B 90.0
B-Axis (4th Axis)

C-Axis
(5th Axis)
4th Axis B-Axis
5th Axis C-Axis
Tool Length Offset
5th-Axis X Offset
5th-Axis Y Offset
5th-Axis Z Offset
4th Axis Rotary Vector

B 180.0

B 270.0

Note: 4th and 5th Axis vectors should intersect

5-Axis Dual Table Special Case (Deckel Maho DMUxxV)


The following defines variables for the machine type and 4thaxis for the
machine tool shown above:
set mom_kin_machine_type
set mom_kin_4th_axis_plane
set mom_kin_4th_axis_center_offset(0)
set mom_kin_4th_axis_center_offset(1)
set mom_kin_4th_axis_center_offset(2)
set mom_kin_4th_axis_rotation
set mom_kin_4th_axis_zero_position

C-26

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

5_axis_dual_table
NONE
0.0
0.0
0.0
standard
0.0

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

Using direction cosines:


set mom_kin_4th_axis_vector(0)
set mom_kin_4th_axis_vector(1)
set mom_kin_4th_axis_vector(2)

0.0000
1.0000
1.0000

Using two angles:


set mom_kin_4th_axis_angles(0)
set mom_kin_4th_axis_angles(1)

270.0
45.0

The distance from the center of the Caxis table to the point about which the
4thaxis or independent axis rotates, is defined using the kinematics array
variable mom_kin_5th_axis_center_offset. The 4th and 5thaxis rotation vector
are usually coplanar.
The following defines variables for the 5thaxis for the previously shown
machine tool:
set mom_kin_5th_axis_plane
set mom_kin_5th_axis_center_offset(0)
set mom_kin_5th_axis_center_offset(1)
set mom_kin_5th_axis_center_offset(2)
set mom_kin_5th_axis_rotation
set mom_kin_5th_axis_zero_position

NONE
1.0
-100.0
-75.0
standard
0.0

Using direction cosines:


set mom_kin_5th_axis_vector(0)
set mom_kin_5th_axis_vector(1)
set mom_kin_5th_axis_vector(2)

0.0000
0.0000
1.0000

Using two angles:


set mom_kin_5th_axis_angles(0)
set mom_kin_5th_axis_angles(1)

EEDS
All Rights Reserved

0.0
0.0

Post Building Techniques


Student Guide

C-27

Advanced Post Building Topics

UG/Post Postprocessing using Runugpost


Runugpost is an interactive menu utility which will allow you to execute the
UG/Post postprocessor outside of aUnigraphics session.
The utility file name and executable command follows:
System

Filename

Execute Command

Windows

ugpost

ugpost

Unix

ugpost

ugpost

You can also activate Runugpost from the Windows desktop by selecting
START  Programs  UNIGRAPHICS  UNIGRAPHICS TOOLS  POST
 UGPOST

C-28

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Advanced Post Building Topics

SUMMARY

The flexibility of Post Builder allows for the


creation of postprocessors for most milling,
turning and wire edm applications. In those
situations that the Post Builder cannot
provide the output that is required,
modification of the Definition and Event
files are required. This appendix covers
topics in:
D

The use and modification of Definition files.

The use and modification of Event Handlers.

Advanced techniques to customize and


modify UG/Post postprocessor.

Postprocessing from the operating system.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

C-29

Advanced Post Building Topics

(This Page Intentionally Left Blank)

C-30

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Glossary

Glossary

Address -- In NC output, this tells the NC controller where to store the contents
of a value and what that value represents. Examples: X1.234, G01, M05, S1445.
The terminology of Address, Word Address, and Word all refer to the same
element. They are used interchangeably in Post Builder.
Block -- A line of output sent to the NC controller. Each block consists of words
that may be separated by a separator and terminated by an endofline. Example:
N0100 G01 X.1.234 Y1.234 Z1.234 F100. S1500 M03.
Custom Command -- In Post Builder, this allows you to create a custom
procedure referred to as a PROC, consisting of custom Tcl code. These can then be
added to existing events and sequences by the Post Builder. These custom
commands add functions which cannot be added by the Post Builder.
Definition file -- This file, with the file extension  .def", describes the static
characteristics of the blocks and their available list of addresses and formats for a
specific machine/tool controller. Also referred to as the def file and has a
corresponding Tcl and pui file for each postprocessor.
Event -- This is sent to the postprocessor by the Event Generator. When you
postprocess, a series of Events is sent, and with each Event, numerous variables are
defined. An Event is a collection of data which is processed by UG/Post, creating
data which causes a specific action(s) by the machine tool/controller.
Event Generator -- The mechanism that extracts the tool path information from
passes it to UG/Post as Events and variables. The Event Generator is started when
you select OK or Apply from a selection of a program and a postprocessor in the
interactive CAM session.
Event Handler -- A file containing Tcl code that contains procedures that
determine what is to be done with each Event. Each procedure will determine if
output is to be generated and if so, what blocks will be output. Unigraphics extends
the Tcl scripting language to allow you to easily construct output blocks based on
the Definition file. These extensions are available from within an Event Handler.
The Event Handler can also process the variables which are loaded by the Event
Generator before outputting a block. Example: my_post.tcl
Extensions -- Unigraphics extends the Tcl scripting language by adding several
commands for postprocessing. This makes the task of outputting easier and
reduces the amount of Tcl code required. These all begin with the prefix MOM_.
Example: MOM_do_template.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

GL-1

GL


GL

Glossary

Global variable -- These are variables that are available to all procedures in the
Event Handler. They are also available to block templates in the Definition file. If
you need to add a variable that different procedures will access, you must declare
the variable as global.
Leader -- In the Definition file, this is the character(s) used to represent the
address. In UG/Post, the default leader is the address. Examples: X,G. In NC
output, the leader can be blanks or other characters output before the start of
program. In this context, leader was originally used for threading paper tape
readers.
Marker -- Within a Post Builder sequence, markers indicate the possible Events
that may occur. Each marker/event may include several blocks of information.
Example: Start_of_Path. Within the Events in machine control, there are several
markers that allow the CAM user to control the order in which some of the output
will be generated. For example, output an operator message with the
Start_of_Program marker.
mom_variable -- The variables which are set by the Event Generator as each
Event is generated. They are always global variables. Example: mom_feed_rate.
MOM -- An acronym for the Manufacturing Output Manager. This is the basic
functionality in CAM that also is used to generate shop documentation, output the
CLS, UG library access and UG/Post. Lower case mom is used for variables, for
example mom_feed_rate. Upper case MOM refers to either Event Handler names,
i.e. MOM_linear_move or Extensions, i.e. MOM_do_template.
Operation End Sequence -- In an NC program Operation_End_Sequence
contains the Events and actions that will occur from the final retract motion to the
end of the operation.
Operation Start Sequence -- In an NC program Operation_Start_Sequence
contains the Events and actions that will occur from the start of an operation to the
first cut motion.
Operator Message -- This is a message contained within NC code that sends
instructions to the console of a machine tool. This usually requires special codes in
the NC code such as "(" or "(msg" to differentiate between the message and
machine/control information. Example: N0010 (*** Tool number 12 ***).
Postprocessor -- This is the mechanism that converts the tool path information
from the tool path format to a format for a specific machine/tool controller. In
UG/Post, this includes an Event Handler file (.tcl), a Definition file (.def) and a
Post Builder User Interface file (.pui). The use of these files with each
postprocessor is determined by the postprocessor template file.

GL-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Glossary

Postprocessor template file -- This file contains the list of postprocessors


available to the user in a CAM session. This file is selected as part of the CAM
configuration (TEMPLATE_POST) or by a machine tool located in a library.
Example: template_post.dat.
Procedure -- Also referred to as proc, this is a part of a Tcl program that is
analogous to a subroutine. For every Event that the postprocessor needs to react
to, there is a procedure in the Event Handler file. Example:
MOM_start_of_program.
Program End Sequence -- In an NC program Program_End_Sequence, this
contains the Events and actions that will occur from the end of the last operation to
the end of the program.
Program Start Sequence -- In an NC program Program_Start_Sequence, this
contains the Events and actions that will occur from the start of the program to the
start of the first operation.
pui file -- This is used by Post Builder to define a postprocessor. This file, along
with the .tcl and .def files, makes a complete postprocessor. The .pui file is not
required to actually postprocess, but is required for editing existing postprocessors.
Example: my_post.pui.
Review Tool -- After postprocessing, the Review Tool will display a window of
three columns showing all the Events, variables and output blocks that were
processed. For example, you can select an Event, see what variables are set and
used for output.
Sequence -- In the Post Builder, this is a series of markers at common areas in a
program. They are used to group several Events and blocks for output in a specific
sequence. Example: Operation_Start_Sequence.
Tcl -- (pronounced tee-cee-el), which stands for Tool Command Language, is a
scripting language that has become popular because of its ease of use. Tcl has
another component, Tk, a user interface tool. WISH, a windows shell also contains
Tk.
Tk -- is a user interface tool that may be used in conjunction with Tcl. Tk
provides basic user interface tools such as buttons, check boxes, and scroll bars.
tcl file -- see Event Handler.
UG/Post Execute -- Unigraphics provides a postprocessor, UG/Post, which
utilizes Unigraphics tool path data as input, and outputs machine controller
readable NC code. UG/Post is customized through the use of user created Event
handler and Definition files. These files, in conjunction with UG/Post, are used to
generate output for the simplest to the most complex of machine tool/controller
combinations.

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

GL-3

GL

Glossary

Post Builder -- Provides an easy to use interface for creating and modifying
postprocessors. Drag and drop functions allows for the creation of formats, words,
blocks, and sequences. The Post Builder allows the definition of output blocks,
formats for addresses and controls the sequence of output for the start and end of
operations, the start and end of program, tool changes and canned cycles.
User Defined Event -- Also referred to as UDE, this is an Event that you can
change. UDE's are used in machine control and as the start post and end post
commands. UDE's can be attached to any CAM object such as a Tool or Program.
Several of the basic UDE's are included and you may modify or add your own.
Wish -- Wish is an acronym for windows shell that includes both Tcl and Tk.
Wish is an interpreter and executes Tcl and Tk commands. It is required in order to
use the UG/Post Review Tool. It is installed as ugwish.exe and is located in the
mach/auxiliary directory.
Word -- See Address

GL

GL-4

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Index

Index
B

overview, 10-2

Best Practices, 11-2


Definiton file, 11-2
Overview, 11-1

L
Listing File & Output Control tab, 2-72

block, 2-54
block component, 2-41
editing of, 2-45

Block word address symbols, 2-55

Machine Kinematics, C-14


Machine Tool tab, 2-22
Default button, 2-23
Restore button, 2-23

C
Component Window, 2-38

Manufacturing Output Manager, 1-4

Course Overview
Class standards for UG/Post files, -3
Classroom system information, -5
Course description, -1
Intended Audience, -1
Objectives, -2
Postprocessor development project overview, -5
Prerequisites, -1
Use of manual, -4

Mill-turn
creating using Post Builder, 7-3, 7-16
types of, 7-2, 7-15

Custom Commands, 8-3

Modifying existing postprocessors, C-2

N
N/C Data Definitions tab, 2-54

Customizing exisiting postprocessors, C-2

D
Definition file, 1-3, 2-3, C-8

E
Event Generator, 1-3
Event Handler, 1-3, 2-3, C-3

F
Files Preveiw tab, 2-80
format, 2-55

I
Integration, Simulation and Verification
machine tool driver, 10-3

O
Other data elements, 2-55
Output File, 1-3

P
Parameter Window, 2-38
Postprocessing
definition of, 1-2
using Runugpost, C-28
Postprocessor, UG/Post Execute, 1-2
Program and Tool Path tab, 2-26
Custom Commands, 2-37
G Codes, 2-26
M Codes, 2-26
Program, 2-26
Word Sequencing, 2-37
Word summary, 2-27
Data type, 2-27
Decimals, 2-27
Fractions, 2-27

EEDS
All Rights Reserved

Post Building Techniques


Student Guide

IN

IN-1

Index
Integers, 2-27
Leader/Code, 2-27
Leading zeroes, 2-27
Plus (+), 2-27
Trailing Zeroes, 2-27
Word, 2-27

R
Runugpost, C-28

S
Sequence, 2-39
Operation End, 2-41
Operation Start, 2-40
Program End, 2-41
Program Start, 2-40
Tool Path Events, 2-40
Canned Cycle Events, 2-41
Machine Control Events, 2-40
Motion Events, 2-41

U
UG/Post, User Defined Events, 9-2
UG/Post Builder, 1-4, 2-17
5-axis, 4-2
5-axis parameters, 4-6
Balloon Tip, 2-8
Context Help, 2-9
Creating a new post, 2-11
Cue Line, 2-7
Help Tool Bar, 2-8
lathe, 5-2
parameters, 5-4
Menu Bar, 2-7
Overview, 2-3
Parameter file, 2-3
Parameters, 2-22
Tool Bar, 2-8
User's Manual, 2-9
UG/Post Builder releases, 11-2

template_post.dat file, 2-12, 5-3

Wire EDM
2-axis, 3-2
4-axis, 3-2
controller type, 3-3
generic, 3-3
library, 3-3
user's, 3-3

Trash bin, 2-43

word, 2-55

T
Tcl, C-3
Tcl Procedures, 6-24, 8-4

IN

IN-2

Post Building Techniques


Student Guide

EEDS
All Rights Reserved

Unigraphics NX 2
Post Builder V3.2

Вам также может понравиться