Академический Документы
Профессиональный Документы
Культура Документы
2
3267352&(66,1*,1752'8&7,21
$1'03267
After a general introduction to Post Processing, this chapter will be devoted mainly to MPost. Refer
to Section 2.2.2: The MPOST Post Processor Package on page 36 and then to the main MPost topics
beginning with Section 2.6: Post Processor Configuration on page 47.
2.1
INTRODUCTION
In the final phase of an NC project, the NC operation toolpaths are processed to convert them to
the NC code needed by the machine that will cut the part. This conversion process, called post
processing, is accomplished with programs called post processors.
After NC code has been created for the specific machine that will do the cutting, it must be
transmitted to that machine. One common method of doing this is to make an RS-232 connection
between a computer and the NC machine and then download the NC code directly to the machine.
This process is referred to as Direct Numerical Control or DNC communications.
SURFCAM is shipped with two post processor systems and one DNC system.
2.2
Post processors are programs that take toolpath information from a file created by a CAM program
and machine information from a machine configuration file (often called a post) to create the final
NC code understood by the NC machines controller. Post processors usually come in a package
consisting of a processor for each general type of NC machine (that is lathe, mill, and wire EDM)
and files and/or programs that help you create machine configuration files or posts for individual
NC machines.
SURFCAM is shipped with two such post processor packages. One consists of three separate
post processors called MPOST, LPOST and EPOST. For convenience, this package is referred
to as MPOST. The other, called SPOST, has more powerful post processors and a machine
configuration utility for developing posts or machine configuration files. Both packages contain a
library of existing posts for a number of NC machines.
2.2.1
The SPost post processor system contains two post processors: SPOSTM.EXE used with
mills and wire EDM and SPOSTL.EXE used with lathes. These programs are stored in the
SURFCAM\Surf2000\SPost directory. The posts for the SPOST system are saved in the
SURFCAM\PostLib\SPost directory as files with names in the form of either UNCX01.Pnn for
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Copyright 2000 by Surfware, Inc. All Rights Reserved.
32
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
mill/wire EDM posts or UNCL01.Pnn for lathe posts. The nn in these file names is the
machine number that is assigned by the person who creates the post.
2.2.1.1
Posts are created in the SPost system using a program called SPOSTCFG.EXE. This
post configuration program is stored in the SURFCAM\Surf2000\SPost directory.
For a detailed explanation of SPost, refer to the online SPost Reference Manual and to the
online SPost FIL Manual.
Often a post has an accompanying FIL (Factory Interface Language) file whose function
is to handle special circumstances regarding the machine that cannot be addressed by
a post file alone. Refer to the online SPost FIL Manual, Chapter 1: Fil Introduction starting on
page 1 if you need to create your own FIL file for a particular machine. FIL files are saved
in the SURFCAM\PostLib\SPost directory with names in a form that is similar to the
names of posts: UNCX01.Fnn for mill and wire EDM machines and UNCL01.Fnn for
lathe machines. The nn in a FIL file name is the same as the nn in its corresponding
post file name.
2.2.1.2
You run an SPost post processor from the NC Operations Manager dialog
box. To access the NC Operations Manager dialog box, either click the
button on the SURFCAM toolbar or press Ctrl + N.
Several features of the NC Operations Manager dialog box are used in post processing.
2.2.1.2.1
Operations Tree
First, the NC Operations Tree is used to select the operations for post processing.
You can process a single operation, all the operations in a single Setup Section,
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
33
or all the operations in the NC Project by clicking the corresponding icon. If you
post process the entire project, however, you get a separate output file (an NCC
file) for each Setup Section rather than a single NCC file.
2.2.1.2.2
2.2.1.2.3
To start the SPost post processing cycle, double-click the desired post name in the
NC Post List box (or click the post name once and click the Post button).
SURFCAM will create an NCD sub-directory if one has not already been created.
Refer to the SURFCAM Getting Started Manual, Chapter 2: NC Project Basics, Section 2.2.4:
NCD Sub-directories on page 53. All the files created during post processing will be
saved in the NCD sub-directory. The NC Operations Manager then executes a
series of commands, stored in the SURFCAM.PST file, that lead to the creation of
the final NCC code.
2.2.1.2.4
From the ICD file, the NC Operations Manager extracts INC files of the operations
you selected from the NC Operations Tree. These INC files are temporary and are
deleted when you exit SURFCAM.
If you selected a single operation, its INC file is extracted and saved with the
Operation File Name shown on the Operation Information dialog box. Refer to the
SURFCAM Getting Started Manual, Chapter 5: NC Operations Manager, Section 5.3.1: NC
Operation Information Dialog Box on page 127.
If you selected a Setup Section, the INC files of each of its operations are
extracted, merged into one INC file and saved with the Section File Name on the
NC Section Information dialog box. Refer to the SURFCAM Getting Started Manual,
Chapter 5: NC Operations Manager, Section 5.3.2: NC Section Information Dialog Box on
page 129.
Copyright 2000 by Surfware, Inc. All Rights Reserved.
34
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Next, the INC file is translated by the INC2APT translator into APT format, an
industry standard, and saved as a file with the APT extension and the same name
as the INC file. This APT file is temporary and is deleted as the last step of post
processing.
Next, the applicable SPost post processor (SPOSTM.EXE or SPOSTL.EXE) will
take input from the APT file and from the designated post file to create a file
containing the final NC code. This file is saved with either the Section File Name
or Operation File Name, mentioned previously, and the NCC extension. At the
same time, a process list file is created having the same name as the NCC file and
the LST extension. The LST file is a diagnostic tool used when you are creating a
new SPost post.
If the file names of any of the files created in the previous steps already appear in
the NCD sub-directory, an NCPOST dialog box similar to the following one will be
displayed.
If you click No, post processing will stop. You can choose not to have these
warning boxes displayed by checking the Dont warn if files already exist while
posting box on the NC Settings dialog box. Refer to the online SURFCAM Reference
Manual, Chapter 1: Menus and Dialog Boxes, Section 1.8.5: Options > NC Settings on page
161.
Next, a dialog box will be displayed and you will be prompted to enter a program
number.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
35
Type in a program number and press Enter to continue. After you do so, the
SPOST post processor will create the final NC code and save it as a file with an
NCC file extension.
Then the SURFCAM Editor will be launched with the newly created NCC file
opened and displayed on the screen. You can view the NCC file and make any
necessary changes. Use the Save command to save your changes using the
SURFCAM-assigned file name or use the Save As command to save it with a
name of your choosing.
Refer to the online SURFCAM SEdit Editor Manual.
2.2.1.3
36
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
send your NCC file directly to your NC machine by clicking the SDNC icon on the
SURFCAM Editor toolbar to run SDNC.
2.2.2
The other post processor package shipped with SURFCAM contains three post processors:
MPOSTWIN used with mills, LPOSTWIN used with lathes, and EPOSTWIN used with wire
EDM. Each is an EXE file. (For simplicity we often refer to all three as the MPost post
processor.) These programs are stored in the SURFCAM\SURF2000\MPost directory. The
post files for this post processor package are located in the SURFCAM\Postlib\Mpost
directory. The name of each post indicates the manufacturer, the model name and NC
machine type. For example, CIN850.M3 is the post for a 3 axis mill made by Cincinnati
Milacron. The model number is 850M.
To get machine configuration data, the post processors MPOSTWIN, LPOSTWIN and
EPOSTWIN read the corresponding POSTFORM library files POSTFORM.M,
POSTFORM.L AND POSTFORM.E. These are text files that contain copies of several posts
that you want to have readily available. The post processors read the POSTFORM files to
get the post names and display them in a menu. You select the post you want and the post
processor goes to that part of the POSTFORM file to get the machine data it needs.
By using a text editorsuch as the SURFCAM Editoryou can add posts to, or delete posts
from, your POSTFORM library files to make them better fit your needs.
The first line in a post file contains the word name followed by the name of the post. The file
can be several pages long. The POSTFORM files consists of the contents of several post
files appended together. To add a post, append the contents of the post file to the
POSTFORM file. To delete a post from a POSTFORM file, delete the name line for that post
and all the following lines up to the next name line.
2.2.2.1
IF the SURFCAM post library does not contain one of these earlier posts for your
machine, you can create one. SURFCAM is shipped with two post template
files: Generic.M and Generic.L. These files contain a set of quasi-standard
characteristics for mills and lathes. By taking the machine characteristics provided by
the manufacturer, you should be able to modify one of these generic post template files
with a text editor to produce a post for your machine.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.2.2.2
37
These post processors are run from the NC Operations Manager dialog box.
From the NC Operations Tree, select the NC operation or set of operations you want to
post process. Then double-click List All in the NC Post List box. This will display a menu
of the available posts.
Specify the machine tool by clicking on its name and number. Then click OK.
Depending on the post you select and the parameter values you enter in the Tool
Information dialog box, a series of additional dialog boxes may be displayed prompting
you to enter additional data. The following examples prompt you to enter values for work
offset number and program number.
Copyright 2000 by Surfware, Inc. All Rights Reserved.
38
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.3
The SURFCAM.PST file contains commands that are used by the NC Operations Manager when
performing functions related to post processing. It also contains other commands, not related to
post processing, that can be executed from the NC Operations Manager dialog box.
To work with the SURFCAM.PST file you must become familiar with its structure and contents. It
is located in the C:\SURFCAM\surf2000 directory. It would be helpful to obtain a printed copy of
the file to study. You can do this by opening the file in any text editoror double-click on the file
name to open it in the SURFCAM Editorand printing it from there.
We will first look at the structure of the PST file and then consider the meaning of the commands
contained in it.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
39
# sign
The # sign placed at the beginning of some lines designates a comment line that will be
ignored when the file is read by the NC Operations Manager. The comment lines at the
beginning of the file form a heading while those at the end provide a file description. Those
used throughout the rest of the file act as separators.
Begin Post
Refer to Section 2.3.1: PST BeginPost Sections on page 39.
Post Item
Refer to Section 2.3.2: PST PostItem Sub-Sections on page 40.
Commands
Execute the commands contained in the PST file using the NC Operations Manager dialog
box. Some are executed by clicking buttons located on the toolbar. Others are executed by
double-clicking on an entry in either the Post List box or the Filter List box. Clicking once on
an entry and clicking the Post button also works.
Refer to Section 2.3.3: PST File Commands, Variables and Switches on page 41, and Section 2.3.4:
Special PST File Commands on page 42.
2.3.1
The main commands in the PST file relate to post processing and are divided into six NC
mode sectionsEDM, Lathe, 2 Axis, 3 Axis, 4 Axis, and 5 Axis. The contents of these mode
sections determines what gets listed in the Post List box in the NC Operations Manager
dialog box. The NC Mode SURFCAM is in when the NC Operations Manager is opened tells
the Operations Manager which of these PST file NC mode sections to read. Following are
the first several lines in the 3 Axis mode section.
Each NC mode section begins with a line that reads BeginPost <name> Default:<n> where
<name> is the name of the NC mode and <n> is a number designating which post in the Post
List box will be highlighted when the NC Operations Manager dialog box is first opened. A 4
Copyright 2000 by Surfware, Inc. All Rights Reserved.
40
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
indicates the fourth post in the Post List box will be highlighted. The highlighted post is
referred to as the default post.
Because NC mode sections begin with the Begin command they will also be referred to as
BeginPost sections.
2.3.2
BeginPost sections are divided into sub-sections which begin with the command PostItem.
Some PostItem sub-sections contain commands to run one of the SPOST post processors
SPOSTM or SPOSTLusing one of the SPOST posts.
Such a PostItem sub-section begins with a line that reads PostItem <name> where <name>
is the name of the SPost post as it appears in the Post List box of the NC Operations
Manager dialog box.
Other PostItem sub-sections contain commands to run MPost.
The first PostItem sub-section contains commands to run an MPost post processor (which,
by convention, means an MPOSTWIN, LPOSTWIN or EPOSTWIN post processor).
The APT-CL PostItem sub-section contains the commands to run the INC2APT program
which will convert the selected operations into the standard APT format used by many other
commercial post processors.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
41
The PostItem APT-CL sub-section will usually be the last in a BeginPost section.
The last command in each PostItem sub-section is a Task command. This causes the NCC
or APT output file to be loaded into the SURFCAM Editor and displayed on the screen.
Each PostItem line is followed by several lines of commands that accomplish post processing
using that post.
2.3.3
The description of the switches appearing with the post commands is as follows:
-I
-O
The order in which posts appear in each NC mode section is the order in which they appear
in the Post List box.
42
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
The most significant line in a post sub-sectionfor the task of adding a postis the second
Command line, such as in the following example:
Command C:\SURFCAM\SURF2000\SPOST\SPOSTM C:\SURFCAM\APT\%N.apt 06
The first part of this command line (C:\SURFCAM\SURF2000\SPOST\SPOSTM) tells which
SPost post processor will be usedin this case, SPOSTM.exe for mills. The number at the
end of this line tells which post will be used in the post processing. This number corresponds
to the machine number designated by the last two digits in the file name for the postin this
case, UNCX01.P06, which is the post for the Haas VF-1 machine.
2.3.4
The following command is listed near the end of the PST file. It is executed from the NC
Operations Manager toolbar. It creates a Setup Sheet.
SetupSheet
C:\SURFCAM\SURF2000\sview -m SSHEET.TXT
The next commands are executed from the Filter List box by clicking the appropriate entry
and clicking Filter Only or Post. Refer to Section 2.5.1: Arc Filter on page 43 to Section 2.5.2:
ArcFltrMx Filter on page 45 and to Section 2.5.3: NURB Filter on page 45.
IncFilter
#IncFilter
IncFilter
2.4
C:\SURFCAM\SURF2000\filters\ArcFltr.dll
C:\SURFCAM\SURF2000\FILTERS\ArcFltrMx.dll
C:\SURFCAM\SURF2000\FILTERS\NurbFltr.dll
PST WIZARD
2.4.2
It is convenient to have your most frequently used posts pre-selected in the Operations
Manager Post List box. The post highlighted when you first open the NC Operations Manager
dialog box is the default post. Refer to Section 2.3.1: PST BeginPost Sections on page 39 for a
description of how the default post is determined.
To make your favorite post the pre-selected or highlighted one, first determine the number of
the position that your post holds in the Post List box. Then open SURFCAM.PST, using a text
editor such as the SURFCAM Editor. Change the number following Default: in the
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
43
BeginPost line to that number. Remember to Save the SURFCAM.PST file after you make
the change.
2.5
FILTERS
2.5.1
Arc Filter
This section describes the use of SURFCAMs arc filter program that converts a sequence of
linear moves, that approximate an arc, to a single arc move. The table below shows
corresponding lines of NCC file code from the same project. The sample on the left shows
code before filtering. The one on the right shows the corresponding code after filtering.
SECTION OF UNFILTERED CODE
SHOWING ALL LINE SEGMENTS
X.3588 Y3.3916
X.4565 Y3.46
X.5575 Y3.5224
X.662 Y3.5793
X.7697 Y3.6309
X.8807 Y3.6776
X.9948 Y3.7194
EXPLANATION
EXPLANATION
44
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Tolerance
This is the arc fitting tolerance. It is the maximum chordal deviation allowedthe
maximum distance between the line segments being optimized and the calculated arc.
HINT: You may want this to be generally the same (or same order of magnitude) as the
surface tolerance used to cut the tool path.
Minimum Radius
This is the smallest allowed arc radius. Any arcs found smaller than this value are output
as the original input line segments.
Maximum Radius
This is the largest allowed arc radius. Any arcs found larger than this value are output
as the original input line segments.
Arc In Plane
Arcs may be restricted to lie in a specified plane. The default is to arc in any best fit
plane. You can restrict arcs to XY, YZ, or ZX plane for machines that may not support
arc movement in any arbitrary plane.
UCS Planes Only
Use UCS Planes Only for best fit.
Fit Arcs Tangent
Arcs must be tangent to the current tool path position.
Fit Area Least Squares
Use Area Least Squares (ALS) Arc fitting function instead of the default Total Least
Squares (TLS) fit. ALS fit is much faster if you have a very large tool path, but may not
be quite as accurate a fit to the arcs. ALS method may also not produce quite as much
optimization as the TLS method.
After you make the desired parameter settings click OK. SURFCAM, will display the ArcFit
Optimizing Toolpath dialog box as it analyzes the tool path to convert linear moves to arc
moves.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
45
When finished with the arc filter, SURFCAM will then perform the rest of the post processing.
2.5.2
ArcFltrMx Filter
The ArcFltrMx filter analyzes linear 5 axis moves in the NC output and translates them into
separate XY and UV arc moves if they lie within a specified tolerance. This utility is
specifically useful for 4 axis wire EDM machines and 5 axis controls that support arc
interpolation. It is available on SURFCAM 4 Axis and above.
To use this, double-click the SURFCAM.PST file in the Explorer. The file will open in the
SURFCAM Editor. Locate the INC Filters section, then the line:
#IncFilter
C:\SURFCAM\SURF2000\FILTERS\ArcFltrMx.dll
The # symbol at the beginning of the line indicates that this line is a comment only.
Delete the # symbol and save the file. Then open SURFCAM. When you open the NC
Operations Manager, you will see the ArcFltrMx listed.
2.5.3
NURB Filter
This section describes SURFCAMs NURB filter program that analyzes sequences of linear
moves in an NC file and converts them to NURB spline moves.
The SURFCAM NURB filter program is run from the Operations Manager dialog box. The
Filter List box contains the SURFCAM filter options. Refer to Figure 12: Filter List Box on page
43. When the default option <None> is selected, no filtering will occur.
NURB Filter can be run in conjunction with performing a post processing operation. To do so,
click NurbFltr in the Filter List box before you proceed with post processing.
Immediately after you double-click the desired post (or click the POST button) to start the
post processing, SURFCAM will display the NURB Filter Options dialog box.
46
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Do Not Optimize
NURB spline moves are created by interpolations that use the original data points
describing linear moves. No data points are discarded. This results in the fastest time
through the NURB filter but the most data sent on to the post processor.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
47
2.6
With this section, we begin the main purpose of this chapter: a discussion of the post processing
package referred to as MPOST. This package consists of the following three post processors:
MPOSTWIN.EXE
LPOSTWIN.EXE
EPOSTWIN.EXE
Mill machines
Lathe machines
Wire EDM machines
These post processors convert generic INC files into a variety of standard EIA / ISO,
conversational, and columnar style NC code formats.
The EIA standard requires that every address or word of the NC program language is a letter
followed by a number. This format usually uses G, X, Y, Z, and/or M codes for various machine
operations and functions. The output format can be Standard G code, Conversational, or
Columnar.
The following example program sections indicate the different code formats:
STANDARD EIA / ISO
CONVERSATIONAL
O1
H1 M9 Z1.
48
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
CONVERSATIONAL
G0 Z0.5
G1 Z0 F4.
4 L Z+0.5 R F6000 M
X1.5638 F9.
5 L Z+0 R F40 M
Y-2.0875
7 L Y-2.0875 Z+0 R F M
8 CC Y-1.6375
10 CC X+1.9138 Y-1.0313
G1 X0.9509 Y0.1139
12 CC X+1.2138 Y-1.0313
G1 X0.3196
Y-2.212
14 CC X+1.9138 Y-1.0313
X0.9417
G0 Z1.
M5 M9
17 CC X+1.183 Y+0.4994
G0 G49 G90 Z0
E0 X0 Y0
19 L X+0.3196 Z+0 R F M
M2
20 L Y-2.212 Z+0 R F M
21 L X+0.9417 Z+0 R F M
22 L Z+1. R F6000 M
23 L Z+0 R F6000 M91
24 L X+0 Y+0 M2
25 END PGM 1 INCH
Figure 15: Standard G code / Conversational (Continued)
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
5
10
49
1
0
90
15
9417
-22120
760
13
20
78
25
9417
-22120
30
79
9417
-22120
40
35
79
15638
-22120
-7071
7071
90
40
79
15638
-20875
-7071
-7071
90
45
11215
-17203
15638
-16375
-9003
-4353
90
50
9209
-13730
19138
-10313
-8271
-5620
90
55
7638
-10313
12138
-10313
-10000
90
60
9209
-6896
12138
-10313
-8271
5620
90
65
11183
-3460
19138
-10313
-9837
1800
90
70
79
9509
1139
-7719
-6357
90
75
9002
1494
-3333
-9428
90
80
79
3196
1494
7071
-7071
90
85
79
3196
-22120
7071
7071
90
90
79
9417
-22120
-10000
90
95
81
11830
4994
26
Figure 16: Columnar
Many different formats can be created and revised for each type of machine/control combination.
These formats are described in the user configurable POSTFORM file.
The post processor receives data from the POSTFORM library to create the NC code. These files
are completely user configurable for the machine format desired. The POSTFORM libraries are
listed below for the appropriate machine tool types.
POSTFORM.M
POSTFORM.L
POSTFORM.E
MPOSTWIN.EXE
LPOSTWIN.EXE
EPOSTWIN.EXE
Milling machines
Lathe machines
Wire EDM machines
Additional posts are available that can be added to the POSTFORM library files if you need them.
Refer to Section 2.23: POST Sample Libraries on page 159.
2.6.1
Inc Files
Before the final NC code can be created, toolpaths for cutting operations on a part must first
be created. For the purposes of this chapter you can assume that each separate toolpath is
Copyright 2000 by Surfware, Inc. All Rights Reserved.
50
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
stored as an INC file within a larger file called an ICD file. The letters INC refer to Intermediate
Numerical Code. This is SURFCAMs version of the traditional CL or cutter location file. Refer
to the SURFCAM Getting Started Manual, Chapter 2: NC Project Basics starting on page 51.
These INC files store instructions on how the tool is changed, how it is positioned, how it cuts,
and various other machining information such as spindle speeds and feed rates. These files
are machine tool independent so they must be converted into actual CNC instructions (G
codes) later.
The merged INC files from an ICD file provide data to the post processor on how the part is
to be cut. The data in the POSTFORM libraries provide it information about the machine
doing the cutting. With data from these two files the post processor creates the final NC code.
With SURFCAM you can generate NC programs in a local coordinate system. Thus you can
machine different sections of the work with independent machining orientationsa necessity
with most parts. SURFCAM can be used to change the machining orientation of the part by
using construction views. This is accomplished by setting the CView (construction view)
parameter to the number of the view that matches the machining orientation of the piece
currently being cut.
Note:
2.7
POSTFORM STRUCTURE
You can configure the post processor for the desired NC code output format. This output format
is directed by the POSTFORM file used. These formats can be configured for machine control
types, output style, or variations of usage.
To create or modify machine code formats, edit the contents of the POSTFORM file with a text
editor. This can be accomplished using the SURFCAM Editor.
When the POSTFORM file is edited for each machine format, the post processor should generate
the proper NC code. In addition to EIA / ISO formats, the post processor can also create programs
using a columnar or conversational format.
The following sections cover the general Post Processor structure for Mill, Lathe, and Wire EDM
machines. The machine type sections cover the specific structure for the individual machine types.
2.7.1
NC Code Format
The post expects to find the NC code formats in the POSTFORM file written in a particular
way. File modifications must be made according to the rules outlined in this document.
Following is the structure the post expects to find in the POSTFORM file:
1. A command word, such as Name, followed by a semicolon (;).
2. A single space separating the word from the instructions.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
51
3. A strictly formatted series of characters and/or lines instructing the post how to process
the command.
The POSTFORM file requires that each numerical designation be enclosed with the Greater
Than and Less Than signs, for example G0. You must bracket numerical values because the
post accepts not only numerical values, but also variables. You can direct the post to a
particular and significant numerical value assigned to a particular address, but it is a value
that changes. The brackets delimit the numbers or variables that are in the POSTFORM file
and are not output in the resultant NC code.
2.7.2
Comments
If there are two or more adjacent spaces on a line, the post will consider anything following
to be a comment. Put comments in the file in either of two ways:
1. Move the cursor three or more spaces past the end of a command line, then type the
comment.
2. Type any comment on its own line. Be sure that the line has two or more leading spaces.
Note:
2.7.3
Name
Multiple machine formats can be stored in the POSTFORM file. The Name line indicates the
name of the next machine or controller that will appear in the menu when the post is run. The
text following the word Name will appear on the screen as a menu choice. The name line
indicates the beginning of the format section for that particular machine. The lines following
the Name line describe the configuration of the post until the next Name line appears. The
examples below indicate a variety of names that can be used. These names are listed when
the Post is executed.
name Fanuc
name Fanuc Incremental
name Fanuc Metric
name Heidenhein Conversational
2.7.4
Case Sensitivity
The case sensitivity of the entries made in the POSTFORM file is dependent upon the data
entered. The only entries that must be in upper case characters are those that are required
by the machine tool to be upper case. These are typically the Word Address characters.
Commands, sequences, and variables can be entered as either upper or lower case
characters.
Note:
When lower case character output is desired, the entire POST file should be in
lower case characters. When a single letter code is required to be in lower case
characters, all entries for that letter code should be in lower case characters.
Copyright 2000 by Surfware, Inc. All Rights Reserved.
52
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
This manual uses upper case characters for the first letter of each word of the commands
and sequences. All variable entries are in lower case characters.
2.7.5
Entry Types
The POSTFORM file consists of four separate entry types. These include the following:
2.8
STRUCTURED LOGIC
The post offers limited structured logic capabilities. This functionality allows logical decisions when
necessary. The following describes the format and required syntax.
2.8.1
IF, ELSE and ENDIF statements can now be added to your machine format to either allow
or disallow any lines in the sequence.
The IF line must have 3 parameters: 2 VARIABLES (or a variable and a constant) with a 1 or
2-character logical operator between themall items separated by a single space.
The ELSE line (which is optional) and ENDIF line cannot have any "parameters."
Following are some sample "IF" lines:
IF [Val1] = 2
IF [Tool] > 24
IF [Speed] <= 50
If [Cycle] = 19
2.8.1.1
Restrictions
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
53
6. You are limited to fifty IF structures within each machine format area.
2.8.2
Operators
Legal operators are >, <, =, <> (not equal), <= and >=
Following is an example of a tool change sequence using logic to control dual-range spindle
speed (M41,M42) and suppression of the pre-indexing of the last tool. (Blank lines were
added for clarity to separate the "logic" sections from the rest of the sequence):
Toolchange
M<9>
G<28> G<49> Z<0> S<100>
N<Block> M<6>
This "IF" structure sets the "gear range" (M41 or 42):
IF [Speed]>500
G<0> G<40> G<80> G<Work> X<H> Y<V> M<42>
ELSE
G<0> G<40> G<80> G<Work> X<H> Y<V> M<41>
ENDIF
G<43> Z<D> H<Lcomp> M<Direct> S<Speed>
M<Cool>
Here the pre-indexing of the last Tool is suppressed:
2.8.3
The SET command allows a variable to be set to any other variable or constant. Place this
within an IF structure, and you can set a variable to a number.
Following is an example of how to support spindle ranges:
1stToolchange
G0 G90 G80 G40 G17
T[Tool] M6
Set [Val2] to 65
54
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Set [Val2] to 66
endif
2.9
This is a series of lines that each start with a specific character, usually a letter, followed by some
numbers and signs. It is a list of all the characters that the NC machine needs, in the order they
appear on any line of NC code. You can add, change, and delete lines so that they are arranged
in the order appearing in a line of NC code. The examples below indicate the Word Address format
and the output order.
These examples show a portion of the Word Address and Tool Change code with the
corresponding NC code that is output.
% 00
O>4
X ->3.>4
Y ->3.>4
Z ->3.>4
F >2
G >2
S >4
M >2
ToolChange
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
55
M6 T[tool]
G0 G90 S[speed] M3 X[h] Y[v]
Z[h] G1 F[plunge]
End
The NC code for this POSTFORM.M excerpts is shown below. The letter output is determined by
the order of the Word Address Formats.
M6 T2
X1. Y2.5 G0 G90 S2000 M3
Z.1 F3.5 G1
The next example uses the same Tool Change sequence with the Word Address Format order
changed. The example indicates the NC code output change as it is effected by the
POSTFORM.M change.
% 00
O>4
G >2
S >4
M >2
X ->3.>4
Y ->3.>4
Z ->3.>4
F >2
ToolChange
M6 T[tool]
G0 G90 S[speed] M3 X[h] Y[v]
Z[h] G1 F[plunge]
End
The NC code for this POSTFORM.M excerpt is shown below. The letter output is determined by
the order of the Word Address Formats.
M6 T2
G0 G90 S2000 M3 X1. Y2.5
G1 Z.1 F3.5
The Word Address characters are formatted according to the following information.
These entries are valid for all SURFCAM post processors.
/ 00
The 00 indicates that the character is output without numbers. This is normally used for the
block skip character as shown.
N >4
This outputs the letter N with up to 4 numerals. There is no minus sign or decimal point
output.
56
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
X ->3.>4
This format outputs the X address character with up to 3 numerals to the left and 4 numerals
to the right of the decimal point. The decimal point is output. The minus sign is output when
applicable.
F >32
The F character is output with up to 3 numerals to the left and 2 numerals to the right of the
decimal point. The decimal point and the minus sign are not output. This format will output
trailing zeros, for example, the code F200 is output for an F-2.0 value.
G2
The G character is always output with 2 numerals. Leading zeros are output for single digit
numbers. The code G02 is output for a value of 2.
R +->24
The R address is output with a plus sign unless it is a minus value. The output has 2 numerals
to the left and no less than 4 numerals to the right of the decimal point. The decimal point is
not output. Trailing zeros are output to fill the 4 numerals to the right of the decimal. The code
of R+15000 is output for an R1.5 value.
COLUMNAR STYLE FORMATS:
T C27 S5 >4 T
The T address will appear with the T in column 27; the complete word will occupy 5 spaces
(up to 4 of which will hold the actual numerical information).
K C14 S6 >32
The K address starts at column 14 (but NO K is output); it has no minus sign, and occupies
6 spaces (up to 3 of which are before the invisible decimal).
When required by the machine tool, commas can be used instead of decimal points. The
MPOSTWIN accepts characters with the ASCII values between 33 (!) and 122 (z).
DETAILS AND EXAMPLES OF LETTER FORMATS:
The maximum possible format is something like this:
? Caa Sb +->c.>d x Limit -40 40 Mult 25.4 Add 2.5 Inc
where "?" is the character (usually a letter) to be formatted, each "n" can be any numeral, and "x"
is an optional character.
Caa
The number following the C denotes the column number at which this word starts.
Note:
There is a space after the number to separate this information from the next part.
(Columnar only)
Sb
The numeral after the S determines how many spaces this word will take in the NC block.
Note:
The column number and spaces number are used only for columnar programs.
(Columnar only)
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
57
+ (plus sign)
This causes the post to output a plus sign on the number if it is not negative. It must be the
first formatting character in this line of the POSTFORM file, if used.
X +>3.>4
INC FILE VALUE
NC CODE OUTPUT
2.5
X+2.5
-1.3000
X-1.3
0.2135
X+.2135
NC CODE OUTPUT
2.5
X2.5
-1.3000
X1.3
0.2135
X.2135
- (minus sign)
This causes the post to output a minus sign on the number if it is indeed a negative value. It
must be the next formatting character if a minus sign is ever to be used for this character
address.
X ->3.>4
INC FILE VALUE
NC CODE OUTPUT
2.5
X2.5
-1.3000
X-1.3
0.2135
X.2135
When both the + and - signs are entered the appropriate sign is output with the value.
X +->3.>4
INC FILE VALUE
NC CODE OUTPUT
2.5
X+2.5
-1.3000
X-1.3
0.2135
X+.2135
58
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NC CODE OUTPUT
2.5
X2.5
-1.3000
X1.3
0.2135
X.2135
This Word address without the first > symbol forces the output of leading zeros.
X 3.>4
INC FILE VALUE
NC CODE OUTPUT
2.5
X002.5
-1.3000
X001.3
0.2135
X000.2135
This Word address without both > symbols forces the output of leading and trailing zeros.
X 3.4
INC FILE VALUE
NC CODE OUTPUT
2.5
X002.5000
-1.3000
X001.3000
0.2135
X000.2135
c (a numeral)
This is always a single digit that indicates the number of digits available. In this example, it is
the number of digits before the decimal point.
If the above > symbol is used, then this is the maximum number of digits that can appear
before the decimal point.
If the above > symbol is not used, then this is the number of digits that will always appear
before the decimal point.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
59
G >2
INC FILE VALUE
NC CODE OUTPUT
01
G1
00
G0
G3
G2
INC FILE VALUE
NC CODE OUTPUT
01
G01
00
G00
G03
. (decimal point)
The presence of the decimal point in the line indicates that the address outputs a decimal
point. If this character is not used, it will not be output in the NC code.
X >3.>4
INC FILE VALUE
NC CODE OUTPUT
2.5
X2.5
-1.3000
X1.3
0.2135
X.2135
When the decimal point is not placed in the Word address format, it is not output in the NC
code. The following example shows that this may not be suitable code for the machine. When
the decimal is not in the Word address the > symbols should be removed to ensure proper
NC code as displayed in the next example.
X >3>4
INC FILE VALUE
NC CODE OUTPUT
2.5
X25
-1.3000
X13
0.2135
X2135
60
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
X 34
INC FILE VALUE
NC CODE OUTPUT
2.5
X0025000
-1.3000
X0013000
0.2135
X0002135
d (another numeral)
This is always a single digit that indicates the number of digits available. In this example it is
the number of digits before the decimal point.
If the above > symbol is used, then this is the maximum number of digits that can appear
before the decimal point.
If the above > symbol is not used, then this is the number of digits that will always appear
before the decimal point.
G>2
INC FILE VALUE
NC CODE OUTPUT
01
G1
00
G0
G3
G2
INC FILE VALUE
NC CODE OUTPUT
01
G01
00
G00
G03
x - OUTPUT character
This is used to replace a character described in the format with another character in the NC
program. This is useful when the same letter must be formatted differently when used in
different places. In some controls, any negative Z value with a minus is usually below the Z0
point, but in the case of drilling cycles, no minus sign is required for the Z. The example below
shows that the letter Z is output when the letter A is used in the POSTFORM file.
A >3.>4 Z
Below is a sample line of a POSTFORM sequence using this output character.
G81 X[h] Y[v] A[d] F[frate]
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
61
This line shows the NC code output using the line in the POSTFORM file.
G81 X2.5 Y1.25 Z.5 F20.
In other words, the post formats for A, but outputs a Z word address.
Note:
When the open parenthesis "(" is used as the output character, as in the case of
the Dynapath conversational control, the closed parenthesis ")" is automatically
coded at the end of the character output. The following code shows this use for G
codes in the Dynapath post.
G 02 (
INC FILE VALUE
NC CODE OUTPUT
01
(01)
00
(00)
(03)
The output letter can be suppressed by placing empty quotes at the end of the letter format.
For example this can be used to suppress the letter N for line numbers. Below, the letter N
is suppressed while the line number is output.
N >4 ""
The examples use the following sequence line.
G0 G90 S[speed]
INC FILE VALUE
NC CODE OUTPUT
1 G0 G91 S1000
23
23 G0 G90 S1000
3237
When the "" symbols are not placed in the Word address the output is as shown below.
INC FILE VALUE
Note:
NC CODE OUTPUT
N1 G0 G91 S1000
23
3237
The Output character can be used to get around many common formatting
problems.
Columnar style
The output character for columnar style programs works slightly differently when formatting
a columnar style program. The Spaces line designates a format as columnar. If no output
Copyright 2000 by Surfware, Inc. All Rights Reserved.
62
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
character is specified, a space will be output in place of the letter, instead of the letter itself.
In the examples with Columnar style formats, the T is repeated at the end of the T format line.
When the letter is not repeated at the end of the line, the letter is not output in the NC code.
Note:
The output letter must be placed on the line before any modifiers.
Limit
This format limits the acceptable value for the word address. When this limit is reached an
error message is output to the screen for you to make a correction. The first numeral
indicates the minimum value for the output and the second numeral indicates the maximum
value. The example below indicates that the value of the S word can be between 0 and 5000.
When the file is post processed, the Word address is error checked for the limit set in the
format.
S 4 Limit 0 5000
INC FILE VALUE
NC CODE OUTPUT
S1
6000
ERROR Message
3237
S3237
When the lower limit is above zero, the output uses this value when the INC file value is less
than the limit.
S 4 Limit 250 5000
INC FILE VALUE
NC CODE OUTPUT
ERROR Message
6000
ERROR Message
3237
S3237
Note:
Note:
Limit values are absolute. When the output is incremental, the absolute value of
the letter is checked for the limit.
Mult
The value after this command is used as a multiplier for all the values that will output for this
word. The value entered can be either a number value or a Word Address Letter. The current
value of the Word Address letter is used for the Mult function. The following example will
output metric values.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
63
Note:
NC CODE OUTPUT
11
X279.4
2.5
X63.5
.2135
X5.4229
Add
The value after this command will be added to all the output for this word. The value entered
can be either a number value or a Word Address Letter. The current value of the Word
Address letter is used for the Add function. The example below can be used to shift the output
location of any character. Add a negative number to subtract.
X ->3.>4 Add 10
INC FILE VALUE
NC CODE OUTPUT
11
X21.
-2.5
X7.5
.2135
X10.2135
Abs/Inc
All output for this word will be incremental. The default is absolute. It can be coded although
it is not necessary. The example below outputs the Y values incrementally. The examples
below indicate the Y incremental move values based on the starting point of Y0. The INC file
values are absolute locations output by SURFCAM from Y0.
Y ->3.>4 Inc
INC FILE VALUE
NC CODE OUTPUT
11
Y11.
-2.5
Y-13.5
.2135
Y2.7135
IncSign
Used as a qualifier for rotary axis positioning. When added to the Word address format, it
causes the sign of the output to designate the direction of rotation.
These example A axis motions are within the 118 degree to 350 degree marks of the rotary
table and begin at 260 degrees.
64
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NC CODE OUTPUT
270
A+270.
118
A-118.
350
A+360.
NC CODE OUTPUT
270.
A+270.
118.
A+118.
350.
A+360.
IncFrom
This is used to define the Word address as incremental from the letter entered. This is
typically used for 4 axis Wire EDM programming. The example below outputs the U value
incrementally from the last absolute value of X. The INC file values are the successive
absolute X axis values.
U ->3.>4 IncFrom X
INC FILE VALUE
X VALUE
NC CODE OUTPUT
U VALUE
1.
2.
U1.
2.5
-3.2
U-5.7
.2135
.125
U.0995
Modal
The Modal modifier prevents the post from repeating the same values on later lines when the
value has not changed. The INC file values are successive lines.
F >2 Modal
The following sequence line is used for this example.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
65
Note:
NC CODE OUTPUT
F
1.
X0 Y0 F1.
1.5
2.5
1.
X1.5 Y2.5
2.
3.
1.
X2. Y3.
1.3
2.
2.
Modal Word address letters can also be specified with the ModalLetters command.
Force
This modifier requires the post to output the letter on each line. When the letter is required
on each line without the value, use the Modal modifier with the Force modifier.
F >2 Force
The following sequence line is used for this example.
X[h] Y[v] F[frate]F >2 Modal Force
INC FILE VALUE
X
NC CODE OUTPUT
F
1.
X0 Y0 F1.
1.5
2.5
1.
2.
3.
1.
1.3
2.
2.
NC CODE OUTPUT
F
1.
X0 Y0 F1.
1.5
2.5
1.
X1.5 Y2.5 F
2.
3.
1.
X2. Y3. F
1.3
2.
2.
66
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
The order in which these modifiers are placed on the line is not important. The order in which they
are performed is not dependent upon the order in the line. The performance order is as follows:
1. The original value is multiplied with Mult.
2. Addition is accomplished after Mult.
3. The result of these two is checked for defined limits.
4. The result is then converted to incremental when Inc or IncFrom is used.
2.10
COMMANDS
Commands are used by the post processor to identify information necessary to format the
program correctly. These commands can be placed in any order. They should be placed before
the sequence section of the machine file. These commands are generally grouped by their
prospective function.
1. 2ndCircleCode (p. 67)
41. Modality
ModalGs (p. 78)
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
67
Commands that are used in the POSTFORM files followed by a question mark (such as Spaces?)
are called switches. These switches refer to various conditions required by the NC machine that
can be turned on or off with a YES or NO indication. This is accomplished by placing a Y or N after
that word.
1. 2ndCircleCode Mill, Lathe, EDM
Some NC machines cannot process a circular move in just one block of program information. For
these machines a second line is used to indicate whatever information could not be given on the
first line. 2ndCircleCode is used to describe the NC word that initiates this second line of
information. Some machines require a code to identify the second line of the arc information. This
is sometimes an M99 code.
2ndCircleCode M99
Related Commands: CtrCode, ByDiameter?, ByQuadrants?, CtrIncremental?
2. ArcPlane Mill Only
This command sets the plane for Circular interpolation in XY, YZ, XZ planes. This command must
be placed before the CtrCode Command. Example: ArcPlane G 17 18 19 # Arc Plane Selection
To use this feature of MPOST, the CtrCode needs to have the K letter added after I J.
Example: CtrCode I J K
Refer to CtrCode Mill, Lathe, EDM on page 71.
3. ArcWithLine? EDM
This command is used for 4 axis EDM only. It is used to break G2 and G3 arc moves into G1 linear
moves. It is used in conjunction with the MaxRad command that defines the chordal breakdown
value of the G1 linear moves.
This command defines whether the machine tool can accept arcs and lines for 4 axis cuts. When
the command is entered with the Y, the EDM machine can accept an arc on one path with a line
on the other. When the N is entered the arcs are broken into line segments based on the MaxRad
values entered.
With the example below the output is with arcs and lines.
ArcWithLine? Y
With this example the arcs are broken into line segments based on the MaxRad command.
MaxRad 99 .001
ArcWithLine? N
Related Commands: ArcWithSame, MaxRad
4. ArcWithSame? EDM
This command is used for 4 axis EDM only. It is used to break G2 and G3 arc moves into G1 linear
moves. It is used in conjunction with the MaxRad command that defines the chordal breakdown
value of the G1 linear moves.
68
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
This command defines whether the machine tool can accept arcs on both cut paths for 4 axis cuts.
When the command is entered with the Y the EDM machine can accept an arc on both cut paths.
When the N is entered the arcs are broken into line segments based on the MaxRad values
entered.
With the example below the output is with arcs.
ArcWithSame? Y
With this example the arcs are broken into line segments based on the MaxRad command.
MaxRad 99 .001
ArcWithSame? N
Related Commands: ArcWithLine, MaxRad
5. Ask Mill, Lathe, EDM
You can set the value of a variable by responding to a prompt. The prompt is configured by the
user to be displayed prior to the post generating the code or the number of times a sequence is
executed. You can enter a default value that can be accepted by pressing the Enter key. You can
define any question for the prompt desired. The response to the question, either the default or
entered value, assigns a numeric value to the any variable name. These variables can be placed
in the POSTFORM file for any letter.
When the Ask statement is placed outside a sequence, it is only displayed one time for each tool
motion file. The value of the variable defined is used for the entire file.
The example below indicates the format for the Ask statement. This example is used for a lathe
cutoff cycle. The first quoted string is the prompt question, and the second is the optional default
value.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
69
The NC code below uses the default values for the Ask statements.
G0 Z.2
G28 U0 W0 M9 T1100
/ M0
G50 X0 Z0
T1200 M8
G96 S200 M3
G0 Z-3. X2. T1212
G0 X2.
G28 U0 W0 T1200
M30
When the Post Processor is activated, the Ask prompts are displayed as follows:
ByDiameter? Y
Related Commands: 2ndCircleCode, CtrCode, ByQuadrants?, CtrIncremental?
70
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
# Outputs G3 Y0 I-2.5 J0
# Outputs the following:
G3 X0 Y2.5 I-2.5 J0
X-2.5 Y0 I0 J-2.5
X0 Y-2.5 I2.5 J0
X2.5 Y0 I0 J2.5
CCW G3
Related Commands: CW, CircDir
9. CDC Mill
This command is used to identify the two letters (usually P and Q) to be included on all movement
lines for the Cincinnati style DComp vectors.
CDC P Q
Related Commands: DComp, LComp
10. CircDir Mill, Lathe, EDM
Machines that have one event code for an arc move must also specify the direction of rotation.
This command must be followed by a letter and two numbers, the first for clockwise and the
second for counterclockwise moves.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
71
Machines that use only a comment start character will ignore after the comment character.
Note:
When the machine tool does not support comments, do not enter the Comment
command in the POSTFORM file.
Notes:
EndNotes
72
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
For the following examples, a 90 deg. arc of radius 2.5, center at X1. Y1., starting at X3.5 Y1. and
ending at X1. Y3.5 is cut in the counterclockwise direction.
MILL, LATHE
CtrCode I J
CtrCode R
EDM
CtrCode I J K L
Note:
The formats for the letters K, and L must be set in the letter format section of the
POSTFORM.E file.
Note:
The programming mode must be absolute for 4 Axis: "INCREMENTAL? Y" line is not
allowed in the POSTFORM.E file.
Arc center codes for UV, typically K and L, are assumed to be incremental from the start of the UV
plane arc. When the K and L values must be incremental from the I and J values of the XY plane
enter another Y after the CtrIncremental? parameter.
Related Commands: 2ndCircleCode, ByDiameter?, ByQuadrant?, CtrIncremental?
14. CtrCode>180 Mill, Lathe, EDM
With this command you can use the R letter designation to code arc moves greater than 180
degrees and less than a full circle. This can be accomplished by coding the following letter address
and command sequence. The letter format used is the same as the CtrCode command.
r ->3.>4 R Mult -1
This outputs a -R for the arc center to break arcs greater than 180 degrees.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
73
This example uses a 90 deg. arc of radius 2.5, center at X1. Y1. starting at X3.5 Y1. and cutting
to X1.0 Y3.5 in a counterclockwise direction.
MILL, LATHE
CtrIncremental? Y
CtrIncremental? N
EDM
CtrIncremental? Y N
The formats for the letters K and L must be set in the letter format section of the
POSTFORM.E file.
Note:
The programming mode must be absolute; the "INCREMENTAL? Y" line is not allowed
in the POSTFORM.E file. When incremental output is desired, use the individual Word
address method instead. Refer to Section 2.18: Incremental Output on page 138.
Note:
UV plane axis positioning values for Wire EDM are absolute values unless otherwise
indicated in the letter format section of the POSTFORM.E file. When the U and V values
for Wire EDM are to be incremental from the X and Y values on the same line, format
the U and V letters as follows:
U ->3.>4 IncFrom X
V ->3.>4 IncFrom Y
Arc center codes for UV, typically K and L, are assumed to be incremental from the start
of the UV plane arc. When the K and L values must be incremental from the I and J
values of the XY plane, enter another Y after the CtrIncremental? parameter.
CtrIncremental? Y Y
Related Commands: 2ndCircleCode, CtrCode, ByDiameter?, ByQuadrants?
17. CW Mill, Lathe, EDM
This command identifies the letter and number for clockwise arcs.
CW G2
Related Commands: CCW, CircDir
18. DCode Mill, Lathe
These are followed by the character that corresponds to their function. The DCode command
corresponds to the depth moves of the INC file. This is typically the Z word.
DCode Z
Related Commands: DCode2, HCode, HCode2, VCode, VCode2, FeedCode
74
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
DCode2 W
Related Commands: DCode, HCode, HCode2, VCode, VCode2, FeedCode
20. DComp Mill, Lathe
The three values following the DComp command correspond to the machines three diameter
offset directions: Left, Right, and Cancel, respectively.
Drive \mill\
There must be a trailing back slash (\).
It is recommended that the Drive line be added after the Name line. Each different machine format
can have a different Drive line, which enables you to automatically route NC programs for each
machine into its own directory.
In addition to (or instead of) having a separate Drive line for each machine, you can place a Drive
line at the very top of the POSTFORM file. All NC programs can be routed to this directory unless
the machine chosen has its own Drive line, in which case the machines drive designation will be
used.
22. Dummy for Columnar Style Mill
The character input after Dummy is a character that will appear at the end of each line of a
columnar style program to indicate the end of the line. The Dummy line is not used when the
format is not columnar.
Note:
The items Spaces and Dummy are used only in columnar style programs.
Each $0
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
75
In this example, to output just the dollar sign without the 0 following it, format the dollar sign to
output no digits by giving it the format:
$ 00
Note:
This needs to be entered in the Word Address Formats section and the POSTFORM it
gets output from is determined by the Word Address Format section.
EOB 13 10
This outputs a carriage return and line feed at the end of each block.
Related Commands: Dummy, Each
25. Feed Mill, Lathe, EDM
The following lines indicate the linear Feed Rate movement codes:
Feed G1
Here a G1 indicates that a move at the specified feed rate is going to be programmed in this block.
Related Commands: FeedCode, FeedType, Rapid, SpeedType, VRapid
26. FeedCode Mill, Lathe, EDM
This function specifies the character to use for Feedrate output.
FeedCode F
Note:
Related Commands: Feed, FeedType, DCode, DCode2, HCode, HCode2, VCode, VCode2
27. FeedType Mill, Lathe, EDM
This command specifies the appropriate G codes for IPR and IPM output.
FeedType 95 94
This entry will output a G95 for IPR and G94 for IPM codes.
Related Commands: Feed, FeedCode, SpeedType, VRapid
Copyright 2000 by Surfware, Inc. All Rights Reserved.
76
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
First#? N
Related Commands: Last#?, Sequence#s
29. HCode Mill, Lathe, EDM
These commands are followed by the character that corresponds to their function (the H, V, and
D in the first 3 stand for Horizontal, Vertical, and Depth, respectively). For standard milling, these
characters are almost always X, Y, Z.
MILL, LATHE
HCode X
EDM
HCode X U
The letter U indicates the auxiliary horizontal plane movement for Wire EDM.
Note:
The formats for the letter U must be set in the Letter Format section of the
POSTFORM.E file.
Note:
UV plane axis positioning values for Wire EDM are absolute values unless otherwise
indicated in the letter format section of the POSTFORM.E file. When the U and V values
are to be incremental from the X and Y values on the same line, format the U and V
letters as follows:
U ->3.>4 IncFrom X
V ->3.>4 IncFrom Y
HCode2 U
Related Commands: DCode, DCode2, HCode, VCode, VCode2, FeedCode
31. Helical? Mill
This switch defines whether or not the machine tool allows helical move. When the machine tool
accepts helical moves this command should be entered as Y. The output code would then utilize
the designated axis for the helical moves.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
77
Inc/Abs G 91 90
Note:
Incremental? Y
This will cause the code to be output in Incremental. The machine may also require a G91. Ensure
that a G91 code is placed in your StartCode or 1stToolChange sequence.
Note:
Note:
Last#? Y
Related Commands: First#?, Sequence#s
36. LComp Mill, EDM
Similar to DComp, the two values following the LComp command indicate the values used for the
words that activate and deactivate the machines tool length compensation function, respectively.
LComp 43 49# On, Off
Related Commands: CDC, DComp
Copyright 2000 by Surfware, Inc. All Rights Reserved.
78
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
41. Modality
ModalGs Mill, Lathe, EDM
This is simply a list of all the G values that are modal. This means that any G code in the list
will remain in effect, and not be repeated, until another G code from the list is called. This
prevents, for instance, a G1 from being output on every line when there are consecutive
linear moves. G values that should appear on this line are G codes for any movement
commands: linear, rapid, circular, and canned cycle G values.
ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85
Related Commands: ModalLetters
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
79
80
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
RenumSubs? Y
Note:
When this command is entered as Y, the Subline variable should not be used.
Refer to Section 2.19: Subprogram Output on page 143 and Section 2.20: Block Number Output on
page 148.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
81
To prevent this from happening, just reverse the order of the Replace lines so the D is replaced
before the T.
Note:
Limits are not checked on phrases that are the result of a Replace command. In other
words, if code is inadvertently replaced with another phrase that is beyond a particular
limit, then no warning will appear. The size of the search phrase in a Replace line is
limited to 10 characters, and the replace phrase is limited to 40 characters.
RevSigns Z X
An indefinite number of letters can be placed on this line.
Related Commands: RevTurret2?
47. RevTurret2? Lathe
This word format globally reverses all X values when the second turret is active. You can enter a
Y for yes or N for no to reverse the X values for the second turret.
RevTurret2? Y
Related Commands: RevSigns
48. Sequence#s Mill, Lathe, EDM
This line defines the Block numbers output in the NC program. There are four parameters required
and placed in order on this line:
CHARACTER
The first character after the command is the 1st character of the block number. These examples
show the code and output for the commands using the letter N and the : symbol.
Note:
THE OUTPUT
1stToolChange
M6 T[Tool]
N1 M6 T1
N2 G0 G90 S2000 M3
N3 E1 X0 Y0
N4 H1 M7 Z.1
End
82
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
The following example uses the letter C with the Replace command to output the : symbol for each
block number.
: >2
SEQUENCE#S : 1 1 1
THE OUTPUT
1stToolChange
M6 T[Tool]
:1 M6 T1
:2 G0 G90 S2000 M3
:3 E1 X0 Y0
:4 H1 M7 Z.1
End
FREQUENCY
A number here indicates how often a block number is placed on a line. To output a number on every
line, enter a 1. To output a number on every other line enter a 2. Entering the number 10 will output a
block number every ten lines. The following examples show the code and output for the parameter.
SEQUENCE#S N 1 1 1
THE OUTPUT
1stToolChange
M6 T[Tool]
N1 M6 T1
N2 G0 G90 S2000 M3
N3 E1 X0 Y0
N4 H1 M7 Z.1
End
The following example indicates a Frequency of 2 to output block numbers on every other line.
SEQUENCE#S N 2 1 1
THE OUTPUT
1stToolChange
M6 T[Tool]
N1 M6 T1
G0 G90 S2000 M3
N2 E1 X0 Y0
H1 M7 Z.1
End
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Note:
83
Use a frequency of 0 not to output the block numbers on each line. The post will only
put them where they are requested.
INCREMENT
This is the value by which the block number is incremented before the next output. Using the value
of 10 will create block numbers in the block address itself as 10 greater than the last block number.
SEQUENCE#S N 1 10 10
THE OUTPUT
1stToolChange
M6 T[Tool]
N10 M6 T1
N30 E1 X0 Y0
N40 H1 M7 Z.1
End
START VALUE
This is simply the value of the very first block number that appears in the code; numbers after the
first are determined by the start value plus a multiple of the Increment.
SEQUENCE#S N 1 2 100
THE OUTPUT
1stToolChange
M6 T[Tool]
N100 M6 T1
N104 E1 X0 Y0
N106 H1 M7 Z.1
End
Note:
84
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
THE OUTPUT
1stToolChange
M6 T[Tool]
M6T1
G0G90S2000M3
E1X0Y0
H1M7Z.1
End
Note:
Do not confuse this line with the Spaces setting mentioned above in the Letter Formats
section.
SpeedCode M
Note:
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
85
desired. When this command is not used, the Subprograms are automatically placed before the
main program.
Subs1st? Y
Related Commands: RenumSubs?
55. Tolerance Mill, Lathe, EDM
This command is used to set the value to round off the output.
Tolerance .0002
The example above causes only even numbers to be output in the 1/10,000ths column.
56. Tools Mill, Lathe
This line is used only with tool indexers that require incremental T numbers. In other words, the
value of the T number is the number of indexes required to reach the desired tool, not the tool
number.
Note:
Make sure there is no Tools line in any section of a POSTFORM that describes a
machine not having this incremental tool change. This could cause the machine to work
improperly.
UpperCaseComments? Y
Related Commands: Comment
58. VCode Mill, Lathe, EDM
These commands are followed by the character that corresponds to their function. The h, v, and
d in the first 3 commands stand for Horizontal, Vertical, and Depth, respectively. For standard
milling, these characters are almost always X, Y, Z, and F.
MILL, LATHE
VCode Y
EDM
VCode Y V
The formats for the letter V must be set in the letter format section of the POSTFORM.E
file.
Note:
UV plane axis positioning values are absolute values unless otherwise indicated in the
letter format section of the POSTFORM.E file. When the U and V values are to be
incremental from the X and Y values on the same line, format the U and V letters as
follows:
U ->3.>4 IncFrom X
V ->3.>4 IncFrom Y
86
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
VCode2 V
Related Commands: DCode, DCode2, HCode, HCode2, VCode, FeedCode
60. VRapid Mill
This command is used to output additional code before the VRapid letter output. This can be used
for some Bandit controls.
VRapid /0
The example above outputs a slash before the letter for all rapid moves.
Related Commands: Feed, FeedType, Rapid, SpeedType
61. Work Mill, Lathe
This line is used to identify the letter designation of work offsets. Typically the letter G is used for
work offset designation. Machine tools may use different letters to identify the work offset. When
this is the case change the Work command to indicate the proper work offset letter. The example
below is for a FANUC style control.
Work G
This example can be used for a FADAL control.
Work E
Related Commands: WorkDefault
62. WorkDefault Mill, Lathe
This line is used to identify the number of the default work offset. The FANUC control begins with
number 54 while the FADAL control begins with the number 1. When this command is not entered
the default number used by the post processor is 54.
WorkDefault 1
Related Commands: Work
63. ZRestart? Mil
This switch allows for machine formats that do not require the canned cycles to be restarted for
each change in the depth or clearance plane values. If this parameter is not used in the
POSTFORM file, and the Z or R values change during a cycle, the cycles will be cancelled if
necessary, then restarted. To prevent this from occurring, enter the following line in the
POSTFORM file:
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
87
2.11
Some machines can handle changing Z and R values when in incremental mode but
not in absolute.
SEQUENCES
Sequences are used to describe the actual NC code output. They are a series of program blocks
that appear in specific places in the NC program and for specific reasons.
Each sequence is described in the POSTFORM file by giving its name, on its own line, then the
line(s) for the formatted NC description. The word END on its own line, which marks the END of
the sequence, is then entered. Each line is limited to 15 words. The total of all sequence lines is
limited to 150 lines.
The output is defined by entering the Letter format desired with the variable required for the output
code. The NC code is output with the letter entered and the data from the variable used.
Note:
The sequence examples in this section were written for a standard Fanuc control. They
are incorporated in the post libraries displayed in this section.
The post processor contains three basic sequence types. These are the Canned cycles, Standard,
and Optional sequences.
The Standard sequences appear in all POSTFORM files. They perform the operations that are
required for every machine. In addition to the standard sequences, there are optional sequences
you can define. Optional sequences are denoted with an * in Figure 18: Standard and Optional
Sequences.
1. 1stToolChange (p. 89)
88
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
These sequences are described in alphabetical order, followed by a description of the canned
cycles.
Note:
When coding sequences, you must place a single space character between each output
letter on the line. Subsequent letters are not output for the line when the single space is
not present. If you either leave out a space or insert an extra space, you will get incorrect
results. The following example shows the correct coding and the incorrect codingtwo
spaces are inserted.
CORRECT
1stToolChange
T[tool] M6
T1 M6
M[direct] S[speed]
M3 S2000
Z[d] H[Lcomp]
Z.1 G43
M[cool]
M7
End
INCORRECT
1stToolChange
T[tool] M6
T1
M[direct] S[speed]
M3
G0
Z[d] H[Lcomp]
Z.1
M[cool]
M7
End
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.11.1
89
LATHE
1stToolChange
1stToolChange
T[tool] M6
T[tool] M6
T1 M6
M[direct] S[speed]
M[direct] S[speed]
M3 S2000
G0 G54 X1. Y0
Z[d] H[Lcomp]
Z[d] H[Lcomp]
Z.1 H43
M[cool]
M[cool]
M7
End
End
BeginRow
G91.1
F[Frate]
End
Related sequences: EndRow
3. Between Mill
This sequence defines any special code desired between the Subprogram and the main
program. This could be used to enter the code for the end of all subroutines on the FADAL.
Between
M17
M30
End
90
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Subprogram end
CcwCode
G3 X[h] Y[v] I[ival] J[jval] F[frate]
G299
End
The output code:
CwCode
G2 X[h] Y[v] I[ival] J[jval] F[frate]
G199
End
The output code:
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
91
EndCode
G0 G90 G49
G0 G90 G49
M6 T[tool1]
M6 T1
X0 Y0
X0 Y0
M30
M30
%0
End
LATHE
EndCode
M6 T[tool1]
M6 T1
G0 G90 G49
G0 G90 G49
E0 X0 Y0
E0 X0 Y0
M30
M30
7. EndRow Mill
This sequence describes the format for the end of each pass of a pocket cut or the end of
each pass on a bi-directional surface cut.
This can be used for water jet or laser machine tools. It can also be used for the high speed
machining function of a machine tool.
EndRow
G91.2
F[plunge]
End
Related sequences: BeginRow
92
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
8. Index Mill
The Index sequence replaces rapid moves whenever the CView changes for the cut. Since
this sequence replaces rapid motion, the example below indicates the three functions that
should be placed in the sequence.
INDEX
G0 G28 G49 Z0
G0 G28 G49 Z0
G43 H1 Z.1
End
Related sequences: UnWind
9. InFeed Mill, Lathe, EDM
The InFeed sequence is used to define the format for tool motion into the part. This is usually
used to define the moves to initiate cutter compensation.
InFeed
G[side] X[h] Y[v] H[dcomp] F[frate]
End
InFeed
G[side] X[h] Y[v] H[dcomp] F[frate]
End
The InFeed sequences can only be 1 block long for 4 axis Wire EDM.
G499
G499
End
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
93
OutFeed
G1 G40 X[h] Y[v]
End
LATHE
OutFeed
G1 G40 X[h] Y[v]
G1 G40 X0 Y0
Note:
The OutFeed sequences can only be 1 block long for 4 axis Wire EDM.
RapidCode
G0 X[h] Y[v] Z[d]
G399
End
The output code:
StartCode
%0
O[program#]
G90 G80 G40 G17
End
# Output %
# Output an O and program #
# Output initializing G codes
94
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
LATHE
StartCode
%0
O[Program#]
G90 G80 G40 G17
End
# Output %
# Output an O and program #
# Output initializing G codes
Stop
M[Stop]
End
15. SubCall Mill
This sequence defines the details of the Subprogram call in the main program.
SubCall
E[work] X[h] Y[v]
M98 P[sub] L[times]
End
The output code for this example follows. The P word is the Subprogram number called. The
L word is the number of repetitions for the Subprogram.
G1 X1. Y1.
M98 P1 L5
Note:
SubEnd
M99
End
The output code for this example follows. This code is placed at the end of the Subprogram
code by the post processor.
M99
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Note:
95
SubStart
O[sub]
End
The output code for this example follows. This code is placed at the beginning of the
Subprogram by the post processor.
O1
Note:
G49 G0 Z0 M9
G49 G0 Z0 M9
T[tool] M6
T1 M6
G43 Z.1 H1
M[cool]
M7
End
Copyright 2000 by Surfware, Inc. All Rights Reserved.
96
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Lathe
TOOLCHANGE
N[block] T[tool] M6
N100 T1 M6
G43 Z.1 H1
M[cool]
M7
End
UNWIND
G0 G28 G49 Z0
G0 G28 G49 Z0
G0 G90 A0
G0 G90 A0
G43 H1 Z.1
G0 X0 Y0 A90.
G1 Z[lastd]
G1 Z.1
End
Related sequences: Index
21. Upon Variable Mill
This sequence can be used to output specific code whenever a variable changes. Each time the
variable changes, the Upon sequence is called. It can also be used to output a specific set of
codes every time the variable is encountered. The example below indicates the sequence to use
when the Work variable is changed.
UPON [WORK]
G91 G28 Z0
G91 G28 Z0
G[work]
G55
G90
G90
End
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Note:
97
When the variable does not change and the next line or sequence uses the
variable, this sequence is not output.
The example below is used every time the Tool variable is encountered by the post
processor.
G91 G28 Z0
G90
2.11.2
Canned Cycles
You can create a series of blocks that will be repeated to do the same operation at each point
of the cycle. The definable canned cycles are listed below. These cycles can be used as a
Machine cycle, an Emulated cycle, or an Advanced cycle.
1. AutoThread (p. 99)
The three Custom cycles can be used to modify an existing machine tool cycle to enhance
the machine capabilities. These cycles are user defined and can be single or multiple line
sequences.
MACHINE CYCLES
Canned cycles can be used to access the machines built-in canned cycles or to create user
defined cycles. When a machine canned cycle is accessed, the Cancel code should be used
to stop execution of the machine cycle.
Note:
This is accomplished by entering Cancel at the end of the End line in the canned
cycle sequence. Refer to Section 4.: Cancel Mill, Lathe on page 102.
This example uses the Drill sequence to access a machine drill cycle.
Drill
G81 X[h] Y[v] Z[d] R[vclear] F[frate]
End Cancel
98
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
This example uses the Advanced cycle method to define a specific output for the first drill
location while outputting less code for the subsequent locations.
Back 3
F[frate]
G306 Z0
G308 Z[d]
G323 P.5
G85 X[h] Y[v]
End Cancel
# Initial Cycle.
# Secondary cycles.
F5.
G306 Z0
G308 Z-.5
G323 P.5
G85 X1. Y1.
G323 P.5
G85 X2. Y3.
G323 P.5
G85 X3. Y4.
G80
1. AutoThread Lathe
This cycle is used for the Lathe automatic threading cycles.
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] P[peck1] Q[vleave] R0 F[frate]
End
The sequence below is for the Fanuc OT control.
99
100
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
MACHINE CYCLE
BACK
End Cancel
X2. Y3.
X3. Y4.
G80
EMULATED CYCLE
BACK
G0 X[h] Y[v]
Z[rplane]
G1 Z[d]F[plunge]
G0 Z[rplane]
End Cancel
G0 X1. Y1.
Z.1
G1 Z-.5 F5.
G0 Z.1
G0 X2. Y3.
Z.1
G1 Z-.5 F5.
G0 Z.1
G0 X3. Y4.
Z.1
G1 Z-.5 F5.
G0 Z.1
ADVANCED CYCLE
BACK 4
# INITIAL CYCLE.
F[frate]
F5.
G306 Z0
G306 Z0
G308 Z[d]
G308 Z-.5
G323 P.5
# Secondary cycles.
G323 P.5
End Cancel
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
101
MACHINE CYCLE
BORE
End Cancel
X2. Y3.
X3. Y4.
G80
EMULATED CYCLE
BORE
G0 X[h] Y[v]
G0 X1. Y1.
Z[rplane]
Z.1
G1 Z[d]F[plunge]
G1 Z-.5 F5.
Z[rplane]
Z.1
End Cancel
G0 X2. Y3.
Z.1
G1 Z-.5 F5.
Z.1
G0 X3. Y4.
Z.1
G1 Z-.5 F5.
Z.1
ADVANCED CYCLE
BACK 4
F[frate]
G306 Z0
G308 Z[d]
G323 P.5
G85 X[h] Y[v]
End Cancel
# INITIAL CYCLE.
# Secondary Cycles.
F5.
G306 Z0
G308 Z-.5
G323 P.5
G85 X1. Y1.
G85 X2. Y3.
G85 X3. Y4.
G80
102
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Cancel
G80
End
Drill
G81 G99 R[vclear] Z[d] X[h] Y[v] F[frate]
End Cancel
The output code for this example follows when a machine cycle is used. The Cancel code is
entered on the End line of the canned cycle sequence.
G81 G99 R.1 Z-.5 X1. Y1. F5.
X2. Y3.
X3. Y4.
G80
When the Cancel code is not entered on the End line of the single line sequence, the line is
repeated for each location.
This example shows the same code without the Cancel sequence used.
Drill
G81 G99 R[vclear] Z[d] X[h] Y[v] F[frate]
End
The output code:
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
MACHINE CYCLE
CUSTOM1
G73 X[h] Y[v] Z[d] Q[vbite] R[vclear] F[frate] G73 X1. Y1. Z-.5 Q.2 R.1 F5.
End Cancel
X2. Y3.
X3. Y4.
G80
EMULATED CYCLE
CUSTOM1
Z[vclear]
Z.1
G1 Z[d] F[plunge]
G1 Z-.5 F5.
G0 Z[rplane]
G0 Z.2
End
ADVANCED CYCLE
CUSTOM1 1
# INITIAL CYCLE.
103
104
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
MACHINE CYCLE
DRILL
End Cancel
X2. Y3.
X3. Y4.
G80
EMULATED CYCLE
DRILL
Z[vclear]
Z.1
G1 Z[d] F[plunge]
G1 Z-.5 F5.
G0 Z[rplane]
G0 Z.2
End
ADVANCED CYCLE
DRILL 1
# INITIAL CYCLE.
End Cancel
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
7. LTap Mill
This cycle is used for left hand threading.
MACHINE CYCLE
LTAP
End Cancel
X2. Y3.
X3. Y4.
G80
EMULATED CYCLE
LTAP
G1 Z[d] F[frate]
G1 Z-.5 F5.
Z[rplane]
Z.4
End
ADVANCED CYCLE
LTAP 6
# INITIAL CYCLE.
F[frate]
F5.
G300 P[rplane]
G300 P.1
G306 Z0
G306 Z0
G308 Z[d]
G308 Z-.5
G323 P.5
G323 P.5
G84
G84
105
106
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
LTAP 6
# INITIAL CYCLE.
X[h] Y[v]
X1. Y1.
End Cancel
X2. Y3.
X3. Y4.
G80
MACHINE CYCLE
PECK
G83 X[h] Y[v] Z[d] Q[vbite] R[vclear] F[frate] G83 X1. Y1. Z-.5 Q.2 R.1 F5.
End Cancel
X2. Y3.
X3. Y4.
G80
EMULATED CYCLE
When the machine tool does not have a Peck drilling cycle, the following example can be
used to create this cycle. The post processor will automatically output the Feed and Rapid
moves to synthesize a Peck drilling cycle. The moves output by this cycle are defined by the
FeedCode, Feed, and Rapid commands in the POSTFORM file. Typically the FeedCode
command identifies the feedrate moves with the letter F. The Feed command identifies the
feed move as being a G1 and the Rapid identifies the rapid moves as being G0. These can
be changed by you as the machine tool requires. During the cycle the tool is moved at rapid
motion to .05 of the last drill depth. Then the feed motion begins.
Peck
None
End
The output below shows this cycle output for two holes .375 deep with a .125 Peck increment.
%
O1
M6 T1 ( Tool Diam: 0.0625
G0 G90 S2000 M3 E1 X3.4875 Y5.3
H1 M7 Z1.
G0 Z0.1
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
G1 Z-0.025 F20.
G0 Z0.1
Z0.025
G1 Z-0.15
G0 Z0.1
Z-0.1
G1 Z-0.275
G0 Z0.1
Z-0.225
G1 Z-0.375
G0 Z1.
X4.8875 Y5.1875
Z0.1
G1 Z-0.025 F20.
G0 Z0.1
Z0.025
G1 Z-0.15
G0 Z0.1
Z-0.1
G1 Z-0.275
G0 Z0.1
Z-0.225
G1 Z-0.375
G0 Z1.
X4.9 Y4.425
Z0.1
G1 Z-0.025 F20.
G0 Z0.1
Z0.025
G1 Z-0.15
G0 Z0.1
Z-0.1
G1 Z-0.275
G0 Z0.1
Z-0.225
G1 Z-0.375
G0 Z1.
M5 M9
G0 G49 G90 Z0
E0 X0 Y0
M6 T1
M2
%
Copyright 2000 by Surfware, Inc. All Rights Reserved.
107
108
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
ADVANCED CYCLE
PECK 6
# INITIAL CYCLE.
F[frate]
F5.
G300 P[rplane]
G300 P.1
G306 Z0
G306 Z0
G307 U[vbite]
G307 U.125
G308 Z[d]
G308 Z-.5
G83
G83
X[h] Y[v]
# Secondary cycles.
X1. Y1.
End Cancel
X2. Y3.
X3. Y4.
G80
MACHINE CYCLE
REAM
End Cancel
X2. Y3.
X3. Y4.
G80
EMULATED CYCLE
REAM
G1 Z[d] F[frate]
G1 Z-.5 F5.
Z[rplane]
Z.1
End
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
REAM
109
Z.1
G0 X3. Y4. Z.1
G1 Z-.5 F5.
Z.1
ADVANCED CYCLE
REAM 4
# INITIAL CYCLE.
F[frate]
F5.
G306 Z0
G306 Z0
G308 Z[d]
G308 Z-.5
G323 P.5
G323 P.5
# Secondary cycles
End Cancel
MACHINE CYCLE
TAP
End Cancel
X2. Y3.
G80
110
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
ADVANCED CYCLE
TAP 6
# INITIAL CYCLE.
F[frate]
F5.
G300 P[rplane]
G300 P.1
G306 Z0
G306 Z0
G308 Z[d]
G308 Z-.5
G323 P.5
G323 P.5
G84
G84
X[h] Y[v]
# Secondary cycles
End Cancel
X1. Y1.
X2. Y3.
G80
2.12
VARIABLES
In many of the sample sequences, variables must be used to indicate numerical values for the post
to insert into the NC program. These variables can be used in the same way the Feed, Rapid, Cw,
and Ccw lines are described above.
A variable is a word or letter that takes the place of a number. These variables indicate information
that is pertinent to machine motion. An X value on a mill generally indicates a horizontal position
so we simply abbreviate it as the letter h. The letter h is the variable that indicates horizontal
position. The code X[h] indicates that you want the X to appear followed by the value of the current
horizontal position.
The following is a list of the variable names, and the values to which they refer, that can be used
instead of numbers when describing the sequences. Remember to enclose any values or
variables between square bracket symbols, for example R[arcrad]. These symbols act as
delimiters and are not output in the NC code.
1. arcrad (p. 111)
7. d (p. 113)
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
111
2.13
GLOBAL VARIABLES
CwCode
G11 I[ival] J[jval] R[arcrad] C[startang]
G12 C[endang]
End
Related Variables: endang, startang
112
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
N[block] T[tool] M6
G0 G90 S[speed] M[direct]
X[h] Y[v]
3. chams Lathe
This variable identifies the number of thread to cut for the taper out move.
Related Variables: passes, tipang, tparams
4. comp Lathe
This variable outputs a Lathe compensated T number.
1stToolChange
O[comp] G90 S[speed] M42
G[feedtype] M31
G92 S[maxrpm]
G0 X.4 Z.4
M[direct]
V77 T[tool] M6
G0 X[v] Z[h] M32
G[speedtype] R[v] S[speed]
End
5. cool Mill, Lathe, EDM
The Coolant value, defined by the Coolant command for on, off, or mist is output for this variable.
ToolChange
M5 M9
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: coolantoff
6. coolantoff Mill, Lathe, EDM
This variable outputs a coolant off command as defined by the Coolant command.
ToolChange
M5 M[coolantoff]
G0 G49 G90 Z0
E0 X0 Y0
M6 T[tool1]
M2
Related Variables: cool
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
113
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: h, v, endh, endv, homeh, homev, lastd, lasth, lastv
8. dcomp Mill, Lathe
This outputs the Diameter compensation offset number. It is used when cutter compensation is
desired in the NC program.
Infeed
H[lcomp] D[dcomp] Z[d]
G1 G[side] X[h] Y[v] F[frate]
End
Related Variables: hcdc, vcdc, lcomp
9. ddist Mill
This variable outputs the distance the depth axis moves during the current move. This variable is
not specifically coded in the POSTFORM file.
Related Variables: hdist, vdist.
10. depth Mill, Lathe, EDM
This variable outputs the depth of the upcoming cycle for milling machines and the total depth of
thread for lathes.
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
11. direct Mill, Lathe, EDM
The M code value of the Spindle direction is output with this variable. The value is defined by the
CW and CCW commands.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Copyright 2000 by Surfware, Inc. All Rights Reserved.
114
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Drill 3
S0
Z[d]
X[h] Y[v] G81
L2 M61
G4 P[dwell]
L2 M62
G4 P[dwell]
End
13. endang Mill, Lathe, EDM
The ending angle of an arc is output for this variable.
CwCode
G11 I[ival] J[jval] R[arcrad] C[startang]
G12 C[endang]
End
Related Variables: arcrad, lastrotang, rotangle, startang
14. feedtype Mill, Lathe, EDM
The G code for IPR and IPM output that is set with the FeedType command is output for this
variable.
1stToolChange
O[comp] G90 S[speed] M42
G[feedtype] M31
G92 S[maxrpm]
G0 X.4 Z.4
M[direct]
V77 T[tool] M6
G0 X[v] Z[h] M32
G[speedtype] R[v] S[speed]
End
Related Variables: frate, plunge.
15. flood EDM
This variable is similar to the cool variable. The options are low, off, medium, and high.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
115
Drill
G81 G99 R[vclear] Z[d] F[frate] X[h] Y[v]
End Cancel
Related Variables: feedtype, plunge
17. gauge Mill, Lathe
This variable outputs the Z axis gauge length for both mills and lathes.
18. h Mill, Lathe, EDM
This variable outputs the current horizontal value.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: d, v, endh, ednv, homeh, homev, lastd, lasth, lastv
19. h2 EDM
This variable outputs the current horizontal value for the auxiliary second plane.
Related Variables: v2
20. hcdc Mill
This variable outputs the horizontal component of the cutter diameter compensation vector for
older machine tools.
Linecode
G79 X[h] Y[v] E0 H0 P[hcdc] Q[vcdc] F[frate]
End
Related Variables: dcomp, lcomp, vcdc
21. hctr Mill, Lathe, EDM
This variable outputs the absolute horizontal center value of an arc.
CwCode
c0 I[hctr] J[vctr] K[d]
I0.0 J0.0 K1.0
x[h] y[v] z[d]
End
Related Variables: vctr.
116
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
EndCode
G0 X[homeh] Z[homev] T[tool] t0 M5
M30
%0
End
Related Variables: d, h, v, endh, endv, homev, lastd, lasth, lastv
24. homev Mill, Lathe
The vertical home position for Lathes is output for this variable.
EndCode
G0 X[homeh] Z[homev] T[tool] t0 M5
M30
%0
End
Related Variables: d, h, v, endh, endv, homeh, lastd, lasth, lastv
25. hvector Mill, Lathe, EDM
This variable outputs the horizontal vector direction of the first completely compensated cutting
move. It is used on machines that do not have "look ahead" ability to indicate which way the tool
is going to go on the move after the infeed.
Infeed
G1 X[h] Y[v] F[frate]
G91
G1 A[hvector] B[vvector]
G[side] I[hvector] J[vvector] D[dcomp]
G90
G86 R-.1 Z[d] F[plunge] D[lcomp]
F[frate]
End
The following example shows the use of this variable for the AGIE EDM machine tool.
Infeed
G1 x[hvector] y[vvector] G44
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
117
ToolChange
M5 M9
G0 G49 G[incmode] Z0
M6 T[tool]
G0 G[incmode] S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
27. inidep Mill, Lathe, EDM
This variable is the initial depth where cutting begins.
ToolChange
M5 M9
G0 G49 G90 Z0
M6 T[tool]
G0 G90 S[speed] M[direct] X[h] Y[v]
H[lcomp] M[cool] Z[d]
G83 R[vclear] z[inidep] F[frate] Q[vbite] X[h] Y[v]
G80
End
Related Variables: plunge, rplane
28. initpower EDM
This is the value entered in the Initl Power field.
29. invtime Lathe
This variable outputs the inverse time for 4 axis motion. Check the machine manual to determine
the correct letter format to use for the InvTime variable. Not all machine tools use the letter F.
Some machine tools may also require the use of the G93 code.
LineCode
G1 X[h] Y[v] Z[d] F[InvTime]
End
Related Variables: movelength, movetime
118
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
CcwCode
F[frate]
X[h] Y[v] I[ival] J[jval]
End
Related Variables: ivect, jval, jvect, kvect
31. ivect Mill, Lathe, EDM
This variable is used to describe the normal X axis vectors for 3D cutter compensation used by
some machines. They can be added to a LineCode sequence as follows:
LineCode
G1 X[h] Y[v] Z[d] I[ivect] J[jvect] K[kvect] F[frate]
End
Related Variables: ival, jval, jvect, kvect
Note:
CcwCode
F[frate]
X[h] Y[v] I[ival] J[jval]
End
Related Variables: ival, ivect, jvect, kvect
33. jvect Mill, Lathe, EDM
This variable is used to describe the normal Y axis vectors for 3D cutter compensation used by
some machines. They can be added to a LineCode sequence as follows:
LineCode
G1 X[h] Y[v] Z[d] I[ivect] J[jvect] K[kvect] F[frate]
End
Related Variables: ival, ivect, jval, kvect
Note:
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
119
LineCode
G1 X[h] Y[v] I[ivect] J[jvect] K[kvect] F[frate]
End
Related Variables: ival, ivect, jval, jvect.
Note:
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
End
Related Variables: d, h, v, endh, endv, homeh, homev, lasth, lastv
36. lasth Mill, Lathe, EDM
The position of the last horizontal move is output for this variable.
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
End
Related Variables: d, h, v, endh, endv, homeh, homev, lastd, lastv
37. lasthole Mill, Lathe
Some controls require a M99 at the end of a drilling cycle rather then a G80.
Heidenhain 2500B is similar to a Fanuc G80 but the M99 must be on the same line as the last X,
Y, or it drills the hole twice. The [LastHole] variable that gets set to 1 if the hole currently being
processed is the last one in the cycle. (Otherwise, its set to 0.)
This variable can be used inside any canned cycle to differentiate between the last hole and all
others.
120
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
if [LastHole] = 1
X<H> Y<V> Z<D> R<Vclear> F<FRate> M99
else
X<H> Y<V> Z<D> R<Vclear> F<FRate>
Endif
38. lastrotang Mill
This variable outputs the previous rotary axis position.
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
End
Related Variables: arcrad, endang, rotangle, startang, sweep
39. lasttool Mill, Lathe
This variable outputs the tool number of the previous tool.
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
M6 T[lasttool]
End
Related Variables: nexttool, tool, tool1.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
121
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
End
Related Variables: d, h, v, endh, endv, homeh, homev, lastd, lasth
41. lcomp Mill
This variable outputs the length compensation offset number. It is output for milling machines only.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: dcomp, hcdc, vcdc
42. lowerdist EDM
This is the distance from the bottom of the part to the lower guide.
43. movelength Lathe
This variable outputs the total chordal length of the current move. It does not consider the 4 axis
motion, it is the difference in location from the start location to the end location of the axis position.
This code is not specifically coded in the POSTFORM file.
Related Variables: movetime, InvTime
44. movetime Lathe
This variable determines the amount of time the machine should require to execute the current
movement. It is equal to the movelength value divided by the frate value. This code is not
specifically coded in the POSTFORM file.
Related Variables: movelength, InvTime
45. nexttool Mill, Lathe
This variable outputs the tool number of the next tool to be used. This can be used to index the
tool changer before the next tool change.
1stToolChange
M6
G0 G90 S[speed] M[direct]
X[h] Y[v]
G43 H[lcomp] Z[d] T[nexttool]
Copyright 2000 by Surfware, Inc. All Rights Reserved.
122
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
M[cool]
End
Related Variables: lasttool, tool, tool1
46. passes Lathe
This variable identifies the number of spring passes for thread cutting.
Related Variables: chams, tipang, tparams
47. peck1 Lathe
This is the depth of the first thread pass for the G76 cycle. It is used for Lathes only.
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
1stToolChange
G90 M[direct] S[speed]
G80 T[tool] M06
G00 X[h] Y[v] F[frate]
G86 R-0001 Z[d] F[plunge] D[lcomp]
End
Related Variables: inidep, rplane
Drill
G81 X[h] Y[v] Z[pointd] R[vclear] F[frate]
End Cancel
Related Variables: d
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
123
Drill
G81 G[RetPlane] X[H] Y[V] ...
end
- G98 when the tool should rapid at the (higher) "initial plane" (the posts [RPlane] level), or
- a G99 when the tool should rapid at the (lower) "rapid level" (the posts [VClear] level).
54. rigid Mill, Lathe
SURFCAM posts sets to the value of 1 during a rigid tapping cycle. During any other cycle, [Rigid] is set
to 0. Use an IF line to detect rigid tapping and output the appropriate code(s) in the TAP and CANCEL
sequences.
NOTE:
Tap
If [Rigid] > 0
G93
G93 to lock Z to spindle rotation.
G84 X[H] Y[V] Z[D] K[VBite] J0 R[VClear] F[FRate]
else
G84 X[H] Y[V] Z[D] R[VClear] F[FRate] Normal (non-rigid) tap.
endif
end cancel
The [Rigid] variable is not reset until the start of the next cycle, it can be used in the
CANCEL sequence as well as the TAP sequence.
cancel
G80
if [Rigid] > 0
G94
Unlock Z if w/ rigid tap.
endif
end
Index X
G0 G49 G90 Z0
X[h] Y [v] E[val1] A[rotangle]
H[comp] M[cool] Z[d]
End
Related Variables: arcrad, endang, lastrotang, startang, sweep
Copyright 2000 by Surfware, Inc. All Rights Reserved.
124
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Drill 3
H[lcomp] M[cool] Z[rplane]
G81 Z[d] R[vclear] F[frate]
X[h] Y[v]
End
Related Variables: inidep, rplane
58. sbite Mill, Lathe
This is the Side cut amount output.
Peck
G74 R[depth]
G74 Z[h] Q[sbite] F[frate]
End
Related Variables: sclear, sleave, vbite, vclear, vleave
59. sclear Mill, Lathe
This variable outputs the Side Clearance amount.
Back
G76 G99 R[vclear] z[d] F[frate] Q[sclear] X[h] Y[v]
End Cancel
Related Variables: sbite, sleave, vbite, vclear, vleave
60. side Mill, Lathe, EDM
The Cutter compensation side value is output for this variable. It is determined by the DComp
command entered in the POSTFORM file.
Infeed
G1 G[side] X[h] Y[v] F[frate]
End
61. sleave Mill, Lathe
This variable outputs the Side Leave amount.
Outfeed
G1 G40 X[sleave] Y[sleave] F[frate]
End
Related Variables: sbite, sclear, vbite, vclear, vleave
62. sparkgap EDM
This is the value entered in the Spark gap field.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
125
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: speedtype
64. speedtype Lathe
This is the Speed code defined by the SpeedType command. This variable is for Lathe machines
only.
1stToolChange
O[comp] G90 S[speed] M42
G[feedtype] M31
G92 S[maxrpm]
G0 X.4 Z.4 M[direct]
V77 T[tool] M6
G0 X[v] Z[h] M32
G[speedtype] R[v] S[speed]
End
Related Variables: speed, maxrpm
65. startang Mill, Lathe
This outputs the Starting Angle of an arc.
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
Related Variables: arcrad, endang, lastrotang, rotangle, sweep
66. stop EDM
Stop codes, M0 or M1, are placed at the end of the first cutting pass and at the end of the tab
cutting pass.
67. sub Mill, Lathe
This variable outputs the Subprogram number.
SubCall
E[work] X[h] Y[v]
M[98] P[sub] L[times]
End
Related Variables: subline, times
126
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
SubCall
E[work] X[h] Y[v]
M98 P[subline] L[times]
End
Related Variables: sub, times
69. sweep Mill, Lathe, EDM
This is used to output the span of an arc. It is measured in degrees. This is typically used with the
CcwCode and CwCode sequences. The value output for clockwise arcs is negative; use the MULT
modifier or RevSign to reverse the output when required.
CwCode
I[hctr] J[vctr]
C2 A[sweep]
End
Related Variables: arcrad, endang, lastrotang, rotangle, startang
70. taper Lathe, EDM
This is the value entered in the Taper field.
It is the difference in height at the start and end of the thread. It is usually an I value.
Lathe example:
AutoThread
G76 A[tparams] Q[vbite] I[taper] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
EDM example:
LineCode
G1 X[H] Y[V] A[taper]
End
71. thickness EDM
This is the thickness of the material being cut.
72. times Mill, Lathe
This variable outputs the number of repetitions for the Subprogram.
SubCall
E[work] X[h] Y[v]
M98 P[subline] L[times]
End
Related Variables: sub, subline
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
127
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: lasttool, nexttool, tool1
75. tool1 Mill, Lathe
This is the tool number of the first tool in the program. It is usually referenced in the EndCode
section to return the turret to tool position number one at the end of the program.
EndCode
M5 M9
G0 G49 G90 Z0
E0 X0 Y0
M6 T[tool1]
M2
%0
End
Related Variables: lasttool, nexttool, tool
76. tparams Lathe
This is a six digit code containing three parameters that consist of two digits each. These digits
are defined in the following example:
A010360
A
01
03
60
128
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
129
LTap
G74 G99 R[vclear] Z[d] F[frate] Q[vbite]
X[h] Y[v]
End
Related Variables: sbite, sclear, sleave, vbite, vleave
86. vctr Mill, Lathe, EDM
This variable outputs the absolute Vertical Center value of an arc.
CwCode
c0 I[hctr] J[vctr] K[d]
I0.0 J0.0 K1.0
x[h] y[v] z[d]
End
Related Variables: hctr
87. vdist Mill
This variable outputs the vertical distance the axis moves during the current move. This variable
is not specifically coded in the POSTFORM file.
Related Variables: ddist, hdist
88. vgauge Mill, Lathe
This variable outputs the X axis gauge length for lathes, 0 for mills.
130
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] P[peck1] Q[vleave] R0 F[frate]
End
Related Variables: sbite, sclear, sleave, vbite, vclear
90. vvector Mill, Lathe, EDM
This variable outputs the vertical vector direction of the first completely compensated cutting
move. It is used on machines that do not have "look ahead" ability to indicate which way the tool
is going to go on the move after the infeed.
Infeed
G1 X[h] Y[v] F[frate]
G91
G1 A[hvector] B[vvector]
G[side] I[hvector] J[vvector] D[dcomp]
G90
G[86] R-.1 Z[d] F[plunge] D[lcomp]
F[frate]
End
The example below shows the use of this variable for the AGIE EDM machine tool:
Infeed
G1 x[hvector] y[vvector] G44
G1 X[h] Y[v] G40
End
Related Variables: hvector
91. wirefeed EDM
This is the value entered in the Wirefeed field.
2.14
PROMPTED VARIABLES
The following variables are called prompted variables because they refer to values that are
entered by you. They are not based on values that are within the incoming tool motion. When
these variables are used in the format, the post prompts you for the value when the post starts
reading the format.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
131
EndCode
G0 X[endv] Z[endh]
M30
End
Related Variables: d, h, v, endv, homeh, homev, lasth, lastv
2. endv Mill, Lathe
This variable prompts you for the vertical position for the tool at the end of the program.
EndCode
G0 X[endv] Z[endh]
M30
End
Related Variables: d, h, v, endh, homeh, homev, lasth, lastv
3. maxrpm Mill, Lathe
This variable prompts you for the maximum spindle speed.
1stToolChange
O[comp] G90 S[speed] M42
G[feedtype] M31
G92 S[maxrpm]
G0 X.4 Z.4
M[direct]
V77 T[tool] M6
G0 X[v] Z[h] M32
G[speedtype] R[v] S[speed]
End
Related Variables: speed
4. program# Mill, Lathe, EDM
You are prompted for the program number to use at the beginning of the program. The Post
Processor does not display a prompt for this variable when the program number is specified in the
SURFCAM Program Information dialog box.
StartCode
%0
O[program#]
End
132
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
ToolChange
G0 Z[toold] T[tool] t0 M9
M1
T[tool]
G[feedtype] G[speedtype] S[speed] M[direct]
G0 X[v] Z[d] T[tool] t[lcomp] M[cool]
End
Related Variables: toolh, toolv
6. toolh Mill, Lathe
This variable prompts you for the Horizontal Tool change position.
ToolChange
G0 Z[toolh] T[tool] t0 M9
M1
T[tool]
G[feedtype] G[speedtype] S[speed] M[direct]
G0 X[v] Z[h] T[tool] t[lcomp] M[cool]
End
Related Variables: toold, toolv
7. toolv Mill, Lathe
This variable prompts you for the Vertical Tool change position.
ToolChange
T0
X[toolv] Z[toolh] A0.1
S9 T[tool]
X[v] Z[h]
End
Related Variables: toold, toolh
8. work Mill, Lathe
You are prompted for the Work offset number. The Post Processor does not display a prompt for this
variable when the program number is specified in the SURFCAM Program Information dialog box.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: workd, workh, workv
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
StartCode
G90 G94 G0 G17
G92 X[workh] Y[workv] Z[workd]
End
Related Variables: work, workh, workv
10. workh Mill, Lathe
You are prompted for the Work origin offset coordinate of the Horizontal Axis.
StartCode
G90 G94 G0 G17
G92 X[workh] Y[workv] Z[workd]
End
Related Variables: work, workd, workv
11. workv Mill, Lathe
You are prompted for the Work origin offset coordinate of the Vertical Axis.
StartCode
G90 G94 G0 G17
G92 X[workh] Y[workv] Z[workd]
End
Related Variables: work, workd, workh
2.15
1stToolChange
M6 T[tool] ([0] d[toolrad] e[tooldiam] f[corner]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: style, tooldiam, toolrad
133
134
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2. tooldiam Mill
This is the diameter of the current tool. It is typically used for tool comments.
1stToolChange
M6 T[tool] ([0] d[toolrad] e[tooldiam] f[corner]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: corner, style, toolrad
3. toolrad Mill, Lathe
This variable outputs the radius of the current tool.
1stToolChange
M6 T[tool] ([0] d[toolrad] e[tooldiam] f[corner]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: corner, style, tooldiam.
2.16
EPOSTWIN.EXE requires two incoming INC files, the first for the Program (XY) plane, and the
second for the Auxiliary (UV) plane. The two INC files are created with NC 2 Axis Contour under
the following guidelines.
Geometry
Create geometry for both the Program plane and the Auxiliary plane. The contours should be
oriented parallel to the XY plane. The Z position of each contour is not important, since the
post processor ignores any Z information.
Surface
Create a Synchronized cross section surface to verify the synchronization of the XY and UV
contours. If SURFCAM does not prompt for Synchronize before creating a surface, you
should break, trim, or increment the geometry until the XY and UV contours have the same
number of elements.
Cut
NC 2 Axis Contour the XY and UV contours with the infeed type set to With C-Comp and the
tool number greater than zero, even though tool numbers are not required in the actual NC
code. The INC filename for the UV contour must be the same as the XY INC file with an X
appended to the filename.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
135
Note:
Both INC files must be the same size and the tool motion must be in the same order.
This may preclude the use of splines within the contours because the number of linear
moves required to cut a spline may not be the same.
Note:
The post processor will automatically merge the XY and UV INC files without having to
specify the UV filename.
Note:
When offsetting for the wire thickness and cutting outside corners, additional moves
may be created and cause synchronization to fail.
Note:
SURFCAM defaults to optimizing contours which may cause synchronization to fail. Set
the curve tolerance to zero and SURFCAM will not optimize the contours.
2.17
SURFCAM can be configured to output NC code in either English (inch) or Metric (millimeter)
units. The output is affected by the system settings and the Post Processor word address,
commands and variables.
To produce the NC code SURFCAM uses the INC file created when the geometry is cut. This INC
file can be in either English or Metric units. This output is effected by the system settings when the
geometry is created. The INC file values are defined by the input values when the geometry is
created. When the system setting is in Inch mode for the geometry creation, the INC file output
values are the same as those entered by the user. SURFCAM does not convert the geometry
values to metric when the system setting is switched to MM units.
Note:
The INC file output unit is not the determining factor for the NC code output units.
The Post Processor uses INC file, Word Address, Inch/MM command, and unitmode variable to
determine the NC code output units.
2.17.1
INC File
The INC file output units are determined by the Inches / MM command on the Options menu.
The system default is for Inch output. When this option is selected the system uses millimeter
input for all dialog boxes and the INC file is output in metric units.
2.17.2
Word Address
The Word Address can be used to convert an Inch INC file to millimeters by using the Mult
modifier. This modifier only affects the Word Address for which it is coded. It must be used
for each Word Address that requires the conversion.
Mult
The value after this command is used as a multiplier for all the values that will output for
this word. The following example will output metric values:
136
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NC CODE OUTPUT
11.
X279.4
2.5
X63.5
.2135
X5.4229
Note:
2.17.3
Inch/MM
The Inch/MM line indicates the numerical values of the G code that set the inch or millimeter
programming mode on the NC machine. The code selected by the Post Processor is
determined by the INC file output units. When the system is set to Inch, the Inch code is used.
When the system is set to MM, the Metric code is used. For most machines, it is G70 and
G71. The example below is entered in the POSTFORM file for a machine tool that uses G20
and G21 for inch and millimeter mode.
Inch/MM 20 21
The default for this command is 70 71 for mills and 20 21 for lathes.
2.17.4
Unitmode
This variable outputs the value for the G code defined by the Inch/MM command.
1stToolChange
M6 T[tool] ([0] d[toolrad] e[tooldiam] f[corner]
G0 G[unitmode] G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Note:
When the Mult modifier is used to convert the Word Address, this variable must
not be used. The machine code for the units must be hard coded.
2.17.5
POSTFORM Formatting
The examples below show a variety of methods to output English or Metric unit NC code.
This example uses the system default of Inch units to create the geometry and the INC file.
The NC code output units is Inches.
Inch/MM 70 71
1stToolChange
M6 T[tool]
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
137
M6 T1
G0 G70 G90 S2000 M3 E1 X1. Y1.
H1 M7 Z.1
This example uses the system MM units to create the geometry and the INC file. The NC
code output units is Millimeters.
Inch/MM 70 71
1stToolChange
M6 T[tool]
G0 G[unitmode] G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
The output code:
M6 T1
G0 G71 G90 S2000 M3 E1 X25.4 Y25.4
H1 M7 Z2.54
This example uses the system default Inch units to create the geometry and the INC file. The
NC code output units is Millimeters for the X and Y axis. The Mult modifier is used in the Word
Address. The machine G code for the metric mode must be hard coded into the sequences.
X ->3.>4 Mult 25.4
Y ->3.>4 Mult 25.4
Inch/MM 70 71
1stToolChange
M6 T[tool]
G0 G71 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
The output code:
M6 T1
0 G71 G90 S2000 M3 E1 X25.4 Y25.4
H1 M7 Z.1
138
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
This example uses the system default MM units to create the geometry and the INC file. The
NC code output units is Inches for the X and Y axis. The Mult modifier is used in the Word
Address. The machine G code for the metric mode must be hard coded into the sequences.
M6 T1
G0 G70 G90 S2000 M3 E1 X1. Y1.
H1 M7 Z2.54
2.18
INCREMENTAL OUTPUT
Incremental output is determined by the use of word address modifiers, commands and variables.
WORD ADDRESS MODIFIERS:
COMMANDS:
VARIABLES:
2.18.1
Inc
Mult
Sub
Incremental?
Inc/Abs
incmode
Abs/Inc
All output for this word will be incremental. The default is absolute. It can be coded although
it is not necessary. The examples below output the Y values incrementally. The examples
below also indicate the Y incremental move values based on the starting point of Y0.
Y ->3.>4 Inc
INC FILE VALUE
NC CODE OUTPUT
11.
Y11.
-2.5
Y-13.5
.2135
Y2.7135
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.18.2
139
Mult
The value after this command is used as a multiplier for all the values that will output for this
word. The following example will output metric values.
X ->3.>4 Mult 25.4
INC FILE VALUE
NC CODE OUTPUT
11.
X279.4
2.5
X63.5
.2135
X5.4229
Note:
2.18.3
Sub
2.18.4
This switch is used to set the machine output to the Incremental or Absolute mode.
Incremental? Y
This will cause the code to be output in Incremental. The machine can also require a G91.
Ensure that a G91 code is placed in your StartCode or 1stToolChange sequence.
Note:
When incremental output is desired, the POSTFORM file must recognize the
motion letters as modal. This can be accomplished with the ModalLetters
command.
140
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.18.5
The Inc/Abs line indicates the numerical values of the G code that set the incremental or
absolute programming mode on the NC machine. The post processor issues a warning when
a mode change command is processed. The default is shown below.
Inc/Abs G 91 90
The letter defines the NC code letter for these modes. The first number indicates the
incremental code and the second indicates the absolute code. This NC code information is
used by the incmode variable.
When these codes are hard coded into the POSTFORM file, the output code remains in the
coded mode until changed. The example below shows a Subprogram that is incremental with
an absolute main program.
SubStart
O[sub]
G91
End
SubEnd
G90
M99
End
The SubStart sequence hard codes the incremental mode for the subprogram. The
subprogram remains in the incremental mode until the SubEnd sequence is used. This
returns the program to the absolute mode for the main program.
When an absolute G code is hard coded, the Incremental? command has no effect on the
output code. The incremental G code must be hard coded to ensure proper NC code output.
2.18.6
The incremental code defined by the Inc/Abs command is output for this variable.
ToolChange
M5 M9
G0 G49 G[incmode] Z0
M6 T[tool]
G0 G[incmode] S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
The incmode variable can be used to output the appropriate NC code defined by the Inc/Abs
command. This variable will output a G90 when the Incremental? command is entered as N
and the Inc/Abs command is entered as shown above. When Y is entered for the
Incremental? command, the output is G91.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
Note:
141
When the POSTFORM file encounters a hard coded mode, either G90 or G91, the
Post uses that code for the remainder of the file. Use the incmode variable instead
of hard coded variables to ensure the proper incmode variable output.
The examples below show the NC code output determined by the word address modifiers,
commands and variables coded in the POSTFORM file.
This example used the Incremental? command as Y, yet hard codes the G90 for absolute
mode.
INCREMENTAL? Y
Inc/Abs G 91 90
ToolChange
M6 T[tool]
M6 T1
G0 G90 S2000 M3
X[h] Y[v]
X1. Y1.
H1 Z.1 M7
End
This example sets the Incremental? command at N, yet hard codes a G91 for the incremental
mode.
INCREMENTAL? N
Inc/Abs G 91 90
ToolChange
M6 T[tool]
M6 T1
G0 G91 S2000 M3
X[h] Y[v]
X0 Y0
H1 Z.1 M7
End
142
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
This example uses the incmode variable to output the incremental set in the Inc/Abs command.
INCREMENTAL? Y
Inc/Abs G 91 90
ToolChange
M6 T[tool]
M6 T1
G0 G91 S2000 M3
X[h] Y[v]
X0 Y0
H1 Z.1 M7
End
This example shows the absolute output using the incmode variable.
INCREMENTAL? N
Inc/Abs G 91 90
ToolChange
M6 T[tool]
M6 T1
G0 G90 S2000 M3
X[h] Y[v]
X1. Y1.
H1 Z.1 M7
End
This example shows a sequence that toggles between absolute and incremental output.
INCREMENTAL? N
Inc/Abs G 91 90
ToolChange
G0 G91 G28 Z0
G0 G91 G28 Z0
M6 T[tool]
M6 T1
G0 G90 S2000 M3
X[h] Y[v]
X1. Y1.
H1 Z.1 M7
End
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.19
143
SUBPROGRAM OUTPUT
Subprograms are individual programs that define the tool motion for each tool in the INC file. The
Subprograms can be used for multiple part fixturing. These programs differ from Subroutines in
that they can be run separately in the machine control. A Subroutine requires a main program for
them to be executed in the machine control.
SURFCAMs post processor will output a separate Subprogram for each tool identified in the INC
file. The post then creates a Main Program that calls the appropriate number of Subprograms.
The following Commands, Sequences, and Variables are used to define and call the
Subprograms.
COMMANDS
RenumSubs?
Subs1st?
2.19.1
SEQUENCES
SubStart
SubEnd
SubCall
Between
VARIABLES
sub
subline
times
RenumSubs? Mill
You can reset the line numbers at the beginning of each Subprogram and the main program.
When it is not used, the line numbers are not reset at the beginning of each Subprogram and
main program.
RenumSubs? Y
Note:
When this command is entered as Y, the Subline variable should not be used.
2.19.2
Subs1st? Mill
This command defines the location of the Subprograms in relation to the main program. Enter
a Y for the Subprograms to be output before the main program. An N outputs the
Subprograms after the main program. This command is only entered in the POSTFORM file
when Subprograms are desired. When this command is not used, the Subprograms are
automatically placed before the main program.
Subs1st? Y
144
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.19.3
SubStart Mill
SubStart
O[sub]
End
The output code for this example follows. This code is placed at the beginning of the
Subprogram by the post processor.
O1
2.19.4
SubEnd Mill
SubEnd
M99
End
The output code for this example follows. This code is placed at the end of the Subprogram
code by the post processor.
M99
2.19.5
SubCall Mill
This sequence defines the details of the Subprogram call in the main program.
SubCall
E[work] X[h] Y[v]
M98 P[sub] L[times]
End
The output code for this example follows. The P word is the Subprogram number called. The
T word is the number of repetitions for the Subprogram.
E1 X1. Y1.
M98 P1 L5
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.19.6
145
Between Mill
This sequence defines any special code desired between the Subprogram and the main
program. This could be used to enter the code for the end of all subroutines on the FADAL.
Between
M17
M30
End
The output code:
X0 Y0
G91 G28 Z0
M17
M30
O1234
2.19.7
# Subprogram end
# Main program beginning
Sub Mill
This variable identifies the Subprogram number and is usually entered in the SubStart and
SubCall sequences. In the example below the variable sub identifies the Subprogram
number and is used to call the Subprogram in the main program.
SubStart
O[sub]
End
SubEnd
M99
End
SubCall
E[work] X[h] Y[v]
M98 P[sub] L[times]
End
The output code for this example follows. The Subs1st? command is entered as Y. When the
INC file is post processed, you are prompted for the Times variable. For this example, your
input was a value of 5.
O621
X1. Y1.
X2.
Z.1 G0
M99
O1234
Copyright 2000 by Surfware, Inc. All Rights Reserved.
146
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
G0 G90 S2000 M3 E1 X0 Y0
H1 M7 Z.1
E1 X1. Y1.
M98 P621 L5
2.19.8
Subline Mill
This variable is used to call the Subprogram using the block numbers. When the INC file is
post processed, the block number of the first line of the Subprogram is output for this variable.
When the variable is used, the RenumSubs? command must not be used.
The following example uses this variable instead of the subline variable. The block numbers
for this example begin at 1 and are incremented by 1.
SubStart
O[sub]
End
SubEnd
M99
End
SubCall
E[work] X[h] Y[v]
M98 P[subline] L[times]
End
When the INC file is post processed, you are prompted for the Times variable. For this
example, your input was a value of 5.
N1 O1
N2 X1. Y2.
N3 X2.
N4 Z1. G0
N5 M99
N6 G0 G90 S2000 M3 E1 X0 Y0
N7 H1 M7 Z.1
N8 E1 X1. Y1.
N9 M98 P1 L5
2.19.9
Times Mill
This variable is used to identify the number of repetitions for the Subprogram. When the INC
file is post processed, you are prompted for the times variable value. The default for this
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
prompt is 0. The following examples show the SubCall sequence and NC code with and
without the Times variable.
SubCall
E[work] X[h] Y[v]
M98 P[sub] L[times]
End
The output code for this example follows. When the INC file is post processed, you are
prompted for the Times variable. For this example, your input was a value of 5.
G0 G90 S2000 M3 E1 X0 Y0
H1 M7 Z.1
E1 X0 Y0
M98 P621 L5
SubCall
E[work] X[h] Y[v]
M98 P[sub] L[times]
End
The output code for this example follows. When the INC file is post processed, you are
prompted for the Times variable. For this example, the default value was used.
G0 G90 S2000 M3 E1 X0 Y0
H1 M7 Z.1
E1 X0 Y0
M98 P621 L0
In this example, the Times variable is not used.
SubCall
E[work] X[h] Y[v]
M98 P[sub]
End
The output code:
G0 G90 S2000 M3 E1 X0 Y0
H1 M7 Z.1
E1 X0 Y0
M98 P621
147
148
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.20
NC code can be output with a number at the beginning of each line of code. This can be referred
to as a Block number, Sequence number or Line number. Block numbers must be defined within
the POSTFORM file with the use of word addresses, commands, and variables.
2.20.1
Word Address
Block numbers are typically output with the letter N. This letter must be entered in the Word
Address section of the POSTFORM file. The number of digits output for the character should
be determined by the machine tool control. Most machine tools use four digits maximum for
the block numbers. The example below shows the Word address format for block numbers
using the letter N.
N >4
The example uses the following command and sequence line.
Sequence#s N 1 1 1
G0 G90 S[speed]
INC FILE VALUE
NC CODE OUTPUT
N1 G0 G91 S1000
23
3237
When a block number is only desired at the first line of a tool change, use the following code
in the POST file.
N >4
SEQUENCE#S N 0 1 100
1stToolChange
N[block] T[tool] M6
N100 T1 M6
G0 G90 S2000 M3
G54 X0 Y0
ToolChange
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
SEQUENCE#S N 0 1 100
149
N[block] T[tool] M6
N200 T2 M6
G0 G90 S2000 M3
2.20.2
First#
Last#
RenumSubs?
Sequence#s
1. First#? Mill, Lathe, EDM
This switch determines whether a Block number is output on the first line of the program or
omitted. Enter Y or N for the desired output. The example below will omit a number on the
first line of the NC program.
First#? N
This is typically coded when the first line that is output for the NC code is a percent symbol.
2. Last#? Mill, Lathe, EDM
This switch determines whether a Block number is output on the last line of the program or
omitted. Enter a Y or N for the desired output. The example below will output a block number
on the last line of the program.
Last#? Y
This is typically coded when the last line that is output for the NC code is a percent symbol.
3. RenumSubs? Mill
You can reset the line numbers at the beginning of each Subprogram and the main program.
When this command is not used, the line numbers are not reset at the beginning of each
Subprogram and main program.
RenumSubs? Y
Note:
When this command is entered as Y, the Subline variable should not be used.
150
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
N1 O1
N2 G91
N3 X1.
N4 M99
N1 O2
N2 G91
N3 Y1.
N4 M99
N1 O1234
N2 G0 G90 S2000 M3 E1 X0 Y0
N3 H1 M7 Z.1
4. Sequence#s Mill, Lathe, EDM
This line defines the Block numbers output in the NC program. There are four parameters
required and placed in order on this line:
CHARACTER
The first character after the command is the 1st character of the block number. These
examples show the code and output for the commands using the letter N and the : symbol.
Note:
The letter or symbol used must be formatted in the Word Address format.
SEQUENCE#S N 1 1 1
1stToolChange
M6 T[Tool]
N1 M6 T1
N2 G0 G90 S2000 M3
N3 E1 X0 Y0
N4 H1 M7 Z.1
End
This example uses the letter C with the Replace command to output the : symbol for each
block number.
: >2
SEQUENCE#S : 1 1 1
1stToolChange
M6 T[Tool]
:1 M6 T1
:2 G0 G90 S2000 M3
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
SEQUENCE#S : 1 1 1
151
:3 E1 X0 Y0
:4 H1 M7 Z.1
End
FREQUENCY
A number here indicates how often a block number is placed on a line. To output a number
on every line, enter a 1. To output a number on every other line, enter a 2. Entering the
number 10 will output a block number every ten lines. The following examples show the code
and output for the parameter.
SEQUENCE#S N 1 1 1
1stToolChange
M6 T[Tool]
N1 M6 T1
N2 G0 G90 S2000 M3
N3 E1 X0 Y0
N4 H1 M7 Z.1
End
This example indicates a Frequency of 2 to output block numbers on every other line.
SEQUENCE#S N 2 1 1
1stToolChange
M6 T[Tool]
N1 M6 T1
G0 G90 S2000 M3
N2 E1 X0 Y0
H1 M7 Z.1
End
Note:
Use a frequency of 0 to not output the block numbers on each line. The post will
only put them where they are requested.
152
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
INCREMENT
This is the value by which the block number is incremented before the next output. Using the
value of 10 will create block numbers in the block address itself to be 10 greater than the last
block number.
SEQUENCE#S N 1 10 10
1stToolChange
M6 T[Tool]
N10 M6 T1
N30 E1 X0 Y0
N40 H1 M7 Z.1
End
START VALUE
This is simply the value of the very first block number that appears in the code; numbers after
the first are determined by the start value plus a multiple of the Increment.
SEQUENCE#S N 1 2 100
1stToolChange
M6 T[Tool]
N100 M6 T1
N104 E1 X0 Y0
N106 H1 M7 Z.1
End
Note:
2.20.3
Variables
The block variable is the only variable available for Block numbers. When it is coded in a
POSTFORM sequence, the output number is determined by the Sequence#s command.
This variable is typically used when block numbers are only desired for the tool change lines.
The following example shows the post file entries for the output of block numbers at tool
changes only.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
153
N >4
SEQUENCE#S N 0 1 100
1stToolChange
N[block] T[tool] M6
N100 T1 M6
G0 G90 S2000 M3
G54 X0 Y0
M8 G43 Z.1
End
ToolChange
N[block] T[tool] M6
N200 T2 M6
G0 G90 S2000 M3
M8 G43 Z.1
End
When Block numbers are required for each program block, the block variable is not used.
This is accomplished by changing the Sequence#s command to indicate the frequency of 1
as the following example indicates:
Sequence#s N 1 1 1
2.20.4
Block numbers can be suppressed for the entire NC program or for specific lines of the
program. You can also output blank lines within the NC code if desired. Suppression of block
numbers is accomplished with the use of Word Address formatting or Commands.
When block numbers must be suppressed on only the first or last line of the NC program, use
the First# and Last# commands described above.
When no block number output is desired, the Sequence#s command is used with a
frequency of zero. This is shown in the following example. This example outputs no block
numbers for the entire program.
Sequence#s N 0 1 1
This command, with the use of the block variable, can be used to output block numbers at
specific NC code lines only.
154
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
The exclamation symbol "!" can be used to suppress a line number at any NC code line. It
can also be used to output a blank line in the NC code.
This symbol must be entered in the Word Address format section of the post file. It should be
entered as indicated by the following example.
! 00
When used in a POSTFORM sequence, the symbol is followed by a variable of 0. The
following example shows the ! symbol being used to suppress the line number for the
program number line.
SEQUENCE#S N 1 1 1
Start
!0 O[program#]
End
1stToolChange
O1234
M6 T[tool]
N1 M6 T1
N2 G0 G90 S2000 M3 E1 X0 Y0
N3 H1 M7 Z.1
End
The following example indicates the use of the ! symbol to insert a blank line in the NC code.
Sequence#s N 1 1 1
RenumSubs? Y
First# N
Last# Y
Start
%0
O[program#]
End
SubStart
O[sub]
End
SubEnd
M99
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
!0
End
EndCode
M5 M9
G0 G49 G90 Z0
E0 X0 Y0
M6 T[Tool1]
M2
%0
End
The output code
%
N1 O1
N2 G91
N3 X1.
N4 M99
N1 O2
N2 G91
N3 Y1.
N4 M99
N1 O1234
N2 G0 G90 S2000 M3 E1 X0 Y0
N3 H1 M7 Z.1
N4 M98 P1 L1
N5 M98 P2 L1
N6 M5 M9
N7 G0 G49 G90 Z0
N8 E0 X0 Y0
N9 M6 T1
N10 M2
N11 %
155
156
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.21
2.21.1
Configuration Files
[MPOST]
Format C:\SURFCAM\POSTLIB\PostForm.m
[LPOST]
Format C:\SURFCAM\POSTLIB\PostForm.l
[EPOST]
Format C:\SURFCAM\POSTLIB\PostForm.e
Figure 23: Post.ini File
2.21.2
The post processor provides foreign language support through the POST.DEF file. This file
is an ASCII text file that lists all messages and prompts used by the post processor. The
numbers at the beginning of each line must not be changed. These are internal addresses
for the post processor. Wording after these numbers can be translated into virtually any
language.
Note:
Some words may be sequence names and should not be translated for clarity
between the messages and the POSTFORM file.
2.21.3
You can output a post processed file to any directory. This can be accomplished using two
methods. You can specify the output directory in the SURFCAM.PST file or in the
POSTFORM files.
2.21.3.1
PST File
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
PostItem Fanuc
Status
ChDir
Delete
Command
Copyfile
Delete
Task
2.21.3.2
157
Fanuc 15M-B
c:\SURFCAM\SURF2000\MPOST
%p%N.NCC
c:\SURFCAM\SURF2000\MPOST\MPOSTWIN %p%N 1
%p%N.NCC c:\MyProjects\%N.NNC
%p%N.NCC
c:\SURFCAM\Surf2000\sedit\sedit c:\MyProjects\%N.NCC
POSTFORM File
To save an .ncc file in the sub-directory C:\MyProjects, add a Drive command like the
one below to a POSTFORM filelike Postform.m.
Drive \C:\MyProjects\
Note:
It is recommended that you place a separate Drive command after each Name
command so that all the NCC programs run on a specific machine will be saved in their
own directory.
You can, however, place a Drive command at the very top of the POSTFORM file. All
NCC programs will then be routed to this directory unless the machine chosen has its
own Drive command, in which case that one will be used.
2.22
158
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
You must first select the operations to be post processed from the NC Operations Tree. You can
process all the operations in a single Setup Section, by clicking its icon, or a single operation, by
clicking its icon.
You will then select a post processor from the NC Post list boxto the right of the Operations Tree.
You can display another list by changing the entry in NC Mode box for example, to 2 Axis. The
posts displayed in the NC Post list box are those listed in that section of the SURFCAM.PST file
set aside for the mode shown in the NC Mode list box. Changing the entry in the NC Mode box will
display the posts listed in another section of the PST file. The PST file contains commands to run
both MPOST (consisting of MPOSTWIN, LPOSTWIN and EPOSTWIN) and SPOST post
processors. SPOST is the other post processor package shipped with SURFCAM. To begin post
processing click a post name in the NC Post box and click the Post button.
You can also display all of the currently available MPOST post processorsfor all NC modes
by double-clicking the List all entry in the NC Post list box. When you do this, SURFCAM will
search the SURFCAM.PST file for a PostItem corresponding to List all, such as the following.
PostItem List all
Status Display all posts in postform.m
ChDir C:\SURFCAM\SURF2000\MPOST
Delete %p%N.NCC
Command "C:\SURFCAM\SURF2000\MPOST\MPOSTWIN" "%p%n"
Task "C:\SURFCAM\SURF2000\sedit\sedit" "%p%N.ncc"
The Command line in this example will run the MPOSTWIN post processor in such a way as to
first bring up a menu of available post processors stored in the current POSTFORM file
POSTFORM.M, POSTFORM.l OR POSTFORM.E.
A POSTFORM file contains the actual code for each of the current MPOST post processors.
SURFCAM accesses this file to run a post processor. You can run a post from the displayed menu
by double-clicking it.
2.22.1
Adding Posts
All of the post processors shipped with SURFCAM are stored in the SURFCAM\PostLib\
MPOST or SPOST sub-directories. You can add any of these post processors to your current
version of SURFCAM by using the PST Wizard utility.
To run the PST Wizard click Start > Programs > SURFCAM 2000.1> SURFCAM Tools > PST
Wizard. The Post Menu Wizard dialog box will be displayed. Follow the prompts to add or
remove a post processor.
If you select an SPOST post processor it will be copied from the PostLib\SPOST subdirectory to the SURFCAM.PST file.
If you select an MPOST post processor it will be copied from the PostLib\MPOST subdirectory to the SURFCAM.PST file and to the end of the applicable POSTFORM file.
Refer to Section 2.2.2: The MPOST Post Processor Package on page 36 and to Section 2.4.1: PST Wizard
on page 42.
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.22.2
159
SURFCAM.PST File
2.23
The POST sample libraries below are included as samples of the POSTFORM file. These files are
included in the SURFCAM\POSTLIB\MPOST directory. The list below indicates the post
processors and filenames that can be appended in the POSTFORM.M, POSTFORM.L, or
POSTFORM.E files. The filename extension indicates the type of post processor.
M2
M3
M4
M5
L2
E2
E4
2 Axis Mill
3 Axis Mill
4 Axis Mill
5 Axis Mill
Lathe
2 Axis Wire EDM
4 Axis Wire EDM
FILENAME
MILLING POSTS
FILENAME
Aciera
aciera.m3
Bridgeport w/BOSS 8
bos8.m3
ACL
acl.m3
Bridgeport w/BOSS 9
boss.m3
Acroloc GN-6M
acr6.m3
Bridgeport w/BOSS 10
boss.m3
acr6.m4
bri151.m3
ab4500.m3
Bostomatic
bostomat.m3
ab8400.m3
Centurion 4
cnt4.m3
anilam-e.m3
Centurion 5
cnt5.m3
anilam-c.m3
cin850.m3
aptcl.m3
cin950.m3
APTCL 5 Axis
aptcl.m5
cin-tab.m3
Bandit 1
ban1.m3
Cintimatic AC-8
cnt8.m3
Bandit 2
ban2.m3
compact2.m3
160
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
MILLING POSTS
FILENAME
MILLING POSTS
FILENAME
Bandit 3
ban3.m3
Deckel
deckel.m3
Bandit 4
ban4.m3
dlg4g17.m3
Bridgeport w/BOSS 4
bos4.m3
dlg4g18.m3
Bridgeport w/BOSS 5
bos5.m3
Devlieg
devlieg.m3
dmt2400.m3
Fanuc 16M
fan16.m3
dmt2400.m4
fan16p.m3
dmt2400c.m3
monarch.m3
dmt4400.m3
ge550.m3
dmt4400.m4
ge1050.m3
dyn20e.m3
ge2000.m3
dyn20c.m3
Haas
haas.m3
dyn30c.m3
haas.m4
Fadal Format 1
fadal.m3
hei151.m3
fadal.m4
Hei151c.m3
fadals.m3
hei151s.m3
Fagor
fagor.m3
hei155.m3
Fanuc 3000
fan3000.m3
Hei155c.m3
Fanuc 0M
fan0.m3
hei155s.m3
Fanuc 6M
fan6.m3
Hei355c.m3
Fanuc 10M
fan10.m3
hei355s.m3
fan10i.m3
Hei355c.m3
fan10.m4
hei355s.m3
fan10p.m3
Hurco
hurco.m3
Hurco BX
maxbx.m3
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
MILLING POSTS
FILENAME
MILLING POSTS
161
FILENAME
Hurco Ultimax 1
ult1.m3
Fanuc 11M
fan11.m3
Hurco Ultimax 2
ult2.m3
fan11p.m3
ult2v8.m3
Fanuc 15M
fan15.m3
Hurco Ultimax 3
ult3.m3
fan15p.m3
ult3v8.m3
K & T 600MM
k&t600.m3
OKK w/Fanuc
okkfan.m3
k&t600.m4
okkfan.m4
Kitamura MC-86
kit86.m3
Okuma w/Bandit 2
okuban2.m3
kit86.m4
Okuma OSP5000
osp5000.m3
leblond.m3
Okuma OSP5020
osp5020.m3
mah-g17.m3
p&wtap.m3
mah-g17.m4
ProtoTrak
prototrk.m3
mah-g18.m3
Roland CAMM-3
roland.m3
mah-g18.m4
Servo
ser2.m3
makfan15.m3
Sharnoa Tiger 4
tig4.m3
Mazak M2
mzk2.m3
Sharnoa Tiger 5
tig5.m3
mzk2p.m3
Shizuoka 13-5V
shi13.m3
mzk2.m4
Siemens 6M
sie6.m3
mzk2h.m3
Siemens 810M
sie810.m3
mzk32.m3
digitiz.m3
mzk32v.m3
Thermwood Model 70
thr70.m3
Mitsubishi M0
mit0.m3
Tree w/Dynapath 20
tredy20.m3
mondy20.m3
Yasnac MX-3
yas3.m3
Mycenter
mycentr.m3
Yasnac 2000G
yas2000.m3
162
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
MILLING POSTS
FILENAME
MILLING POSTS
FILENAME
mycentr.m4
Cincinnati
cincinat.12
charmill.e2
citizen.12
charmill.e4
Fanuc OT
fan0.12
elox.e4
Fanuc 5T
fan5.12
japax.e2
Fanuc 6T
fan6.12
japax.e4
Fanuc 10T
fan10.12
mitsub.e2
ge550.12
sodick.e2
generic.12
Ikegai 5T
ike5.12
Mitsubishi L0
mit0.12
Mori-Seiki
moriseik.12
Yasnac 2000B
yas2000.12
Figure 25: Post Processors and File Names (Continued)
The sample POSTFORM files in Figure 26: Generic 3 Axis Mill Postform file, Figure 27: Generic Lathe
Postform file on page 170, and Figure 28: Generic EDM Postform file on page 176 are the Generic
POSTFORM files that are included.
2.23.1
Generic.M3
NAME
% 00
! 00
O4
N >4
G2
Figure 26: Generic 3 Axis Mill Postform file
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
g2G
X ->3.>4
Y ->3.>4
Z ->3.>4
I ->3.>4
J ->3.>4
R ->3.>4
Q ->3.>4
F >3.1
H2
D2
T2
M2
S >4
ModalLetters X Y Z F R
ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85
Sequence#s N 1 1 1
First#? N
Last#? N
HCode X
# X or X U Horizontal char.
VCode Y
# Y or Y V Vertical char.
Dcode Z
# Depth char.
FeedCode F
163
164
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
Comment ( )
Spindle 3 4 5
Coolant 8 9 7
DComp 41 42 40
LComp 43 49
Feed G1
# Linear move
Rapid G0
Cw G2
Ccw G3
Inc/Abs G 91 90
Inch/MM 70 71
CtrCode I J
# I J or R or I J K L
CtrIncremental? Y
ByQuadrants? N
Spaces? Y
Incremental? N
Work G
UppercaseComments? Y
# Y or N Require uppercase
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
StartCode
%0
!0 O[Program#]
End
1stToolChange
Infeed
Outfeed
ToolChange
M[CoolantOff]
T[Tool] M6
M[Direct] S[Speed]
G0 X[H] Y[V]
Figure 26: Generic 3 Axis Mill Postform file (Continued)
Copyright 2000 by Surfware, Inc. All Rights Reserved.
165
166
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
EndCode
G0 G91 G28 Z0
M30
%0
End
#LineCode
#G1 X[H] Y[V] Z[D] F[FRate]
#End
#RapidCode
#G0 X[H] Y[V] Z[D]
#End
#CwCode
#G2 X[H] Y[V] I[IVal] J[JVal] F[FRate]
#End
#CcwCode
#G3 X[H] Y[V] I[IVal] J[JVal] F[FRate]
#End
Drill
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
167
Peck
Tap
LTap
Ream
Bore
Back
168
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
#Custom1
#G81 X[H] Y[V] Z[D] R[Vclear] F[FRate]
#end cancel
#Custom2
#G81 X[H] Y[V] Z[D] R[Vclear] F[FRate]
#end cancel
#Custom3
#G81 X[H] Y[V] Z[D] R[Vclear] F[FRate]
#end cancel
Cancel
G80
end
#SubStart
#O[Sub]
#End
#SubEnd
#M99
#End
#SubCall
#G[Work] P[Sub] M98
#End
Figure 26: Generic 3 Axis Mill Postform file (Continued)
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
#Between
#M9
#G91 G80 G30 Y0 Z0
#G0 G40 G80 G90
#M30
#End
#Index X
#G0 G28 G91 Z0
#G90 G[Work] X[H] Y[V] A[RotAngle]
#G43 H[Lcomp] Z[D]
#End
#UnWind
#G0 G28 G91 Z0
#A0
#G43 Z[D] H[Lcomp] M[Cool]
#X[LastH] Y[LastV] A[LastRotAng]
#G1 Z[LastD]
#End
#Upon RPlane
#Ask "Val1" " Enter 98 or 99 for canned cycles" "98"
#End
Figure 26: Generic 3 Axis Mill Postform file (Continued)
169
170
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
2.23.2
Generic.L
NAME
GENERIC LATHE
% 00
! 00
O4
N3
G2
X ->3.>4
x ->3.>4 X
Z ->3.>4
D2
I ->3.>4
K ->3.>4
U ->3.>4
W ->3.>4
P ->3.>4
A 60 P
Q ->3.>4
q ->3.>4 Q
R ->3.>4
F >3.>3
T2
t2
S >4
M2
ModalLetters X Z F
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC LATHE
ModalGs 0 1 2 3 73 76 80 81 82 83 84 85 # List of g
Sequence#s N 0 1 1
First#? N
Last#? N
Comment ( )
HCode Z
# X or X U Horizontal char.
VCode X
# Y or Y V Vertical char.
FeedCode F
Spindle 3 4 5
Coolant 8 9 7
DComp 41 42 40
LComp 43 49
SpeedType 97 96
FeedType 95 94
ByDiameter? Y
CtrIncremental? Y
ByQuadrants? N
CtrCode R
# I J or R or I J K L
Inc/Abs G 91 90
171
172
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC LATHE
Inch/MM 20 21
Spaces? Y
Incremental? N
Feed G1
# Linear move
Rapid G0
Cw G2
Ccw G3
RevSigns X x
StartCode
%0
!0 O[Program#]
end
1stToolChange
Infeed
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC LATHE
Outfeed
ToolChange
M[CoolantOff]
T[LastTool] t0
G50 x[ToolH] Z[ToolV]
G0 T[Tool] t[Tool] M42
G[SpeedType] S[Speed] M[Direct]
X[V] Z[H] M[Cool]
End
EndCode
#LineCode
#G1 X[V] Z[H] F[Frate]
#End
#RapidCode
Figure 27: Generic Lathe Postform file (Continued)
Copyright 2000 by Surfware, Inc. All Rights Reserved.
173
174
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC LATHE
#CcwCode
#G3 X[V] Z[H] R[ArcRad]
#End
#CwCode
#G2 X[V] Z[H] R[ArcRad]
#End
Drill
Peck
#Tap
#G78 Z[H] F[FRate]
#end cancel
#LTap
#G78 Z[H] F[FRate]
#end cancel
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
175
GENERIC LATHE
AutoThread
Ream
G1 Z[H] F[FRate]
G1 Z[VClear]
end
Bore
G1 Z[H] F[FRate]
G1 Z[VClear]
end
Back
G1 Z[H] F[FRate]
G1 Z[VClear]
end
#Custom1
#End
#Custom2
#End
#Custom3
Figure 27: Generic Lathe Postform file (Continued)
Copyright 2000 by Surfware, Inc. All Rights Reserved.
176
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC LATHE
#End
Cancel
G80
end
#Upon Turret
#M13
#End
2.23.3
Generic.E
NAME
GENERIC EDM
% 00
! 00
O4
N >4
G2
X ->3.>4
Y ->3.>4
I ->3.>4
J ->3.>4
F >3.2
D2
M2
Figure 28: Generic EDM Postform file
Copyright 2000 by Surfware, Inc. All Rights Reserved.
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC EDM
ModalGs 0 1 2 3
Sequence#s N 0 1 1
First#? N
Last#? N
HCode X
# X or X U Horizontal char.
VCode Y
# Y or Y V Vertical char.
FeedCode F
Comment ( )
DComp 41 42 40
LComp 43 49
Feed G1
# Linear move
Rapid G0
Cw G2
Ccw G3
Inc/Abs G 91 90
Inch/MM 70 71
177
178
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC EDM
CtrCode I J
# I J or R or I J K L
CtrIncremental? Y
ByQuadrants? N
Spaces? N
Incremental? N
#Work G
StartCode
%0
!0 O[Program#]
End
1stToolChange
G0 G92 X0 Y0
X[H] Y[V]
End
Infeed
Outfeed
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC EDM
end
ToolChange
M1
G0 X[H] Y[V]
End
EndCode
M30
%0
End
#LineCode
#G1 X[H] Y[V] F[Frate]
#End
#RapidCode
#G0 X[H] Y[V]
#End
#CcwCode
#G3 X[H] Y[V] I[Ival] J[Jval] F[Frate]
#End
#CwCode
#G2 X[H] Y[V] I[Ival] J[Jval] F[Frate]
#End
Figure 28: Generic EDM Postform file (Continued)
Copyright 2000 by Surfware, Inc. All Rights Reserved.
179
180
SURFCAM Support Utilities Manual, Chapter 2 Post Processing Introduction and MPost
NAME
GENERIC EDM
#Upon
#End
Figure 28: Generic EDM Postform file (Continued)