PostProcessor Reference Help en
PostProcessor Reference Help en
PostProcessor Reference Help en
Reference Help
Delcam plc has no control over the use made of the software described in
this manual and cannot accept responsibility for any loss or damage
howsoever caused as a result of using the software. Users are advised
that all the results from the software should be checked by a competent
person, in accordance with good quality control procedures.
Delcam plc grants permission for licensed users to print copies of this
manual or portions of this manual for personal use only. Schools that are
licensed to use the software may make copies of this manual or portions
of this manual for students currently registered for classes where the
software is used.
Acknowledgements
Overview
Postprocessor .................................................................................................
Editor ..............................................................................................................
Console ..........................................................................................................
PostComparer ..............................................................................................
F.A.Q.
How to
References
Command reference ...............................................................................................
Built-in parameters .................................................................................................
Built-in functions .....................................................................................................
Console command line .........................................................................................
Errors....................................................................................................................
Appendix
Glossary .................................................................................................................
Escape sequences .................................................................................................
System requirements
Hardware Requirements:
1 GHz or faster processor
512 MB of RAM
850 MB of available hard disk space (x86)
2 GB of available hard disk space (x64)
General enhancements
Improved presentation of conditional statements in command blocks
Customisable header for erroneous files
Folders for CLDATA files
Commands and parameters are shown according to machine capabilities
Merging in PostComparer
Contact point parameters
Commands and parameters for rotary axis move detection
Static axes in MTD considered
Features
Overview
A design engineer uses CAD (Computer Aided Design) software to create a part
drawing, containing all features and dimensions required to manufacture a part.
Computer Aided Manufacturing (CAM) evolved from the need to manufature
using numerically controlled machine tool. Once CAD drawing is complete, it can be
imported into CAM software for further use. Using various functions withing the
CAM software, the programmer selects various lines, circles, surfaces or other
entities from the imported CAD drawing and then develops cutting sequences, or
tool paths, that simulate actual machinig of those entities.
The most CAM applications, the tool path that is generated for each cutting
sequence is placed into a file in a specific order and syntax, almost like a structured
language. This file is called a Cutter Location Data (CLDATA) file. It contains
various commands, as well as X, Y, Z coordinate values, and in the case of four and
five axes machines, will also contain tool vector I, J, K values used to determine the
angle of the tool in relation to the part.
Postprocessor reads each statement or command contained withing the CLDATA
and postprocesses (translates) each of those statements or commands into CNC
machine code. This CNC machine code (G-Codes) is created based on the content
of the CLDATA and in combination with the settings in option file.
The Delcam PostProcessor application contains the following modules:
The Postprocessor creates programs for NC/CNC machine tool, in the
form of tapefiles.
The Editor is used to create or edit the option file, which configures
the Postprocessor.
The Console creates output suitable for an NC/CNC machine tool using
the commands and parameters specified in the Editor.
The PostComparer enables you to compare the structures of different
option files.
Introduction to the Postprocessor
The Editor enables you to create and edit the controller-specific option files used in
configuring the Postprocessor to create output suitable for the associated NC/CNC
machine tools.
To open the Editor, click the Editor tab.
A set of standard, selectable elements are displayed in the Option File Explorer.
When a command is selected in the explorer, its details are as a table in the View
pane. For example:
Each command table represents a program frame. It specifies the NC code that is
output to the tapefile when that command is found in the cut file. For more details,
refer to Command Interface.
You can use the Preview window at the bottom of the PostProcessor to view the
NC code created for the selected command.
Console
The Explorer windows display the different sections of the option files to be
compared. The differences between the files are highlighted.
The Properties windows display the properties of the selected elements in the
Explorer windows.
Using Delcam PostProcessor
The Delcam PostProcessor reference help includes the following sections:
Toolbar
When the PostProcessor tab is selected:
Button Description
Opens a session.
Saves the current session to a file. When you save the session for the first
Postprocesses the selected CLDATA files using the current option file.
Button Description
Searches the option file for the text specified in the Find dialog. You can
search the entire option file, or restrict the search to one type of
element.
Menus
The menus are located at the top of the window. They contain commands that
enable you to control and work with the Delcam PostProcessor.
File menu
Edit menu
View menu
Tools menu
Window menu
Help menu
File menu
Edit menu
Pasting formats
For each format on the clipboard, the wizard searches the target option file for a
format with the same name as source format:
If no match is found, the format is pasted from the clipboard to the target
file.
If a matching name is found and the formats are identical, the clipboard
format is not pasted. The format of the target file is automatically assigned
to any pasted parameters which use that format.
If a matching name is found but the formats are different, a message is
displayed asking whether you want to paste the format from the clipboard
into the target file. The selected format is automatically applied to all original
parameters and all pasted parameters.
Pasting parameters
Pasting parameters works in the same way as pasting formats. However, because
parameters are linked to a specific format, you are asked about merging the prefix,
postfix and group states when the format of the target parameter differs from that
of the parameter being pasted. Any additional questions are displayed on separate
dialogs within the wizard.
Parameters cannot be pasted when the target option file contains a parameter that
has the same name as a parameter in the clipboard and the parameters have a
different value type.
Pasting tables
Pasting tables works in the same way as pasting formats.
Pasting structures
Pasting structures works in the same way as pasting formats.
Pasting commands
Pasting commands works in the same way as pasting formats.
The Find toolbar is used to search for strings in the View pane of the
PostProcessor tab. Use the Find toolbar to search the active output file (displayed
in the View pane of the PostProcessor tab) for text strings.
To search for a text string:
1. Select the Edit > Find menu option, or press Ctrl+Shift+F. The Find
toolbar is displayed at the bottom of the View pane.
2. Enter the text you want to search for in the entry box.
3. If you want to prevent the search from finding instances of the string
within words, select Match Whole Word Only.
4. If you want to restrict the search to names that match the case of the
string you entered, select Match Case.
5. If you want the search to continue from the beginning of the file when
the end is reached, select Wrap Around.
6. Select Find. The first instance of the string is selected and displayed in
the View pane. Click Find again to search for the next instance of the string.
7. When you have finished searching, select Hide to close the toolbar.
Using the Find dialog
Use the Find dialog to search the option file for a specified text string.
To search the option file:
1. Click the Find button in the toolbar, or select the Edit > Find menu
option. The Find dialog is displayed.
2. In the Find What box, enter the text you want to search for.
3. In the Find For field, select the type of search you want to make:
Select Text to search the option file for all instances of the specified
Find What text.
Select an element to restrict the search to references to that type of
element.
4. To restrict the search to text that matches the case of the Find What
string, select Match case.
5. To prevent the search from finding instances of the string within
words, select Match whole word.
6. Click Find All. The Find Results window lists all instances of the
string found in the options file. Click a result to display the element in which
the string was found.
View menu
Option File Report - Creates an HTML report containing the file history, settings,
commands and parameters.
PostProcessor Settings - Enables you to change your Delcam PostProcessor user
name, and to specify your interface preferences.
Window menu
Create Empty Window - Adds a new tab to the View pane. Select an element in
the explorer to display it in the tab.
Different tabs enable you to display different elements of the session in the
same window. Click a tab to display its contents.
To resize the frames, position the cursor over a frame border and, when the cursor
changes to a double-headed arrow, drag the border to a new position.
Context menus
Delcam PostProcessor contains several context menus that are displayed when you
right-click an item in the user interface:
Session menu
CLDATA file
Process - Postprocesses the selected file.
Process As Debug - Postprocesses the selected file in Debug mode.
Save As CXM - Saves the selected file as a *.cxm file.
Unload - Removes the cutfile from the session.
Explorer - Displays shell context menu.
To create a new session, click the New Session button, or select the File >
New > Session menu option.
If you have any unsaved changes, a message asks whether you want to save them.
Click:
Yes to save your changes and close the session.
No to close the current session without saving your changes.
Cancel to cancel the close.
Saving a session
Use the Session Properties dialog to specify the location and name of tapefiles
created using this session.
CLDATA Folders
The CLDATA files of a session can be arranged in folders. Those folders may not
exist on the disc but are stored in the session.
You can also drag CLDATA files from Windows Explorer and drop them on the
PostProcessor tab.
To create a .cxm file from a cutfile, in the same folder and with the same
prefix, right-click the file in the Session Explorer and select Save as CXM
from the context menu.
Postprocessing CLDATA files
To postprocess all the CLDATA files you have loaded , click the
Process All button or select the Tools - Process All menu option.
Debug mode
Debug mode produces an NC Program file with additional information, so you can
see the extents and names of the blocks, and the parameter settings used. They
cannot be used for machining.
Debug postprocessing is not recommended for large source files.
To generate a debug file, select Process As Debug from the cutfile's context menu
in the Session Explorer. Debug files have an extension of *.dbg and are indicated
by the icon.
To display the debug file, click its entry in the Session Explorer.
PostProcessor Settings
Use the PostProcessor Settings dialog to control the behaviour of the user
interface. To open the dialog, select the Tools > PostProcessor Settings menu
option.
General settings
Backup Files on Save - Specifies what happens when you save an option file.
Select:
No Backup to overwrite the original file with the new version.
Replace extension with .bak to rename the original option file with an
extension .bak and save the option file under the original name.
Users Name - Specifies the user name used to track changes in the Editor.
Select:
Login Name to use the user name of the person who is currently logged in.
to specify the user name in the adjacent field.
Prompt before overwriting output files - Specifies whether you want Delcam
PostProcessor to ask for confirmation before overwriting an existing cutfile file.
Select:
Yes to prompt you for confirmation.
No to overwrite cutfiles without confirmation.
Interface settings
The Delcam PostProcessor Editor enables you to create and edit the option files
that convert CLDATA files to controller-specific programs. To display the Editor,
click the Editor tab, or select the View > Switch to Editor menu option.
The Option File Explorer pane in the Editor tab enables you to select the
different parts of the option file. It enables you to navigate to and work with the
elements that make up the option file:
Commands
Parameters
Tables
Structures
Script
Formats
Select a tab at the bottom of the Explorer to choose the element you want to work
with.
Use the View menu options to show and hide the tabs displayed in the
Explorer.
Use the Option File Settings dialog to specify the controller-specific parameter
settings for the option file you are working with. To open the dialog, click the
Option File Properties button in the toolbar, or select the File > Option File
Properties menu option.
Click an option in the left panel to view and edit the parameters.
Informationdisplays common information about the option file and summary of
changes made during option file creation and editing: Select:
Generalto display common information about the option file.
Revision Historyto displays summary of changes made during option file
creation and editing.
Initialisation specifies the settings used at the start of postprocessing.
Program Generation provides overall control of generation settings for current
controller. Select:
General to specify general program generation settings.
Feed Rates to set the minimum and maximum allowable feed rates for a
controller.
Arcs And Splinesto enable arc or spline interpolation if it is supported by
the controller. This page also enables you to set conditions when arc
linearisation (when a sequence of small linear moves is written out instead of
the arc) is required in an NC program.
Drilling to specify the drilling cycle parameters. This page also includes
settings for expanding helical and threading cycles if they are not supported
by the controller.
Coordinates Control to enable and disable Automatic Coordinate
Control. When it is enabled, you can select machine profiles and presets to
define the associated Toolpath Axis Modes (3-Axis, 3+2 or Multi-Axis).
Multiaxis Configuration to specify multi-axis attributes. This option is
available only when 4-Axis or 5-Axis is selected in Machine Kinematics.
Error Response to specify the actions to the PostProcessor responses.
Machine Kinematics enables you to specify the number of axes in the machine
tool (3-Axis, 4-Axis and 5-Axis) and the number, type and location of the machine's
tilting axes. There are no tilting axes for a 3-Axis machine, one tilting axis for a 4-
Axis machine and two tilting axes for a 5-Axis machine.
Format controls the output format for NC programs. Select:
General to specify general formatting options.
Blocks to specify the format for the output of blocks to NC programs.
NC Comments to specify the format for the output of comments to NC
programs.
Substitutions to automatically replace characters in the output file.
String Variables to automatically replace strings in the output file.
By default most settings is locked to edit in protected option files. But you may
allow to edit any settings using context menu or just clicking on node icon.
Information properties
The section contains information about the option file itself and lists the changes
that have been made to the option file:
General
Revision History
Information - General
Information - Revision history
Information General
Use the General page to record general information about the option file and how
it is used.
To open the General page:
1. Click the Option File Properties button, or select the File >
Option File Properties menu option.
2. In the Option File Properties dialog, select Information - General.
Parameter Description
Controller Specifies the name of the manufacturer of the machine
Manufacturer controller.
Created Specifies the creation date of the option file. This field is
completed automatically.
Last Modified Specifies the date of the last change. This field is completed
automatically.
Special Notes Use this box to record extra information about the option file,
such as when it should be used.
Last Modified Version Specifies the version of Delcam PostProcessor used when
the option file was last modified. This field is completed
automatically.
Schema Version Specifies the current schema version of the option file. This
field is completed automatically.
The Revision History page summarizes the changes made to the option file. Use it
to record information about the option file, such as changes made to the file and
the reasons for the changes.
To open the Revision History page:
1. Click the Option File Properties button, or select the File >
Option File Properties menu option.
2. In the Option File Properties dialog, select Information - Revision
History.
To add a note to the revision history:
1. Click the New Note button.
2. In the New Note dialog, enter the information you want to record,
and click Accept. The note is added to the option file history. To view the
details of the note, select its entry in the list.
Configuration options
Hide Update Info Select this check box if you do not want to list information
about automatic updates.
Set Show All Notes Select this check box to list all history entries in the Note
box.
Settings Select an option to specify when the user is asked to update the history.
Initialisation
Use the Initialisation page to specify start values for parameters that must be set
at the start of postprocessing, such as the Coolant Mode and Cutter
Compensation Mode. The list of parameters to be initialised depends on the
machine controller used.
Protection
Use the Protection page to protect the option file from editing. When the option
file is protected, you can postprocess CLDATA files as usual, but you can't open it in
the Editor without entering a password it was protected with.
3. Save the option file. The file is password protected when it is next
opened.
To unprotect the option file:
1. Select the None radio button.
2. Save the option file.
By default, only Initialisation page is available in a protected file. It's possible to
enable any other page of option files settings.
1. Select a page you want to mark as editable in protected mode.
2. Right click on it.
3. Select Editable
Program Generation properties
The section provides overall control of generation settings for current controller:
Program Generation - General
Program Generation - Feed Rates
Program Generation - Arcs and splines
Program Generation - Drilling
Program Generation - Coordinates control
Program Generation - Multi-axis configuration: general
Program Generation - Multi-axis configuration: retract and
reconfigure
Program Generation - Error Response
Angle Styles
Output File Specifies the suffix appended to output files (for example, tap). It
Extension cannot include any of the following characters: .,?*:;=+\|/".
Option File Specifies the units used to input linear parameter values in the
Linear Editor. You can select: Metric, Inches, or As Output Units.
Units
Output Specifies the units used to output linear parameters. You can
Linear select: Metric, Inches, or As Input (CLDATA) units.
Units
Output Specifies the units used to output angular parameters. You can
Angular select: Degrees or Radians.
Units
Parameter Description
Access to Specifies the type of access to the XML model. This option is only
XML Data required for backward compatibility with old option files using xml
and node objects in the script. This option must be set to None or
Automatic for the new option files.
None to disallow XML access. Recommended.
Automatic to allow the Postprocessor to select the
appropriate XML access according to its analysis of the
option file.
Partial to allow the Postprocessor to use simplified
access to XML. The simplified model reduces memory usage
by including all commands except moves. This mode is
recommended when processing a large CLDATA file with
option file using the "xml" object in the script.
All Data to access whole XML model including move
commands, such as Move Linear and Move Rapid. This
mode is required only when the "node" object is accessed in
the script.
All Data mode can result in significant memory
usage. You should avoid using this mode when processing
files of several megabytes.
Use the Program Generation - Feed Rates page to set the minimum and
maximum allowable feed rates for the controller.
To open the Feed Rates page:
1. Click the Option File Properties button, or select the File >
Option File Properties menu option.
2. In the Option File Properties dialog, select Program Generation -
Feed Rates.
Parameter Description
Maximum Specifies the maximum feed rate value for cutting moves when
Inverse using a Feed Mode of INVERSE_TIME.
Time
Use Select Yes to correct the feed rate when the tool rotates around
Advanced the tool tip.
Inverse
Time
Restrictive Enter a value to control the maximum feed rate when Use
Coefficient Advanced Inverse Time is selected. The value represents the
offset of a secondary point on the tool for calculating the feed rate
when the tool axis changes, but the tip does not move.
Minimum Specifies the minimum possible feed rate value. When processing
Feed Rate CLDATA, all feed rates below this value are increased to this rate.
Maximum Specifies the maximum feed rate value for rapid moves. When
Rapid processing CLDATA, all feed rates above this value are decreased
Feed Rate to this rate.
Maximum Specifies the maximum feed rate value for cutting moves. When
Cutting processing CLDATA, all cutting feed rates above this value are
Feed Rate decreased this rate.
Program Generation - Arcs and splines
Use the Program Generation - Arcs and Splines page to specify the arc
interpolation settings for the option file.
To open the Arcs and Splines page:
1. Click the Option File Properties button, or select the File >
Option File Properties menu option.
Parameter Description
Minimum Specifies the minimum possible radius value for an arc in the NC program.
Radius An arc with a smaller radius is written out in a linearised form. This option is
available only when you have selected one or more options in Arcs support.
Maximum Specifies the maximum possible radius value for an arc in the NC program.
Radius An arc with a greater radius is written out in a linearised form. This option is
available only when you have selected one or more options in Arcs support.
Minimum Arc Specifies the minimum bulge factor supported by the machine controller.
Height An arc with height below this value are written out as a series of linear
segments approximating the arc. This option is available only when you have
selected one or more options in Arcs support.
The bulge factor is the maximum distance between the arc and its chord.
Arc Angles Specifies angle style for Arc Start Angle and Arc End Angle. For more
Style information see Angle Styles. Note, Arc Start Angle is used as previous
value for Arc End Angle if Relative or Winding and Unwinding styles are
used.
Quadrant Specifies whether arcs are split into quadrants in the NC program. Some
Split controllers require arcs to be split in this way, so select Yes. This option is
available only when you have selected one or more options in Arcs support.
Spline Because PowerMILL cannot generate spline records, this option assumes
Configuration you have used the SplineMILL utility to add splines to your CLDATA file.
The postprocessed Output can take either of the following forms:
Linearisation - polygonises the spline.
Polynomial - generates the curve as a polynomial, using the
output from SplineMILL.
B-spline - generates the Bezier curve, using the output from
SplineMILL.
In this case, the Minimum Radius, Maximum Radius and Quadrant Split fields
are enabled.
Minimum Radius - enter the minimum radius for the arcs that are
generated.
Maximum Radius - enter the maximum radius for the arcs that are
generated. If the Postprocessor receives a radius in excess of this value,
the arcs are polygonised.
Quadrant Split - if this is set to Yes, then, during arc output, an arc
is divided into quadrants if it crosses the coordinate axis of the local two-
dimensional coordinates:
The above illustration shows the arc in the XZ plane. Red points denote the
points where the arc traverses the quadrant boundaries. The location of the
axes of the local coordinates match the corresponding axes of the global
coordinates and so the arc is output in the NC program as five successive
circular moves (Arc start-1, 1-2, 2-3, 3-4, and 4-Arc end).
Arc travel angle
Some machines use a travel angle, which is a relative angle characterizing the
angle moves on an arc:
Linearisation
If arc interpolation is not supported by the controller, you must set Output Arc to
Linearisation so the Postprocessor outputs linear approximations for the arcs,
which are defined by CLDATA or generated by the Postprocessor (Delcam
PostProcessor uses a linear approximation when the arc radius is greater than the
maximum radius for the machine).
In the following example, all arcs contained in the CLDATA files are written out by
the Postprocessor as a set of standard linear moves:
If you have an Arc Output of Linearisation, you must specify the Linearisation
Method. A setting of From CLDATA uses the CLDATA file settings, whilst the
alternative setting of Calculation allows you to specify your own Tolerance
setting in the Tolerance field. This field defines the maximum deviation between
the original arc and a series of straight lines used to represent the curve, and you
can set it to either Use CLDATA Tolerance (in which case the deviation is taken
from the CLDATA file) or Specify Tolerance, in which case you can specify your
own deviation in the adjacent field.
Linearisation is represented in an NC program as a sequence of Move
Linear commands.
Comparing arc and linearised output
There are three variants of NC code by which an arc can be represented in an NC
program (based on the option file for a Fanuc controller):
Spline configuration
To enable splines in your option file:
1. Ensure your CLDATA files were generated by SplineMILL. (CLDATA files
from PowerMill do not contain spline data.)
o Only binary CLDATA can be accepted by SplineMILL.
2. Go to the Option File Properties dialog in the Editor and set Spline
Configuration - Output to Polynomial or B-spline:
3. Open the Spline folder in the Commands tree, and activate the Spline
Move command.
4. Complete the Spline Move block with the appropriate spline
parameters from the controller's manual.
Delcam
MillPlus PostProcessor
Parameter Description
Drilling Hole Specifies the distance between the Z position of the tool and workpiece
Top surface.
Drilling Feed Specifies the traversing speed of the tool during drilling.
Rate
Drilling Clear Specifies the coordinate in the tool axis at which no collision can occur
Plane between the tool and workpiece (including the clamping devices).
Drilling Dwell Specifies the time in seconds that the tool remains at the hole bottom.
To invert a parameter's value, select the corresponding check box in the Negative
column.
To specify the drilling cycle origins for the controller, choose an entry in the Origin
Positions list for each parameter. Select:
Last Z to output depths measured from the current Z value reached
by the toolpath.
Clear Plane to output depths relative to the Drilling Clear Plane
setting.
Hole Top to output depths relative to the hole top setting in the
CLDATA file.
Hole Bottom to output depths relative to the hole bottom setting in
the CLDATA file.
Z Zero to output depths relative to the origin of theNC Program
Settings
Multiaxis drilling - if the CLDATA contains multi-axis drilling cycles, select this
option to allow them to be postprocessed. Otherwise, Delcam PostProcessor will not
process the CLDATA.
Treat vertical drilling as - Delcam PostProcessor uses Automatic Coordinate
Control to handle multi-axis drilling cycles. It generates the commands that transfer
a multi-axis cycle into the 3+2 part of the trajectory as Delcam PostProcessor
defines and uses a local workplane for each multi-axis cycle that it processes.
However, in some cases, a multi-axis cycle can be processed without being
transformed to a local workplane, such as when the direction of the cycle is parallel
to the machine's Z axis (for example, for machines with rotary axes on the table).
If you select this option, Delcam PostProcessor avoids using ACC wherever possible,
giving simpler results. If the option is not selected, Delcam PostProcessor always
uses ACC for drilling cycles.
This option is unavailable if Multiaxis drilling is not selected, or if Automatic
Coordinate Control is not enabled.
In this example, all the depths are measured from the last Z position of the tool.
Drilling First Depth is equal to Drilling Total Depth for single pecking drilling
cycles.
Some parameters may be measured from different levels to meet controller
requirements. Delcam PostProcessor allows any of the parameters to be
recalculated with scripts. For example, on Heidenhain TNC530s, the clear plane
value is the distance between the start position of the tool tip and the workpiece
surface. For Delcam PostProcessor it can be recalculated in the following way:
Drilling Clear Plane = Drilling Hole Top - Drilling Clear Plane
The corresponding JScript code for use in Scripting is as follows:
> Description
Command
Set Workplane These commands are used to turn the local workplane On and Off.
On They are used only when Automatic Coordinate Control is On and
the controller includes 3+2 support.
Set Workplane
Off The Set Workplane On command is invoked for each local workplane
in the toolpath. Following the processing of a toolpath in the local
workplane using the Set Workplane On parameters, the Set
Workplane Off command is invoked prior to the start of the next
toolpath, unless both toolpaths consist of 3+2 moves using the same
tool and the same local workplane, and the next toolpath starts where
the previous one ended (so that there are no connection moves).
These commands can be used to control the Workplane
Transformation parameter without scripting.
Workplane This command must be activated only if ACC is Off. It is the basic
Setting command for working with local workplanes that are derived from
CLDATA.
If ACC is On, and 3+2 is supported, you are advised to use the Set
Workplane On and Off commands instead to control local
coordinates.
Parameters affected by ACC
Tool Length On / First Move Most controllers can lift the head along
Off After the machine's Z axis by the length of
Compensation
Toolchange the tool after the tool is loaded. There
Mode
is no need to apply this parameter to
Load Tool
controllers that do this by default. The
First
state of this parameter becomes
Load Tool important when the Tool Tip or Gauge
Face option is defined as the output
point. If Tool Length Compensation
Mode is On, Delcam PostProcessor
assumes the controller can compensate
for the tool length itself and outputs a
Tool Tip point. Otherwise (if the state
is Off), Delcam PostProcessor
compensates for the tool length by
outputting a Gauge Face point.
However, this depends on other
parameters. For example, Tool Length
Compensation Mode is ignored when
RTCP Mode is On (as RTCP includes
Tool Length Compensation Mode);
also, Tool Length Compensation
Mode cannot be applied when the
current tool direction is different from
the Z axis direction (but it works in
3+2 trajectories when the local
workplane is used).
When the profile is selected, you may need to adjust the preset for each axis mode.
A preset is a set of states which Delcam PostProcessor uses to
control coordinate parameters when a program is in the corresponding axis
mode (3-Axis, 3+2 or Multi-Axis). The number of available presets
depends on the selected profile.
To select a preset, click the down arrow next to the Pre-Set field for the required
Toolpath Axis Mode, and select the preset in the drop-down list:
Following selection of the presets, the table in the View pane shows the parameter
states that Delcam PostProcessor uses for each axis mode during
postprocessing. For example:
For each preset, the combination of the states of the Workplane Transformation,
RTCP Mode and Tool Length Compensation Mode parameters defines the
Output Point Info, which shows what the X, Y and Z coordinates mean. The
information consists of two parts: a point and the coordinate system in which the
point is represented. The possible points are: Tool Tip, Gauge Face, Pivot, or
Undefined (which means that the XYZ values do not correspond to any of the
points on the machine). The possible coordinate systems are: Model, Machine or
Local.
For Machine Attach Point and Force Attach Point to Tool Tip for
3-axis, refer to Coordinate Control.
Machine with three linear axes only
This is the most restricted configuration as it only allows you to control Tool
Length Compensation Mode (the other parameters, RTCP Mode and
Workplane Transformation, are not used by Delcam PostProcessor with this
machine configuration).
The only available Toolpath Axis Mode available for this profile is 3-Axis:
Default
Available Output
Presets Point Mode Notes
Preset 1:
Workplane:
Off, RTCP: Gauge This preset can be used if Preset 2 with its Tool
Off, Tool Face / Length Compensation Mode cannot be applied and
Length Machine you need to have Gauge Face coordinates in a 3-axis
Comp: Off Workplane program.
This configuration is intended for older multi-axis machines which have rotary axes
that cannot compensate for rotations around them (that is, machines that do not
support the Rotate Tool Centre Point setting).
The available presets for this profile for the different Toolpath Axis Modes are:
Preset 1: Gauge This preset can be used if Preset 2 with its Tool
Workplane: Face / Length Compensation Mode cannot be applied and
Off, RTCP: Machine you need to have Gauge Face coordinates in a 3-axis
Off, Tool Workplane program.
Length
Comp: Off
Preset 2: Tool Tip / This preset represents the default configuration for 3-
Workplane: Machine axis programs. For some controllers it is not necessary
Off, RTCP: Workplane to enable Tool Length Compensation Mode in a
Off, Tool program (usually using the G43 code) because
Length compensation is automatic - refer to Parameters
Comp: On defining output coordinates.
as 3+2 As for Axis This preset must be selected if 3-axis trajectories are
Mode: 3+2 be represented as 3+2. It then makes no difference
whether 3-axis or a similar 3+2 trajectory (3-axis
program saved in Multi-axis mode) is processed. 3-
axis fields in the table are disabled if this preset is
selected. All states of the 3-axis attributes are set to be
the same as the corresponding 3+2 states
Axis Mode: 3+2
Preset 1: Gauge This preset can be used for all kinematics because
Workplane: Face / there is no restriction on Tool Length Compensation
Off, RTCP: Machine Mode. This preset is suitable for older machines where
Off, Tool Workplane "everything is off".
Length
Comp: Off.
Preset 2: Tool Tip / This preset (with Tool Length Compensation Mode
Workplane: Machine enabled) can be applied only in the case of kinematics
Off, RTCP: Workplane without head rotary axes.
Off, Tool
Because Workplane Transformation is Off, Delcam
Length
PostProcessor assumes the 3+2 trajectory is continuous
Comp: On.
multi-axis and all multi-axis rules are therefore applied.
Because RTCP is also Off, a controller does not
compensate machine rotations. In this condition, if
there is at least one rotary axis on the head, the tool
direction vector is variable in space and Tool Length
Compensation Mode along the machine's Z axis
cannot be applied. This preset is still available for
selection for such kinematics, but Delcam
PostProcessor stops processing with an error
message if there is an attempt to process a 3+2
trajectory.
In conclusion, this preset is used for kinematics such as
a 4- axis or 5-axis table, where a tool has constant
direction in space and Tool Length Compensation
Mode can be applied without problems.
as Multi- As for Axis Selecting this preset removes the difference betwen
Axis Mode: 3+2 and pure multi-axis trajectories. Delcam
Multi-Axis PostProcessor starts to process all non-3-axis moves
as multi-axis. All 3+2 fields in the table are therefore
disabled. All states of the 3+2 attributes are set to the
same as the corresponding multi-axis states. If this
preset is used with the as 3+2 preset for 3-Axis
mode, Delcam PostProcessor assumes all trajectories
to be multi-axis.
Axis Mode: Multi-Axis
Preset 1: Gauge This preset can be used for all kinematics because
Workplane: Face / there is no restriction on Tool Length Compensation
Off, RTCP: Machine Mode. This preset is suitable for older machines with
Off, Tool Workplane poor capabilities where "everything is off".
Length
Comp: Off
Preset 2: Tool Tip / This preset works only for kinematics without
Workplane: Machine head rotary axes.
Off, RTCP: Workplane
For continuous multi-axis trajectories, Workplane
Off, Tool
Transformation cannot be used in Delcam
Length
PostProcessor.
Comp: On
As RTCP is also Off, Tool Length Compensation
Mode becomes important, but it only applies to
machines with rotary axes on the table.
Delcam PostProcessor stops processing with an error
message if there is an attempt to process a multi-axis
trajectory using kinematics with head rotary axes.
This profile supports the Rotate Tool Centre Point (RTCP) setting where
appropriate.
The available presets for 3-Axis Mode are as for Multi-Axis Machine without RTCP
Support.
Preset 1: Gauge This preset can be used for all kinematics because there is no
Workplane Face / restriction on Tool Length Compensation Mode. This preset is
: Off, Machine suitable for older machines with poor capabilities where
RTCP: Off, Workplan "everything is off".
Tool e
Length
Comp: Off
Preset 2: Tool Tip / This preset (with Tool Length Compensation enabled) can be
Workplane Machine applied only in the case of kinematics without head rotary axes.
: Off, Workplan
Because Workplane Transformation is Off, the 3+2 trajectory is
RTCP: Off, e
considered by Delcam PostProcessor as continuous multi-axis
Tool
and all multi-axis rules are therefore applied here.
Length
Comp: On Because RTCP is also Off, a controller does not compensate
machine rotations. In this condition, if there is at least one
rotary axis on the head, the tool direction vector is variable in
space and Tool Length Compensation Mode along the
machine's Z axis cannot be applied. This preset is still available
for selection for such kinematics, but Delcam PostProcessor
stops processing with an error message if there is an attempt to
process a 3+2 trajectory.
In conclusion, this preset is used for kinematics such as a 4-
axis or 5-axis table, where a tool has constant direction in space
and Tool Length Compensation Mode can be applied without
problems.
Preset 3: Tool Tip / This preset implies that 3+2 moves are considered as
Workplane Model continuous multi-axis moves. RTCP is used here, and so the
: Off, Workplan Tool Length Compensation Mode state is not important
RTCP: On, e because the Output Point is always the Tool Tip.
Tool
Make sure there is no superfluous output of Tool Length
Length
Compensation Mode codes in a program (for 3+2
Comp: On
trajectories). You must also set the RTCP On/Off codes in the
commands Set Multi-Axis On and Set Multi-Axis Off.
as Multi- As for Axis Selecting this preset removes the difference between 3+2 and
Axis Mode: pure multi-axis trajectories. Delcam PostProcessor starts to
Multi-Axis process all non-3-axis moves as multi-axis. All 3+2 fields in the
table are therefore disabled. All the states of the 3+2 attributes
are set to be the same as the corresponding multi-axis states. If
this preset is used together with the as 3+2 preset for 3-Axis
Mode, then all trajectories without exception are considered by
Delcam PostProcessor as multi-axis.
Axis Mode: Multi-Axis
Preset 1: Gauge This preset can be used for all kinematics because
Workplane: Face / there is no restriction on Tool Length
Off, RTCP: Machine Compensation Mode. This preset is suitable for older
Off, Tool Workplane machines with poor capabilities where "everything is
Length off".
Comp: Off.
Preset 2: Tool Tip / This preset works only for kinematics without
Workplane: Machine head rotary axes.
Off, RTCP: Workplane
For continuous multi-axis trajectories, Workplane
Off, Tool
Transformation cannot be used in Delcam
Length
PostProcessor.
Comp: On.
As RTCP is also Off, Tool Length Compensation
Mode becomes important but it can only be applied to
machines with rotary axes on the table.
Delcam PostProcessor stops processing with an
error message if there is an attempt to process a
multi-axis trajectory using kinematics with head
rotary axes.
Preset 3: Tool Tip / This is the default preset when RTCP is available. The
Workplane: Model Tool Length Compensation Mode state is not
Off, RTCP: Workplane important because the Output Point is always the
On, Tool Tool Tip.
Length
Workplane Transformation is not available for
Comp: Off.
continuous multi-axis trajectories in Delcam
PostProcessor.
You must set the RTCP On/Off codes in the
commands Set Multi-Axis On and Set Multi-Axis
Off.
Preset 1: Gauge This preset can be used for all kinematics because
Workplane: Face / there is no restriction on Tool Length
Off, RTCP: Machine Compensation Mode. This preset is suitable for
Off, Tool Workplane older machines with poor capabilities where
Length "everything is off".
Comp: Off
Preset 3: Tool Tip / This preset implies that 3+2 moves are considered
Workplane: Model as continuous multi-axis moves. RTCP is used here,
Off, RTCP: Workplane and so the Tool Length Compensation Mode state
On, Tool is not important because the Output Point is always
Length the Tool Tip.
Comp: On
Make sure there is no superfluous output of Tool
Length Compensation Mode codes in a program
(for 3+2 trajectories). You must also set the RTCP
On/Off codes in the commands Set Multi-Axis On
and Set Multi-Axis Off.
Preset 4: Gauge This preset allows you to use the local workplane for
Workplane: Face / the output of 3+2 trajectories. Delcam
Available Default Notes
Presets Output
Point Mode
as Multi- As for Axis Selecting this preset removes the difference between
Axis Mode: 3+2 and pure multi-axis trajectories. Delcam
Multi-Axis PostProcessor starts to process all non-3-axis
moves as multi-axis. All 3+2 fields in the table are
therefore disabled. All the states of the 3+2
attributes are set to be the same as the
corresponding multi-axis states. If this preset is used
together with the as 3+2 preset for 3-Axis Mode,
Delcam PostProcessor considers all trajectories as
multi-axis.
Each toolpath (i.e. each program segment between Toolpath Start and Toolpath
End commands contains a sequence of moves. Toolpath Axis Mode for each
toolpath is defined using following rules:
3-axis Tool Direction of all moves inside the toolpath is the same
and vertical i.e. equal to (0,0,1).
Tool Orientation of all moves inside the toolpath is the
same and equal to (1,0,0).
Tool Direction and Tool Orientation are absent in the
program. In this case they are assumed to correspond to 3-axis
case.
3+2 Tool Direction of all moves inside the toolpath is the same.
Tool Orientation of all moves inside the toolpath is the
same.
3-axis 5000/3 (FROM) record does not contain Tool Direction. This is the
very basic property of pure 3-axis CLDATA:
I 8I 22I 5000I 3I 0I 0
F+0000000000000000+0000F+0000000000000000+0000F+10000000000
00000+0003;
F+3587393569946289+0002F+4037593078613281+0002F+20000000000
00000+0002
F+3406729159749328+0000F+2000349495862240+0000F+91865553025
34097+0000;
F+4885429776957986+0002F+2350000000000000+0002F+15833750602
58813+0002
F+4497201209304200+0002F+2350000000000000+0002F+13448632082
52107+0001;
F+3587393569946289+0002F+4037593078613281+0002F+20000000000
00000+0002
F+3406729159749328+0000F+2000349495862240+0000F+91865553025
34097+0000;
This warning shows that the profile selected does not correspond to the machine
kinematics used for this option file. In the above example, Delcam PostProcessor
cannot use the rotary axes of the machine despite the Multi-axis kinematics. To fix
this, either select another (multi-axis) profile, or change the machine kinematics to
3-axis. There is a similar warning for 3-axis kinematics used with a multi-axis
profile:
The following warning is displayed because Tool Length Compensation Mode
cannot be applied when the tool direction is not parallel to the machine's Z axis
(this is the compensation that is usually activated by the G43 code and involves
the lifting of a head by the tool length). As the tool direction is changed relative to
the Z axis on machines with rotary axes on the head, Delcam PostProcessor does
not apply Tool Length Compensation Mode for such machines. The Warning
suggests how to rectify the problem.
Linearise Multi-Axis Moves - Use this option to specify how moves that exceed
controller tolerance are treated:
Select Yes to verify that all multi-axis moves are within the tolerance
specified in General settings. When a move exceeds tolerance, Delcam
PostProcessor splits it into two smaller moves.
Select No to leave the original moves in CLDATA unchanged.
Euler Angles Style - Specifies angle style for Workplane Euler A,Workplane
Euler B and Workplane Euler C. For more information see Angle Styles.
Machine Angles Style - Specifies angle style for WP Machine A, WP Machine B,
WP Machine C, Machine A, Machine B and Machine C. For more information
see Angle Styles.
Reset Axes. When a toolpath follows a 3+2 or 5-axis toolpath the machine rotary
axes may not be in initial state. For example, a rotary table may be in the position
corresponding to last machine state of previous toolpath. In order to force rotary
axes to reset set this option.
Never means not resetting axes at all (default).
Before Pure 3-axis to reset only before a 3-axis toolpaths.
Before Any Toolpath to reset before a toolpaths regardless of its axis
mode.
Use Constant Surface Speed Feed Rate - In multi-axis moves where the pivot
point is different from the tool tip point, the tool tip can move with a different speed
to the feed rate specified in the CLDATA. Use this option to specify how you want to
treat the surface speed rate:
Select Yes to apply a constant feed rate at the contact point.
Select No to apply no correction.
Calculation Method - specifies the method used to orient the tool for 3+2
processing when the machine controller supports working in a local workplane.
Select:
Machine to specify the tool location using azimuth and elevation.
Euler to specify the tool location relative to the local workplane's X, Y
and Z values. If you select Euler, you must also select the Euler
Convention used by the machine controller. For information on the
Calculation Method and Euler Convention used by your controller, refer
to the controller's manual.
Workplane Source - specifies the data used for workplane definition for a 3+2
toolpath. Actually, the workplane used in PostProcessor may differ from the original
one commanded from the CAM system. Select:
Z of the Original Workplane to specify that Z of the new workplane
is aligned with Z of the original workplane. Other axes are defined according
to the Calculation Method. If Calculation Method is Euler the new
workplane is exactly the same as the original one.
Original Workplane to specify the new workplane is exactly the same
as the original one. In this case workplane X does not coincide with the
orientation vector the toolpath appears as 5-axis rather than 3+2.
Tool Vector and Orientation to specify the new workplane
constricted from the tool vector and orientation vector. This option is
preferrable is the program uses orientaion vectors. Nevertheless, the local
workplane may differ from what was used in the CAM system.
To enable 3+2 support, you must also set the Profile to Multi-Axis
machine with RTCP and 3+2 support in the Coordinates Control
settings, and activate the Set Workplane On and Set Workplane Off
commands.
Ignore Toolpath Workplane Shift - specifies whether to use the linear part of
the toolpath workplane. In other words, if set Yes, Workplane Origin X,
Workplane Origin Y and Workplane Origin Z are always zeros.
Program Generation - Multi-axis configuration: retract and
reconfigure
Parameter
is Not Specifies the action to be taken when no value is assigned to a
Initialised parameter that is to be output.
Parameter
Value
Cannot be
Converted
to Specifies the action to be taken when a value cannot be converted
specified to the type of the assigned parameter, such as when a text string is
type assigned to a numeric parameter.
On
Attempt
To Change
Read-Only Specifies the action to be taken when the Postprocessor attempts
Parameter to change a parameter that is defined as read-only.
Angle Styles
The PostProcessor supports four different styles of specifying angles:
1. ANSI/EIA RS-274-D
In this style, the value of the angle specifies the angular position measured
from zero in the positive direction. The sign of the angle indicates the
direction of rotation.
2. Mathematical
In this style, the value of the angle specifies the angular position measured
from zero and the sign indicates the direction of measurement. The sign of
the angle also indicates the direction of rotation.
3. Relative
In this style, the value of the angle specifies the angular distance measured
from the current position and the sign indicates the direction of
measurement. The sign of the angle also indicates the direction of rotation.
Use the Machine Kinematics page to define the number of axes on the machine
tool, and the number, type and locations of the machine's tilting axes.
Kinematic model - Choose an option from the drop-down list to specify the type
of machine for which you want to create an NC program file. Select:
3-Axis for machines with three linear axes (X, Y and Z).
4-Axis Head or Table for machines with three linear axes and a
rotary axis. The rotary axis can be located on the machine head or table.
5-Axis for machines with three linear and two rotary axes. Select:
o Table - Table when both rotary axes are located on the table.
o Table - Head (also known as Table - Spindle) when one rotary
axis is located on the table, and the other is located on the head.
o Head - Head (also known as Spindle - Spindle) when both
rotary axes are located on the head.
to load a model of the machine for which you are creating an option
file. The model must be defined in an MTD (Machine Tool Data) file that
includes the transformations between model and machine coordinates.
Because this option loads the kinematics data from the model file, it also
enables you to create programs for 6-axis machines with three rotary axes.
The path of the selected file is displayed in the MTD Path field and stored in
the option file.
The view changes to display the fields required for the selected machine.
Export - Click this button to save the currently selected model to an MTD file.
Preview - Click the Preview tab to display the selected Kinematic model. If you
selected , the model specified in the MTD Path is displayed. Otherwise, a generic
model is displayed.
Kinematics chain
The Kinematics chain contains the details of the machine axes and information
about the location of the tool:
Order lists the elements of the machine.
Parameter lists the parameters that control each machine axis. To
display or update the settings for an axis, click Edit. To change the
Parameter associated with a rotary axis, select an entry in the drop-down
list.
Direction specifies the vector for each axis. All origins and directions
are defined in the workplane in which the machine kinematics are defined.
The Head values show the initial direction of the tool.
o This workplane is used by PowerMILL to save cutfiles (CLDATA
Output Workplane).
Origin specifies the origin for each axis.
The Head values specify the start position of the tool (a tool tip point for a
tool with zero length). This point is defined in the Machine workplane and
must be the same as the CLDATA Output Workplane when CLDATA files
are prepared in PowerMILL.
The Table values specify the Origin point where the billet is located. This
setting is not currently used in PowerMILL.
Limits specifies the Minimum and Maximum values for each axis. The
Initial value specifies the start of the coordinate.
Delcam PostProcessor verifies your axis configurations, and displays the status
below the table. For example:
Defining rotational axes
To change the letter designating a rotational axis. (for example, from B to C),
select it from the drop-down list in the Parameter column.
Each rotational axis is defined by the following attributes:
Rotary Axis Location
Rotary Axis Vector
Rotary Axis Origin
Rotary Axis Limits
You can control the C axis position from within PowerMILL by entering
the C axis value in NC program format. In Delcam PostProcessor this value
automatically sets the Machine C value prior to machining.
Rotary axis location
Although the configurations of rotary axes vary widely, there are only three basic
types of 5-axis machine configuration:
TABLE- TABLE - both axes are on the table.
TABLE - HEAD - the primary axis is on the head (or spindle) and the
secondary axis is on the table. This is also known as Table - Spindle.
HEAD- HEAD - both axes are on the head (or spindle). This is also
known as Spindle - Spindle.
The diagram shows the direction of positive angle rotations about an axis, assuming
that the vectors are set as (1,0,0), (0,1,0) and (0,0,1). This is called the corkscrew
rule.
Direction - the axis vector must NOT be collinear with the initial tool vector as
rotations about the axis do not change the tool orientation.
Origin - the rotation axis is linked to the point on the tool holder where the tool
length starts. The blue arrow in the diagram below shows how to determine the
origin point. When defining the origin, ensure that all rotational axes on the
machine tool are zero.
The rotary A Axis is along the machine X. The origin axis vector (which defines the
origin point) is shown by the yellow arrow. The model workplane rotates about this
axis together with the table (and the part).
Axis Vector - the axis vector must NOT be collinear with the initial tool vector as
rotations about the axis won't change the tool orientation.
Axis Origin - the rotational axis origin point is set relative to the Model
Workplane (that is, relative to the workplane where the CLDATA trajectory was
generated by PowerMILL).
In the case of a head-based rotating axis, a model (or part) does not change its
position in space when rotating around this axis. The positional relationship
between the model and the machine workplanes is unchanged. So, a rotation
around the rotary axis does not cause a part to move or rotate in the machine
workspace. As a result, it is sufficient to calculate a rotary axis origin point correctly
to output it into an NC program. It is only necessary to know the tool tip
coordinates and the tool tip direction and to compensate for tool length and add the
origin vector.
The case of a table-based rotating axis is more difficult. When rotating about the
rotary axis, the model workplane position is changed relative to the machine
workplane (the part rotates in space). You must define the correlation between
these two coordinate systems (it correlates the model position in space with the
tool tip). The simplest way to do this is to define the rotary axis origin point relative
to the model workplane. In this case, the origin point does not change its
coordinates in the machine workplane by default and you can then follow the model
workplane rotation and calculate its position relative to the machine workplane
(which in turn allows you to define the tool tip at the correct point in space at any
point in time). The origin vector is shown by the green arrow in the above
illustration.
The origin point must be defined for the initial state of the machine in the Delcam
PostProcessor configuration when the coordinate of the rotary axis is zero.
Where the pivot point is the same as a tool tip point (or end point of a tool holder if
Tool Length Compensation Mode is On in Delcam PostProcessor), the
calculation of the correct position of the tool tip in the machine workplane is only
necessary if dynamic compensation is Off.
The calculation of the axis origin point relative to the model workplane means there
is only one valid place for the part on the table (if the part is moved, the rotary axis
origin point is different. This results in a similar difference in the tilted axis origin
point, and the machine kinematics in Delcam PostProcessor will not correspond
to this configuration).
5-Axis table - table machines
Axis Vector - a typical configuration of the Table - Table class is shown above.
The first rotary axis (A) has a direction of 1,0,0. The second rotary axis (C) has a
direction of 0,0,1.
The first rotary axis position remains unchanged during rotations as its motor just
'rocks the cradle'. The second rotary axis motor is inside the 'cradle' and its
direction is changed when the 'cradle' tilts.
Axis Origin - the secondary rotational axis origin point is set relative to the Model
Workplane (relative to the workplane where the CLDATA trajectory was generated
by PowerMILL). The primary rotational axis origin point is set relative to the origin
of the secondary axis.
The origin point must lie on the axis it links. One complex variant is shown in the
diagram above, although simpler cases are more common.
The example at the top of this topic has intersecting A and C axes and this greatly
simplifies the configuration. If you place a model workplane at the point of
intersection and define the axes' origin point as the intersection point, you get both
axis origins as 0,0,0:
This is the simplest approach to configure the kinematics of the Table - Table
machine. The only task is to place the part on the table so that the model
workplane origin coincides with the tilted axes' intersection point in space (or place
the part in a different position and compensate for this difference by configuring a
machine controller).
You must conform to the following rules when configuring Table - Table
kinematics:
The first axis must not have a similar direction to the initial tool vector.
The first and second axes must not have similar directions.
If these restrictions are not observed, the 5-axis kinematics degenerates to a 4- or
3-axis configuration, and Delcam PostProcessor outputs an error message.
5-Axis table - head machines
Axis Vector - a typical configuration of the Table - Head class is shown above.
The first rotary axis (C) is on the table and has a direction of 0,0,1 along the Z axis
of the machine. The second rotary axis (A) is on the head and has a direction of
1,0,0 along the X axis. Neither axis changes its direction when the machine
performs any other rotation.
The dull arrows mark the axis origin vectors. The second rotary axis (on the head)
links to the tool holder end and the first rotary axis links to the model workplane
origin. In this case, the pivot point is the origin point of the second rotary axis.
The dialog below shows typical values:
It is necessary to stick to the following rules when configuring Head - Table
kinematics:
The second axis must not have a similar direction to the initial tool
vector.
The first and second axes must not have similar directions.
5-Axis head - head machines
Axis Vector - a typical configuration of the Head - Head class is shown above.
The first rotary axis (C) has a direction of 0,0,1. The second rotary axis (A) has a
direction of 1,0,0 and rotates in the horizontal plane when the first rotary axis
rotates.
The first rotary axis has its origin at a higher point than the point at which the axes
intersect. This is done to demonstrate how to determine the origin points. The
primary axis origin point can coincide with the intersection. In this case, the
primary axis has an origin of 0,0,0. The pivot point is the origin point of the second
rotary axis.
Everything needed for the pivot point calculation is on a machine head so there is
no need to use a model workplane. This makes calculations simpler.
It is necessary to stick to the following rules when configuring Head - Head
kinematics:
The secondary axis must not have a similar direction to the initial tool
vector.
The first and second axes must not have similar directions.
MTD-based kinematics
Each machine tool for which Delcam PostProcessor generates programs can be
described in terms of its Kinematic (mathematical) model.
This model contains information that Delcam PostProcessor uses to transform
the model coordinates received from a CLDATA file into machine coordinates. This
transformation is called the Inverse Kinematic Problem. Solving this problem is
one of the main tasks in Delcam PostProcessor and is more complex when
handling multi-axis trajectories.
To represent machine kinematics, Delcam PostProcessor uses the Machine Tool
Data (MTD) format. MTD-based kinematics offer a more effective representation
than the kinematics offered by 3-axis, 4- axis and 5-axis configurations. The MTD-
based approach also allows Delcam PostProcessor to create programs for 6-axis
machines with three rotary axes.
This is shown in the following examples.
Example of an MTD Model
Table Branch
Head Branch
Example of an MTD Model
This example looks at how to create an MTD Model for a 5-Axis Head - Head
machine. However, the MTD-format allows you to create models for any type of
machines with any number of axes (linear or rotary) placed in any order, using
similar principles.
Different colours are used to represent different parts of the machine. The machine
bed, which never moves, is shown in dark grey. The machine bed forms the root of
the machine and branches of joints are created from this. In this case there are two
branches, Table and Head.
Table Branch
Axis 1 Machine Y Linear
The table branch consists of just one element shown in white, the table itself. There
is a joint between the table and the base. When this joint is actuated, the table
moves relative to the base along the direction shown by the white arrow in the
pictures. This joint is called Y.
You must read the machine's manual to find out what name to use and
not use some arbitrary name (it is not simply the Y axis of a workplane).
This axis is the closest to the part when it is fixed on the table. That's why it is Axis
1.
Head Branch
Axis 2 Machine X Linear
Start with the first joint (between the base and the yellow part) as it is closest to
the base. It is Axis 2. You can create just one list of joints (axes) despite having
two branches, because splitting the kinematics into the branches used in MTD
format is only for presentation purposes. Delcam PostProcessor Editor displays
both the axis location (head or table) and the axis when the MTD-model is loaded.
So, there is a linear joint here representing the Machine X Axis. When this joint is
actuated, the whole head moves in the direction of the yellow arrows.
Axis 3 Machine Z Linear
The next joint is between the yellow part and the green one. This is the last linear
joint. It represents the Machine Z Axis.
Axis 4 Machine A Rotary
This joint connects the green part with the red part and produces horizontal
rotations on the rest of the head (the red and the blue parts). Delcam
PostProcessor uses the Primary Rotary Angle parameter to store the coordinate
of this axis as this is first rotary axis. The axis is called A, and so the prefix A for
the Primary Rotary Angle parameter must be added to the option file for this
machine.
It represents the Machine A Axis.
The last joint rotates the blue part relative to the red one. The head rotation is
ignored as it doesn't produce any effect when Delcam PostProcessor calculates
machine coordinates. In this model the last joint is a second rotary axis. Delcam
PostProcessor uses the Secondary Rotary Angle parameter to store the
coordinate of this axis. The axis is called B, so the prefix B for the Secondary
Rotary Angle parameter must be added to the option file for this machine.
It represents the Machine B Axis.
This kinematic example has two rotary axes. But Delcam
PostProcessor also supports 6-axis models which contain three rotary and
three linear axes. For 6-axis kinematics a Third Rotary Axis parameter is
used to store coordinate of the third rotary axis in the list (the rotary axis
which is closest to the head).
Format properties
Parameter Description
Time Format Select an entry in the list or type manually the format in which
the time is displayed. See more about Date and Time Format.
Date Format Select an entry in the list or type manually the format in which
the date is displayed. See more about Date and Time Format.
Duration Select an entry in the list to specify the format in which the
Format times taken to perform tasks are displayed. An example of how
durations are shown is displayed in the adjacent column.
Decimal Enter the character you want to use to separate the integer
Separator and fractional parts of numbers.
Exponent Enter the characters you want to use as the exponent indicator
String in exponential formats.
Date and Time Format
Date
Time
Format - Blocks
The Blocks page specifies the format of the blocks output to NC programs.
To open the Blocks page:
1. Click the Option File Properties button, or select the File >
Option File Properties menu option.
2. In the Option File Properties dialog, select Format - Blocks.
Parameter Description
Output Block Specifies whether block numbers are output with the block.
Number Select Yes to output numbers.
Maximum Specifies the maximum block number that can be used in the
Block NC program. If Delcam PostProcessor reaches this number,
Number numbering restarts.
Block End Specifies the string to mark the end of a line in the program. If
String a string is set, each line of program must end with this string.
Trim Leading Select Yes to remove leading spaces from the NC program file.
Spaces Select No to preserve leading spaces.
Format - NC Comments
The NC Comments part defines format for output of NC comments to programs.
To open the NC Comments page:
1. Click the Option File Properties button, or select the File >
Option File Properties menu option.
2. In the Option File Properties dialog, select Format - NC
Comments.
Parameter Description
Comment Enter the character string used to identify the start of a comment.
Start
Different machine controllers use different characters to
identify the start of a comment. You must enter the appropriate
character for the target controller.
Comment Enter the character string used to identify the end of a comment.
End
Different machine controllers use different characters to
identify the end of a comment. Others, such as Siemens
controllers do not require an end comment character. You must
enter the appropriate character for the target controller.
Parameter Description
Enable Specifies how multi-line comments are written to the NC Program file.
Multiline Select Yes to add the Comment Start and Comment End strings
Comments only at the start and end of the comment. Select No to add the
Comment Start and Comment End strings to each line of the
comment.
Substitutions
Some machine controllers cannot recognize or cannot accept all characters that can
appear in an NC program file. For example, Fanuc controllers ignore lower case
characters in comments, and Haas controllers do not accept the underscore
character. To avoid this problem, you can use the Substitutions page to
automatically replace all instances of the specified characters in the NC Program
file.
To open the Substitutions page:
1. Click the Option File Properties button, or select the File >
Option File Properties menu option.
2. In the Option File Properties dialog, select Format - Substitutions.
String Variables
A string variable is a special string entity that replaced by its value in the end of
processing. A string variable can be placed at any text field in the option file with
the following syntax: "%s(name)%", where "name" is the identifier of the string
variable. String variables are defined in a special table of the Option File Properties
dialog.
A string variable can also be set in the script with the SetStringVariable() function:
SetStringVariable("My Variable", "1234.56789");
Note, that string variables are applied at very end of the processing. Therefore,
only last set value of the string variable is applied.
The string variables are useful where you need to customize multiple strings in one
go. There is no limitation on where a string placeholder is output from: prefix or
postfix of a parameter, text item in a block or even from CLDATA.
Event Effect
Manual setting of the Setting the Updated flag to Yes causes Delcam
Updated flag in the PostProcessor to treat the parameter's initial value as
Initialisation Table. having changed (even if it has not).
The Output Next Time Sets Updated to Yes if it was previously set to No.
flag is set to Forced.
Event Effect
The Output Next Time Sets Updated to No if it was previously set to Yes.
flag is set to
Suppressed.
The following flowchart shows the sequence of events when the postprocessor
encounters a parameter in a command block. It demonstrates how the setting of
the internal Updated flag is important when a parameter is used modally.
For the Dependency Filter, refer to the Command Interface.
Commands
Command toolbar
Drop-down list of the block item types you want to add, which
contains:
Parameter
Command
Structure
Table
Contains the items of the specified type that can be added as block
items.
There are four items available for building conditional statements: if, else if, else,
end if.
Conditional statements can be nested one in another. The depth of the nesting is
not limited. By default, nested conditional statements are shown with indentation.
This mode can be toggled by button on the toolbar.
The expression syntax should correspond to the scripting language of the option
file. For example, %p(Tool Number)% != 1 Is valid for Jscript, whereas the same
expression for VBScript is %p(Tool Number)% <> 1
A string like %p(Tool Number)% is just abbreviated form of GetParam(%p(Tool
Number)%)
The expressions of conditional statements are evaluated in the same context as the
main script. Therefore, there could be used variables and functions defined.
In order to insert a conditional statement do the following:
Press drop-down button and choose the statement you need
Select the statement inserted and open its properties
In the Item Properties change the expression
This state may be useful if output of some parameter within some block in addition
to modality issues indirectly depends on previously processed blocks.
Lets consider an option file which supports 3+2 trajectories and uses Local
Workplanes. The cutfile to be processed is intended to cut a set of pockets in
differently oriented planes. Such cutfile contains a set of 3+2 trajectories connected
by rotary connection moves (join-ups). After processing the cutfile the result NC-
file had been generated and for each toolpath start part it contained output similar
to the one shown below:
...
N100 (WORKPLANE NAME 1)
N110 (TOOLPATH NAME decaisse )
N120 (USINAGE 3+2)
N130 G17 G131
N140 D5
N150 D0
N160 G92 Y1540.0 X338.609 Z0.0 ROLL0.0 PITCH0.0 YAW20.0
N170 (USINAGE 3+2)
N180 D5
N190 G00 Y119.527 X88.156 Z-59.542 B0.0 C20.0
N200 G01 Z-9.542 F20000
N210 Z0.216 F400
...
For better understanding what is in there we may look at the same part of the file
in Postprocessor's Debug View window:
Set Workplane On command which starts the workplane section in the NC-
program uses Euler Angles (Roll-Pitch-Yaw) to set Local Workplane orientation.
They are encircled with the blue frame. At the same time the red frame encircles
machine angles contained in First Move After Toolchange. And there is the
problem - machine angles are not needed there as the Local Workplane section is
already started. But machine angles appeared there just because this is the first
time they have been met after a conntecting join-up rotation (or first time in
program at all). It is necessary to remove the angles from there for 3+2 toolpaths.
Lets look at the First Move After Toolchange block in the Editor:
Machine angles cannot just be removed as they are still necessary for pure 5-axis
toolpaths (when there is no any Local Workplane used). Instead of removing we
can suppress their output by Output Next flag but not in this block. Local
Workplane section causes this problem, so this can be done in block Set
Workplane On. In this case the addition we are going to make will only affect 3+2
toolpaths. There is Set Workplane On block:
The blue frame shows Euler angle parameters and they do not have any influence
on the machine angles. It is necessary to add the machine angles in any place of
the block and set Output Next flag to Suppressed state for them:
Note that this solution works together with Output to Tape flag set to Never
state. This optional stuff is needed to exclude appearance of the machine angles
from Set Workplane On block. After the block is processed the next call of the
machine angles will happen in First Move After Toolchange and that is the
moment when the Output Next flag snaps into action for them. Also note that this
will only work if the machine angle parameters are modal. The result code after
updating the option file will look like shown below. There are no machine angles in
First Move After Toolchange any more:
...
N100 (WORKPLANE NAME 1)
N110 (TOOLPATH NAME decaisse )
N120 (USINAGE 3+2)
N130 G17 G131
N140 D5
N150 D0
N160 G92 Y1540.0 X338.609 Z0.0 ROLL0.0 PITCH0.0 YAW20.0
N170 (USINAGE 3+2)
N180 D5
N190 G00 Y119.527 X88.156 Z-59.542
N200 G01 Z-9.542 F20000
N210 Z0.216 F400
...
This option may be used if it is needed to repeat output of a modal parameter later
even if it will not change its value. Also it may be needed to change some
parameter without writing it down but ensure its output when it is met next time
during processing (deferred output). As an example we'll consider switching to
multi-axis mode. Look at the following piece of code:
There are multi-axis switching OFF/ON procedures. We may want to have machine
angles written down after multi-axis is turned ON even if they will be repeated. But
basically machine angles are modal. Blue frames at the picture above encircle
repeating angles. To do that it is enough to open Set Multi-Axis On block in the
editor and set flags as shown below:
Doing this we ensure machine angles to appear within the first motion block coming
after Set Multi-Axis On whether they changed or not. As in previous example,
Output to Tape flag is also set to Never as we do not need machine angles to
appear in Set Multi-Axis On (deferred output).
Compound commands
Compound commands are commands that contain one or more nested commands
(also called sub-commands). A nested command is parsed normally and the result
of parsing is inserted in the output according to the nested command's place in the
host command block.
Nested commands can be generic or user defined. They are subject to
the Always and Never settings of the Output to Tape flag - refer to the
Command Interface.
A compound command can be invoked by a StandardResponse() command. A
nested command may itself have a script function assigned to it. In this case, the
function is executed only when the Type of the nested command is set to Output
Script Function (by default, it is set to Output Block Items Only).
Nested commands include nested commands.
Compound commands are useful when you need to re-use fragments of a command
response. In this example, the option file has two commands, Load Tool and Load
Tool First, configured as follows:
Load Tool
These commands are the same except for the first block of Load Tool First. You
can avoid making changes in two places by nesting Load Tool within Load Tool
First. Then, changes to Load Tool are automatically reflected in Load Tool First.
Enter the message you want to display when Delcam PostProcessor encounters the
command in the Disallowed Message field in Command Properties.
Rename to rename a user defined command.
Copy to copy a command.
Delete to delete a user defined command.
Block description
Use block description to enter information about the blocks in a Command.
To create or edit a block description:
1. Select any item in the row for which you want to enter information.
The block description is displayed in Item Properties - Block - Description
field.
2. Enter the information to the field. The Block Description displays icon
to indicate a note has been entered.
To display the note as a tooltip, move the mouse cursor over the note icon:
Preview
When you have defined a command, you can assign values to the fields in the
bottom left corner of the Message view, and see a preview of the command in the
bottom right corner of the screen. For example:
Parameters enable you to input values from a CLDATA file and to output values
specific to a machine controller.
To list the parameters available in Delcam PostProcessor, click the Parameters tab
in Explorer or select the View > Parameters menu option. The tab lists all the
available parameters categorized by usage. To display the individual parameters,
expand the sub-folders.
The icon displayed to the left of each parameter indicates the type of value it can
contain:
indicates an integer or real number
indicates a text string
indicates a measure of the time taken to perform a task
indicates a value chosen from a list.
To filter the parameters list, enter a string, in the search field of the tab's toolbar.
The list displays the parameters whose name contains the string. To list all the
parameters again, click the Clear button.
To edit a parameter's settings, or to change the format assigned to it, select the
parameter in the list and edit the properties view at the bottom of the tab.
To add a parameter to a command block:
Select the cell to which you want to add the command, select the
parameter in the parameters list, and click .
Select its entry in the Parameter tab of the Explorer and drag it to
the block item in which you want to use it.
To create a parameter, right-click Parameters or User Parameters and select
Add User Standard Parameter to create an integer, real, string, or duration
parameter, or select Add User Group Parameter to create a group parameter.
You must define a machine value for each option in a group parameter
before using it; nothing is written to the output file when the Value of a
State is blank. To check the options for a group parameter, select the item
in the Block Items view. The parameter options are displayed in the Item
Properties.
By default, parameters are shown according to option file properties.
For example, if arcs are disabled in option file properties arc related
parameters become hidden.
Creating parameters
In addition to using the built-in parameters supplied with Delcam PostProcessor,
you can create your own parameters for use in Commands. These parameters are
listed in the User Parameter branch of Explorer.
To create a parameter:
1. Right-click in the Explorer, and select:
o Add User Standard Parameter to create an integer, real,
string, or duration parameter.
o Add User Group Parameter to create a group parameter.
2. In the new parameter dialog, enter a Name for the parameter.
3. Select the values that the parameter can hold:
o For a User Standard Parameter, select: Duration, Integer,
Real or String.
o For a User Group Parameter, define the states that users can
choose from and their values.
4. Click OK to save your changes and close the dialog. The parameter is
displayed in the User Parameters folder where you can view to edit the
parameter properties.
Editing parameters
Use the Properties view to change the settings of built-in parameters and user-
defined parameters.
To edit a parameter:
1. Select the parameter's entry in the Parameters view of Explorer.
Contact Point
Usually moves in NC-program contain positions of tooltip. However, some
controllers are able to compensate tool geometry. This feature is known as 3D
Cutter Compensation. When it's used, the CAM system additionally provide
Contact Normal.
PostProcessor calculates coordinates of Contact Point for each move from
Tooltip Radius, Tool Diameter and the contact normal.
Difference between Tooltip point and Contact Point is shown on the image below:
Used abbreviations:
TV - Tool Vector
CN - Contact Normal
CP - Contact Point
R - Tooltip Radius
Contact Point calculated only when the CAM system provides
Contact Normal. To achieve that you need to enable 3D Cutter
Compensation in PowerMill.
Structures enable you to combine several parameters into a single block item. Use
them when you want to quickly assign the same set of parameters to several
different command blocks. Structures also enable you to quickly make changes to
several commands simultaneously because changes to a structure are reflected in
all the commands in which it is used.
A structure looks like a simplified block, except that it contains a single string and
no Block Number:
To create a structure:
1. Select the Structures tab, right-click in the Explorer and select the
Add Structure menu option.
2. In the Add Structure dialog, enter a Name for the structure, and
click OK. The structure is displayed in Explorer.
3. Add parameters to the structure by selecting them from the drop-down
list and clicking the Add Parameter button or by dragging them from the
Parameter tab in Explorer.
Using structures
To add a structure to a command:
Select Structure in the Select Item Type list, select the structure in
the Select item list, and click the Add Parameter button.
Drag the structure from Explorer and drop it into the block where you
want to use it.
The structure is displayed with an orange background.
To display the parameters within a structure, right-click the block item and select
the Unfold menu option. The parameters are shown with an orange background.
You cannot edit the parameters within the structure, or insert items in between
them.
To collapse the structure again, right-click a parameter within the structure and
select Fold.
To change the contents of a structure, right-click the block item and select the Go
To Structure menu option.
Editing a structure affects all commands in which the structure is used.
To convert the contents of the structure into block items, right-click the structure
and select the Unstructure menu option.
This option breaks the connection with the structure, and further
modifications to the structure will have no effect on the command.
In the Add Structure dialog, enter a Name for the structure, and click OK. The
structure is displayed in Explorer
Tables
Tables enable you to list all tools and cutters together so that you can notify the
machine operator of the NC program's requirements (by, for example, adding the
relevant Tool Table to Program Start and the relevant Toolpath Table to
Toolpath Start).
If you insert a Toolpath Table into the Toolpath Start command, you can choose
the Type of output that creates. Select:
A Type of Toolpath outputs the rows individually. For example:
A Type of Program outputs all the rows in the table. For example:
Previewing a table
The Preview pane is available for tables and commands.
To test the table, enter values in the parameter list at the bottom left of the
window. The values are displayed in the example pane on the right.
Editing a column
Use the Item Properties view to specify the layout of the selected column.
To display the properties, select a column in the table. The Item Properties view
displays all the settings for the selected column:
Parameter specifies the name of the parameter assigned to the column. Click to
display the parameter properties.
Alignment specifies the alignment (Left, Right or Center) of the column values.
Name specifies the internal name of the column.
Caption specifies the name of the column used in the output.
Prefix specifies any text to be added to the start of the column values when
output. For example, if the Prefix is X and the column value is -1.23, the output is
X-1.23.
Postfix specifies any text you to be added to the end of the column values when
output. For example, if the Postfix is _A and the column value is -1.23, the output
is -1.23_A.
Output Total when True is selected for a column parameter that has a numeric
value, Delcam PostProcessor outputs the total value for the column.
Formats
A format is a group of settings that control how parameters are output. Formats
enable you to quickly apply settings to parameters so you can ensure that similar
values are output in a similar way. Formats also enable you to change the output of
all associated parameters in one place.
To create a format, right-click in the Formats Explorer and select the Add
Format menu option.
Using the Formats Explorer
The Formats Explorer lists all defined formats and the properties of the selected
format.
Creating formats
To create a new format:
1. Right-click the Formats Explorer and select the Add Format menu
option. For example:
The View pane summarizes the parameters associated with the selected format.
For example:
To view and edit the properties of a parameter, select its entry in the list. The
properties are displayed in the Item Properties window.
To assign a parameter to another format, right-click the parameter and select the
format from the menu. For example:
Creating a script
To create a script:
1. Select the Script tab in the Explorer.
4. Enter a Name for the function. The name must not start with a digit or
include spaces.
5. Click OK. The new script is added to the Script folder in the Explorer,
and the function code is shown in the Script view.
6. Enter your script. The code is checked as you write it, and its status,
and any errors, are displayed in the Status Bar. For example:
function Script_Second()
dim ret
ret = StandardResponse & "Output Script"
Script_Second = ret
end function
Because the first part of the value returned by function Script_Second contains a
StandardResponse() with no argument, the first part of the output is the same as
that of the command block (Start of Second Command, End of Second
Command). The last part of the value returned (Output Script) corresponds to
the last part of the script.
The command Third_from_Standard_Second uses a script function
(Script_Standard) instead of its command block to generate its output:
function Script_Standard()
dim ret
ret = StandardResponse("%b(Second)%") & StandardResponse
Script_Standard = ret
end function
The first part of the output is from the block command output of the second
command. The last part of the output (Output from Third Command) is derived
from the current command block (Third_from_Standard_Second) because the
last part of the script function is StandardResponse() without an argument. This
corresponds to the output from the calling command.
The command Fourth_from_Advanced_Second also uses a script function,
Script_Advanced, instead of its command block to generate its output. However,
the first part of the output is derived from the AdvancedResponse() (the scripted
output) of the second command:
function Script_Advanced()
dim ret
ret = AdvancedResponse("%b(Second)%") & StandardResponse
Script_Advanced = ret
end function
Because the first part of the value returned by the function contains an
AdvancedResponse() with an argument referencing the second command, the
first part of the output is derived from the script attached to the command block for
Second, that is, from Script_Second (Start of Second Command, End of
Second Command, Output Script). Because the last part of the value returned
contains a StandardResponse() with no argument, the last part of the output
(Output from Fourth Command) is taken from the current command block.
Using the Script toolbar
The Script toolbar is displayed when you select a script in the View pane. It
enables you to create function templates and perform Cut, Copy, Paste, Delete,
Select All and Find functions on the script text.
Button Description
Click the down arrow and select an option from the list to add the template
for the selected function to the script.
You can also select a function by right-clicking the Script view
and selecting an option from the context menu.
Pastes the contents of the system clipboard into the Script view.
Displays the Find toolbar. Use it to search the script text and to control
how the text is displayed.
Debugging script
Finding run-time problems is very difficult in complex script. But option file
developers may setup breakpoints and execute script in "step" mode.
At first, you need to have installed any JIT debugger. The best one is shipped with
Microsoft Visual Studio (including express editions), but you may install free Script
Debugger for Windows
(http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-
4569-b3c4-dffdf19ccd99&DisplayLang=en).
Then, you need to allow script debugging. Create file called
"TurnJITDebuggingOn.reg" with content:
[HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings]
"JITDebug"=dword:10000000
Now when you double clicked on it, will be applied changes into windows registry
and debugging will be enabled.
Then, add "debugger" call to any required place in advanced function.
function complex_method()
{
var res = "";
res += StandardResponse();
return res;
}
Then, start postprocessing. "debugger" will break executing your script function,
and you will be able to debug. Debugger allows to see values of parameters and
evaluate expressions. Also you may continue script execution step by step or to the
end of script.
To disable JIT debugging you need create and apply file called
"TurnJITDebuggingOff.reg" with content:
[HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings]
"JITDebug"=dword:00000000
Using the PostComparer
View Differences
When the comparison is complete, each element is displayed with a background
colour that indicates how it compares across the option files:
White indicates the element is the same in both files.
Pink indicates the element is different in each file.
Green indicates the element appears in only one file.
For example:
To compare a command, double-click its entry in the PostComparer. The
command is displayed in a separate window with the differences highlighted. For
example:
To compare a script, double-click its entry in the PostComparer. The text of the
script is displayed in a separate window with the differences highlighted. For
example:
Merge Features
Using context menu you may copy values of highlighted items between option files:
For complicated items, like commands, copying of whole item is not allowed. But
you may copy all its properties separatelly, step by step.
PostComparer support undo/redo functionality.
All changes are made in the editor and eventually you need to save changes using
toolbar buttons and .
When you close PostComparer with changed and unsaved option file,
you will be prompted about saving it.
Option file will be saved in the current file format and cannot be used
with old versions of PostProccesor.
F.A.Q.
CAM systems always uses only one active postprocessor. Its version will be printed
in output window of CAM system.
For changing active version, please, use the guide Change active version
If you have individual CLDATA files you may call any version using
Windows start menu - All Programs - Delcam - PostProcessor -
PostProcessor.
How to
Change active version
Command reference
Built-in parameters
Built-in functions
Console command line
Errors
Command reference
This section lists the standard commands available with Delcam PostProcessor.
Program start
Program Start sets the initial values the NC machine needs to start running. The
command is output at the beginning of every program, and must be activated and
defined in each option file.
Toolpath start
Toolpath Start initializes parameters before the start of every toolpath in the
option file. It can also be used to output values and Comments.
You can also use the Toolpath Start command to output a list of tools using a
table.
Controller switches
Cutter compensation on
Activate this command to switch off the Cutter Compensation Mode parameter,
which specifies the offset from the cutter centre.
The Cutter Compensation Mode parameter can be embedded within
other commands, so this command is not normally used.
Coolant on
Coolant off
Set Multi-Axis On
Use the Set Multi-Axis Off command to cancel any parameter settings specified
for multi-axis working.
Set Workplane On
When the machine controller supports working in a local workplane, and you have
specified a Profile of Multiaxis machine with RTCP and 3+2 support in
Coordinates Control, you must activate the Set Workplane On command and
specify the parameters required by the Workplane Definition Method used by
the controller:
If the controller requires machine angle coordinates to specify the tool
location, you must set the Workplane Origin parameters and the azimuth
and elevation values using machine angle parameters, such as WP Machine
B and WP Machine C.
If the controller requires Euler angles to specify the tool location, you
must specify the Workplane Origin parameters and the Workplane Euler
parameters.
o The values of the Workplane Euler parameters depend on the
Euler Convention specified in Multi-Axis Configuration settings.
You must select the correct Euler Convention for the target machine
controller otherwise the values output to the NC program will be
incorrect.
Use the Set Workplane Off command to specify the parameters required to cancel
the local workplane specified in the Set Workplane On command so that the
controller can revert to using the output workplane.
Spindle on
Spindle off
Activate this command to switch off the Spindle Direction Mode parameter.
The Spindle Direction Mode parameter can be embedded within
other commands, so this command is not normally used.
Move
Move rapid
The Move Rapidcommand controls movements of the tool when it does not need
to perform any cutting. Typical parameters used in this command include:
In this example, the output of the Motion Mode is required only when
at least one of the X, Y or Z values is output. For more information, see
Linking block items.
Linking enables you to make the output of one block item dependent on the
output of one or more other items in the same block.
To create a link between block items:
1. Right-click the block item you want to link and select:
Positive if you want to output the block item only when the linked
item is output.
Negative if you want to output the block item only when the linked
item is not output.
The cursor changes to indicate the type of link you selected.
2. Click the block items you want to link to. A link icon is
displayed in the first block item to show it is linked.
3. Right-click to complete the link.
To display the block items in a link at any time, click the link icon.
To break a link:
4. Right-click the block item you want to unlink and select Unlink.
5. Click the block items you want to unlink. The colour of the block
item changes to show it is no longer linked.
6. Right-click to stop unlinking.
The link icon is removed when all the block items are removed from
the link.
Motion Mode - This parameter enables the motion mode to be set
from the CLDATA file.
Cutter Compensation Mode - This parameter must be specified
before beginning a move so the mode can be set from the CLDATA file.
The point coordinates for each axis.
Tool Number - The number is set from the corresponding tag in
CLDATA. The prefix for tool number options is typically T.
Tool Length Offset Number - The number is set from the
corresponding tag in CLDATA. The prefix for tool length offset number
options is typically H.
o On most machines, the Tool Number parameter automatically
sets the Tool Length Offset Number to the same value.
Coolant Mode - This parameter must be specified after the spindle is
switched on and has achieved the specified rotation rate, and before
beginning a work movement. The Mode is then set from the CLDATA file.
You must define a value for each state in a group parameter before
using it; nothing is written to the output file when a state is unset. To check
the options for a group parameter, select the block item. The parameter
properties is displayed in the Item Properties.
Move Rapid is never triggered by multi-axis toolpaths because the
CLDATA file does not contain rapid moves.
Move linear
The Move Linear command controls movements of the tool. Typical parameters
used in this command include:
Rotation On
The Rotation On is executed before any sequence of moves, where rotary axes are
changed. This command may be used for unlocking rotary axes when machine is
support axes clamping.
This command is invoked each time when set of moving rotary axes changes.
Current states of rotary axes are stored in parameters from Machine A Rotation
to Machine T Rotation. Each group parameter has two states:
ON - axis is rotated in current move,
OFF - there is no rotation.
You may set clamping codes in parameters like Machine A Rotation
and, using modality, output it in this command.
Rotation On can also be used for triggering inverse time feeds. The inverse time
mode makes more sense when a rotation occurs. In that case the Feed Mode must
be INVERSE_TIME and G93 (ISO) must be output in the NC program.
When no rotation occurs it's more convenient to use feed per minute or feed per
revolution (G94 and G95 correspondingly). In that case the Feed Mode must be
set to PER_MINUTE or PER_ROTATION in Rotation Off.
Rotation Off
The Rotation Off is executed before any sequence of moves, where rotary axes
are not changed (if rotary axes changed before). This command is used for
unlocking rotary axes when machine supports axes clamping or disable inverse
time feed mode.
Tool
In this example, blocks 1 - 4 retract the tool, cancel the tool length
compensation and then move the tool in preparation for the tool change.
Because blocks 5 -9 are the same as those used in the Load Tool First
command in the Fauc_Generic option file, you can replace blocks 5 - 9 by
making Load Tool First a sub-command of Load Tool. Alternatively, you
could create a user command that includes blocks 5 - 9 and then embed the
command in both load tool commands.
Typical parameters used in this command include:
Tool Type
Tool Name
Tool Diameter
Tool Tip Radius
Tool Length
Tool Number
In most cases, the parameter value is set from the CLDATA file. However, you must
check the machine prefix specified for each parameter is appropriate for the target
controller. (To check a parameter, right-click the block item and select Edit from
the context menu. The parameter is displayed in the Add/Edit Parameter dialog.)
Drilling
Delcam PostProcessor contains all the parameters and setup commands required
to configure drilling cycles and thread milling. To ensure full compliance between
CAM systems and the controller, you must define and activate all drilling cycle
setup commands that may be used by the controller in the option file.
Some parameters must be recalculated for specific controllers.
In a drilling cycle, Delcam PostProcessor outputs commands in the
following sequence:
Drilling Cycle Start displays the specified parameter values at the start of
every drilling cycle. This command enables you to display information that
applies throughout the cycle, such as Drilling Peck Depth, Drilling
Number of Depths, Drilling Thread Pitch, Drilling Feed Rate, Drilling
Clear Plane, Drilling Total Depth, Drilling First Depth, and Drilling
Retract 2nd Height.
Move in Cycle specifies the hole co-ordinates and moves the tool between
holes. The drilling cycle is then performed.
Drilling Cycle End closes the sequence and should contain a Drilling Cycle
Type of Canned_Cycle_Off and any other exit codes required by the
controller.
If your CAM system uses a drilling cycle not supported by Delcam
PostProcessor, the NC program output may be incorrect.
If a drilling cycle command specified in your CAM system is disabled or empty
in the option file, Delcam PostProcessor does not display an error message
when it creates the NC program. However, if a required command is
disallowed, a warning message is displayed when the file is postprocessed.
You must set the appropriate machine prefix (# in the above example)
for each setting in the Parameter PropertiesEditing parameters.
A Fanuc controller uses a G31 command to move the probe and touch
a surface. For example, if you program a move of one centimeter in G31, the
machine moves one centimeter as in G01 (a straight-line feed move).
However, in G31, the machine stops if the probe touches something.
Arc commands control circular moves. The appropriate circular move is called when
it is encountered in the CLDATA file:
Circular Move YZ
Circular Move XY
Circular Move XZ
In addition, the Circular Move Setup command can, optionally, be used to set up
any preparatory text and parameters for arc moves.
For the settings and parameters relating to Arc commands, refer to
Arc Interpolation is Supported and Arc Settings.
All circular moves have a similar command structure (using the parameters
specified in Arc Settings). The following example demonstrates the Circular Move
YZ command:
Arc settings
All circular move commands use the Arc parameters. However, because the layout
method varies between controllers, the method by which an arc is represented
must be defined when Arc Interpolation is Supported.
The arc centre coordinates, Arc Centre X, Arc Centre Y and Arc Centre Z, can be
defined:
In absolute coordinates
Relative/incremental to the arc start point
Arc Start X, Arc Start Y, Arc Start Z define the arc start point. This point is the
same as the end point of a previous move, so it is not normally used in NC output.
X, Y, Z define the arc end point when they are used in arc interpolation.
Arc Plane Mode sets the plane identification code for a controller. Delcam
PostProcessor calculates the correct value of the parameter (the actual arc
plane). It is only necessary to add this parameter to arc interpolation blocks to
have it written out.
Arc Axis Vector X, Arc Axis Vector Y, Arc Axis Vector Z contain normalised
vectors of a normal to an arc plane. They are used with machine controllers that
support axes in arbitrary planes. They are not usually needed for arc interpolation
output.
Arc Radius contains the arc radius value.
Arc Travel Angle contains the arc angle. The arc angle is the angle between
vectors directing from the arc centre to the arc start and end points. So, the arc
angle represents a path of a tool as it moves along the arc. The value is positive
when the direction is counterclockwise and negative when the direction is
clockwise.
Spline start
This command initializes any required parameters before the start of any spline-
points sequence.
Spline move
Refer to Spline Configuration.
Misc
Comment
Use the Comment command to pass comments from the CLDATA file through to
the NC program. The comment is displayed by the machine controller, but it has no
effect on the program.
The Comment command outputs all comments in the CLDATA file
including those generated automatically by the CAM system.
Comments must be identified by the comment commands that are specific to the
target controller. For example, on Fanuc controllers, comments must be enclosed
by bracket characters.
To add comment characters to items in the Comment command:
1. Select the block items.
2. Click the Insert Comment button in the toolbar, or right-click the
selected items, and select the Comment SelectionBlock Item context menu
menu option.
Postprocessor function
Use the Postprocessor function command to output commands that are not
supported by Delcam PostProcessor, such as Print, Set Data and WPCS setup. It
can be used to add machine-specific code to the NC program file by setting the
Value of the function. For example, it can be used to add command line
information that has been entered directly from the CAM system. However, this will
make the option file machine specific. You can create a non-specific option file
using script functions.
Program End
The main function of the Program End command is to mark the end of the
postprocessing.
It is the final command in every program and must be set in each option file.
Built-in parameters
This list contains the parameters supplied with Delcam PostProcessor.
Legend
Numeric Parameter
String Parameter
Group Parameter
Duration Parameter
Time Parameter
Date Parameter
You must specify a machine value for each option in a group parameter in
the Parameter Properties or Item Properties view before using the
parameter; nothing is written to the output file when a parameter is set to an
undefined State.
Parameter Folder Incremental Description
Arc Travel Arc false The angle between the vector from
Angle the centre of an arc to its start point
and from the centre of the arc to
the arc's finish point.
Block Max X Workpiece false The upper block limit along the X
axis. Together with Block Min X, this
defines the extent of the PowerMILL
material block along the X axis.
Block Max Y Workpiece false The upper block limit along the Y
axis. Together with Block Min Y, this
defines the extent of the PowerMILL
material block along the Y axis.
Block Max Z Workpiece false The upper block limit along the Z
axis. Together with Block Min Z, this
defines the extent of the PowerMILL
material block along the Z axis.
Block Min X Workpiece false The lower block limit along the X
axis. Together with Block Max X,
this defines the extent of the
PowerMILL material block along the
X axis.
Block Min Y Workpiece false The lower block limit along the Y
axis. Together with Block Max Y,
Parameter Folder Incremental Description
Block Min Z Workpiece false The lower block limit along the Z
axis. Together with Block Max Z,
this defines the extent of the
PowerMILL material block along the
Z axis.
Cutting Rate Toolpath false The rate (or speed) that the
material moves past the cutting
edge of the tool. See also Feed
Rate.
Drilling Feed Canned false The feed rate for a cycle. See also
Rate Cycles Feed Rate.
Number of Cycles
Depths
Drilling Total Canned false The total depth of the cycle hole.
Depth Cycles
Feed Rate Move false The feed rate is the distance (in
millimetres, for metric units) that a
cutting tool advances per
revolution. The Plunge Rate value is
used instead if the cutfile is of type
Plunging.
Input Linear Program N/A The units used to input linear units
Units (MM / INCH).
Max Cutting Option File false The maximum rate of cutting. See
Rate Settings also Feed Rate.
Tolerance linearisation.
Optfile Option File N/A The date on which the option file
Created Date Info was created.
Optfile Option File N/A The customer for whom the option
Customer Info file is intended.
Optfile Last Option File N/A The date on which the option file
Modified Date Info was last modified.
Optfile Name Option File N/A The name of the option file.
Info
Number
Time - Day Traceability N/A The current number days into the
current month (in the range 1-31).
Time - Year Traceability N/A The last two digits of the current
year.
Tool Cutting Tool N/A The length of cutting time for the
Duration tool.
Tool Length Tool false The length is the total length of the
cutter and holder assembly when it
is mounted in the machine. The
length is measured from the tip of
the tool to the Gauge Face, which is
the ground face of the spindle.
Tool Length Tool false The tool length offset number in the
Offset Number machine table.
Tool Output Tool N/A The tool output point (Tip / Centre).
Point
Tool Radius Tool false The tool radius offset number in the
Offset Number machine table.
Tool Tip Tool false The X value of the tool tip radius.
Radius X
Parameter Folder Incremental Description
Tool Tip Tool false The Y value of the tool tip radius.
Radius Y
These are the script functions that come as standard with Delcam PostProcessor.
ActiveCommandId
ActiveCommandId()
Returns the ID of command that call a script.
Example (JScript)
function test()
{
return ActiveCommandId;
}
ActiveCommandName
ActiveCommandName()
Returns the name of command that call a script.
Example (JScript)
function test()
{
return ActiveCommandName;
}
AdvancedResponse
AdvancedResponse([command])
Executes the script function associated with the referenced command and returns
its value. If called command has no assigned script, AdvancedResponse return
NC output of referenced command.
Refer to Scripting and Examples of Scripting principles for the
difference between StandardResponse() and AdvancedResponse().
Example (VBScript)
In the following example of a Probing Move Composite, the value for ptm is
derived from the AdvancedResponse() for Probing Move Touch (the script
function associated with the Probing Move Touch command):
Function ProbingCompositeMove
' A Probing Move Composite is a Probing Move Rapid to the Approach Point
' followed by a Probing Move Touch to the Probing Target Point
dim prm, ptm, ret
prm = StandardResponse("%b(Probing Move Rapid)%")
' Note AdvancedResponse so script is run
ptm = AdvancedResponse("%b(Probing Move Touch)%")
ret = StandardResponse & prm & ptm
ProbingCompositeMove = ret
end Function
InitialSplittingPartNumber
InitialSplittingPartNumber()
Get/set the number of first splittig part.
Example (JScript)
function ProgramStart()
{
InitialSplittingPartNumber = 100;
return StandardResponse();
}
GetCoordinate
GetCoordinate(parameter, representation_id)
This function returns the last value of the coordinate parameter that was output to
the NC Program file in the specified coordinate system. The function returns a value
type of real.
If the parameter has not been output to the NC Program file, the
function returns the parameter value specified in the Initialisation settings.
Arguments
parameter - Parameter name string
representation_id - The coordinate system for which the parameter value is to be
returned. Select:
0 to return the value in the NC-program output system. (This option is the
equivalent of the GetParam() function.)
1 to return the value in the Model Coordinate System.
2 to return the value in the Machine Coordinate System with multi-axis
transformation applied, but excluding tool length compensation.
3 to return the value in the Local Workplane.
4 to return the value in the CAD Workplane.
Examples (JScript)
GetDynamicAxisInitial
GetDynamicAxisInitial(axis_name)
This function returns the current initial rotary angle for the specified axis.
Arguments
axis_name - The axis name string.
GetDynamicAxisMax
GetDynamicAxisMin(axis_name)
This function returns the current maximum rotary angle for the specified axis.
Arguments
axis_name - The axis name string.
GetDynamicAxisMin
GetDynamicAxisMin(axis_name)
This function returns the current minimum rotary angle for the specified axis.
Arguments
axis_name - The axis name string
GetParam
GetParam(parameter [,rounding])
This function returns the value of the specified parameter. The value type depends
on the parameter type.
Arguments
parameter - Parameter name string
rounding - Boolean value
The rounding argument is optional:
The false state returns the unrounded value as it is stored in Delcam
PostProcessor.
The true state rounds a Real value to the number of digits specified in
the format used by the parameter.
The rounding argument does not affect Integer or String parameters.
Examples (JScript)
comment = GetParam("%p(Comment)%");
// Returns string value of "Comment" parameter.
x_coord = GetParam("%p(X)%");
// or
x_coord = GetParam("%p(X)%",true);
// Returns value of "X" parameter, but rounded using the number of digits
specified in the output format used by "X".
x_coord = GetParam("%p(X)%",false);
// Returns the unrounded value of "X" parameter ("X" is of type REAL).
frame_number = GetParam("%p(Block Number)%");
// Returns the integer value for the current block number.
Refer also to the example given for StandardResponse().
GetParamPrevValue
GetParamPrevValue(parameter [,rounding])
The function returns the previous value of a specified parameter. The value type
depends on the parameter type.
Arguments
parameter - Parameter name string
rounding - Boolean value
The rounding argument is optional. It sets the rounding property for the return of a
Real value. If you use the false state, GetParamPrevValue() returns the
unrounded value as it is stored in Delcam PostProcessor. If you use the true
state, GetParamPrevValue() rounds a Real value to the number of digits
specified in the format used by the parameter. The rounding argument does not
affect Integer or String parameters.
Examples (JScript)
x_coord = GetParamPrevValue("%p(X)%");
// or
x_coord = GetParamPrevValue("%p(X)%", true);
// Returns the rounded REAL value of the X coordinate from the previous move.
// ----------------------------------
function Move()
// how to avoid repeating moves like:
// N100 X10 Y20 Z30 B50 C60
// N110 X10 Y20 Z30 B50 C60
// if the coordinates are not controlled by the UPDATE flag.
//
// Just use this function for all motion commands.
// If all the coordinates are the same as in the previous move
// then a command response will not be processed.
//
// Note that ROUNDED values are used.
//
{
if (GetParamPrevValue("%p(X)%", true) != GetParam("%p(X)%", true) ||
GetParamPrevValue("%p(Y)%", true) != GetParam("%p(Y)%", true) ||
GetParamPrevValue("%p(Z)%", true) != GetParam("%p(Z)%", true) ||
GetParamPrevValue("%p(Machine B)%", true) != GetParam("%p(Machine
B)%" ,true) ||
GetParamPrevValue("%p(Machine C)%", true) != GetParam("%p(Machine
C)%", true))
{
return StandardResponse();
}
return "";
}
// ----------------------------------
MessageBox
MessageBox(text [, flags])
The MessageBox function creates, displays, and operates a message box. The
message box contains an script-defined message, along with any combination of
predefined icons and push buttons.
The value must be within the limit specified within the CLDATA file. If the machine
is already outside the specified maximum, or if the specified axis does not exist, an
error is returned.
Arguments
text - String that contains the message to be displayed.
flags - Specifies the contents and behavior of the dialog box. This parameter can be
a combination of flags from the following groups of flags.
ppOk - The message box contains one push button: OK. This is the default.
ppOkCancel - The message box contains two push buttons: OK and Cancel.
ppYesNo - The message box contains two push buttons: Yes and No.
ppYesNoCancel - The message box contains three push buttons: Yes, No
and Cancel.
ppRetryCancel - The message box contains two push buttons: Retry and
Cancel.
ppAbortRertyIgnore - The message box contains three push buttons:
Abort, Retry, and Ignore.
ppCancelTryContinue - The message box contains three push buttons:
Cancel, Try Again, Continue.
ppIconError - A stop-sign icon appears in the message box.
ppIconWarning - An exclamation-point icon appears in the message box.
ppIconAsterisk - An icon consisting of a lowercase letter i in a circle
appears in the message box.
Return Value
If a message box has a Cancel button, the function returns the ppIdCancel value
if either the ESC key is pressed or the Cancel button is selected. If the message
box has no Cancel button, pressing ESC has no effect.
If the function fails, the return value is zero.
If the function succeeds, the return value is one of the following values.
ppIdOk - OK button was selected.
ppIdCancel - Cancel button was selected.
ppIdAbort - Abort button was selected.
ppIdRetry - Retry button was selected.
ppIdIgnore - Ignore button was selected.
ppIdYes - Yes button was selected.
ppIdNo - No button was selected.
ppIdTryAgain - Try Again button was selected.
ppIdContinue - Continue button was selected.
Examples (JScript)
MessageBox("Some information");
...
var result = "";
if (MessageBox("Do you want print tool table?", ppYesNo) == ppIdYes) {
result += StandardResponse("%b(Generate Tool Table Command)%");
}
OutputExtension
Changes extension of output NC file.
Property value
text - String that contains the extension of output NC file.
Extension must not contains following characters : \ / : * ? \ " < > |.
Examples (JScript)
PromptParam
PromptParam(parameter[, value])
This function prompts the user to set the value of a parameter during
postprocessing. When postprocessing takes place, PromptParam opens the
Parameter Value dialog:
The user must enter the required Value, and then click OK before postprocessing
can continue.
PromptParam can be used to request a value when post-processing
from within PowerMILL.
Arguments
parameter - The name of the parameter for which the value is to be verified.
value - Parameter value
The value argument is optional. It can be used to set a default value for the
parameter. The Type depends on the parameter. Where possible, the Value
entered by the user is converted to the type required by the parameter.
Examples
function User_Input() {
//This function is called from the Start command
var out_str = "";
PromptParam("%p(Input Offset Value)%")
out_str += StandardResponse("");
return out_str;
}
ResetDynamicAxisLimits
ResetDynamicAxisLimits(axis_name)
Use this function to reset the rotary angle of the specified axis to the original value
specified in the CLDATA file.
Arguments
axis_name - The axis name string
If no axis-name is specified, the function resets all axes to their original values.
ResetMachineCoordinates
ResetMachineCoodinates()
This function returns the rotary axes to their initial states as defined in the MTD-file
or the option file. For example, use it to ensure all axes are reset when switching
tool paths on machines that are configured to use two machine angles rather than
Euler angles.
Arguments
None
Example
function reset_axes() {
ResetMachineCoordinates();
return StandardResponse("");
}
SetDynamicAxisInitial
SetDynamicAxisInitial(axis_name, value)
Use this function to set a new initial rotary angle for the specified axis. For
example, this position will be used during retract and reconfigure or when you call
ResetMachineCoordinates.
The value must be within the limit specified within the CLDATA file. If the specified
initial position is outside , or if the specified axis does not exist, an error is
returned.
Arguments
axis_name - The axis name string
value - The initial rotation for the specified axis in degrees
SetDynamicAxisMax
SetDynamicAxisMax(axis_name, value)
Use this function to set a new maximum rotary angle for the specified axis. For
example, you can use this function when the target machine supports different axis
limits for different tools.
The value must be within the limit specified within the CLDATA file. If the machine
is already outside the specified maximum, or if the specified axis does not exist, an
error is returned.
Arguments
axis_name - The axis name string
value - The maximum rotation for the specified axis in degrees
SetDynamicAxisMin
SetDynamicAxisMin(axis_name, value)
Use this function to set a new minimum rotary angle for the specified axis. For
example, you can use this function when the target machine supports different axis
limits for different tools.
The value must be within the limit specified within the CLDATA file. If the machine
is already outside the specified minimum, or if the specified axis does not exist, an
error is returned.
Arguments
axis_name - The axis name string
value - The minimum rotation for the specified axis in degrees
SetParam
SetParam(parameter, value [, update flag])
This function allows you to set the values of the Postprocessor's internal
parameters.
Arguments
parameter - The name of the parameter for which the value is to be set.
value - Parameter value.
This argument depends on the parameter type - where possible, the
Postprocessor transforms the argument to the required type.
update flag
This argument takes one of the following integer values:
0 - Not changed (the default)
1 - Updated
2 - Not Updated
For values 1 and 2, refer to Output Mode in Initialisation Table.
If the function is called with flag 0 (the default), then whether the parameter is
considered to have been Updated depends on its value: if the value differs from
the preceding value of the parameter, the parameter is assumed to be Updated;
otherwise, it is not.
Example 1
SetParam("%p(Comment)%", "example");
SetParam("%p(Comment)%", 777);
SetParam("%p(Motion Mode)%", "RAP");
SetParam("%p(Spindle Speed)%", 5000);
SetParam("%p(Feed Rate)%", 20000, 2);
These are single line examples from different functions. Refer to example 2 for a
complete Heidenhain machine function that illustrates the use of SetParam to set
the FQ parameter according to feed rate type:
Example 2
function Parametric_Feedrates()
{
var out_str = "";
if (GetParam("%p(Feed Rate)%") == GetParam("%p(Plunge Rate)%"))
SetParam("%p(FQ)%", 1);
else if (GetParam("%p(Feed Rate)%") == GetParam("%p(Cutting Rate)%"))
SetParam("%p(FQ)%", 2);
else if (GetParam("%p(Feed Rate)%") == GetParam("%p(Skim Rate)%"))
SetParam("%p(FQ)%", 3);
else if (GetParam("%p(Feed Rate)%") == GetParam("%p(Max Rate)%"))
SetParam("%p(FQ)%", 4);
else
SetParam("%p(FQ)%", 1);
out_str += StandardResponse("");
return out_str;
}
VBScript
Function Parametric_Feedrates
'
dim FQ
dim FR
FR = GetParam("%p(Feed Rate)%")
if FR = GetParam("%p(Plunge Rate)%") then
FQ = "1"
elseif FR = GetParam("%p(Cutting Rate)%") then
FQ = "2"
elseif FR = GetParam("%p(Skim Rate)%") then
FQ = "3"
elseif FR = GetParam("%p(Max Rate)%") then
FQ = "4"
end if
'
Call SetParam("%p(FQ)%", FQ)
Parametric_Feedrates = StandardResponse
'
end Function
Example 3
This function is to be associated with the Move Linear command. It first returns
the value of parameter Toolpath Axis Mode. Another two parameters -
Workplane Transformation and Tool Length Compensation Mode - are set
according to the value of this Mode.
The Move Linear command block is appended to the output by
StandardResponse() (with no calling argument) - therefore, the current
command is called.
function Move_Linear_()
{
var res = "";
var s_axis_mode = GetParam("%p(Toolpath Axis Mode)%");
if (s_axis_mode == "3+2" || s_axis_mode=="3axis")
{
SetParam("%p(Workplane Transformation)%", "ON");
SetParam("%p(Tool Length Compensation Mode)%", "OFF");
}
else if (s_axis_mode=="5axis")
{
SetParam("%p(Workplane Transformation)%", "OFF");
SetParam("%p(Tool Length Compensation Mode)%", "ON");
}
res += StandardResponse();
return res;
}
StandardResponse
StandardResponse([command (optional)])
Postprocess block items of specified command and return it NC output (if no
command is specified, output is returned from the current command).
If you do not specify StandardResponse() on its own within the
script function, the command block for the command to which it is attached
is never output.
Using StandardResponse() for current command (without specified
command) is forbidden in functions which result is used for update block
items value.
Refer to Scripting and Examples of Scripting principles for the
difference between StandardResponse() and AdvancedResponse().
Example 1
function Parametric_Feedrates()
{
var FR = GetParam("%p(Feed Rate)%");
var FQ;
if (FR == GetParam("%p(Plunge Rate)%")) {
FQ = 1;
} else if (FR == GetParam("%p(Cutting Rate)%")) {
FQ = 2;
} else if (FR == GetParam("%p(Skim Rate)%")) {
FQ = 3;
} else if (FR == GetParam("%p(Max Rate)%")) {
FQ = 4;
} else {
FQ = 1;
}
SetParam("%p(FQ)%", FQ);
return StandardResponse("");
}
VBScript
Function Parametric_Feedrates
dim FQ
dim FR
FR = GetParam("%p(Feed Rate)%")
if FR = GetParam("%p(Plunge Rate)%") then
FQ = "1"
elseif FR = GetParam("%p(Cutting Rate)%") then
FQ = "2"
elseif FR = GetParam("%p(Skim Rate)%") then
FQ = "3"
elseif FR = GetParam("%p(Max Rate)%") then
FQ = "4"
end if
Call SetParam("%p(FQ)", FQ)
Parametric_Feedrates = StandardResponse
end Function
Example 2 (JScript)
This function is for association with the Tool Change command and its purpose is
to cancel workplane tilting and zero point shift. The script variables that follow the
if command define whether workplane tilting and zero point shift appear in the
program. Where the variables are returned as true, the user defined commands
Cancel Tilt Plane and Cancel ZP Shift are called to set the variables to false
(using StandardResponse() with a calling argument).
Regardless of whether workplane tilting and zero point shift need to be cancelled,
output from the Tool Change command blocks is appended to the preceding
output (using StandardResponse() with no calling argument).
function Tool_change()
{
var res = "";
if (m_b_tilt_wp) {
res += StandardResponse("%b(Cancel Tilt Plane)%");
m_b_tilt_wp = false;
}
if (m_b_zp_shift) {
res += StandardResponse("%b(Cancel ZP Shift)%");
m_b_zp_shift = false;
}
res += StandardResponse();
return res;
}
UserError
UserError(error string)
This function interrupts the postprocessing of a CLDATA file with an error (for
example, if a condition is not met). When Delcam PostProcessor encounters this
function during the processing of a command, it stops at the place the function is
called, displaying a user-defined message in the Output window.
Arguments
error string - User defined error message
This is the error message displayed when the UserError() function is executed. It
can contain text and other information, such as current parameter values.
Example 1 (JScript)
If you have an option file that handles only continuous 5-axis toolpaths, you can
force it to interrupt processing when another mode is encountered in the toolpath
by associating the following function with Move Linear and other relevant
commands:
function Process_with_axis_mode_check()
{
// Interrupt processing if toolpath is not in 5-axis mode
if (GetParam("%p(Toolpath Axis Mode)%") != "5AXIS")
{
UserError("Toolpath cannot be processed as it contains 3-axis or 3+2 parts");
}
return StandardResponse();
}
For any mode other than continuous 5-axis, Delcam PostProcessor stops
processing the CLDATA file and displays the following message when the associated
commands are run:
Example 2 (JScript)
This example shows how to add a parameter value to the output string when
generating a UserError.
function On_move()
{
// Negative X values not allowed.
if (GetParam("%p(X)%") < 0)
{
// Write down error and stop processing.
UserError("X is negative: " + GetParam("%p(X)%"));
}
return StandardResponse();
}
If a negative X value is generated from the processing of a command, and the
command calls the on_move function, then, if, for example, the command was a
Move Linear, and X was returned as -40, Delcam PostProcessor stops
processing and outputs the following message:
-------------------------------------------------------------------
User error! X is negative: -40
Commands: Move Linear
Script location: line 20, pos 4
-------------------------------------------------------------------
Note that the current value of parameter X is present in the output.
Example 3 (JScript)
function Error_message_test()
{
SetParam("%p(Delay)%", 123.456);
SetParam("%p(Comment)%", "my comment.");
UserError(" Test. String: " + GetParam("%p(Comment)") + " Real: " +
GetParam("%p(Delay)%") + " Number: " + 987.654 + " End Test.");
return "";
}
If this function is linked to the Program Start command, Delcam PostProcessor
stops processing and outputs the following error in the Output window:
-------------------------------------------------------------------
User error! Test. String: my comment. Real: 123.456 Number: 987.654 End Test.
Commands: Program Start
Script location: line 20, pos 4
-------------------------------------------------------------------
Example 4 (JScript)
This example shows how the UserError() function can be used to handle drilling
cycle setup. The conditions are:
Multi-axis drilling cycles are not supported.
Helical and Reversed Helical cycles are not supported.
If the cycle setup block does not produce any output, processing stops
and an error message is displayed.
The Break Chip cycle has additional settings to be written into the NC
program. Output of these settings is already generated by the Break Chip
Setup command block.
The following function must be linked to all Drilling Setup commands, all of which
must be Active:
function On_cycle_setup()
{
var out_str = "";
// 1. Throw error and stop processing if CLDATA contains multi-axis drilling cycle.
if (GetParam("%p(Toolpath Axis Mode)%") == "5axis")
{
UserError(Multi-axis Drilling Cycle not allowed!!);
}
// 2. Throw error if unsupported cycles are processed.
if (GetParam("%p(Drilling Cycle Type)%") == "HELICAL" ||
GetParam("%p(Drilling Cycle Type)%") == "REVERSED_HELICAL")
{
UserError("Unsupported drilling cycle!");
}
// 3. Generate output for cycle setup. Throw error if it is empty
var out_str += StandardResponse();
if (out_str == "")
{
UserError("Drilling cycle setup block is empty!");
}
// 4. Add special code to cycle setup if "Break Chip" is used.
if (GetParam("%p(Drilling Cycle Type)%") == "BREAK_CHIP")
{
// generate output for user-defined block
out_str += StandardResponse("%b(Break Chip Setup)%");
}
return out_str;
}
What happens in each case:
1,2. If a condition is not satisfied in the first two cases, the corresponding error
message appears. The name of the command where the error occurred is contained
in the message as in the previous examples.
3. The StandardResponse() call initiates the processing of the current cycle setup
block and generates output for the NC program. An error is generated if the string
that is output from the block is empty.
If error 1 or error 2 is generated, this part of the function is not
processed and there is no output from case 3).
4. This additional block is parsed if the Break Chip Setup command is processed.
The "+=" operator is used to insert the additional output to out_str. If
it is not used, output from the initial block is lost.
UserWarning
UserWarning(warning string)
This function generates a warning during the postprocessing of a CLDATA file (for
example, when a specified condition is not met). When Delcam PostProcessor
encounters this function during the processing of a command, it displays the user-
defined warning in the Output window, before continuing with the postprocessing.
Arguments
warning string - User defined warning
This is the warning displayed in the Output window when the function is executed.
It can contain text and parameter values.
Example 1 (JScript)
function On_load_tool()
{
// Throw warning if tool length is excessive. Associate function with Load Tool First
and Load Tool.
if (GetParam("%p(Tool Length)%") > 100)
{
UserWarning("Tool length is excessive: " + GetParam("%p(Tool Length)%"));
}
return StandardResponse();
}
This function outputs a warning from the current command (for example, Load
Tool First or Load Tool) when the length is in excess of 100. It also outputs the
tool length so the user can see the excess length:
-------------------------------------------------------------------
User warning! Tool length is excessive: 120
Commands: Load Tool First
-------------------------------------------------------------------
A hyperlink is associated with the command so users can open the
command block.
After the message has been output, processing continues, and the
StandardResponse() for the current command is always executed.
Example 2 (JScript)
function Warning_test()
{
// comment
SetParam("%p(Delay)%", 123.456);
SetParam("%p(Comment)%", "my comment.");
UserWarning(" Test. String: " + GetParam("%p(Comment)%") + " Real: " +
GetParam("%p(Delay)%") + " Number: " + 987.654 + " End Test.");
return "";
}
If this function is linked to the Program Start command, then, when the cutfile is
postprocessed, Delcam PostProcessor outputs the following warning in the
Output window before completing the command:
-------------------------------------------------------------------
User warning! Test. String: my comment. Real: 123.456 Number: 987.654 End
Test.
Commands: Program Start
-------------------------------------------------------------------
WorkplaneEuler
By default, Delcam PostProcessor uses the Euler convention defined in the Multi-
Axis Configuration view to calculate Euler angles that are output to the NC
program file. Use the WorkplaneEuler function to specify a different convention
during processing.
To specify the convention for an Euler angle:
1. In the Script Function toolbar, click Script Function and select
WorkplaneEuler.
2. In the Angle drop-down list, select the angle for which you want to
redefine the Euler convention.
3. In the Convention list, select the new convention for the angle.
4. Click Accept.
Example (JScript)
WorkplaneEulerA("SXYZ")
Console command line
The syntax:
Console {optfile.pmopt} {input} [output] [parameters]
Keys:
output Specifies the location and name of the output file. For example:
D:\tmp\Test.tap
If no location is specified, the file is saved in the same
location as the input CLDATA file.
If no filename is specified, the output file is saved with
the same name as the input file and with the output file
extension specified in the General view.
If a filename is specified with no extension, the output
file is saved with the specified output file extension specified
in the General view.
If a filename is followed by a period (.) but no
extension, the output file is saved with no extension.
NCB0003
Error message
Description
NCB0010
Error message
NCB0011
Error message
NCB0028
Error message
Cannot output undefined state value (value) from group parameter 'param'
NCB0032
Error message
Error message
NCB0037
Error message
NCB0039
Error message
NCB0045
Error message
NCB0054
Error message
NCB0058
Error message
NCB0059
Warning message
Error message
Cannot define Probing Search Direction as Search Start Point coincides with Probing
Target Point
NCB0084
Error message
NCB0085
Error message
NCB0086
Error message
NCB0087
Error message
Maximum Cutting Feed Rate can't be less than the Minimum Feed Rate
NCB0088
Error message
Maximum Rapid Feed Rate can't be less than the Maximum Cutting Feed Rate
NCB0089
Error message
NCB0090
Error message
NCB0092
Error message
NCB0093
Error message
Cannot use 'value' object in advanced script. Enable access to XML model at run-
time
NCB0095
Error message
NCB0096
Warning message
Error message
NCB0099
Error message
NCB0100
Error message
NCB0101
Error message
Multi-Axis drilling cycle can't be processed. Turn ON Local Workplane for 3+2
trajectories
NCB0106
Warning message
NCB0107
Warning message
Can't change 'Read Only' parameter param. Set 'Read/Write' access for current
parameter.
NCB0108
Error message
NCB0109
Error message
NCB0110
Warning message
NCB0116
Error message
Expansion of value cycles are not supported. Upgrade your CAM system.
NCB0125
Warning message
NCB0129
Error message
NCB0130
Error message
Error message
NCB0133
Error message
NCB0134
Error message
NCB0135
Error message
NCB0199
Error message
User error.
NCB0207
Error message
Error message
NCB0219
Error message
NCB0227
Error message
NCB0229
Error message
NCB0230
Error message
Can't find linear machine coordinates to reach the aim tool position.
NCB0232
Error message
Error message
NCB0234
Error message
Can't reach desired tool direction without rotary axes (value, value, value).
NCB0235
Error message
Can't initialise value calculation engine for reduced result kinematics for the
current machine state as axes is locked.
NCB0236
Error message
NCB0237
Error message
Can't reset axis limit value=value degrees during reconfiguration without a retract
procedure as the interval between the limits is too narrow.
NCB0238
Error message
Error message
NCB0240
Error message
Axis 'value' limit exceeded: Value = value; Min = value; Max = value.
NCB0241
Error message
Function value cannot set new dynamic limit for axis param : the value value is
out of range (machine value, dynamic value). All data are in degrees.
NCB0242
Error message
Cannot use function value with argument 'param' : This parameter is not linked to
any machine axis of used kinematic model.
NCB0244
Error message
NCB0245
Error message
Error message
Can not write output file 'value'. The file is missed or write protected.
NCB0248
Warning message
Retract and Reconfigure has been applied at line value. Please, verify correctness
of the NC-program.
NCB0249
Error message
NCB0251
Warning message
During a connection move tool directions of two neighbouring positions are anti-
parallel: machine behaviour during this move is unpredictable. Please, be careful!
Start tool vector (value), end tool vector (value).
NCB0252
Warning message
Tool directions of two neighbouring positions are anti-parallel within one toolpath!
machine behaviour during this move is unpredictable. Be very careful, THE
MACHINE CAN BE SERIOUSLY DAMAGED! Start tool vector (value), end tool vector
(value).
NCB0253
Error message
Warning message
NCB0256
Warning message
NCB0257
Warning message
NCB0258
Error message
NCB0259
Error message
NCB0617
Error message
Minimum value value for axis 'value' is greater than maximum value value.
NCB0618
Error message
NCB0619
Error message
NCB0621
Error message
Cannot load the machine kinematics. Wrong Orientation vector (value, value,
value). It must be orthogonal to Tool vector (value, value, value).
NCB0641
Warning message
NCB0642
Warning message
NCB0643
Warning message
Tool Length Compensation cannot be used for machines with rotary axes on a head
for continuous multiaxis moves. It will be ignored.
NCB0644
Warning message
Local Workplane and RTCP are both switched ON. This is not normally allowed.
NCB0645
Warning message
NCB0646
Warning message
NCB0647
Warning message
NCB0648
Warning message
Parameter param has too small an output field (value) to contain the value of
'value'
NCB0649
Warning message
param is 'ON' when 'Tool Tip' Machine Attach Point is set. Tool length is already
compensated by selection of such attach point, so, Delcam PostProcessor will ignore
'ON' state of param parameter.
NCB0650
Warning message
Splines are not available in continuous Multi-Axis. Linearised moves used instead.
NCB0651
Warning message
Some characters cannot be translated in code page value and replaced by '?'
NCB0652
Warning message
NCB0653
Warning message
NCB0654
Warning message
NCB0655
Warning message
NCB0656
Warning message
Warning message
Diverging tool vector (value; value; value) corrected by (value; value; value)
NCB0811
Warning message
NCB0814
Warning message
NCB0815
Warning message
NCB0816
Error message
D0070
Warning message
Field is empty.
Description
D0071
Warning message
Description
All feed rate values should be greater then zero and Maximum Cutting Feed Rate
should be equal or below Maximum Rapid Feed Rate.
Correct following values:
Minimum Feedrate,
Maximum Rapid Feed Rate,
Maximum Cutting Feed Rate.
D0072
Warning message
Description
D0075
Warning message
Description
Warning message
D0077
Warning message
Description
D0078
Warning message
D0079
Warning message
Description
Usually option files uses different formatting styles for print values of paramenets,
but this uses single format for all. You may need to create new format and assign it
to desired parameters or just ignore this warning.
D0080
Warning message
Description
Group parameter uses as switch and should two and greater states.
D0081
Warning message
Description
Output value for state is not defined, that mean when Group Parameter will be in
this state you will get empty output.
D0082
Error message
undefined error
D0083
Error message
D0084
Warning message
Description
In advanced script you want to get output of command, but it name is not defined.
Possible, there is a misprint in name or you need to create new command.
D0085
Warning message
D0086
Warning message
Description
In advanced script you want to assign new value for read-only parameter. Possible,
you need to change access to parameter.
D0088
Warning message
D0089
Warning message
D0090
Warning message
D0091
Warning message
Description
In advanced script you want to use parameter, but it name is not defined. Possible,
there is a misprint in name or you need to create new parameter.
D0092
Warning message
Description
D0093
Warning message
Description
D0094
Warning message
D0095
Error message
D1001
Error message
Error message
D1003
Error message
D1004
Error message
Machine Axis: This Axis sould not be collinear to Initial Tool Vector.
D1005
Error message
Simplex solver is used for this kinematics: number of linear axes aren't equal 3.
D1006
Error message
Simplex solver is used for this kinematics: linear axes aren't orthogonal.
D1007
Error message
Simplex solver is used for this kinematics: linear axes aren't right-handed.
D1008
Error message
Simplex solver is used for this kinematics: rotary axes are collinear.
D1009
Error message
D1010
Error message
D1011
Error message
Simplex solver is used for this kinematics: axes order in kinematics chain not
standard.
D1012
Error message
Last Rotary Axis is collinear to Initial Tool Vector. The rotary angle can only be
controlled by input Orientation Vector.
Appendix
Glossary
Auxiliary Option Files
Auxiliary option files allow to produce more than one option file in one go. This
feature is especially useful for processing of main and sub-programs. The auxiliary
files are absolutely independent on its master. However, they are stored inside the
master option files.
In order to add an auxiliary option file, you may create it from scratch or attach an
existing option file. For the first option, click "New Auxiliary Option File" in the
context menu of the master option file in the Session Tree. Then enter the name of
the file and follow to the Editor to fill it in. If you prefer to load an existing option
file, click "Load Auxiliary Option File" and choose an appropriate one.
If you would like to change an auxiliary file, it must be activated first. To do that,
double click on the file item in the Session Tree or click "Activate" from its context
menu. After activation follow to the Editor and do the changes you need.
Most NC programmers think of the F-register in a CNC controller as the method for
specifying linear velocity. This is true for two- and three-axis linear motion, but
when rotary motion is to be controlled, the F-register takes on a different meaning.
When combined linear/rotary motion exists, most good CNC controllers require the
inverse of the amount of time necessary to make the move, and since each move
has a different distance, the corresponding time varies for each block as well. The
exact reasoning behind using the inverse value rather than the direct time in
minutes or seconds is simply a historical matter.
The constant used to calculate the inverse time code is normally 1 minute, such
that the equation is:
F(code) = 1(minute) / (time = 3D distance/velocity)
The 3D distance of the move is calculated in model coordinate space at the NC
control point, not in machine coordinate space and not necessarily at the tool tip.
For example, a 5-inch move at 50 IPM takes 5 50ths of a minute, yielding an
inverse time calculation of 1/.1 and an F-code of F10. The same 5-inch move at 700
IPM would be 1(minute) / (time = 5 / 700) or (1/(5/700)) or (1/.0071428) or
F1400.168
Escape sequences
To include any of the following special characters in a string, use the associated
escape sequence:
Horizontal HT 9 \t
Tab
Vertical tab VT 11 or \v
0x0b
Carriage CR 13 or \r
Return 0x0d
Form Feed FF 12 or \f
0x0c
Back Slash \ 92 or \\
0x5c
Question ? 63 or \?
Mark 0x3f
Hexadecimal hh \xhh
Number
For example, type Line 1\nLine 2 into a text string to generate the following
output:
Line 1
Line 2
In previous versions of Delcam PostProcessor, the following escape sequences
were used:
Character
Previous Escape
Sequence Representation Replacement
;cr CR LF \r\n
;bcktick ` `
;bar | |
;; ; ;
When you open an existing option file that contains any of the above sequences,
Delcam PostProcessor automatically updates them to the replacements shown.