GPM Postprocessing from the Operating System

Required Input

When you use the operating system to postprocess using the GPM, you must provide the following information for postprocessing:

 

Required

Description

CLF=

CLS, CLF, or ISO file specification, with or with out the extension.

MDF=

MDFA(ASCII) or MDF(Binary) file specifi cation, with or without the extension.

 

The files for the file specification, specified without a path, should reside in your default directory or the global UTIL directory. The MDF or MDFA files can also exist in the directory defined by the environment variable UGII_MDF_DIR.

After entering the required information you can enter several run time options.

 
Methods

You can run the GPM from the operating system by using:

 
Using the Command Line

Use one of the following formats to run the GPM from the operating system command line. These formats show the minimum information you must enter in order to run the GPM.

 
UNIX, Windows NT

To execute GPM on UNIX or Windows NT, the minimum command is:

gpm -MDF=name.MDFA (or .MDF) -CLF=name.CLS (.CLF or .ISO)

Execute GPM without any switches, or the (h) switch to get the online help.

 

Run GPM

Rungpm is an interactive menu utility which allows you to execute the GPM postprocessor outside of an NX session. Instead of typing tedious file specifications, you can now browse and select files from a standard file selection box. Options for the GPM command line are selected from a pulldown list of modifiers. Each option is labeled for easy reference.

You do not need to include the extension for an MDF or a CLS name, the utility will add it. The utility file name and its executable command are as follows:

System

Filename

Execute Command

UNIX:

rungpm

rungpm

Windows NT:

rungpm

rungpm

 

CL File Generation

When you use a postprocessor other than the GPM, you will probably need to convert the tool path .cls file to a standard file format. An operating system utility program, cls2clf, is provided for creating the .clf. The formats for the utility are:

cls2clf filename

(do not include the .cls extension)

cls2clf *filename

(for multiple file creation)

cls2clf

(for menu prompts)

cls2clf -h

 

(for help text)

 

Using Switches

Help

cls2clf -h

 

Default Generation

(cls2clf -or- cls2clf clsf_name_list{.cls}):

NO CLSF HDR: OUTPUTS STD APT CLF (clsf_name.clf)
CLSF HDR($$ISO): OUTPUTS ISO-4343 CLF (clf_name.iso)
CLSF HDR($$BCL): OUTPUTS EIA-RS494 BCL-0/A CLF
  (clsf_name.bcl)
CLSF HDR($$ACL): OUTPUTS EIA-RS494 ACL-B CLF
  (clsf_name.acl)

 

Using Switches

(cls2clf -X=clf-name[.extn] [-e] clsf_name[.cls]):

X IS o: OUTPUTS clf_name.clf / iso/bcl/acl PER HDR
X IS oa: OUTPUTS STD APT CLF (clf_name.clf)
X IS oi: OUTPUTS ISO-4343 CLF (clf_name.iso)
X IS ob: OUTPUTS EIA-494 BCL-0/A CLF
(clf_name.bcl) with FPM/FPR FEED
X IS ub: OUTPUTS EIA-494 BCL-0/A CLF
(clf_name.bcl) with IN/MM FEED
X IS os: OUTPUTS EIA-494 ACL-B CLF
(clf_name.acl) with FPM/FPR FEED
X IS us: OUTPUTS EIA-494 ACL-B CLF
(clf_name.acl) with IN/MM FEED
-e: errors to /tmp/gupta_cls_err.log
(default is stdout)

 

Examples

>cls2clf
ENTER CLSF NAME:
>cls2clf millop1
>cls2clf millop*.cls
>cls2clf -oa=millop1_new millop1

 

MDF Binary to MDFA ASCII

A binary .mdf can be converted into an ASCII .mdfa using the operating system utility program ascmdf. The formats for the utility are:

ascmdf filename (the .mdf extension is optional)

ascmdf *filename (for multiple file creation)

ascmdf -h (for help text)

 

Using Switches

Help

>ascmdf -h
mdfa generated will have the name of the mdf:
>ascmdf
>ascmdf mdf1[.extn(default is .mdf)] mdf2[] ...
>ascmdf mdf_template
>name can be specified for mdf generated:
>ascmdf -o=ascii_output_file bin_input_file
>ascmdf -or+bin_output_file ascii_input_file

 

Examples

>ascmdf
ENTER MDF NAME:
>ascmdf vmill
>ascmdf *mill.mdf
>asccmdf -o=vmill_new[.mdfa] vmill[.mdf]
>ascmdf -or=vmill_new[.mdf] vmill_new[.mdfa]

 

Operating System Run Time Options

After you enter the required postprocessing information, you can include the following optional characters and words in the command line. If you do not include these options, GPM will accept the default settings from the MDF.

The following table shows the available optional character or word, its modifiers, and a description of its function.

Option

Modifiers

Description

 
O=

filename
PTP
None

Output to file
Output to paper tape punch
Output suppressed

 
L=

filename
LTP
TERM
None

Listing to file
Listing to lineprinter
Listing to terminal
Listing suppressed

ET=

ON
OFF

Error messages to terminal

EL=

ON
OFF

Error messages to listing

UNITS=

IN
ININ
INMM
MM
MMIN
MMMM

Inches input
Inches input, Inches output
Inches input, Millimeters output
Millimeters input
Millimeters input, Inches output
Millimeters input, Millimeters output

FMT

COL
PACK
TLLST

Column listing
Packed listing
Tool listing only

COM

YES
NO

Commentary data output
Commentary data not output

 

Considerations

GPM accepts the specification of all file names (i.e., CLSF, MDF(A), OUTPUT, and LIST files) with or without extension.

GPM uses the following hierarchy for applying the file extensions in the absence of the extension in the specification.

CLSF: .cls, .clf
MDF(A): .mdf, .mdfa
OUTPUT: mdf defined
LIST: mdf defined

The file extensions described above are the only valid file extensions that can be specified.

 

GPM Functions

This section describes the methods that GPM uses in order to calculate the output tool positions (GOTO points).

Specifically, the GPM will:

Then, depending upon the MDF settings for each record the GPM:

Converts post commands to machine code.

Establishes machine machine motion modes (RAPID, FEDRAT, etc.).

Calculate distances.

Compute contouring motion.

Generate circular interpolation blocks.

Convert motion into the machine's coordinate system .

Assure that the machine limits are not exceeded.

Generate canned cycle motion.

Assure that the machine moves do not violate the part.

These elements of postprocessing are described as follows:

 

Calculate Distances

The GPM establishes its initial position using the FROM statement coordinates. If you did not include a FROM position in the tool path, the first GOTO point is changed to a FROM position when you generate a post processed file.

The FROM statement causes no tool movement.

 

Computing Contouring Motion

The postprocessor assumes contouring mode if RAPID or CYCLE has not been specified.

The following commands allow the tool axis to be changed:

FROM/x,y,z,i,j,k
GOTO/x,y,z,i,j,k

The GPM generates a tool axis vector by comparing the present tool axis with the previous tool axis. This determines whether rotary and/or tilt motion is necessary. If so, then the machine table must be positioned in such a way as to cause the tool axis to lie in the plane of the rotary axis. This is accomplished by a rotation and translation of the tool end coordinates. All following cutter end points are referenced to this new position until the next specified tool axis causes another rotary movement.

 

Generating Linear and Circulat Interpolation Output

 

Linear Interpolation - The postprocessor assumes linear mode for positioning and cutting moves involving straight lines. One to five axis linear interpolation can be programmed.

 

Circular Interpolation - If SET/MODE,LINCIR is in effect, the GPM checks input toolpath points that are part of a circular drive geometry for output as a circular interpolation motion.

If a circle record in a toolpath cannot be output as a valid circular interpolation motion, the postprocessor outputs as much of the drive geometry as possible under circular interpolation motion and switches to linear interpolation. It cuts the remaining circular drive geometry with a series of small linear moves.

Factors that eliminate the circular drive geometry from being a valid circular interpolation motion are:

The input toolpath can define circular motion along the same arc and in the same direction for more than 360 degrees.

For machine/controls that accept quadrant-limited arcs of 90 degrees or less, the postprocessor divides the programmed arc into segments that do not cross a quadrant boundary.

For machine/controls that accept full 360 degree arcs, the postprocessor divides any programmed arc of more than 360 degrees into segments of 360 degrees or less.

 

Generate Cammed Cycle Motion

A cycle sequence occurs at each CL point following a CYCLE command until a CYCLE/OFF, LOAD or a different CYCLE command is programmed. The same cycle is resumed by programming CYCLE/ON. The cycle mode can be interrupted for one motion block by programming a RAPID command. Each cycle is executed along the machine tool axis.

The postprocessor assumes that the programmed CL points in a cycle series is defined on the part.

Positioning motions to and between CL points during the execution of a cycle are made at rapid traverse rate.

 

Cycle Feed Rates

The rate of feed motions during a cycle sequence is controlled by the IPM,f or IPR,f couplet of the CYCLE command (MMPM or MMPR in metric mode). If IPM,f (MMPM) is programmed, the feed motion occurs at f inches or millimeters per minute. If IPR,f (MMPR) is programmed, the feed motion occurs at (f * current rpm) inches or millimeters per minute.

Programming a different spindle rpm while IPR (MMPR) is in effect causes the feed motion rate to be recalculated.

 

Cycle Value Calculations

See Coordinate Value Calculations for a description of how Z axis rapid clearance and depth planes are calculated.

 

Rapid Feed Rate

The next motion after a RAPID command positions at the rapid feed rate.

 

Axis Limits Check

If limits defined by the CHECK command are exceeded, a warning is output with the move to show the violated axis limit.

 

Units Conversion

Postprocessor input and output is specified by the MDF or the UNITS switch. If metric input is specified, all dimensions and feed rates must be in millimeters. If inch input is specified, all dimensions and feed rates must be in inches.

 

Machining Time

The machining time is an approximation of the total minutes required to machine the part. It is output after the END command or when Block Time is specified. It includes the following times:

 

Threading (for Lathe)

The postprocessor outputs code to the machine tool for the next motion following a THREAD/ON, THREAD/TURN, or THREAD/FACE command.

 

CSS

Constant Surface Speed mode is activated when the postprocessor encounters a SPINDL/SFM or SPINDL/SMM command. In this mode, a constant surface speed is maintained as the radius changes by varying the rpms of the spindle. Constant Surface Speed mode is cancelled by a SPINDL/RPM or SPINDL/OFF commands. Per Revolution mode should be used in conjunction with Constant Surface Speed Mode.

 

Startup Blocks

Startup blocks include all data that is necessary to initialize the machine for the present location and conditions. The next motion block contains all coordinate axes information for the following CL point.

Startup blocks are generated with:

EXAMPLE:

$$INITIAL STARTUP BLOCK
Rewind stop character
EOB character ($)

 

Multi-axis Linearization

When the postprocessor encounters a tool axis record, it converts the input x,y,z,i,j,k to machine tool coordinates. This can include several rotary positions.

If these rotary positions are different from the previous position, an arc is generated. Generally, this is desirable. However, if the programmed tool motion is a straight line, the arc output causes a deviation from the programmed toolpath. See Figure 1-1.

Figure 1-1 Deviation from the Programmed Toolpath

The amount of deviation depends upon the size of the rotary move and the distance from the tool tip to the center of rotation.

The solution is to segment the move into smaller moves, thereby simulating a straight line with a series of small arcs. The LINTOL statement allows you to control the size of these small arcs by specifying the maximum allowable deviation between the programmed path and the actual tool path.

If the deviation is within the limit specified, the point is accepted.

If the deviation exceeds the limit, the move is reduced (by an iteration method that is allowed to loop 20 times) until the maximum deviation is within the LINTOL specified limit.

If a solution is found, the postprocessor outputs the intermediate point and then repeats the process for the remaining portion of the move.

If no solution is found, the conditions are considered too extreme. The process is aborted and the point is output.

 

Coordinate Value Calculation

The following are the methods GPM uses to calculate the output toolpath coordinates.

 
For All Machine Types Except Lathes

 

Formula Definitions

Xp,Yp,Zp

Unrotated machine reference system coordinates

Xr,Yr,Zr

Xr,Yr,ZrRotated machine tool coordinates

ORIGIN(x,y,z)

Vector from part coordinate zero to machine tool zero as specified by the ORIGIN command.

TRANS(x,y,z)

Part coordinate translation vector as specified by the TRANS command.

SET(x,y,z)

Vector from machine tool zero to machine coordinate zero as specified by the SET/XAXIS. command.

ZOFF

Tool length as specified by the LOAD command.

I,J,K

Input tool axis vector.

RA

Rotary axis angular position determined from input tool axis vector.

Xm,Ym,Zm

Machine tool coordinates (unrotated)

 

Machine Tool Coordinates

Xp

= (programmed X) + TRANS(x) - ORIGIN(x)

Yp

= (programmed Y) + TRANS(y) - ORIGIN(y)

Zp

= (programmed Z) + TRANS(z) - ORIGIN(z)

 

Non-Multi-Axis Mode (no tool axis vectors)

Xr

= Xp

Yr

= Yp

Zr

 = Zp

 

Multi-Axis Mode

Rotary Axis in YZ Plane

RA

= ARCTAN (-J/K)

 

Xr

= Xp

 

Yr

= Yp * cos(RA) + Zp * sin(RA)

 

Zr

= -Yp * sin(RA) + Zp * cos(RA)

 

Rotary Axis in ZX Plane

RA

= ARCTAN (I/K)

 

Xr

= Xp * cos(RA) - Zp * sin(RA)

 

Yr

= Yp

 

Zr

= Xp * sin(RA) + Zp * cos(RA)

 

 Rotary Axis in XY Plane

RA

= ARCTAN (J/I)

 

Xr

= Xp * cos(RA) + Yp * sin(RA)

 

Yr

=-Xp * sin(RA) + Yp * cos(RA)

 

Machine Tool Coordinates

Xm

= Xr - SET(x

Ym

= Yr - SET(y)

Zm

= Zr - SET(z) + ZOFF

 

Cycle Values

Rapid R

= Zm + RAPTO value

Depth Z

= Zm + FEDTO value

 
For Lathes

Some N/C lathes require programming in X and Z coordinates, some in X and -Z, and some in X and Y. To simplify programming, when a lathe MDF is processed by the GPM, NX uses its own coordinate system. It has two dimensions:

The special coordinate system is transformed into the coordinate system of the N/C lathe by the postprocessor as follows:

 

Formula Definitions

(c,d,0)

centerline file coordinates

Xp

Coordinate of tool tip position, parallel to centerline, measured from the machine zero, in the part coordinate system.

Yp

Coordinate of tool tip position, perpendicular to centerline, measured from machine zero, in the part coordinate system.

ORIGIN (c,d)

Vector from part coordinate zero to machine zero as specified by the ORIGIN command.

TRANS (c,d)

Part coordinate translation vector as specified by the TRANS command.

XOFF

Distance from turret reference point to tool tip, parallel to the centerline, as specified by the TURRET command.

YOFF

Distance from turret reference point to tool tip, perpendicular to the centerline, as specified by the TURRET command.

TLC

Tool offset parallel to centerline

= XOFF if tracking point is turret reference

= 0 if tracking point is tool tip

TLD

Tool offset perpendicular to centerline

= YOFF if tracking point is turret reference

= 0 if tracking point is tool tip

(see MACHIN/OPTION,99)

R

Radius/Diameter output factor

= 1 for X-axis radial output

= 2 for X-axis diametrical output

Xm

machine tool X-axis coordinate

Zm

machine tool Z-axis coordinate

 

Xp, Yp Calculations

Xp

= (programmed c) + TRANS(c) - ORIGIN(c)

Yp

= (programmed d) + TRANS(d) - ORIGIN(d)

 

Machine Tracking Point Calculations

Xm

= R*Q* (Yp - TLD)

Zm

= Xp - TLC

 
For Production Center Mill Mode With Radius And Angle (Polar) Coordinates

 

Formula Definitions

RA

Rotary axis angular position as determined from input Xp,Yp,Zp coordinates.

Xm,Ym,Zm

Coordinates

 

Machine Tool Coordinates - Unrotated

Xp

= (programmed X) + TRANS(X)-ORIGIN(X)

Yp

= (programmed Y) + TRANS(Y)-ORIGIN(Y)

Zp

= (programmed Z) + TRANS(Z)-ORIGIN(Z)

 

Machine Tool Coordinates - Rotated

Xm

= SQRT (Xp**2 + Yp**2)

Ym

= 0

Zm

= Zp

RA

= ARCTAN (Yp/Xp)

 

Lathe Post Input Coordinate System

All motion coordinate data will be in the special Lathe Coordinate System (LC).

PC1 and PC2 represent the first and second axial dimensions of a position coordinate.

Figure 1-2 Lathe Coordinates

For horizontal lathes using NX, the motion data will be in the following coordinate system. MCZ and MCX represent the Machine Tool Coordinate system axes.

Figure 1-3 Horizontal Lathes Using NX

For horizontal lathes using the GLM processor, the motion data will be in the following coordinate system.

Figure 1-4 Horizontal Lathes Using the GLM Processor

For vertical lathes using NX, the motion data will be in the following coordinate system. MCZ,MCW and MCX,MCU represent the machine tool coordinate system axes.

Figure 1-5 Vertical Lathes Using NX

For vertical lathes using the GLM processor, the motion data will be in the following coordinate system.

Figure 1-6 Vertical Lathes Using the GLM Processor

The basic equalities are:

Figure 1-7 Basic Equalities

Figure 1-8 Rotary Axis in ZX Plane

Figure 1-9 Rotary Axis in YZ Plane