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.
You can run the GPM from the operating system by using:
The command line
A supplied utility program
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.
To execute GPM on UNIX or Windows NT, the minimum command is:
gpm -MDF=name.MDFA (or .MDF) -CLF=name.CLS (.CLF or .ISO)
NOTE: File names are lower case and are upper case sensitive in native mode UNIX.
Execute GPM without any switches, or the (h) switch to get the online help.
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 |
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) |
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
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)
Help |
>ascmdf -h
|
Examples |
>ascmdf |
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 |
|
filename |
Output to file |
|
filename |
Listing to file |
ET= |
ON |
Error messages to terminal |
EL= |
ON |
Error messages to listing |
UNITS= |
IN |
Inches input |
FMT |
COL |
Column listing |
COM |
YES |
Commentary data output |
CAUTION: The "-" character (in UNIX systems) cannot be used in filenames. This character is a delimiter and GPM will terminate entry at the character preceding the delimiter.
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.
This section describes the methods that GPM uses in order to calculate the output tool positions (GOTO points).
Specifically, the GPM will:
Read the MDF for format information. The MDF sets switches within the GPM that the GPM uses as it processes the CLS or .ISO file.
Read the CLS or .ISO file for positioning data.
Then, depending upon the MDF settings for each record the GPM:
Processes a postprocessor command.
Converts post commands to machine code.
Establishes machine machine motion modes (RAPID, FEDRAT, etc.).
Process a GOTO record and generate machine motion.
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.
Reads a FINI and Quit. Fini is automatically inserted by CL File generation.
Process a circle record to establish circular motion.
Approximate machining time.
These elements of postprocessing are described as follows:
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.
CAUTION: You must assure that the machine tool is initially set to the FROM coordinates if the machine tool uses incremental positioning.
The FROM statement causes no tool movement.
CAUTION: Subsequent use of the FROM statement establishes a new reference position (again, without tool movement).
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
NOTE: i,j,k are the direction cosines of the desired vector.
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.
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:
Exceeding the minimum or maximum radius limits
One or more points on the circular drive geometry are not within circle record tolerance of the radius (i.e., a parabolic motion).
The circular drive geometry is not parallel to a principle plane.
The circular drive geometry is a helix and the machine/control does not allow helical interpolation.
The tool axis vector changes.
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.
NOTE: For ISO, the MOVARC/ command becomes the CIRCLE/ command.
NOTE: If SET/MODE,LINEAR is in effect, arcs are output as a series of small linear moves.
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.
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.
See Coordinate Value Calculations for a description of how Z axis rapid clearance and depth planes are calculated.
The next motion after a RAPID command positions at the rapid feed rate.
If limits defined by the CHECK command are exceeded, a warning is output with the move to show the violated axis limit.
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.
NOTE: For ISO, the UNITS/ command can be used to change input units.
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:
X,Y,Z and rotary axis positioning and contouring.
Canned cycle feed to depth and feed/rapid back to clearance plane.
Programmed Delays.
Any adjustments made by the TIME command.
Tool change time
Turret index time
The postprocessor outputs code to the machine tool for the next motion following a THREAD/ON, THREAD/TURN, or THREAD/FACE command.
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 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:
The initial blocks of a program.
EXAMPLE:
$$INITIAL STARTUP BLOCK
Rewind stop character
EOB character ($)
The blocks following LOAD/TOOL or TURRET/ output. See LOAD and TURRET commands.
The blocks following a TMARK/n statement. See the TMARK command.
NOTE: Refer to Startup Block in the MDFG manual.
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.
The following are the methods GPM uses to calculate the output toolpath coordinates.
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) |
Xp |
= (programmed X) + TRANS(x) - ORIGIN(x) |
Yp |
= (programmed Y) + TRANS(y) - ORIGIN(y) |
Zp |
= (programmed Z) + TRANS(z) - ORIGIN(z) |
Xr |
= Xp |
Yr |
= Yp |
Zr |
= Zp |
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) |
Xm |
= Xr - SET(x |
Ym |
= Yr - SET(y) |
Zm |
= Zr - SET(z) + ZOFF |
Rapid R |
= Zm + RAPTO value |
Depth Z |
= Zm + FEDTO value |
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:
Dimension c is the distance parallel to the rotated MCS centerline.
Dimension d is the distance perpendicular to the rotated MCS centerline.
The special coordinate system is transformed into the coordinate system of the N/C lathe by the postprocessor as follows:
(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 |
= (programmed c) + TRANS(c) - ORIGIN(c) |
Yp |
= (programmed d) + TRANS(d) - ORIGIN(d) |
Xm |
= R*Q* (Yp - TLD) |
Zm |
= Xp - TLC |
RA |
Rotary axis angular position as determined from input Xp,Yp,Zp coordinates. |
Xm,Ym,Zm |
Coordinates |
Xp |
= (programmed X) + TRANS(X)-ORIGIN(X) |
Yp |
= (programmed Y) + TRANS(Y)-ORIGIN(Y) |
Zp |
= (programmed Z) + TRANS(Z)-ORIGIN(Z) |
Xm |
= SQRT (Xp**2 + Yp**2) |
Ym |
= 0 |
Zm |
= Zp |
RA |
= ARCTAN (Yp/Xp) |
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