PostProcessor Reference Help en
PostProcessor Reference Help en
Reference Help
Issue: 2014
Released: 12/05/2014
Important Notices
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.
The functionality and user interface in this manual is subject to change
without notice in future revisions of software.
The software described in this manual is furnished under licence
agreement and may be used or copied in accordance with the terms of
such licence.
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
This documentation references a number of registered trademarks and
these are the property of their respective owners. For example, Microsoft
and Windows are either registered trademarks or trademarks of Microsoft
Corporation in the United States.
Contents
Introduction
Important Notices ..........................................................................................
Delcam Plc Software Licence And Terms Of Supply ...................................
System requirements ...................................................................................
What's New ..................................................................................................
Features .......................................................................................................
Backward compatibility with v4.8 .................................................................
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
Supported Operating System
Windows 7 SP1, Windows Server 2008 R2 SP1, Windows Server 2008 SP2,
Windows Vista SP2
Windows
Windows
Windows
Windows
Hardware Requirements:
What's New
General enhancements
Features
Delcam PostProcessor is a tool for generating controller-specific NC programs
from CLDATA files produced by CAM systems. It also includes an editor for creating
and editing the option files that are used to convert the CLDATA files, and an
application for comparing different versions of option files.
It has the following features:
A graphical user interface for postprocessing CLDATA files, such as the *.cut
files generated by PowerMILL;
Access to the internal structure of the Postprocessor and a link to the
Editor, which shows a hierarchical representation of the option file structure;
Simple and efficient handling of post-processor commands;
Continuous 5-axis support;
Local coordinate system transformation support;
Probing support, integration with PowerINSPECT;
A search tool for finding elements in option files;
Option file reports;
Debug mode for output files;
Option file comparison and merging;
Script functions for sophisticated handling of post-processor commands.
Based on Microsoft Active Scripting, and using JScript and VBScript, scripting
enables you to implement specific tasks for any controller.
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:
On the image below you may see main window of Postprocessor. On the left, is
located Session Explorer, that allows you to load option files, to load and
postprocess CLDATA files. Result NC programs you may see on the right pane. The
bottom window is needed for diplaying errors, warnings and other information
about postprocessing.
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 Console module enables you to generate NC programs using a command
prompt.
This GUI-less application usually executed by CAM systems in background. On the
image below you may see console output in Delcam PowerMILL.
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.
Toolbar
When the PostProcessor tab is selected:
Button
Description
Creates a new session and closes the current one.
Opens a session.
Saves the current session to a file. When you save the session for the first
time, the Save Session As dialog is displayed.
Creates an option file.
Opens an option file.
Saves the current option file.
Loads a CLDATA file, such as a *.cut or *.cxm file.
Postprocesses the selected CLDATA files using the current option file.
Postprocesses all CLDATA files using the current option file.
Description
Displays the previous page you selected.
Displays the next page you selected.
Creates an option file.
Opens an option file.
Saves the current option file.
Password-protects the option file.
Specifies the option file properties, such as machine kinematics, program
generation setting, output format.
Undoes the last option file edit.
Reverses the action of the last Undo.
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
When the PostProcessor tab is selected:
New >
Open >
Edit menu
When the PostProcessor tab is selected:
Copy - Copies the selected text from the Output pane.
Select All - Selects all text in the Output pane.
Find - Displays the Find toolbar.
Find Next- Searches the Output pane for the next instance of the text specified in
the Find toolbar.
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.
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.
In the Find What box, enter the text you want to search for.
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.
2.
3.
View menu
Tools menu
When the PostProcessor tab is selected:
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.
Close Active - Closes the currently displayed tab.
Close All - Closes all tabs.
Close All But Active - Closes all tabs except the tab that is currently displayed.
Reset Layout - Returns the user interface to its default layout.
Help menu
Help Contents - Opens the reference help for Delcam PostProcessor.
Getting Started - Opens the introductory help for Delcam PostProcessor.
Check for Updates - Check the Delcam website for new versions of Delcam
PostProcessor.
Subscribe to the PostProcessor Newsletter - Subscribe to the Delcam
PostProcessor online newsletter.
Visit User Forum - Opens the User Forum page on the Delcam website.
Delcam Home Page - Opens the Home page on the Delcam website.
About Delcam PostProcessor - Displays information about this version of Delcam
PostProcessor including:
copyright information;
details of the files installed;
licensing details.
Main Toolbar and Menus - These enable you to create, open and save
projects; to create, load and save option files; to load and delete CLDATA
files; to perform postprocessing; and to specify the postprocessing settings.
Session Explorer - This lists the name of the current session, the option file
used to postprocess the CLDATA files, and the CLDATA files to be converted
using the specified option file. If the CLDATA files have been postprocessed
in this session, it also lists the output (or tapefiles) that have been generated
from them.
View Pane - This displays the contents of the selected tapefile. When no
tapefile is selected, the pane is empty.
Output Window - This displays any error, warning and messages produced
during postprocessing.
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
Session
Creating a new session
To create a new session, click the New Session
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.
1.
2.
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
To save your session:
Click the PostProcessor tab.
Choose a save option:
1.
2.
To save the session under its current name, click the Save Session
button on the toolbar, or select the File > Save Session menu
option.
To save the session under another name, select the File > Save
Session as menu option.
To save all session files (option files, CLDATA files and NC program
files) to one folder, select the File > Save Session Folder menu
option.
The location and filename are displayed in the Title bar of the Delcam
PostProcessor without an asterisk.
Session properties
Use the Session Properties dialog to specify the location and name of tapefiles
created using this session.
Cldata name to insert the name of the CLDATA file. The %cldata
variable is added to the name box.
Date to insert the date in dd_mm_yy format. The %date variable is
added to the name box.
Time to insert the time in hh_mm_ss format. The %time variable is
added to the name box.
Counter to insert a unique number in the file name. The number is
incremented each time you save the file. The %counter variable is
added to the name box.
4.
Specify the extension for the tapefiles created by this session. Select:
Use extension specified in option file to generate all output files
using the extension specified in the option file.
Custom Extension to specify the extension in the adjacent box. The
extension can contain any characters except . , ? * : ; = + \ | / ".
5.
Click Save as Default if you want to use the current settings as the
default session properties for new sessions.
6.
Click Restore Defaults to if you want to reset the properties to the
default settings.
7.
Click OK to save the preferences in the session file.
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.
If you want to rename a folder select it, click Rename from the context menu (or
press F2) and type its new name.
If you want to remove a folder select it, click Remove from the context menu (or
press Del).
When you do Save Session Folder the directory tree is automatically created at
destination according to CLDATA folders in the session.
You can also drag CLDATA files from Windows Explorer and drop them on the
PostProcessor tab.
To load several CLDATA files from a folder, select the
File > Add CLDATA Folder menu option. In the Browse for Folder dialog,
select the folder and click OK to load its files into the Session Explorer.
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.
5.
6.
If you want to display the location of the tapefile, position the mouse
cursor over the file's entry in the Session Explorer. For example:
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
icon.
by the
To display the debug file, click its entry in the Session Explorer.
The view allows to trace links between response and its output (NC code).
To display the name and Controller Switches of the command that produced a
section of the code, move the mouse over Response order section of the debug
file. Double-click the command to display the command .
To display the name and attributes of the parameter that included into selected
command, move the mouse over NC code order section of the debug file. Doubleclick the parameter to display selected command and select block item associated
with the parameter.
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:
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:
Interface settings
Word Wrap - Specifies how long lines are treated in the script window.
Select:
Yes to display any text that extends beyond the right edge of the window on
the next line.
No to display any text that extends beyond the right edge of the window by
scrolling.
Indent - Specifies how the Tab key works in the Script Editor. Select:
Keep Tabs to insert a tab character each time the Tab key is pressed. The
Tab Size field specifies the length of each tab.
Insert Spaces to insert space characters each time the Tab key is pressed.
The Tab Size field specifies how many spaces are inserted by each key
press.
Main Toolbar and Menus - These enable you to create, open and save
option files; to specify option file properties; to protect option files; and to
generate option file reports.
Option File Explorer - This displays the elements that can be used in an
option file. It contains the following tabs:
Commands
Parameters
Tables
Structures
Scripts
Formats
A toolbar is displayed at the top of each tab to enable you to add and move
items. A Properties section at the bottom of each tab displays the attributes
of the selected item in the list.
Use the options in the View toolbar to hide or display tabs in the
Option File Explorer.
load the option file for the required machine controller, edit the file, and then
save it under the same name.
load an option file that is similar to what you require, then customize it and
save it under a different name.
Select the File > New > Option File menu option.
If the current session contains any unsaved changes, you are prompted to
save them.
The new option file is displayed in the Session Explorer. If you have created a
new file (as opposed to opening a template), it is called New1, or New2 if it is the
second new file in the session, and so on. You can rename it when you first save it.
Click the Editor tab and edit the option file. If you are using an existing file as a
template, rename it by selecting the File > Save Option File As menu option, or
on the toolbar. This displays the Save option file as dialog.
clicking
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.
The pane contains following sections:
Click any of objects listed in the Explorer to display more information in the
Properties window and the View pane.
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
button in the toolbar, or select the File > Option File
Option File Properties
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:
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 4Axis machine and two tilting axes for a 5-Axis machine.
Format controls the output format for NC programs. Select:
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
Manufacturer
Controller Series
Machine Tool
Manufacturer
Customer
Created By
Created
Last Modified
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
Product Version
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.
4.
If you want to record extra information about the parameter, enter the
information in the Notes box.
5.
To remove a parameter from the list, select the parameter and click
button.
the Remove
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.
2.
Program Generation
Program Generation
Program Generation
Program Generation
Program Generation
Program Generation
Program Generation
reconfigure
Program Generation
Angle Styles
General
Feed Rates
Arcs and splines
Drilling
Coordinates control
Multi-axis configuration: general
Multi-axis configuration: retract and
- Error Response
Parameter
Description
NC
Program
Tolerance
Output File
Extension
Error File
Header
Probing
Support
Allow
Repeated
Tool
Change
Option File
Linear
Units
Output
Linear
Units
Output
Angular
Units
Parameter
Description
Access to
XML Data
Specifies the type of access to the XML model. This option is only
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
Inverse
Time
Specifies the maximum feed rate value for cutting moves when
using a Feed Mode of INVERSE_TIME.
Use
Advanced
Inverse
Time
Select Yes to correct the feed rate when the tool rotates around
the tool tip.
Restrictive
Coefficient
Minimum
Feed Rate
Maximum
Rapid
Feed Rate
Specifies the maximum feed rate value for rapid moves. When
processing CLDATA, all feed rates above this value are decreased
to this rate.
Maximum
Cutting
Feed Rate
Specifies the maximum feed rate value for cutting moves. When
processing CLDATA, all cutting feed rates above this value are
decreased this rate.
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
Option File Properties menu option.
Parameter
Description
Minimum
Radius
Specifies the minimum possible radius value for an arc in the NC program.
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
Radius
Specifies the maximum possible radius value for an arc in the NC program.
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
Height
The bulge factor is the maximum distance between the arc and its chord.
Arc Angles
Style
Specifies angle style for Arc Start Angle and Arc End Angle. For more
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
Split
Specifies whether arcs are split into quadrants in the NC program. Some
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.
Linearisation
Method
Arcs Support
Specifies the method used to create arcs in each base plane. For each 3-axis
and 3+2-axis toolpath option, select the check box if you want to write out
arc movement commands to the NC program file; deselect the check box if
you want to write out arcs as a series of linear segments approximating the
arc.
Helical Arc
Support
Spline
Configuration
Arc interpolation
When PowerMILL saves CLDATA file with arc interpolation, it also saves arc
linearisation.
Since the CLDATA contains not only the arc attributes, but also the linearisation
sequence, you can choose what to output in the NC program.
The vector of a normal to an arc's plane plays the main role in arc definition.
Depending on this, the vector arc can take different positions in space and different
commands are used for its output to an NC program.
An arc is defined by the following:
A - Arc start point;
B - Arc end point;
C - Arc centre;
n - Vector of the normal to the arc.
The vector n defines the location of the arc, whereas the other options define the
arc itself. The following illustration shows the effects of changing the vector n of an
arc:
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 twodimensional 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).
If a trajectory is clockwise, the travel angle is negative. If the trajectory is counterclockwise, the travel angle is positive.
The Arc Travel Angle is available as both a parameter and format in Delcam
PostProcessor. This is a real value which, when used as a parameter in a
command block, must be set to the difference between the absolute start angle
(typically, zero) and the end arc angle (this should be no more than 360 degrees).
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.
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.
5.
Spline interpolation automatically creates a curve that smoothly traces
specified points. This enables high-speed and high-accuracy machining for
free shapes along a smoothly curved toolpath.
Delcam PostProcessor supports set of splines, for example Cubic Polynomial
Splines can be represented as:
C(t) = K0 + K1 * t + K2 * t ^ 2 + K3 * t ^ 3, t = (0;1)
For most controllers, K0 may be omitted.
Delcam PostProcessor has the special parameters "Spline K0x", "Spline K0y",
"Spline K0z", ... "Spline K3x", "Spline K3y", "Spline K3z". These parameters are
spline coefficients.
For example, Heidenhain MillPlus accepts splines in the following form:
G6 X51=.. Y51=.. Z51=.. X52=.. Y52=.. Z52=.. X53=.. Y53=.. Z53=..
MillPlus
Delcam
PostProcessor
X51
Spline K1x
Y51
Spline K1y
Z51
Spline K1z
X52
Spline K2x
Y52
Spline K2y
Z52
Spline K2z
X53
Spline K3x
Y53
Spline K3y
Z53
Spline K3z
Description
Drilling Hole
Top
Specifies the distance between the Z position of the tool and workpiece
surface.
Drilling Feed
Rate
Drilling Clear
Plane
Specifies the coordinate in the tool axis at which no collision can occur
between the tool and workpiece (including the clamping devices).
Drilling Peck
Depth
Drilling
Number of
Depths
Drilling Total
Depth
Drilling Dwell
Specifies the time in seconds that the tool remains at the hole bottom.
Drilling First
Depth
Drilling Hole
Diameter
Drilling
Retract 2nd
Height
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:
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.
Expand Threading Cycles - if the controller does not support standard threading
cycles, select this option to replace the cycles with a series of helices in the NC
program file.
box
to
Profiles Select an entry in this list to specify the axis modes supported by the
target controller. These profiles specify the presets that control the coordinates
output using commands and parameters.
You are advised to set Automatic Coordinate Control to On to gain
maximum multi-axis and workplane control, although you should pay special
attention to this when Drilling.
Machine Attach Point This determines the X, Y and Z coordinates of the
machine's drive point. The available options are:
Tool Tip (used in the majority of cases),
Gauge Face
Pivot
Many calculations inside Delcam PostProcessor depend on the
Machine Attach Point setting.
Force Attach Point to Tool Tip for 3-axis Select Yes to force a Machine Attach
Point of Tool Tip for 3-axis cases regardless of the Machine Attach Point
setting.
Use Smart Axis Mode Detection Sets traditional or new method to define
Toolpath Axis Mode:
Yes (default). Toolpath Axis Mode is set dependently on behavior of
real moves contained in a toolpath.
No. Old-style Toolpath Axis Mode definition based on special CLDATA
records.
Description
Command
Set Workplane
On
Set Workplane
Off
These commands are used to turn the local workplane On and Off.
They are used only when Automatic Coordinate Control is On and
the controller includes 3+2 support.
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.
Set Multi-Axis
On
Set Multi-Axis
Off
Workplane
Setting
Toolpath Axis
Mode
Possible
Used in
States
Commands
3-Axis
3+2
MultiAxis
Workplane
Transformation
On /
Off
Description
Set MultiAxis On
Set MultiAxis Off
Workplane
Setting
when ACC is
Off.
Set
Workplane
On/Off
when ACC is
On.
RTCP (Rotation
Tool
Compensation
Point) Mode
On /
Off
Set MultiAxis On /
Off
Parameter
Possible
Used in
States
Commands
Description
On /
Off
First Move
After
Toolchange
Load Tool
First
Load Tool
Output Point
Info
Tool
Tip
Gauge
Face
Pivot
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.
Available
Presets
Default
Output
Point Mode
Notes
Preset
1:
Workplane:
Off, RTCP:
Off,
Tool
Length
Comp: Off
Gauge
Face
/
Machine
Workplane
Tool Tip /
Machine
Workplane
This preset represents the default configuration for 3axis programs. For some controllers it is not necessary
to enable Tool Length Compensation Mode in a
program (usually using the G43 code) because
compensation is automatic. For more information, see
Parameters defining output coordinates.
Preset
2:
Workplane:
Off, RTCP:
Off,
Tool
Length
Comp: On
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:
Available
Presets
Default
Output
Point Mode
Notes
Preset 1:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: Off
Gauge
Face /
Machine
Workplane
Preset 2:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: On
Tool Tip /
Machine
Workplane
This preset represents the default configuration for 3axis programs. For some controllers it is not necessary
to enable Tool Length Compensation Mode in a
program (usually using the G43 code) because
compensation is automatic - refer to Parameters
defining output coordinates.
as 3+2
As for Axis
Mode: 3+2
Default
Output
Point Mode
Notes
Preset 1:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: Off.
Gauge
Face /
Machine
Workplane
Preset 2:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: On.
Tool Tip /
Machine
Workplane
as MultiAxis
As for Axis
Mode:
Multi-Axis
Default
Output
Point Mode
Notes
Preset 1:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: Off
Gauge
Face /
Machine
Workplane
Preset 2:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: On
Tool Tip /
Machine
Workplane
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.
The presets for the other modes are:
Default
Output
Point Mode
Notes
Preset 1:
Workplane
: Off,
RTCP: Off,
Tool
Length
Comp: Off
Gauge
Face /
Machine
Workplan
e
Preset 2:
Workplane
: Off,
RTCP: Off,
Tool
Length
Comp: On
Tool Tip /
Machine
Workplan
e
Preset 3:
Workplane
: Off,
RTCP: On,
Tool
Length
Comp: On
Tool Tip /
Model
Workplan
e
as MultiAxis
As for Axis
Mode:
Multi-Axis
Default
Output
Point Mode
Notes
Preset 1:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: Off.
Gauge
Face /
Machine
Workplane
Preset 2:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: On.
Tool Tip /
Machine
Workplane
Preset 3:
Workplane:
Off, RTCP:
On, Tool
Length
Comp: Off.
Tool Tip /
Model
Workplane
The available presets for Multi-Axis Mode are as for Multi-Axis Machine with RTCP
Support.
The presets for Axis Mode: 3+2 are as follows:
Available
Presets
Default
Output
Point Mode
Notes
Preset 1:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: Off
Gauge
Face /
Machine
Workplane
Preset 2:
Workplane:
Off, RTCP:
Off, Tool
Length
Comp: On
Tool Tip /
Machine
Workplane
Preset 3:
Workplane:
Off, RTCP:
On, Tool
Length
Comp: On
Tool Tip /
Model
Workplane
Preset 4:
Workplane:
Gauge
Face /
Available
Presets
Default
Output
Point Mode
Notes
On, RTCP:
Off, Tool
Length
Comp: Off
Local
Workplane
as MultiAxis
As for Axis
Mode:
Multi-Axis
Satisfied conditions
3+2
same.
5-axis
Toolpath
Axis
Mode
3-axis
Satisfied conditions
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;
3+2
5-axis
F+3587393569946289+0002F+4037593078613281+0002F+20000000000
00000+0002
F+3406729159749328+0000F+2000349495862240+0000F+91865553025
34097+0000;
9000/2/1 (MULTAX ON) record was NOT cancelled by 9000/2/0
(MULTAX OFF) before current toolpath is started:
I
4I
38I
9000I
2I
1;
...
I
17I
71I
5000I
5I
0I
0
F+1005960559844971+0002F5279238510131836+0002F+1225378616333008+0003
F-89243219935166740003F+6409995740022847+0000F+7675407153328475+0000
F+9940394401550293+0001F-
5279238510131836+0002F+1225378616333008+0003
F+89243219935166740003F+6409995740022847+0000F+7675407153328475+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:
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.
During the procedure, a tool retracts along its current direction by the
Withdrawal Distance, using the Retract Feed Rate. Rotary angles are not
changed during the retract. Delcam PostProcessor then recalculates the
coordinates of the retracted position. It tries to find another solution for
which all angles satisfy the limits. If successful, Delcam PostProcessor
inserts the reconfigured position into the NC output and starts to move the
tool back to the position from which the retract started using the Retract
Feed Rate. Only the last part of the move uses the Plunge Feed Rate; the
Rotations Limit - this field is activated when Minimize Rotations is set to No. It
limits the number of full circular revolutions towards the centre of the interval that
Delcam PostProcessor can make when reconfiguring its position. Delcam
PostProcessor never exceeds the limit specified and rotations are stopped when
the middle of the interval or the limit is reached.
Reconfiguration Mode specifies the behaviour when the rotary axis limit is
reached:
Simple sets the simplest possible behaviour for Delcam
PostProcessor, for example causing the reconfigured position to be inserted
into a numbered block directly after the Position after retract (as in the
examples above). Also, if linearisation is used in multi-axis moves, the
reconfigured move is not linearised as it is assumed a machine can handle
this move without problems.
Example results:
N165
N166
N167
N168
N169
N170
N171
N172
N173
N174
N175
N176
N177
N178
Withdrawal Distance - the distance of the retract move where a tool moves up
out of a workpiece along its direction vector. You must enter a positive value that
provides as safe a reconfiguration as possible. The default value is 100 units (so, it
could be 100 millimetres or 100 inches, depending on which units are active).
Percentage Of Plunge Distance - the Retract and Reconfigure procedure uses
the Retract Feed Rate specified in the next field. However, when a tool goes back
to touch a workpiece (that is, when it makes a plunge), its speed must be reduced.
This percentage determines the length of the plunge - for example, if the
Withdrawal Distance is equal to 150 and the Percentage Of Plunge Distance
is 10, the plunge has a length of 15.
Retract Feed Rate - the speed of a tool during retracts. The possible states are:
Use CLDATA Skim Rate - the value of the skim rate from CLDATA is
used for the Retract and Reconfigure procedure.
Specify Feed Rate - this option opens the edit box where you can
enter the value of the feed rate you want to use for the Retract and
Reconfigure procedure.
Plunge Feed Rate - the speed of the tool when it is approaching the workpiece
after reconfiguration. The possible states are:
Use CLDATA Plunge Rate - the value of the plunge rate from
CLDATA is used for this move.
Specify Feed Rate - this option opens the edit box where you can
enter the value of the feed rate that you want to use for the plunge.
Parameter
Description
Parameter
is
Not
Initialised
Parameter
Value
Cannot be
Converted
to
specified
type
Command
is Inactive
On
Attempt
To Change
Read-Only
Parameter
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.
4.
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 difference between the angle and the current position 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:
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.
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.
Head - the rotations cause the machine head to rotate, so that the tool tip
direction is moved around the part.
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.
To set up this configuration, specify attributes for one rotary axis and set the initial
tool vector. In the illustration, the axis is directed along Y linear axis, so it is the B
Axis:
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).
Relationships between Model Workplane and Machine Workplane during
Multi-Axis Processing
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).
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.
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:
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 MTDbased 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
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
The section controls main options of output format for NC programs:
General
Blocks
NC Comments
Substitutions
String Variables
Format - General
Date and Time Format
Format - Blocks
Format - NC Comments
Substitutions
String Variables
Format - General
The General page specifies the general settings for the options file.
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 Format - General.
Parameter
Description
Time Format
Date Format
Duration
Format
Decimal
Separator
Exponent
String
MM
MMM
MMMM
dd
ddd
dddd
year of century
yy
yyyy
year
Time
h
hh
HH
minutes
mm
seconds
ss
AM or PM
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
Number
Number Of
Start Block
Maximum
Block
Number
Block
Increment
Block End
String
Block Items
Separator
Trim 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
Enable NC
Comments
Comment
Start
Comment
End
Parameter
Description
Enable
Multiline
Comments
Make
Comment
Text
Uppercase
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.
To automatically remove all non-English characters from the NC Program file, select
the Remove International Characters check box.
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.
2.
Select the Tools > Option File Report menu option or click on the
toolbar.
3.
In the Option File Report dialog, enter the location where you want
to save the HTML report, or click
4.
By default, the report includes all the elements of the option file. If you
do not want include all the elements in the report, deselect the check boxes
of the elements you want to exclude.
5.
Deselect the Data properties you want to exclude from the command
table:
State displays the state (active, inactive, disallowed) of each command.
Advanced displays any linked script functions for each command.
Preview displays a command preview for each command.
6.
Effect
A different value is
assigned to the
parameter using a
format or command,
or by CLDATA.
Subsequent changes
to the value do not
affect the flag; the
setting only changes
(to No) when the
current value is
output.
The Output Next Time
flag is set to Forced.
Event
Effect
Output of parameter's
value.
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 interface
The command block is the NC program's basic component. A block consists of
primary elements which are output, such as other nested commands, parameters
and text fragments.
A command is made up of one or more blocks, with each block containing Block
Items. A block represents an NC program string. Typically, a block begins with a
Block Number, but it can start with any element which has a carriage return
associated with it (for example, any command).
Command toolbar
Conditional Statements
Command interface allows inserting conditional statements in command block. A
conditional statement is associated with an expression which is evaluated in runtime. If the expression is true the blocks under the statement are executed and
output.
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.
Suppressed always stops the value from being written out next
time regardless of other settings
Workplane For Output - specifies workplane transformation used for coordinate
parameters. Select:
Active Workplane (default) to output the coordinates according to
the active coordinate system (this depends on the current setting of
Workplane Transformation - see Parameter Control).
CLDATA Output Workplane to output the coordinates of the block
item in the workplane from the program that generated the CLDATA file (for
example, the PowerMILL workplane).
line.
file had been generated and for each toolpath start part it contained output similar
to the one shown below:
...
N100
N110
N120
N130
N140
N150
N160
N170
N180
N190
N200
N210
...
(WORKPLANE NAME 1)
(TOOLPATH NAME decaisse )
(USINAGE 3+2)
G17 G131
D5
D0
G92 Y1540.0 X338.609 Z0.0 ROLL0.0 PITCH0.0 YAW20.0
(USINAGE 3+2)
D5
G00 Y119.527 X88.156 Z-59.542 B0.0 C20.0
G01 Z-9.542 F20000
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 NCprogram 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
N110
N120
N130
N140
N150
(WORKPLANE NAME 1)
(TOOLPATH NAME decaisse )
(USINAGE 3+2)
G17 G131
D5
D0
N160
N170
N180
N190
N200
N210
...
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 First
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.
Load Tool First with nested Load Tool command
command Inactive
. A
.
Enter the message you want to display when Delcam PostProcessor encounters the
command in the Disallowed Message field in Command Properties.
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
the first block item to show it is linked.
3.
Right-click to complete the link.
icon is displayed in
To display the block items in a link at any time, click the link
icon.
To break a link:
1.
Right-click the block item you want to unlink and select Unlink.
2.
Click the block items you want to unlink. The colour of the block item
changes to show it is no longer linked.
3.
Right-click to stop unlinking.
The link
link.
icon is removed when all the block items are removed from the
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.
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:
1.
In Explorer, right-click Commands or User Commands and select
the Add User Command menu option.
2.
In the Add Command dialog, enter a name for the new command and
click OK.
The command is added to the User Commands branch of Explorer.
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
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:
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.
1.
5.
Use the parameter properties view to edit the new parameter's
settings:
Preview displays preview for selected parameter with a value inputted to
ValueForPreview field.
ValueForPreview specifies a value for Preview output.
Name specifies the parameter name.
Notes displays extra information about the parameter.
ValueType specifies types list. Select the type of value the parameter can
hold.
Access defines how the parameter can be used. Select:
Read to specify the value of the parameter cannot be changed
by the user. This option is used for parameters whose values are
defined in the CLDATA file.
o
Read - Write to specify the user can change the value of the
parameter. Most standard parameters have Read - Write access.
o
Prefix specifies any text you want to display in front of the value
when it is output. For example, when the Prefix is X, a value of -1.23
is output as X-1.23.
Postfix specifies any text you want to display after the value when it
is output.
Format specifies the format you want to use to control how the
parameter is output.
In Group parameters, specify the options users can choose from. To
specify an option, enter a State name and its Value.
For example, if the possible Spindle Mode in CLDATA are CCW
(counter-clockwise), CW (clockwise) and OFF, you must specify the
machine code for each of these states. If a letter is required before the
codes, enter it in the Prefix field.
Editing parameters
Use the Properties view to change the settings of built-in parameters and userdefined parameters.
To edit a parameter:
1.
2.
If you want to record extra information about the parameter, click
Notes.
3.
In the Format list, select the format you want to use to control how
the parameter is output.
4.
In the Value Type list, select the type of value the parameter can
hold.
5.
In the Access list, choose how the parameter can be used. Select:
o
Read to specify the value of the parameter cannot be changed
by the user. This option is used for parameters whose values are
defined in the CLDATA file.
o
Read - Write to specify the user can change the value of the
parameter. Most built-in parameters have Read - Write access.
6.
In the Prefix field, enter any text you want to display in front of the
value when it is output. For example, when the Prefix is X, a value of -1.23
is outpu t as X-1.23.
7.
In the Postfix field, enter any text you want to display after the value
when it is output.
8.
Incremental Mode - Select True to make output values relative to
the previous value. For example, if the value to output is 10 and the previous
value was 4, Incremental Mode outputs the value as 6 (10-4). Select False
to output the actual value. Incremental Mode is allowed for most
coordinates, machine angles and real parameters created by user (see builtin parameters for more information).
9.
If you want to check how the parameter values will look when they are
output, enter a value in the ValueForPreview field. The value is displayed
in Preview field with any Prefix and Postfix, plus the effect of the currently
assigned Format.
10.
In Group parameters, specify the options users can choose from. To
specify an option, enter a State name and its Value.
For example, if the possible Spindle Mode in CLDATA are CCW (counterclockwise), CW (clockwise) and OFF, you must specify the machine code for
each of these states. If a letter is required before the codes, enter it in the
Prefix field.
o
You must define a machine value for each option in a group
parameter before using it as nothing is written to the output file when
an option is left blank.
Polar coordinates
There is another way to specify coordinates of a point named as "polar
coordinates".
Polar coordinates are useful in cases where a workpiece or part of a workpiece is
dimensioned by radius and angle. The origin of the dimensional measurements is
referred to as the "pole".
Example:
The points P1 and P2 can then be described with reference to the pole as follows:
P1 corresponds to radius =100 plus angle =30?
P2 corresponds to radius =60 plus angle =75?
Fanuc 16i
N1
N2
N3
N4
G17 G16
; enable polar coordinates mode in XY plane
G1 X120 Y100 F1000 ; linear move (X ? radius, Y ? angle)
G0 X220 Y100
; rapid move
G15
; cancel polar coordinates mode
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.
4.
In the Value field, type the expression. The expression can contain:
o
Any built-in or user parameter wrapped as %p(name)%.
o
Any of the following operators: +, -, *, /, %, (, or ).
o
Any of the following mathematical functions: abs, acos, asin,
atan, ceil cos, exp, floor, log, max, min, pow, round, sin, sqrt, tan.
For example, you can assign any of the following expressions to a parameter:
Feed Rate = max ( %p(Feed Rate)%, 100 )
X = %p(X)% + %p(User Shift X)%
User X = sin ( %p(User Angle)% ) * %p(User Radius)%
User Y = GetParamPrevValue("%p(Y)%")
Structures
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:
Creating a table
To create a new table:
1.
In the Tables tab, right-click in the Option File Explorer, select Add
Table from the context menu. The Add Table dialog is displayed.
2.
Enter a Name for the tool.
3.
Choose a Type from the drop-down list. Select:
o
Tool Table to base the number of rows on the number of tools
in the cutfile. For example:
A cutfile contains three toolpaths (Toolpath1, Toolpath2 and
Toolpath3), and two tools (tool1 for Toolpath1 and Toolpath2, and
tool2 for Toolpath3). The table contains the columns Tool Name
and Toolpath Name.
The Tool Table is output as follows in the NC program:
5.
6.
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
display the parameter properties.
to
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.
As in Format to use the setting from the format assigned to this parameter.
If you change the default As in Format setting in the command block, the
Width - Specifies the size of the output value in characters when the Width
Mode is Maximum or Constant. The value must be a positive number
between 1 and 80.
Unlimited to display the full value using the minimum number of characters.
Maximum to restrict the width of the output to the number of characters
specified in the Width field.
Constant Left Align to left align all values at the specified Width. Values
that contain fewer characters than the specified Width are padded (with
spaces by default, or with zeros when the Leading Zeros check box is
selected).
Constant Right Align to right align all values at the specified Width. Values
that contain fewer characters than the specified Width are padded (with
spaces by default, or with zeros when the Leading Zeros check box is
selected).
Imperial Unit Dependent and Metric Unit Dependent specify how values
are output when using imperial measurements and when using metric
measurements.
Name specifies the name of the format. To change the name, overwrite the
text.
Decimal Part Zero - Specifies how numeric values with trailing zeros are
represented. Select:
o XXX.000 to display trailing zeros (even when Trailing Zeros is not
selected). If Decimal Point is not selected, the display becomes
XXX000.
o XXX.0 to display one trailing zero (if Trailing Zeros is not selected).
o XXX. to display no trailing zeros (unless Trailing Zeros is selected).
o XXX to display no trailing zeros or decimal point (unless Trailing
Zeros or Decimal Point are selected).
Leading Zeros - Select True to pad numeric values with leading zeros up to
the number of characters specified in Width. For example, if Width is 7, 23.45 is output as -023.45 when this is selected.
o This option is not available when the Width Mode is Not Used.
Sign Output - Specifies the sign used to display positive and negative
values. Select:
o If Negative to display a minus character (-) in front of negative
values.
o Always to display a plus (+) character in front of positive values, and
a minus character (-) in front of negative values.
o Never to display no sign in front of values.
Trailing Zeros - Select True to pad numeric values with trailing zeros up to
the number of characters specified in Width. For example, if Width is 9, 23.45 is output as -23.45000 when True is selected.
o This option is not available when the Width Mode is Not Used.
Text Case - Specifies the character case of the value. Select:
o Not Changed to keep it as is.
o Upper to force Upper Case.
o Lower to force Lower Case.
Creating formats
To create a new format:
1.
Right-click the Formats Explorer and select the Add Format menu
option. For example:
2.
Enter a Name for the format.
3.
In the Based on list, select the format on which you want to base the
new format's properties, and click OK. The new format is displayed in the
Formats folder. For example:
o
To delete a format, select its entry in the Formats Explorer
and click the Delete button. Any parameters that use the deleted
format are re-assigned to Default format.
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:
Script
Postprocessessing behaviour may be extended by using JScript or VBScript. Userdefined functions have access to built-in functions and all option file settings. The
toolbar allows you to create script functions quickly. Refer to Command Interface
for instructions on how to associate a script function with a command.
When Delcam PostProcessor processes a command, it responds as follows:
If the command block is not associated with a script function, Delcam
PostProcessor processes the list of block items in the command and
generates the NC output. This default behaviour is equivalent to a script's
StandardResponse().
If the command block is associated with a script function, the script is
run. If the script function contains a StandardResponse(), Delcam
PostProcessor generates output from the command block as above. If the
script function contains an AdvancedResponse(), Delcam PostProcessor
generates output in accordance with the script associated with the command
referenced by the AdvancedResponse().
Creating a script
To create a script:
1.
2.
3.
Click
displayed.
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:
7.
8.
o
To add a function to the script, use the Script Functions
toolbar.
Select the command to which you want to add the script, and attach it.
Repeat step 7 to add the function to other commands.
function
Description
Adds atemplate for a new function to the end of the script.
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.
Cuts the selected script fragment to the system clipboard.
Copies the selected script fragment to the system clipboard.
Pastes the contents of the system clipboard into the Script view.
Deletes the selected script fragment.
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-94fd4569-b3c4-dffdf19ccd99&DisplayLang=en).
Then,
you
need
to
allow
script
"TurnJITDebuggingOn.reg" with content:
debugging.
Create
file
called
function complex_method()
{
var res = "";
// Some script code
debugger; // Here script executing will be stopped
// Continue script code
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
"TurnJITDebuggingOff.reg" with content:
create
and
apply
file
called
View Differences
When the comparison is complete, each element is displayed with a background
colour that indicates how it compares across the option files:
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.
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
2.
Choose desired version and run
Version.
This shortcut will start installer which sets active console and COM-server.
On Windows 64-bit edition you may set two active versions, first for 32-bit
and second for 64-bit applications.
References
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.
You can control the way in which items are output to the NC program
using tables.
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 on 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
Activate this command to switch on the Coolant Mode parameter.
The Coolant Mode parameter can be embedded within other
commands, so this command is not normally used.
Coolant off
Activate this command to switch off the Coolant Mode parameter.
The Coolant Mode parameter can be embedded within other
commands, so this command is not normally used.
Set Multi-Axis On
The Set Multi-Axis On command is used by 5-axis toolpaths. It is also used by
3+2 toolpaths when workplanes are disabled or when the controller does not
provide 3+2 support. Use the command to specify any conditions required only for
multi-axis machining.
You must select a multi-axis machine profile in the Coordinates Control settings
when processing multi-axis toolpaths.
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.
Spindle on
Activate this command to switch on the Spindle Direction Mode parameter.
The Spindle Direction Mode parameter can be embedded within
other commands, so this command is not normally used.
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
First Move After Tool Change
The First Move After Tool Change specifies the initial movement within a
toolpath following the loading of a tool. It typically sets the parameters that control
the movement from the tool start position to the point where the tool begins work.
Example First Move After Toolchange command for a Fanuc controller:
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
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.
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.
icon is
To display the block items in a link at any time, click the link
icon.
To break a link:
4.
5.
item
6.
Right-click the block item you want to unlink and select Unlink.
Click the block items you want to unlink. The colour of the block
changes to show it is no longer linked.
Right-click to stop unlinking.
The link
the link.
icon is removed when all the block items are removed from
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:
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
Load tool first
The Load Tool First command is used the first time a tool is loaded. It normally
appears in the program before the first move, and must be defined in each option
file.
Example Load Tool First command for a Fanuc controller:
Type
Name
Diameter
Tip Radius
Length
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.)
Load Tool First is used only once in the NC program. Subsequent tool
loads are performed by the Load Tool command.
Load Tool
The Load Tool command is used when the machine needs to change the tool it is
currently working with. The command is similar to the Load Tool First command,
but it normally also includes instructions to retract the tool to a safe position and
cancel the tool length compensation before changing the tool. The command must
be defined in each option file.
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
Tool
Tool
Tool
Tool
Tool
Type
Name
Diameter
Tip Radius
Length
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.
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.
Probing
You must set the appropriate machine prefix (# in the above example)
for each setting in the Parameter PropertiesEditing parameters.
The following example is for a machine using a Fanuc controller, where a specific
speed setting is used:
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
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 splinepoints 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.
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 Axis
Vector X
Arc
false
Arc Axis
Vector Y
Arc
false
Arc Axis
Vector Z
Arc
false
Arc Centre X
Arc
true
Arc Centre Y
Arc
true
Arc Centre Z
Arc
true
Arc End
Angle
Arc
true
Arc Is Full
Circle
Arc
N/A
Arc
Linearisation X
Special
false
Arc
Linearisation Y
Special
false
Arc
Linearisation Z
Special
false
Arc Middle
Point X
Arc
true
Arc Middle
Point Y
Arc
true
Parameter
Folder
Incremental
Description
Arc Middle
Point Z
Arc
true
Arc Radius
Arc
false
Arc
false
Arc Start X
Arc
true
Arc Start Y
Arc
true
Arc Start Z
Arc
true
Arc
false
Axis Mode
Move
N/A
Block Max X
Workpiece
false
Block Max Y
Workpiece
false
Block Max Z
Workpiece
false
Block Min X
Workpiece
false
Block Min Y
Workpiece
false
Arc Start
Angle
Arc Travel
Angle
Parameter
Folder
Incremental
Description
this defines the extent of the
PowerMILL material block along the
Y axis.
Workpiece
false
Block
Number
Traceability
false
CAD WP
Matrix 00
Workplanes
in World CS
false
CAD WP
Matrix 01
Workplanes
in World CS
false
CAD WP
Matrix 02
Workplanes
in World CS
false
CAD WP
Matrix 10
Workplanes
in World CS
false
CAD WP
Matrix 11
Workplanes
in World CS
false
CAD WP
Matrix 12
Workplanes
in World CS
false
CAD WP
Matrix 20
Workplanes
in World CS
false
CAD WP
Matrix 21
Workplanes
in World CS
false
CAD WP
Matrix 22
Workplanes
in World CS
false
Block Min Z
Parameter
Folder
Incremental
Description
relative to the world coordinates.
CAD WP
Origin X
Workplanes
in World CS
false
CAD WP
Origin Y
Workplanes
in World CS
false
CAD WP
Origin Z
Workplanes
in World CS
false
CAM System
Version
Number
Program
false
CLDATA
Tolerance
Toolpath
false
Traceability
N/A
Contact
Normal X
Move
false
Contact
Normal Y
Move
false
Contact
Normal Z
Move
false
Contact
Point X
Move
false
Contact
Point Y
Move
false
Contact
Point Z
Move
false
Comment
Parameter
Folder
Incremental
Description
Controller
Command
String
Traceability
N/A
Coolant
Mode
Controller
Switches
N/A
Traceability
N/A
Cutter
Compensation
Mode
Controller
Switches
N/A
Cutting
Direction
Toolpath
N/A
Toolpath
false
Special
false
Traceability
N/A
Diameter
Mode
Controller
Switches
N/A
Drilling
Chamfer
Diameter
Canned
Cycles
false
Drilling Clear
Plane
Canned
Cycles
false
Drilling
Cycle Type
Canned
Cycles
N/A
Drilling Draft
Angle
Canned
Cycles
false
Drilling
Dwell
Canned
Cycles
false
Current User
Cutting Rate
Cycle Hole
Top PMill
Date
Parameter
Folder
Incremental
Description
Drilling
Expanded
Cycle Mode
Canned
Cycles
N/A
Drilling Feed
Rate
Canned
Cycles
false
Drilling Feed
Reduction
Distance End
Canned
Cycles
false
Drilling Feed
Reduction
Distance Start
Canned
Cycles
false
Drilling Feed
Reduction End
Canned
Cycles
false
Drilling Feed
Reduction
Start
Canned
Cycles
false
Drilling Final
Pass
Canned
Cycles
false
Drilling Final
Pass Location
Canned
Cycles
false
Drilling First
Depth
Canned
Cycles
false
Drilling Hole
Depth
Canned
Cycles
false
Drilling Hole
Diameter
Canned
Cycles
false
Drilling Hole
Top
Canned
Cycles
false
Drilling Lead
Distance
Canned
Cycles
false
Drilling
Minimum Peck
Canned
Cycles
false
Canned
N/A
Drilling
Parameter
Folder
Incremental
Description
Number of
Depths
Cycles
Drilling
Overlap Angle
Canned
Cycles
false
Drilling Peck
Decrement
Canned
Cycles
false
Drilling Peck
Depth
Canned
Cycles
false
Drilling
Rapid Retract
Canned
Cycles
N/A
Drilling
Retract 2nd
Height
Canned
Cycles
false
Drilling
Retract Factor
Canned
Cycles
false
Drilling
Retract Feed
Factor
Canned
Cycles
false
Drilling
Retract Mode
Canned
Cycles
N/A
Drilling
Secondary
Multiaxis Clear
Plane
Special
false
Drilling Start
Offset
Canned
Cycles
false
Drilling Step
Over
Canned
Cycles
false
Drilling Sub
Peck
Canned
Cycles
false
Drilling
Thread Pitch
Canned
Cycles
false
Parameter
Folder
Incremental
Description
Drilling Total
Depth
Canned
Cycles
false
Drilling User
Parameter
Canned
Cycles
false
Dumb Tool
Length
Traceability
false
Dwell
Traceability
false
Euler A
Move
false
Euler B
Move
false
Euler C
Move
false
Feed Mode
Controller
Switches
N/A
Feed Rate
Move
false
Feed Rate
Type
Move
N/A
Fixture
Offset Type
Toolpath
N/A
Fixture
Offset X
Toolpath
false
Fixture
Offset Y
Toolpath
false
Fixture
Offset Z
Toolpath
false
Parameter
Folder
Incremental
Description
From X
Program
true
From Y
Program
true
From Z
Program
true
Program
N/A
Machine A
Move
true
Machine A
Roll Over
Move
N/A
Machine A
Rotation
Move
N/A
Machine B
Move
true
Machine B
Roll Over
Move
N/A
Machine B
Rotation
Move
N/A
Machine C
Move
true
Machine C
Roll Over
Move
N/A
Machine C
Rotation
Move
N/A
Machine D
Move
true
Machine D
Roll Over
Move
N/A
Machine D
Rotation
Move
N/A
Input Linear
Units
Parameter
Folder
Incremental
Description
Machine E
Move
true
Machine E
Roll Over
Move
N/A
Machine E
Rotation
Move
N/A
Machine F
Move
true
Machine F
Roll Over
Move
N/A
Machine F
Rotation
Move
N/A
Machine G
Move
true
Machine G
Roll Over
Move
N/A
Machine G
Rotation
Move
N/A
Machine H
Move
true
Machine H
Roll Over
Move
N/A
Machine H
Rotation
Move
N/A
Machine L
Move
true
Machine L
Roll Over
Move
N/A
Machine L
Rotation
Move
N/A
Machine M
Move
true
Machine M
Roll Over
Move
N/A
Parameter
Folder
Incremental
Description
Machine M
Rotation
Move
N/A
Machine N
Move
true
Machine N
Roll Over
Move
N/A
Machine N
Rotation
Move
N/A
Machine O
Move
true
Machine O
Roll Over
Move
N/A
Machine O
Rotation
Move
N/A
Machine P
Move
true
Machine P
Roll Over
Move
N/A
Machine P
Rotation
Move
N/A
Machine Q
Move
true
Machine Q
Roll Over
Move
N/A
Machine Q
Rotation
Move
N/A
Machine R
Move
true
Machine R
Roll Over
Move
N/A
Machine R
Rotation
Move
N/A
Machine S
Move
true
Parameter
Folder
Incremental
Description
Machine S
Roll Over
Move
N/A
Machine S
Rotation
Move
N/A
Machine T
Move
true
Machine T
Roll Over
Move
N/A
Machine T
Rotation
Move
N/A
Machine U
Move
true
Machine V
Move
true
Machine W
Move
true
Machine X
Move
true
Machine Y
Move
true
Machine Z
Move
true
Max Cutting
Rate
Option File
Settings
false
Max Rate
Option File
Settings
false
Motion Mode
Controller
Switches
N/A
Move Type
Move
N/A
NC Program
Name
Program
N/A
NC Program
Path
Program
N/A
Option File
Settings
false
NC Program
Parameter
Folder
Incremental
Tolerance
Description
linearisation.
Optfile
Author
Option File
Info
N/A
Optfile
Controller
Manufacturer
Option File
Info
N/A
Optfile
Controller
Series
Option File
Info
N/A
Optfile
Created Date
Option File
Info
N/A
Optfile
Customer
Option File
Info
N/A
Optfile Last
Modified Date
Option File
Info
N/A
Optfile
Machine Tool
Manufacturer
Option File
Info
N/A
Optfile
Machine Tool
Model
Option File
Info
N/A
Option File
Info
N/A
Optfile
Special Note
Option File
Info
N/A
Optfile
Version
Option File
Info
N/A
Orientation
Vector X
Move
false
Orientation
Vector Y
Move
false
Orientation
Vector Z
Move
false
Optfile Name
Parameter
Folder
Incremental
Description
Output
Angular Units
Option File
Settings
N/A
Output
Linear Units
Option File
Settings
N/A
Output Point
Info
Move
N/A
Output Point
Mode
Move
N/A
Output
Rotation
Matrix 00
Workplane
false
Output
Rotation
Matrix 01
Workplane
false
Output
Rotation
Matrix 02
Workplane
false
Output
Rotation
Matrix 10
Workplane
false
Output
Rotation
Matrix 11
Workplane
false
Output
Rotation
Matrix 12
Workplane
false
Output
Rotation
Matrix 20
Workplane
false
Output
Rotation
Workplane
false
Parameter
Folder
Incremental
Matrix 21
Description
relative to the global coordinates.
Workplane
false
Traceability
N/A
Special
N/A
Plane Mode
Controller
Switches
N/A
Plunge Rate
Toolpath
false
Polar Angle
Move
false
Polar Centre
Move
false
Polar Centre
Move
false
Polar Centre
Move
false
Polar Radius
Move
false
PPfun
Traceability
N/A
Probing
Approach
Distance
Probing
false
Probing
Expected
Touch Point X
Probing
true
Output
Rotation
Matrix 22
Part Name
Permanent
Comment
Parameter
Folder
Incremental
Description
Probing
Expected
Touch Point Y
Probing
true
Probing
Expected
Touch Point Z
Probing
true
Probing Is
Composite
Move
Redirection
Special
N/A
Probing Is
Composite
Move Used
Probing
N/A
Probing
Move Speed
Probing
false
Probing
Retract
Distance
Probing
false
Probing
Search
Direction I
Probing
false
Probing
Search
Direction J
Probing
false
Probing
Search
Direction K
Probing
false
Probing
Search
Distance
Probing
false
Probing
Stylus
Direction X
Probing
false
Probing
Stylus
Direction Y
Probing
false
Parameter
Folder
Incremental
Description
Probing
Stylus
Direction Z
Probing
false
Probing
Target Point X
Probing
true
Probing
Target Point Y
Probing
true
Probing
Target Point Z
Probing
true
Probing
Touch Speed
Probing
false
Product
Version
Traceability
N/A
Program
Cutting
Duration
Program
N/A
Program
Number
Program
N/A
Program X
Max
Program
false
Program X
Min
Program
false
Program Y
Max
Program
false
Program Y
Min
Program
false
Program Z
Max
Program
false
Program Z
Min
Program
false
Project
Name
Program
N/A
Parameter
Folder
Incremental
Description
Quaternion
Move
false
Quaternion
Move
false
Quaternion Y
Move
false
Quaternion
Move
false
RR Origin X
Retract and
Reconfigure
true
RR Origin Y
Retract and
Reconfigure
true
RR Origin Z
Retract and
Reconfigure
true
RR Plunge X
Retract and
Reconfigure
true
RR Plunge Y
Retract and
Reconfigure
true
RR Plunge Z
Retract and
Reconfigure
true
RR Safe X
Retract and
Reconfigure
true
RR Safe Y
Retract and
Reconfigure
true
RR Safe Z
Retract and
Reconfigure
true
Retract and
Reconfigure
false
Controller
Switches
N/A
RR
Withdrawal
Distance
RTCP Mode
Parameter
Folder
Incremental
Description
Skim
Distance
Toolpath
false
Toolpath
false
Spindle
Mode
Controller
Switches
N/A
Spindle
Speed
Move
false
Spline K0x
Spline
false
Spline K0y
Spline
false
Spline K0z
Spline
false
Spline K1x
Spline
false
Spline K1y
Spline
false
Spline K1z
Spline
false
Spline K2x
Spline
false
Spline K2y
Spline
false
Spline K2z
Spline
false
Spline K3x
Spline
false
Spline K3y
Spline
false
Spline K3z
Spline
false
Spline Knot
Spline
false
Skim Rate
Parameter
Folder
Incremental
Description
Spline Knot
Spline
false
Spline Knot
Spline
false
Spline Knot
Spline
false
Spline Knot
Spline
false
Spline Knot
Spline
false
Spline Knot
Spline
false
Spline Knot
Spline
false
Spline Mode
Spline
N/A
Spline Order
Spline
N/A
Traceability
N/A
Toolpath
false
Thread
Milling
Allowance
Canned
Cycles
false
Thread
Milling Cuts
Number
Canned
Cycles
false
Thread
Milling Lead
Angle
Canned
Cycles
false
Thread
Milling Turns
Canned
Cycles
false
Split
Segment
Number
Thickness
Parameter
Folder
Incremental
Description
Time
Traceability
N/A
Time - Day
Traceability
N/A
Time - Hour
Traceability
N/A
Time - Min
Traceability
N/A
Traceability
N/A
Time - Sec
Traceability
N/A
Time - Year
Traceability
N/A
Tool
Compensation
Length
Tool
false
Tool
Compensation
Radius
Tool
false
Tool Cutting
Duration
Tool
N/A
Tool Cutting
Length
Tool
false
Tool
Diameter
Tool
false
Tool Flutes
Number
Tool
false
Tool Gauge
Length
Tool
false
Number
Time Month
Parameter
Folder
Incremental
Description
Tool Index
Tool
N/A
Tool Length
Tool
false
Tool Length
Compensation
Mode
Controller
Switches
N/A
Tool Length
Offset Number
Tool
false
Tool Life
Traceability
false
Tool Name
Tool
N/A
Tool Name
Next
Tool
N/A
Tool Number
Tool
false
Tool Number
Next
Tool
false
Tool Output
Point
Tool
N/A
Tool
Overhang
Tool
false
Tool Radius
Offset Number
Tool
false
Tool Taper
Angle
Tool
false
Tool Tip
Radius
Tool
false
Tool Tip
Radius X
Tool
false
Parameter
Folder
Incremental
Description
Tool Tip
Radius Y
Tool
false
Tool
N/A
Tool Vector
From X
Program
false
Tool Vector
From Y
Program
false
Tool Vector
From Z
Program
false
Tool Vector
Move
false
Tool Vector
Move
false
Tool Vector
Move
false
Toolpath
Axis Mode
Move
N/A
Toolpath
Axis Mode
Commanded
Move
N/A
Toolpath
Cutting
Duration
Toolpath
N/A
Toolpath
Cutting
Strategy
Toolpath
N/A
Toolpath
Index
Toolpath
N/A
Toolpath
Length
Toolpath
false
Toolpath
Name
Toolpath
N/A
Tool Type
Parameter
Folder
Incremental
Description
Toolpath
Strategy
Subtype
Toolpath
N/A
Toolpath
Type
Toolpath
N/A
Toolpath X
Max
Toolpath
false
Toolpath X
Min
Toolpath
false
Toolpath Y
Max
Toolpath
false
Toolpath Y
Min
Toolpath
false
Toolpath Z
Max
Toolpath
false
Toolpath Z
Min
Toolpath
false
User Defined
Parameter
Name
Program
N/A
User Defined
Parameter
Value
Program
N/A
Variable
Feed Rate
Toolpath
N/A
Workpiece
Coordinate
System
Number
Workpiece
N/A
Workplane
Definition
Mode
Option File
Settings
N/A
Parameter
Folder
Incremental
Description
Workplane
Euler A
Workplane
false
Workplane
Euler B
Workplane
false
Workplane
Euler C
Workplane
false
Workplane
Origin X
Workplane
true
Workplane
Origin Y
Workplane
true
Workplane
Origin Z
Workplane
true
Workplane
Output Name
Workplane
N/A
Workplane
Toolpath Name
Workplane
N/A
Workplane
Transformation
Mode
Controller
Switches
N/A
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
Parameter
Folder
Incremental
Description
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
Parameter
Folder
Incremental
Description
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP Machine
Move
true
WP mxs X
Workplane
false
WP mxs Y
Workplane
false
WP mxs Z
Workplane
false
WP Safe Z
Workplane
false
WP Start Z
Workplane
false
Move
true
Move
true
Move
true
Traceability
N/A
Zero Tool
Length
Built-in functions
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.
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)
comment = GetParamPrevValue("%p(Workplane Output Name)%");
// Returns a string containing the name of the previous workplane used.
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.
x_coord = GetParamPrevValue("%p(X)%", false);
// Returns the unrounded REAL value of the X coordinate from the previous move.
frame_number = GetParamPrevValue("%p(Block Number)%");
// Returns the previous block number.
// ---------------------------------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)
// This script is called by the "Main" command.
if (GetParam("%p(Program Number)%") < 1000) {
OutputExtension = "mpf";
}
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
Postprocessor transforms the argument to the required type.
possible,
the
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
In the following function, FQ is set to 1, 2, 3 or 4 depending on whether the feed
rate set is a Plunge Rate, Cutting Rate, Skim Rate or Max Rate. The function
can then be associated with the Move Rapid, First Move after Toolchange,
Circular Move YZ ,Circular Move XZ and Circular Move XY commands.
JScript
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")
}
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
The following is a function called Parametric_Feedrates, written in both JScript
and VBScript. The function is called from the following commands: Move Rapid,
First Move after Toolchange, Circular Move YZ ,Circular Move XZ and
Circular Move XY, and outputs parametric feed rates for a Heidenhain machine
using the Qdef function. The StandardResponse() function at the end of each
script (JScript and VBScript) ensures the command block is output.
JScript
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:
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)
The UserError() function can allow a variety of data types to be returned:
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:
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 userdefined 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)
The UserWarning() function can allow a variety of data types to be returned:
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 MultiAxis 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")
The syntax:
Console {optfile.pmopt} {input} [output] [parameters]
Keys:
optfile.pmopt
input
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.
parameters
Errors
NCB0003
Error message
Minimum arc radius is greater than maximum arc radius.
Description
Possible set wrong arc configuration on Arcs and Splines page.
NCB0010
Error message
Unrecognised command name in advanced script (value)
NCB0011
Error message
Unrecognised parameter name in advanced script (value)
NCB0028
Error message
Cannot output undefined state value (value) from group parameter 'param'
NCB0032
Error message
Arc linearisation tolerance value is too small
NCB0034
Error message
Wrong language identifier (value)
NCB0037
Error message
Cyclic nested structure
NCB0039
Error message
Cyclical links in block
NCB0045
Error message
Block number values are incorrect
NCB0054
Error message
Transformation to local workplane can't be used during continuous 5-Axis
NCB0058
Error message
Syntax error in the advanced script
NCB0059
Warning message
Type conversion has failed for 'param'
NCB0083
Error message
Cannot define Probing Search Direction as Search Start Point coincides with Probing
Target Point
NCB0084
Error message
Start block number can't be negative
NCB0085
Error message
Block increment can't be negative
NCB0086
Error message
Minimum Feed Rate can't be negative
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
All feed rates values are set to zero
NCB0090
Error message
Parameter 'param' does not exist.
NCB0092
Error message
Output file isn't set.
NCB0093
Error message
Cannot use 'value' object in advanced script. Enable access to XML model at runtime
NCB0095
Error message
Command disallowedvalue value
NCB0096
Warning message
Parameter 'param' isn't initialised
NCB0098
Error message
Cyclical nesting of 'command' command
NCB0099
Error message
Multi-Axis drilling cycles aren't enabled in the option file
NCB0100
Error message
Multi-Axis drilling cycle can't be processed without Automatic Coordinate Control
(ACC)
NCB0101
Error message
Multi-Axis drilling cycle can't be processed. Turn ON Local Workplane for 3+2
trajectories
NCB0106
Warning message
Command inactive: command.
NCB0107
Warning message
Can't change 'Read Only' parameter param. Set 'Read/Write' access for current
parameter.
NCB0108
Error message
Euler convention value doesn't exist.
NCB0109
Error message
Parameter 'param' cannot be accessed as a coordinate as it has different type.
NCB0110
Warning message
Cannot set 'param' as there is no corresponding axis in the machine kinematics.
NCB0116
Error message
Expansion of value cycles are not supported. Upgrade your CAM system.
NCB0125
Warning message
Move by Z with cutter compensation.
NCB0129
Error message
There is not string variable value in list.
NCB0130
Error message
String variables value start the loop.
NCB0132
Error message
Incorrect key name value in command SetStringVariables.
NCB0133
Error message
Script function value cannot call postprocessing of current command.
NCB0134
Error message
Parameter value is invalid. Expansion of value cycle cannot be processed.
NCB0135
Error message
'Tapping' and 'Rigid Tapping' cycles cannot be expanded.
NCB0199
Error message
User error.
NCB0207
Error message
Can't initialise
incorrectly
value
calculation
engine.
Machine
kinematics
is
configured
NCB0213
Error message
Toolvector can't be zero
NCB0219
Error message
Negative tool length is not allowed
NCB0227
Error message
Undefined Tool direction of aim position
NCB0229
Error message
Linear axis coordinate limit exceeded. value.
NCB0230
Error message
Can't find linear machine coordinates to reach the aim tool position.
NCB0232
Error message
Rotary axis coordinate limit exceeded. value.
NCB0233
Error message
Can't reach desired tool direction (value, value, value).
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
Retract and Reconfigure cannot be processed.
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
Impossible to use multiaxis linearization: tool directions of two neighbouring
positions are anti-parallel.
NCB0239
Error message
Failed to process a singular position - NC Program Tolerance is too accurate.
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
No Delcam PostProcessor licence (value)
NCB0245
Error message
No Delcam PostProcessor Multi-Axis licence (value)
NCB0247
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
Active table object is undefined.
NCB0251
Warning message
During a connection move tool directions of two neighbouring positions are antiparallel: 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
Licence error: value
NCB0254
Warning message
New output extension 'value' contains forbidden characters. Changing extension
was ignored.
NCB0256
Warning message
Linearisation of Retract and Reconfigure moves has been failed.
NCB0257
Warning message
Block item (value:value)
'command'.
overlaps
'value'
text
with
'value'.
Command:
NCB0258
Error message
'if(..)' condition marker expected
NCB0259
Error message
'end if' condition marker expected
NCB0617
Error message
Minimum value value for axis 'value' is greater than maximum value value.
NCB0618
Error message
Initial value value of axis 'value' is out of range: [value, value].
NCB0619
Error message
Axis vector for axis 'value' has zero normal
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
Feed Rate value (value) beyound the limit.
NCB0642
Warning message
Spindle Speed value (value) beyound the limit.
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
Minimum Feed Rate value is zero.
NCB0646
Warning message
Maximum Cutting Feed Rate value is zero.
NCB0647
Warning message
%%pr(FM)%% is set to INVERSE_TIME but PostProcessor ommits its calculation
when Workplane Transformation is ON.
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
Origin workplane cannot be reached by machine angles.
NCB0653
Warning message
Function 'value' undefined.
NCB0654
Warning message
Floatig point value cannot be formatted.
NCB0655
Warning message
Used machine coordinate parameter is not linked to any machine axis.
NCB0656
Warning message
Input orientation vector is not orthogonal to tool vector
NCB0810
Warning message
Diverging tool vector (value; value; value) corrected by (value; value; value)
NCB0811
Warning message
Workplane adjusted in order to match tool vector and orientation.
NCB0814
Warning message
Parameter 'param' cannot be recalculated.
NCB0815
Warning message
Value of 'Split Part Postfix' should contain '_%%part' mask.
NCB0816
Error message
Wrong default value for 'param'
D0070
Warning message
Field is empty.
Description
Possible one from following fields is empty:
Controller,
Machine Tool,
Decimal separator,
Exponent String.
D0071
Warning message
Feed rate limit has zero value.
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
Radius limit value is out of range.
Description
Correct following values:
Minimum Radius,
Minimum Arc Height,
Maximum Radius.
D0075
Warning message
block start number can't be negative.
Description
Correct Number of Start Block, it should be greate then zero.
D0076
Warning message
Parameter is not initialised.
D0077
Warning message
Command must be enabled.
Description
As a minimum, the following commands should be activated and specified in each
option file:
Program Start
Load Tool First
Load Tool
Move Rapid
Move Linear
Circular Move YZ, if the Arcs option is selected for Arcs and Splines.
Circular Move XZ, if the Arcs option is selected for Arcs and Splines.
Circular Move XY, if the Arcs option is selected for Arcs and Splines.
Spline Move, if Spline Configuration Output is set to Polynomial.
Program End
D0078
Warning message
command '{0}' must contain parameter '{1}'.
D0079
Warning message
only one format is defined.
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
Group parameter contain less than 2 states.
Description
Group parameter uses as switch and should two and greater states.
D0081
Warning message
State of group parameter isn't defined.
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
'if(..)' condition marker expected
D0084
Warning message
Command 'name' isn't defined.
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
command ID is no longer valid.
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
function name() has incorrect argument.
D0089
Warning message
command must contain parameter
D0090
Warning message
parameter ID is no longer valid.
D0091
Warning message
parameter with name 'name' isn't defined.
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
block number values are incorrect.
Description
Block Number configuration should match following rules:
Block
D0093
Warning message
block increment must be positive.
Description
Correct value of Block Increment, it should be greater than zero.
D0094
Warning message
'Feedrate Value' can not be less than 'Minimum'.
D0095
Error message
'end if' condition marker expected
D1001
Error message
Machine Axis: Direction cannot be Null.
D1002
Error message
Machine Axis: Maximum Limit cannot be less than Initial Value.
D1003
Error message
Machine Axis: Initial Value cannot be less than Minimum Limit.
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
Head: Orientation vector is null.
D1010
Error message
Head: Orientation vector isn't orthogonal with initial tool vector.
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.
Escape sequences
To include any of the following special characters in a string, use the associated
escape sequence:
Character
ASCII
Representation
ASCII
Value
Delcam PostProcessor
6.0
Escape Sequence
New Line
NL (LF)
10 or
0x0a
\n
Horizontal
Tab
HT
\t
Vertical tab
VT
11 or
0x0b
\v
Carriage
Return
CR
13 or
0x0d
\r
Form Feed
FF
12 or
0x0c
\f
Back Slash
92 or
0x5c
\\
Question
Mark
63 or
0x3f
\?
Single
Quotation
Mark
'
39 or
0x27
\'
Double
Quotation
Mark
"
34 or
0x22
\"
Hexadecimal
Number
hh
\xhh
For example, type Line 1\nLine 2 into a text string to generate the following
output:
Line 1
Line 2
Previous
Sequence
Escape
Character
Representation
Replacement
;cr
CR LF
\r\n
;amp
&
&
;apos
'
\' or '
;quot
"
\" or "
;lt
<
<
;gt
>
>
;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.