Вы находитесь на странице: 1из 56

CAM/SIM MACH Content

DOCUMENTATIONABOUTTHE
MACHSIMULATIONCONTENTNX9
1
2
3
4
5

Highlights - new with NX9 ....................................................................................................... 3


Overview ................................................................................................................................. 3
Load Options .......................................................................................................................... 3
CAM-Setup ............................................................................................................................. 4
MCS-Handling (Best practice for the OOTB examples) .......................................................... 5
5.1
5.2
5.3

About Post Processors ........................................................................................................... 7


6.1
6.2
6.3
6.4
6.5
6.6
6.7

7
8
9

General settings and rules .............................................................................................................................. 5


Special rules and settings for Mill-Turn machine tools. .................................................................................. 6
Library machine tool specific handling ............................................................................................................ 7
General supported features of the OOTB Posts ............................................................................................. 7
Creating file with tool and offset data.............................................................................................................. 8
MOM variable for MCS handling..................................................................................................................... 9
Differences between pure template posts and OOTB posts (Sinumerik) ................................................... 10
About UDEs and OOTB ................................................................................................................................ 10
Post output for Coolant (Sinumerik, TNC, Fanuc) ........................................................................................ 10
About Special handling for 5 axis motions with Fanuc for table machine tool configuration ........................ 10

About CAM Programming ..................................................................................................... 11


Using the library tools ........................................................................................................... 12
About CSE Simulation Drivers .............................................................................................. 12
9.1
9.2
9.3
9.4

Handling of Offsets: ...................................................................................................................................... 12


Handling of the tool change .......................................................................................................................... 13
Handling the reference point (Fanuc) ........................................................................................................... 14
Handling of tool correction data .................................................................................................................... 14

10 About Sinumerik Cycles in the content ................................................................................. 15


11 About swiveling cycles .......................................................................................................... 15
11.1
11.2
11.3

Swiveling on Heidenhain .............................................................................................................................. 16


Swiveling in Sinumerik - CYCLE800............................................................................................................. 17
Swiveling in Fanuc - G68.2 ........................................................................................................................... 18

12 Example specific considerations ........................................................................................... 18


12.1
12.2
12.3
12.4
12.5
12.6

SIM01: ........................................................................................................................................................... 18
SIM03: ........................................................................................................................................................... 18
SIM05: ........................................................................................................................................................... 19
SIM10: ........................................................................................................................................................... 20
SIM11 SIM13 - Fanuc: ............................................................................................................................... 20
SIM13: ........................................................................................................................................................... 20

13 The Mill-Turn Example sim15 ............................................................................................... 20


13.1
13.2
13.3
13.4
13.5
13.6
13.7
13.8
13.9

Kinematics Configuration .............................................................................................................................. 21


ONT Coordinate systems setup.................................................................................................................... 22
Tool Change ................................................................................................................................................. 23
About Spindles .............................................................................................................................................. 24
TRANSMIT Operation and other milling motion types.................................................................................. 24
TRAORI simultaneously 5-Axis milling ......................................................................................................... 25
Handling of special features like part transfer, moving sub-spindle and jaws .............................................. 25
Multiple Chains ............................................................................................................................................. 28
Definition of Tools and related Settings (not specific for sim15) .................................................................. 28

14 The Head-Change Example SIM16 ...................................................................................... 30


14.1
14.2
14.3
14.4

About the machine tool kinematics ............................................................................................................... 30


About the head kinematics defined as devices ............................................................................................ 31
About the Post and CAM setup .................................................................................................................... 32
About the CSE Driver.................................................................................................................................... 33

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 1 / 56

CAM/SIM MACH Content


14.5

Changes in the MCF for the head change .................................................................................................... 34

15 Sim09 becomes a Turn-Mill machine Tool ............................................................................ 37


15.1
15.2

Kinematic Configuration ................................................................................................................................ 37


Changes of the Post ..................................................................................................................................... 40

16 Creating your own CSE examples based on the OOTB mach examples ............................. 41
17 Appendix ............................................................................................................................... 42
A.
B.
C.
D.
E.
F.
G.
H.
I.
J.
K.

Example NC code TRAORI and circles ........................................................................................................ 42


Detailed information about ini files ................................................................................................................ 42
Example of a tool change subprogram ......................................................................................................... 43
Post Processor features of the OOTB examples .......................................................................................... 44
Example of an INI file .................................................................................................................................... 45
Swiveling Cycles ........................................................................................................................................... 45
PLANE SPATIAL .......................................................................................................................................... 45
CYCLE800 .................................................................................................................................................... 47
G68.2 ............................................................................................................................................................ 51
Default controller settings inside the CCFs................................................................................................... 52
OOTB MCS Handling output details ............................................................................................................. 54

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 2 / 56

CAM/SIM MACH Content

1 Highlights - new with NX9


Update sim09 to have a turning table and act as turn-mill machine tool
Sim15 is enhanced and comes with an updated CAM example and with improved
programming capabilities for the sub spindle plus movable jaws on chucks
Clean-Up MTD drivers have separate folder for legacy reason
Add for sim05 OKUMA with Post and Parser
Add tomb-stone sim03 using new feature Paste with reference function and post outputs
subroutines
Introduce level based CCF plus controller CCF
Post: S840D postprocessor based on Sinumerik_840D_basic template post.

2 Overview
This document explains the handling and usage of the simulation examples provided out-of-thebox (OOTB) with NX Version 9. The example data is mainly contained in two locations: one is for
the library machine tool models in the
$UGII_CAM_BASE_DIR/resource/library/machine/installed_machines folder, the other for the
CAM examples utilizing the library machine tools. These CAM examples can be found under
$UGII_CAM_BASE_DIR/samples/nc_simulation_samples. All of the machine tools in the library have
preconfigured geometry, assembly and kinematics models as well as post processors and CSE
controller models for the major controller types Siemens SINUMERIK 840D, Fanuc family and
TNC Heidenhain Conversational; posts are available for metric and inch units. For all machine
tools in the library there is at least one CAM setup example available. The intention of these
examples is to show best practice and to demonstrate the features of the NX CAM built-in
machine simulation. Another intended use of the examples is as seed parts for customer specific
simulation.
NOTE: The examples cannot contain or show every possible feature of NX CAM, NX Post and
ISV. In certain cases such as complex or multi-function machine tools, and in order to achieve
advanced capabilities, specific customization of the provided posts and/or controller models will
be necessary.

3 Load Options
To ensure all related assembly component parts are loaded correctly it is recommended to use
the "From Search Folder" load option with the following search paths. Be certain to include the
three dots at the end of each path. Leave the Use Partial Loading - option unchecked'

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 3 / 56

CAM/SIM MACH Content

4 CAM-Setup
When creating a new CAM setup with the provided set of machine tools, the following best
practice is suggested. It is assumed that the CAD geometry of the part to be machined already
exists.
Open the CAD part file in NX
Select New and pick an appropriate entry in the Manufacturing tab.

The system will automatically create a master-model-concept-part-file referencing your


CAD geometry.

Create a Wave link to the CAD geometry

Select the body of the CAD model for the Wave object and hide the CAD component in the
assembly navigator

To prepare for material removal simulation it is recommended to have the blank geometry
pre-defined as well. In the example shown it is a simple cylinder added to the assembly.

Starting with NX9 all CAM setups part files in the sample folder are pre-configured to be used as
template or seed parts.
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 4 / 56

CAM/SIM MACH Content

5 MCS-Handling (Best practice for the OOTB examples)


In order to achieve a complete and reliable machine simulation, different modules need to play
together. These are:

CAM programming structure in the Operation Navigator (ONT),


Internal Post Processor (MOM inside NX),
TCL based post processor
Simulation controller model.

A few rules need to be considered for NX CAM setup to support the assigned post processor
creating a valid NC code which can be used at the physical machine tool as well as for
simulation.

5.1

General settings and rules

Each CAM setup example using one of our OOTB MACH machine tools must not include
more than one single MCS with the purpose Main
The Main MCS needs to be placed at the same location and orientation as the
MACHINE_ZERO coordinate junction of the machine tool.
NOTE: This was used to tell the post processor the position of the machine zero position prior
NX8.5. Starting with NX8.5 the post has access to the junctions in the kinematics model. For
more details refer to Creating file with tool and offset data. The examples still include the MAIN
MCS to represent the Machine Zero Position; this is due to planned future improvements and
enhancements for a better usability.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 5 / 56

CAM/SIM MACH Content

All other used MCSs in the ONT need to be of purpose Local


If the Special Output of the local MCS is Fixture Offset, the post processor will output a
fixture offset statement based on the number of the Fixture Offset.
E.g. if Fixture Offset is 2:
G55
-> SINUMERIK
G55
-> Fanuc
CYCL DEF 7.0
-> TNC (7.1/2/3 will include the offset values e.g. CYCLDEF 7.1 X 100)
The Sinumerik Post will create an to_ini.ini file including the offset vector from the local
MCS with fixture offset number to the Main MCS and output that like
$P_UIFR[2]=CTRANS()
It is not suggested to use fixture offset number 0, which will output a $P_UIFR[0] and that
is mainly the machine zero system defined with the Main MCS object
If the Special Output of the local MCS is CSYS Rotation the postprocessor will output a
special statement to indicate a translation and/or a rotation. The fixture offset number must
always inherit its value from the parent MCS object.
TRANS/ROT or CYCLE800 (based on UDE)
-> SINUMERIK
G68
-> Fanuc
PLANE SPATIAL
-> TNC
With these settings the example will look like:
MCS Name
MCS_MAIN
| MCS_G54
| MCS_G55
| ROT

Purpose
Main
Local
Local
Local

Fixture Offset
0
1
2
2 (inherit)

Special Output
Fixture Offset
Fixture Offset
CSYS Rotation

Post S840D

Post Fanuc

Post TNC

G54
G55
CYCLE800

G54
G55
G68.2

CYCL DEF 7.0


CYCL DEF 7.0
PLANE SPATIAL

More details and example are shown in Appendix: OOTB MCS Handling output details
For the OOTB post, operations must not be placed under MCS objects with the special
output none or Use Main MCS. In such cases the post will not identify the correct offset
for the operation and the offset creation in the to_ini.ini files will fail.

5.2

Special rules and settings for Mill-Turn machine tools.

Working with Mill-Turn machines the work piece spindle object needs to be represented in the
ONT. Therefore a MCS Spindle object is mandatory. That MCS object needs to be aligned with
the work piece spindle and the X/Y or Z/X plane represents the lathe work plane. Also the Lathe
axis needs to be aligned with the spindle axis. Working with multiple spindles e.g. Main and sub,
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 6 / 56

CAM/SIM MACH Content


each spindle needs to be defined by an MCS Spindle object in the ONT. All operations and
related offsets need to be located below that spindle object.
Below a snapshot shows the configuration of the sim09 example:

The LATHE-SPINDLE object is a local MCS with special purpose None and fixture offset
number 0, so that this MCS will be ignored by the post in regards to output offset information. The
offsets G54 and G55 are located as child objects of the spindle.
Also the sim15 is setup related that rules; details will be described in the sim15 chapter.
Additional information about best practice to set up a multi-spindle Mill-Turn geometry view is
available in the NX Help under CAMManufacturing TurningGeometry structure sample
for a 2 spindle multifunction machine

5.3

Library machine tool specific handling

SIM15 post rule for local MCS object with special output None
A local MCS with special purpose None located as child of a local MCS with special
purpose Fixture Offset number will be used to output G59. See more in the chapter about
sim15

6 About Post Processors


All the OOTB delivered post processors are created with the Post Builder Version 9 based on the
Sinumerik S840D basic template post. Some differences between pure template post and OOTB
post are listed in the 3rd subchapter.

6.1

General supported features of the OOTB Posts

All three major controllers support the basic functionality for 2 axis drilling, 3 axis, 3+2 axis and 5
axis milling and also some advanced functionality.
6.1.1

Basic functionality
Addresses (X, Y, Z, A, B, C)
Program control ( M30, M0...)
Basic motion type: rapid, linear, circular
Metric/Inch units
Radius/diameter programming
Fixture offset
Coordinate system rotation(support Local CSYS and Auto3D way)
(G68, TRANS/AROT)
Tool radius compensation
Tool length compensation
Feed rate, feedrate unit
Spindle mode and spindle speed
Constant surface speed
Tool change
TCP (TRAORI, G43.4, M128)

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 7 / 56

CAM/SIM MACH Content


Drilling cycle
6.1.2

Advanced functionality:

Swiveling function (G68.2, CYCLE800, PLANE SPATIAL)


Variable axis drilling (fully support cycle plane change)
Turning cycle (CYCLE95, G71)
6.1.3

6.2

Sim15 Mill-turn (S840D and Fanuc)


One mill-turn post
Part transfer
Polar mode
Drilling XZC output

Creating file with tool and offset data

The SINUMERIK 840D post processor creates a CAM setup specific initialization data file for
offset values and the tool data. The post processor creates an additional ini file (to_ini.ini or
to_ini_Channel.ini) in the SINUMERIK format. This file will be located in the cse_files/subprog
subfolder of the CAM setup part:
MACH/samples/nc_simulation_samples/cse_files/subprog

This to_ini.ini file is handled as a subprogram and in the ini files of the machine tool in the library
this file gets called (executed and loaded). When working with CSE controller models, the
different ini files are loaded and executed before the simulation starts. The format and syntax of
the files is controller specific and their purpose is to initialize certain settings upfront. For more
details about ini files please see Appendix.
Before the post create a new file to_ini.ini it will back up the existing ini file by renaming it to
*.bck.
Note 1: New with NX85 is that the post query the kinematics model using the TCL query function
MOM_ask_init_junction_xform and store the results in the variable mom_sim_result[9],
mom_sim_result1[3] to get the data of the machine zero junction needed to calculate offset
information for e.g. G54.
Note 2: With the Sinumerik template Post within PostBuilder Version 8 or newer you are able to
configure the behavior of creating the ini file.
Note 3: The OOTB example machine tool ini files for Sinumerik (e.g. sim07_mill_5ax-Main.ini)
have the entry TO_INI to call the post created file as a subprogram. If the creation of the file not
work properly or the file gets deleted or the post does not have write access to create this file and
the CSE Simulation starts it will give you a warning in the details window, that the related TO_INI
file could not be found. The simulation will not stop in that case.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 8 / 56

CAM/SIM MACH Content

6.3

MOM variable for MCS handling

For coordinate rotation NC codes output inside the post, the related coordinate matrix is
changed. Reason for this is because the Main MCS is representing Machine zero and Local
fixture offset representing machining coordinate G54, G55, but mom_csys_origin and
mom_csys_matrix still map current local MCS to Main MCS. For CSYS rotation coordinate
output, the value of linear offset (G68, CYCLE800 ) should be the offset between current local
MCS to parent local MCS(e.g. G54,G55). Therefore, mom_parent_csys_matrix replaced
mom_csys_matrix in postprocessor .
MCS-Main (G53)
|----MCS-Local-for-G54
|-----MCS-for CSYS rotation or other-purpose

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

mom_csys_matrix
mom_parent_csys_matrix

Page 9 / 56

CAM/SIM MACH Content

6.4

Differences between pure template posts and OOTB posts (Sinumerik)

The OOTB posts are created based on the latest Sinumerik S840D basic template posts. Some
settings and or features are slightly different, which are listed here.
6.4.1
Coolant
Coolant output is different.
Posts of OOTB Examples
Coolant code always be M8

6.4.2

Output of T0 M6 at end of program

Posts of OOTB Examples


Output T0 M6 at end of program

6.5

Post from template post


Coolant code depends on coolant status

Post from template post


No T0 M6 at end of program

About UDEs and OOTB

The post shipped with the OOTB machine tools in the library are coming with their own UDEs
(CDL file), which provides a series of UDE which all are supported.

6.6

Post output for Coolant (Sinumerik, TNC, Fanuc)

OOTB post processors only support M8 (coolant on) and M9 (coolant off), to output other coolant
codes, post processors need to be customized.

6.7

About Special handling for 5 axis motions with Fanuc for table machine tool
configuration

The OOTB setting for Fanuc controller will not move the programming system together with the
table when doing 5 axis motions like G43.X. The post takes care about that when outputting the
X/Y/Z data. The CSE controller takes care about that by using a specific mode when activating
the 5 axis transformation.
This mode can be changed:
In Post do the following:
Change variable dpp_ge(sys_output_coord_mode) value to TCP_FIX_MACHINE in command
PB_CMD_customize_output_mode
In Simulation do the following:
Change the setting of the variable #19696 in the INI file to =0 (default is 32 for non-rotating
workpiece coordinate system)

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 10 / 56

CAM/SIM MACH Content

7 About CAM Programming


About Cutter Compensation for contact contour and circle statements in the NC code file hereby
important information. Whenever the NC code contains statements which refer to a plane such as
G02/G03 or G41/G42, the controller needs to have the related working plane defined. Therefore
it is necessary to define the correct plane upfront. The initialization files provided with the
machine tool examples define a default working plane. This is typically the XY-Plane (G17) for
the milling machine tools and ZX-Plane (G18) for the turning machine tools.
Important to understand are cases where the surfaces to be machined are not parallel to one of
the orthogonal machine tool planes and the post processor has a specific transformation like
TRAORI or using swivel cycles activated to achieve this operation. A typical example is shown
with the external NC code listed in Appendix simulated with the machine tool example
sim06_mill_5ax_cam_sinumerik_mm.prt.
Activating cutter comp or circle output will only be correct if a related working plane is defined.
This can be seen e.g. in the following picture for the green area and the operation
PLANAR_PROFILE_TOP. It is taken from the example sim05 (head/head configuration). Here,
the operation PLANAR_PROFILE_TOP includes circle statements for a plane which is not
aligned with xy, yz, or zx. Circle records can correctly processed only because a ROT
command was executed in a previous NC line and swivel the plane in the TRAORI mode.
The latest used post in the example dont output TRAORI anymore, but use CYCLE800 to swivel
the plane.

The example shown below (POCKET2_PLANAR_CUTCOMP, example sim05) is an alternative


method when machining within a plane which is not aligned with xy, yz, or zx. Here, the working
plane is not defined by a ROT statement; circular or cut comp output would not work and
therefore are deactivated in the operation.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 11 / 56

CAM/SIM MACH Content

8 Using the library tools


The CAM setup simulation examples use as many as possible tools available from the OOTB tool
library (ASCII in NX native) as delivered with the actual NX version. It is not suggested to adding
part files with the existing tool library entry names. (e.g. ugt010101_003.prt). It may happen that
the added 3D tool does not match the geometry created based on the parameters.

9 About CSE Simulation Drivers


9.1

Handling of Offsets:

Like any physical NC controller, CSE drivers can process offset information (activated e.g.
through G55) only if the required data is provided, i.e. coordinate values between the actual
chosen offset e.g. G55 and the machine tool zero position. There are two ways to achieve this
with CSE and both are used in the OOTB examples.
9.1.1
Alternative 1 (Fanuc)
In the case of Fanuc, the controller queries the information during simulation from the application
(ISV NX). This is done internally by a command called LoadOffset during interpretation of an
offset statement in the NC code like G55. The system searched in the ONT for an MCS object
with the related fixture offset number.
Example: In the NC code a G55 (2nd offset) is used. In this case the system cycles through all
MCS objects and compares the value use in Fixture Offset with the given offset in the NC code.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 12 / 56

CAM/SIM MACH Content

9.1.2
Alternative 2 (Sinumerik and TNC)
The SINUMERIK 840D CSE and the TNC controller doesnt use the LoadOffset mechanism as
described above but follows an alternative implementation. On the physical controller in the shop
floor, the offset values are typically measured by probing operations or are manually set in the
controller. The controller stores these values in an offset table and in controller variables.
The SINUMERIK OOTB post processors create an initialization file for the actual CAM setup
including information about the offsets and tool data. This initialization file is loaded before the
simulation starts. So the offset definition is achieved by the definition of the variables in the
initialization file.
Snapshot of the SINUMERIK ini file:

Later, when one of the offsets is activated in the NC code, the CSE controller uses these
variables to define the offset transformation.
The TNC OOTB post processors outputs the offset data into the main program based on the
actual CAM setup. The offset gets activated right away by parsing these NC code lines.
Example for TNC offset data:

8 CYCL DEF 7.0


9 CYCL DEF 7.1 X -0.0000
10 CYCL DEF 7.2 Y -225.0000
11 CYCL DEF 7.3 Z -327.4470

Note: Working with CYCLE247 and/or is possible with CSE, but not part of the OOTB example.

9.2

Handling of the tool change

Tool changes with CSE controller models in the existing examples are achieved by calling a tool
change subprogram. This subprogram is located under the subprog folder for each CSE driver;
its kept in the corresponding NC code syntax and basically positions the tool to the tool change
location. Using one of these subprograms for a different machine tool will typically require an
adjustment of the tool change position. Another section in the tool change subprogram is the
Anycontroller (AC) part, which mimics the PLC portion of the tool change. This mainly takes care
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 13 / 56

CAM/SIM MACH Content


of the mounting and un-mounting of the tool itself. Refer to NX Help for more details about the AC
language. The OOTB examples demonstrate different kinds of tool change methods.
The standard way is that one spindle is defined on the kinematics model of the milling
machine tool and the tools are mounted on the fly during simulation. This can be seen in
sim02 to sim09 as well as sim14.
sim08 is similar, but shows how an advanced tool change mechanism can be animated
using the AC language to open and close doors.
In sim01, tools are already pre-mounted and visible in the CAM scenario on an eight
pocket tool changer. During simulation, the system moves the spindle and the tool
changer to mount and un-mount the tool.
The turning examples sim10 to sim13 dont mount tools during simulation. Here, all tools
are already pre-mounted on the turret in the CAM scenario. The tool change subprogram
takes care of the rotation of the turret and the activation of the selected tool.
An example of a tool change subprogram can be found in Appendix
Note: The machine tool view in the ONT reflects the definition of turrets and pockets in the
kinematics model. Each time the machine tool is retrieved from library, the ONT is updated based
on the kinematics model. It is strongly recommended not to add or remove turrets and pockets in
the ONT machine tool view when working with machine tools.

9.3

Handling the reference point (Fanuc)

In Fanuc NC code, the G command G28 is often used to move the reference point. The OOTB
examples include this in the post and in the CSE controller models. This section describes how
the position of the reference point is defined and stored to get correct simulation results.
On physical machine tools, the reference point is stored inside of the controller. To mimic this in
the CSE simulation, the position of the reference point is defined in the *.ini file along with the
machine tool. The NC code to define reference points in Fanuc syntax is shown in the sim01
example (sim01_mill_3ax_fanuc-Main.ini) as:
(This part sets the position of the
G54
G17
G90
G10L52
N1240P1R0000
-> X Position
N1240P2R225.425
-> Y Position
N1240P3R406.425
-> Z Position
G11

reference point G28)

of the reference point related to machine zero


of the reference point related to machine zero
of the reference point related to machine zero

If needed, the values of the reference point can easily be changed in the ini file. All coordinates
are assumed to be metric.

9.4

Handling of tool correction data

Handling tool data CSE is able to get the data on different ways. One way is a direct connection
to the application ISV and query the data through an API function during simulation e.g. when
activating the tool correction e.g. Dxx or G43 Hxx).
An alternative way is to rely on data predefined in controller variables e.g. in an ini file. The
behavior can be triggered in the OOTB CCF by setting the global variable
GV_bUseSetToolCorrection in the CSEInitializeChannel. Most controller use the first described
way and get the tool correction data via the API during simulation form ISV. New with NX9 for
the Sinumerik CCF (main purpose is for showcase) is, that these CCF relies completely on the
provided data in the to_ini.ini file created by the OOTB post and doesnt query any tool correction
data during simulation.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 14 / 56

CAM/SIM MACH Content

10 About Sinumerik Cycles in the content


Since NX8 the OOTB library for Sinumerik supports list of cycles for simulation. The cycles are
covered by an encrypted archive file (*.cyc) and placed in the subprog folder of the Sinumerik
CSE simulation. Multiple versions are added to the system for Sinumerik Powerline and for
Sinumerik Solutionline. The SolutionLine Version 4.4 used by default in the CSE simulation.
The cycles of the Solutionline Version 4.4 are in the file: SinumerikSL_Cycles.cyc
The cycles of the Solutionline Version 2.6 are in the file: SinumerikSL_Cycles.cycV26
The cycles of the Powerline are in the file SinumerikPL_Cycles.cyc_powerline
To use the cycle other than form the default rename the files so that the desired one has the
extension *.cyc
Here the list of cycles in the archives files:
PowerLine

CYCLE71
CYCLE81 CYCLE90
CYCLE801
HOLES1, HOLES2
LONGHOLE
SLOT1, SLOT2
POCKET1, POCKET2, POCKET3, POCKET4
CYCLE800 (kinematic specific, customized per machine tool)

Solutionline

CYCLE71
CYCLE81 CYCLE90
CYCLE801
HOLES1, HOLES2
LONGHOLE
SLOT1, SLOT2
POCKET3, POCKET4
CYCLE95
CYCLE97
CYCLE800 (kinematic specific, customized per machine tool)

11 About swiveling cycles


This will give an overview about what are swiveling cycles and how they are used. The main
target is to machine on a plane not perpendicular to an existing linear axis. What it would take
without swiveling:
You have to create a rotated coordinate system
Figure out how to move the rotary axis so that X, Y, Z can be used for the motions in the plane
Solve the problem that your work piece coordinate system does not rotate with the rotary axis

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 15 / 56

CAM/SIM MACH Content


Working with swiveling cycles will make the life easier and let the controller do the work. In the
following subchapters it is explained in detail how the swiveling Cycle PLANE SPATIAL/AXIAL
and CYCLE19 on Heidenhain, CYCLE800 on S840D and G68.2 on Fanuc controllers work and
how this is implemented in the CSE and the OOTB examples. In addition you will see a section
how this is configured and can be reused for a different machine tool. With NX85 all the five axis
machine tools in OOTB support swiveling for all three controller type.

11.1

Swiveling on Heidenhain

11.1.1
How the ONT needs to be defined to achieve a proper Post output
To achieve an output of PLANE SPATIAL by the Post the following prerequisites needs to be
fulfilled. (PLANE SPATIAL is supported by OOTB post; PLANE AXIAL and CYCLE19 are
supported in the CCF for simulation only)
milling operations and drilling operations needs to be 3+2 axis operation
The MCS need to be set to CSYS Rotation
11.1.2 How to customize the machine data to achieve correct simulation
The settings are valid for all supported modes which are PLANE SPATIAL, PLANE AXIAL and
CYCLE19. Inside the MCF global variable in Internal variables tab must be set related to the type
of the machine tool and the axis vector directions. Name of the variables are:
GV_strMachineType (T, M,P)
T for Tool Head/Head
P for Part Table/Table
M for Mixed Head/Table
GV_strSwivelingChainName
The default name for the chain will be default
GV_strFourthAxisName
GV_strFifthAxisName
GV_dFourthAxisX (x component of fourth axis)
GV_dFourthAxisY (y component of fourth axis)
GV_dFourthAxisZ (z component of fourth axis)
GV_dFifthAxisX (x component of fifth axis)
GV_dFifthAxisY (y component of fifth axis)
GV_dFifthAxisZ (z component of fifth axis)
And the soft min/max limit of the rotary axes should be set if you wish rotary axis solution can be
selected based on axes limit.

More details about the cycle and the way how it is implemented in CSE can be found in the
Appendix

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 16 / 56

CAM/SIM MACH Content

11.2

Swiveling in Sinumerik - CYCLE800

The Sinumerik Solutionline version is implemented in this approach. Much more details about the
cycle itself and the way how it is implemented in CSE can be found in the Appendix
11.2.1

Example and parameter

11.2.2
How the ONT needs to be defined to achieve a proper Post output
To achieve an output of CYCLE800 by the Post the following prerequisites needs to be fulfilled.
milling operations and drilling operations needs to be 3+2 axis operation
Sinumerik 840 UDE should be added on the operations, Transformation option should
choose Swiveling as shown below:

11.2.3
Machine Tool dependent data customized ini files
This is the list of variables defined for each machine tool in the ini file and others files to define
data for the CYCEL800. These are the data, which need to match the related machine tool.
Content of the OOTB INI file
SMAC; adopt the original DEF file from MC
PGUD; need remove the line with REDEF
TC_CARR; define tool holder data
G40 D0
$MN_MM_NUM_TOOL_CARRIER=1
M17

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 17 / 56

CAM/SIM MACH Content


Definition data of the TC variables:
$TC_CARR7
;x component of rotary axis v1
$TC_CARR8
;y component of rotary axis v1
$TC_CARR9
;z component of rotary axis v1
$TC_CARR10
;x component of rotary axis v2
$TC_CARR11
;y component of rotary axis v2
$TC_CARR12 ;z component of rotary axis v2
$TC_CARR23 ;kinematic type
$TC_CARR24 ;Offset of rotary axis v1
$TC_CARR25 ;Offset of rotary axis v2
$TC_CARR30[1]=-90 ;software minimum limit of rotary axes v1
$TC_CARR31[1]=-9999999 ;software minimum limit of rotary axes v2
$TC_CARR32[1]=90 ;software maximum limit of rotary axes v1
$TC_CARR33[1]=9999999 ;software minimum limit of rotary axes v2
$TC_CARR34 ;tool holder name
$TC_CARR35 ;Axis name 1
$TC_CARR36 ;Axis name 2
$TC_CARR37 ;Identifier
$TC_CARR40 ;Z axis retract value

11.3

Swiveling in Fanuc - G68.2

11.3.1 How the ONT need to be defined to achieve a proper Post output
To achieve an output of G68.2 by the Post the following prerequisites needs to be fulfilled.
Milling operations and drilling operations needs to be 3+2 axis operation
The MCS need to be set to CSYS Rotation
11.3.2
How to customize the machine data to achieve correct simulation
The requirement for G68.2 is the same to the requirement for PLANE SPATIAL. Please refer to
previous chapter
More details about the cycle and the ay how it is implemented in CSE can be found in the
Appendix

12 Example specific considerations


12.1

SIM01:

This example has a special tool change mechanism including a real tool changer. Re-using this
example for other machines without a similar tool changer can cause unexpected behavior. In
this case, use sim02 as reference for a simple 3 axis milling machine tool.

12.2

SIM03:

This metric Sinumerik example includes a cam setup, which handles operation using milling tool
(T-Cutter and Step-Mill) dealing with multiple tracking points.
New with NX9 an additional CAM Setup part file is included showing a tomb stone configuration.
The CAM structure using the feature Paste with Reference and the OOTB post of this machine
tool included one special UDE to activate/deactivate the feature to output the pure cutting area of
the operation as separate subprograms.

Furthermore the post is enhanced to not outputting a ROT statement or a swivel cycle if the
orientation of the used MCS programming coordinate system can be brought into synch with the
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 18 / 56

CAM/SIM MACH Content


machine tool axis orientation by a simple B axis table rotation. This more following the real
working on such machine tool configurations.
If the post should output a ROT or swivel cycle it is needed to set up in CAM geometry view the
fixture offset without any rotation and have a child MCS object defining the CSYS-Rotation (see
also chapter 5.1)

12.3

SIM05:

This machine includes post and Simulation for controller OKUMA. Here a list of the supported
features.
12.3.1
Functionality list
Okuma controller supports the basic functionality for 2 axis drilling, 3 axis, 3+2 axis and 5 axis
milling and also some advanced functionality.
12.3.2

12.3.3

Basic functionality
Addresses (X, Y, Z, A, B, C)
Program control (M02, M0...)
Basic motion type: rapid, linear, circular(G0/G1/G2/G3)
Workplane selection (G17,G18,G19)
Metric/Inch units(G20/G21)
Absolute and incremental dimensioning mode(G90/G91)
Fixture offset(G15 Hn/G16 Hn)
Coordinate system rotation(support Local CSYS and Auto3D way)
Tool radius compensation(G41/G42/G40)
Tool length compensation(G54 H/G55 H/G56 H/G53 H/D)
Feedrate, federate unit(G94/G95 F)
Spindle speed and direction control (S, M3,M4,M5)
Tool number and tool change(T M6)
Coolant(M7/M8/M9)
Home position(G30)
Dwell(G4)
Drilling cycle(G73/G74/G76/G81/G82/G83/G85/G86/G87/G8R9/G80)
Advanced functionality:

Variable axis drilling (fully support cycle plane change)


UDE-Set Tool Path Type to switch between 5 axis and 3 axis tool path.
12.3.4
Ssetting slope coordinate system (G69/G68)
In sim05 Okuma kit, the coordinate conversion can be done up to three times. Firstly, the
coordinate conversion is with respect to Z-axis, secondly it is with respect to X-axis, and finally it
is with respect to Z-axis. The output format likes this:
G69 X Y Z P
G69 X Y Z R
G69 X Y Z P

G68
G68
G68
12.3.5
Switching between TCP G44 mode and G169 mode for 5 axis machine
Set variable dpp_ge(tcp_output_type) to AXIS", and set dpp_ge(tcp_base_coord_type) to
"TCP_FIX_MACHINE" in PB_CMD_dpp_ge_set_default_variable. It will output NC code G169.
set variable dpp_ge(tcp_output_type) to VECTOR,and set dpp_ge(tcp_base_coord_type) to
"TCP_FIX_TABLE" in PB_CMD_dpp_ge_set_default_variable. It will output NC code G44.
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 19 / 56

CAM/SIM MACH Content


12.3.6

Define Set Tool Path Type via UDE

The UDE is used to set tool path type of a operation.


Option (5 Axis Simultaneous Cutting):
Yes: set the tool path type to 5 axis simultaneous cutting
No: set the tool path type to 3 axis machining
In the sim05 Okuma kit, the post can automatically detect the tool path type, but if the post
doesn't detect correctly, the users can use the UDE to reset the tool path type.

12.4

SIM10:

This machine tool is only available with a Fanuc controller model. Material removal and/or tool
path based TPB simulation are not supported. It doesnt support many different Mill-Turn
features, mainly what the example includes. To see more Mill-Turn features like e.g.
TRANSMIT/Polar mode refer to sim15 is suggested.

12.5

SIM11 SIM13 - Fanuc:

The initial setting for these machine tools in the library changed to be type LATHE and run with
G-Code System-A. That is done by using the variables in the ini file:
#983=0 (specifies that this is a lathe)
#3401=1 (specifies that G-Code system A should be used, where G99=feed per rev)
Doing so G99 will be interpreted as feed rate set per revolutions and G98 as feed per minute.
And G90 G91 is not a valid code in that setting. For incremental motions U/V/W is used

12.6

SIM13:

This machine tool is only available with a Fanuc controller model.

13 The Mill-Turn Example sim15


Since NX8 an OOTB Mill-Turn example with a Post Processor and Simulation Driver for
Sinumerik S840D and since NX85 also with a Driver for Fanuc are supported. The machine tool
is a two channel B-Axis head and lower turret configuration with a main and sub spindle.
Additionally the kinematics includes a non-orthogonal X,Y,Z configuration and allows
simultaneously 5-Axis milling on the main spindle (TRAORI). The CAM example includes
different operations for milling and turning including TRANSMIT and Part Transfer. The goal of
this example is to show the power of the CSE simulation capability.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 20 / 56

CAM/SIM MACH Content

Note: Due to the general complexity and variations of mill turn machine tools it could not
expected that these example can be reused for any different mill turn machine tool type. For such
complex manufacturing centers a customization for Post and Driver is always mandatory.
Note: This example does not support TPB and MTD

13.1

Kinematics Configuration

Main Spindle and B-Axis Head

Sub Spindle and Lower Turret

+ Z3

+ X1
+ B1

+ Y1

+ C2
+ C4

+ C3

+ Z2

+ Z1
+ X2

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 21 / 56

CAM/SIM MACH Content

13.2

ONT Coordinate systems setup

G53
MZJ

G54
Local 1
G59

ATRANS AND AROT


based on G59

G59

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

G55
Local 2

Page 22 / 56

CAM/SIM MACH Content


MCS

Description

G53

The machine zero point is placed at the center


of the main turning spindle
MSC is main and fixture offset number is set
to0

Picture

The Offset G54 is placed at the center of the


front face at the chuck. It is represented as a
local MCS with Fixture Offset number set
to1
This object defines the Spindle, so need to be
of type MCS Spindle (!)
(MAIN in the name refers to the main spindle
not to the MCS purpose)
At the front face of the work piece a MCS is
placed.
It is of type MCS Spindle to put turning and
milling below.
The G59 is an additional offset based on G54.
The G59 is similar as a TRANS but will not be
reset or overwritten by a new TRANS.
Local, None and inherit the fixture offset
number from the parent.

G54

G59

For arbitrary/ rotated work planes.


ATRANS This will be indicated as an additional
transformation ATRANS and AROT and is
AROT
based on the G59 coordinate system.

G55

The Main Offset for the sub spindle G55 is


placed at center of chuck face on sub spindle.
This object defines the Spindle, so need to be
of type MCS Spindle (!)
It is represented as a local MCS with Fixture
Offset number set to2

G59

Same as above, but for the part on the sub


spindle

13.3

Tool Change

The tool change on the B-Axis is done by calling a sub program TC.SPF. The parameter
definition is defined as:
TC(tool number, B-Axis position, Spindle position )
Example:

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 23 / 56

CAM/SIM MACH Content

13.4

About Spindles

The machine tool has 4 spindles

C1 Tool spindle in the B-Axis Head


C2 The spindle for life tools on the lower turret
C3 The work piece spindle of the sub spindle - right side
C4 The work piece spindle of the main spindle - left side

The post outputs related code to activate (M3/M4) and stop (M5) them. At the beginning of an
operation the related spindle will be set as main spindle with the SETMS command. At the
beginning the main spindle C4 is assigned to the first channel (B-Axis Head) and the sub spindle
C3 is assigned to the second channel (lower turret). If necessary to change this the post will
output the command GETD(channel) to assigned the related spindle/axis to the channel which
drive this spindle/axis

13.5

TRANSMIT Operation and other milling motion types

The example includes the TRANSMIT option (CX Polar Mode) for one operation. To activate and
deactivate a start and end UDE needs to be used.

N5520
N5530
N5540
N5550
N5560
N5570
N5580
N5590
N5600
N5610
N5620
N5630
N5640
N5650
N5660
N5670
N5680
N5690
N5700
N5710
N5720

;Operation : PLANAR_MILL_ROUGH
GETD(C4)
;Tool Change
G17
DIAMOF TOWSTD
TC(5,0.,0.)
MSG("MILL_TRANSMIT")
SETMS(1)
;
;Initial Move
G0 B0.0 C4=0.0
TRANSMIT(1)
G54
TRANS X0.0 Y0.0 Z300.
G0 G90 X-42.544 Y-70.87 Z10. S1=2000 D1 M1=3
;Approach Move
Z-52.
;Engage Move
G94 G1 Z-55. M8 F200.
X-45.041 Y-66.538
;Cutting

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 24 / 56

CAM/SIM MACH Content


N5730
N5740
N5750
N5760
N5770
N5780
N5790
N5800
N5810
N5820

X-80.152 Y-5.636
;Retract Move
X-82.649 Y-1.304
Z-52.
;Departure Move
G0 Z10.
;End of Path
TRANS X0 Y0 Z0
TRAFOOF
M1=5

For other milling modes like XYZ motions (example operation is FACE_MILLING_AREA) and for
axial drilling XYC motion (example operation DRILL_IN_CENTER_S1H) the post figure out this
automatically by the operation.

13.6

TRAORI simultaneously 5-Axis milling

The example includes some multi axis operation, which simulated using the TRAORI function. As
a show case one operation (CONTOUR_PROFILE_1) are created Vector output instead of Axis
positioning. To achieve the vector output the following UDE is used.

13.7

Handling of special features like part transfer, moving sub-spindle and jaws

New with NX9 are three user defined generic motion types to give the user full flexibility define
special motions of the sub-spindle and the related jaws on the chucks. Doing these actions it is
no longer needed to use special UDE, but more using these new sub operation types. The
following sub-chapters describe the individual UI and related NC output of these operations.
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 25 / 56

CAM/SIM MACH Content


13.7.1

Moving Sub-Spindle Z3

UI Setting

Posted NC Code

Move to Home

G90 G53 G0 Z3=0

Move to Position (Move to)

G90 G53 G0 Z3=value from Move to

Start & End Point


delta is difference in Z of selected
points

G90 G53 G0 Z3=-delta

Clearance Mode (Distance)


(before or after G0 motion)

G90 G53 G0 Z3=-value+clerancceDistance


G90 G53 G1 Z3=-value F250

Travel to Fixed Stop

G90 G53 G1 Z3=-value FXS[Z3]=1 F25

Fixed Stop Torque

Add after FXS: FXST[Z3]=12.0

Fixed Stop Window

Add after FXS: FXSW[Z3]=2.0

Feed (default is F250 on the G1)

G90 G53 G1 Z3=-value FCustom Feed Rate

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 26 / 56

CAM/SIM MACH Content


13.7.2

Handling of Chucks

UI Setting

Posted NC Code

Mainspindle Open

M120

Subspindle Open

M130

Mainspindle Close

M121

Subspindle Close

M131

Mainspindle Position

G53 G0 CHUCK_MAIN=Jaw Position

Subspindle Position

G53 G0 CHUCK_SUB=Jaw Position

13.7.3

Handling work piece transfer

UI Setting

Posted NC Code

Main to Sub

M140

Sub to Main

M141

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 27 / 56

CAM/SIM MACH Content

13.8

Multiple Chains

New with NX9 the kinematics model of sim15 has two kinematics chains of type milling defined in
the MTB. At this point in time only the first one B-HEAD-MAIN-SPINDLE is used in the CAM
setup and addressed by TRAORI. In the MCF it is prepared TRAORI(1) and TRAORI(2) for
working on the main or sub spindle.

13.9

Definition of Tools and related Settings (not specific for sim15)

This chapter explains the dependencies between tool angle data, the related orientation and
mounting in to a machine tool. This will be used to created specific operations and achieve the
desired orientation. Even if this is done based on one operation of the sim15 example, this is not
specific but can be seen as some more general CAM tool related information. As the example we
are using the operation ROUGH_BACK_TURN. Desired is the following manufacturing.

13.9.1

Settings in the tool

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 28 / 56

CAM/SIM MACH Content

Selecting the tool in the ONT the tool will be displayed with the tracking point on the WCS in that
orientation as it will be mounted into the pocket. In the case above this is the B-Axis head. To
achieve the correct orientation the tool holder angle (OA), the insert position and the tool holder
type can be changed accordantly. Usually the turning tool (if it is a parameter tool without tool
assembly graphic) is mounted into the spindle with the tracking point. To change these values in
the tab More section Simulation are used. In this example 100 / 0 will result in:
100mm

13.9.2
Settings in the Operation:
To achieve the desired position for the operation the tool needs to be more orientated vertical
instead of horizontal (B-Axis motion) this will be set into the operation. Here to achieve 80
degree. To achieve the rotation about 180 degree in the spindle of the B axis, so that the cutting
edge is more on the right as on the left, the Flip Tool Holder is used.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 29 / 56

CAM/SIM MACH Content

14 The Head-Change Example SIM16


With NX8.5 we provide an OOTB example including a head change mechanism. This includes as
usual Post Processor and Simulation Driver for Sinumerik S840D. The machine tool based on the
gantry SIM05 example plus a head magazine (without extra geometry). Three different heads
(devices) are added to the machine and used in the related CAM setup. The standard head to
mount a tool vertical, a simple right angle head and a complete 5 axis head including two axes C
and A. With the latter one the machine tool becomes similar as the SIM05. The main target of this
example is to show how head change can be handled in NX CAM, in the post and in the CSE
driver. The CAM example shows different operations placed on different heads. To handle the
same tool on different heads the names of the tools must have post fix _headno.
Simultaneously working with the rotary axes is not supported by this example (e.g. TRAORI). The
prepositioning of the rotary axis must not be done direct inside the NC code e.g. C=30, but use
the head change cycle, like the attached post did it. The head change cycle takes care about the
positioning of the rotary axis and swiveling the plane internally. The post itself takes care about
create coordinate system based on the working plane without the need to have separate MCS
object for each face. This makes that example most easy to use for the user. One MCS to define
a fixture offset like e.g. G54 is totally enough for such cases. At the end of that chapter is a
section targeted mainly for CSE experts who want to customize other head change examples
and need to understand how that one is working in detail.

Note: Due to the general complexity and some special assumptions made in that example it
could not be expected that this example can be reused for a different head change machine tool
without any customization on Post and Driver.
Note: This example is available in Sinumerik CSE and TPB. MTD is not supported.

14.1

About the machine tool kinematics

This example is built in such a way that the base machine tool includes a head magazine, which
gets filled by heads using the device mechanism. The head magazine pocket gets the holder
type HEAD added, so that only heads and no tools can be placed in the pockets. The core
machine tool includes the three linear axes and a pocket to mount the head on. This junction is
classified as Tool Mount junction and is used later in simulation to mount the head.
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 30 / 56

CAM/SIM MACH Content

Note1: To keep it simple, the orientation of the machine zero junction, the mount junctions on the
machine and the junctions on the heads to mount them onto the machine are all identical.

Note2: The holding system is defined, so that only HEAD objects can be mounted to that
pocket (_STATIC_HOLDER)
Note3: The Holder ID is not used today

14.2

About the head kinematics defined as devices

The three heads are defined as devices with the related kinematics model and axes (if available).
Here the example of the 2-axis head:

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 31 / 56

CAM/SIM MACH Content

Note1: Must not assign an axis in the root component, but always create the junction which is
used for an axis definition in the direct parent kinematics component of the axis.
The head objects are added into the device_database.dat file with the appropriate HEAD type so
that they match the holding system into the 3 designed pockets of the core machine tool. It is
important to mention that the description name will be used later when these objects get retrieved
in NX CAM. Thus they are chosen simple.

14.3

About the Post and CAM setup

14.3.1 Tool name in NX CAM


Today NX CAM allows different possibilities to setup head examples. This example is related to
the Post and CSE Simulation and can be seen as best practice. Each tool and the related
operation need to be placed under the related head device in the ONT. To allow placing the
same tool under different heads, a workaround is used here by adding an extension to the name
of the tool. The rule is:
Toolname_headnumber (e.g. MILL_2 for using tool MILL on head 2)
The post will remove that additional post fix before output it into the NC code. The CSE driver
again adds it to find the right tool inside the ONT.
Note1: These special workaround is needed because CAM does not support duplicate names of
tools placed on different head either any other view to define and place heads and tools.
14.3.2 Rules for the geometry View
There are no special rules, which apply to this example only. As usual the same rules as for other
OOTB sample apply. If the tool axis of operation is not parallel to Z axis of machine, this
operation could be put directly under G54 (G55, etc.) the post will take care of creating a
temporarily MCS object related to the plane belonging to the operation and the driver will take
care about automatic swiveling inside the HEADCHANGE cycle.
14.3.3 Post output
For each head or tool change the post will output one cycle head change program. Doing it that
way keeps the post structure simple. The output will look like:
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 32 / 56

CAM/SIM MACH Content


HEADCHANGE (toolname, headnumber, C-axis_value, A-axis_value)
The logic is done in the simulation of the head change machine tool (see next chapter for more
details). In the case an operation use identical head and/or tool but a different head orientation
the post outputs head change statement (HEADCHANGE). Due to coordinate rotation will be
handled in HEADCHANGE subprogram, CYCLE800 will not be outputted.

14.4

About the CSE Driver

The CSE driver handles that complete example mainly through the HEADCHANGE subprogram.
All related controller logic is placed into that single subprogram, which calls other subprograms to
mount/unmount the head and the tool.
14.4.1
Settings done in the ini file
This example uses some global NC variables. Here a list and description of variables used and
defined in the related ini file.
DEF NCK INT $P_HEADNO
-> actual mounted head
DEF NCK STRING[128] $P_HEADNAME
-> name of the mounted head
DEF NCK STRING[128] SIM_TOOL_CARRIER
-> name of the tool carrier, depends on the pocket name
DEF NCK INT HEAD_TRANS_PLUS_SWIVEL
-> switch to activate swivel together with the head NOT used today
DEF NCK REAL POCKET_SWIVEL_ROTX/Y/Z
-> variable to describe the rotation needed to do the swiveling based on the initial position
of the head after it is mounted
14.4.2
Head Change Program
This subprogram is called for all head/tool change actions from the main program. This program
is written in Sinumerik NC code language only. From the main program the other subprograms to
mount and un-mount the tool and head are called.
Name of the subprogram: HeadChange.spf
Parameter description of program:
No.
1
2
3
4

Parameter
_TOOL
_HN
_CPOS
_APOS

Type
STRING
INT
REAL
REAL

Description
The name of the tool e.g. MILL
The number of the head (1== vertical 2== RAH 3==AC-Head)
The axis values to position the C axis in the head (head 2 and 3 only)
The axis values to position the A axis in the head (head 3 only)

14.4.3 Mount Head


This subprogram represents the PLC action to mount the head and is implemented in AnyController language. The head is mounted in two steps: logically with the AC command
mountHead and physically as usual with the grasp command.
sHeadName = getVariable("$P_HEADNAME");
mountHead(sHeadName, "S");
grasp(sHeadName, getJunction("POCKET", "S"));

The mountHead command registers the heads tool carriers and axes in CSE. Each tool carrier
represents a pocket in the head.
When retrieving a device from the library, it can happen that a head axis has to be renamed due
to the fact that different heads come with the same axis name (in our example head 2 and head 3
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 33 / 56

CAM/SIM MACH Content


both have a C axis defined). The head mount command takes care of the mapping between the
logical and the physical axis name (e.g. C and C_1). All heads are mounted by grasp on the
main pocket of the machine tool.
14.4.4 Mount Tool
This subprogram represents the PLC action to mount the tool and is implemented in AnyController language. The correct tool carrier is specified in the head change subprogram by using
the variable SIM_TOOL_CARRIER.
sCarrier

= getVariable("SIM_TOOL_CARRIER");

The name is extended by the head number (see workaround in the post chapter)
sToolName = getArrayElement("$TC_TP2",nToolID)+"_"+getVariable("$P_HEADNO");

The creation of the tool itself is done as usual, but with the correct carrier object like:
generateTool (sToolName, sCarrier);

The grasp command to physically mount the tool needs to use the pocket junction on the head.
grasp(getNextTool(sCarrier), getJunction(sCarrier, "S"));

For the activation of the tool, the correct carrier object is required again:
activateNextTool (sCarrier);

14.4.5 Un-mount Tool


This subprogram represents the PLC action to mount the head and is implemented in AnyController language. Un-mounting the tool is done as usual, with the hint that again the
predefined carrier name needs to be used.
sCarrier = getVariable("SIM_TOOL_CARRIER");
release ( getCurrentTool(sCarrier));

14.4.6 Un-mount Head


This subprogram represents the PLC action to mount the head and is implemented in AnyController language. As for mount, also two steps are required: the physical un-mount using the
grasp command and the logical un-mount using the AC command unmountHead. To position the
head on the correct place in the magazine, the head name variable is used.
nHeadID
= getVariable("$P_HEADNO");
sHeadName = getVariable("$P_HEADNAME");
grasp(sHeadName, getJunction("HEAD-"+ITOS(nHeadID),"HMJ"));
unmountHead("S");

14.5

Changes in the MCF for the head change

This section is for experienced people who usually take care of customizing CSE
simulation drivers only. It describes what is changed in the MCF on top of the OOTB CCF to
implement the given head change example.
14.5.1 About head correction
One important enhancement in NX8.5 is the capability to access the head correction matrix in
CSE. With this information it is possible to activate a complete compensation calculation of the
head including the actual position of the axes in the head. A new CSE kernel method was
introduced to get the data from NX CAM.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 34 / 56

CAM/SIM MACH Content


The 2nd parameter of the kernel method getHeadCorrection needs to be the name of a registered
tool carrier. When the head is mounted and logically assigned (mountHead), CSE registers a tool
carrier for each pocket on the head. These names are currently based on the KIM-name like:

If this head gets mounted to the spindle S (main tool carrier of the machine tool) the parameters
of getHeadCorrection look like:
getHeadCorrection("S","H"+getVariable("$P_HEADNO")+"_SPINDLE")
14.5.2 Axis and channel configuration in the MCF
The mount head and un-mount head CSE kernel command register and unregister the axes on
the head. To achieve the correct behavior in this example the base MCF does include the axes of
the base machine only. These are X,Y,Z and the spindle S.
14.5.3 Changes done in meta Code D
The length correction of both the tool and the head, are set in the transformation $TOOL.
Below the main difference on top of the CCF is shown. The kernel command SetToolCorrection
is used, but it is important here to use the correct tool carrier to get the compensation of the tool.
The compensation of the head is determined by calling getHeadCorrection. To follow the
common implementation, the overall handling is achieved in the D metacode, but the pure math
and setting of the $TOOL transformation is done in a method called from the D metacode. That
method is called GMe_ActivateHeadCorrection.

Note: In this implementation the update of the length compensation of the tool plus head is done
only if the D meta code is called. To handle e.g. an update after each motion of a heads rotary
axis it would be necessary to overwrite and change the meta code for C and A (calling the related
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 35 / 56

CAM/SIM MACH Content


method from there). But due to the fact that this will be very uncommon behavior on real machine
tools it is not implemented this way in the CSE sim16 example.
14.5.4 Method GMe_ActivateHeadCorrection
In this method the correction values for the mounted head and possible axis position are
calculated and the kernel commands provide a transformation matrix. That data is used to either
only add the length compensation or and that is default compensate the length and swivel the
working plane based on the actual orientation of the head. The mode can be controlled by the
last parameter of the TOOLCHANGE subprogram, which internally sets the
HEAD_TRANS_PLUS_SWIVEL variable.
For deeper details about the math behind that please use the MC and check the related method.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 36 / 56

CAM/SIM MACH Content

15 Sim09 becomes a Turn-Mill machine Tool


With NX9 the sim09 Sinumerik is enhanced with a turning table. Doing so that machine tool
becomes a turn-mill machine tool. The following chapters explain in detail what is done to
achieve this e.g. what is specific updated on top of the previous milling only sim09.

15.1

Kinematic Configuration

15.1.1
Machine Tool Builder
The kinematic model contains two spindle objects. The First one is the main spindle with the tool
mount junction S in head and the second one C with the part mount junction on the rotary
table. Both components are classified as spindles-objects and can be driven with a NC command
e.g. S1000 M3.
For lathe spindles it is necessary to create two spindle components (C_Base, C_Rotary) beneath
a parent object with a containing rotary junction (C_TABLE_ROT).
The C_BASE-component contains the NC axis flag and is classified as _LATHE_SPINDLE
without any graphics. The graphic elements are assigned in the C_ROTARY component

15.1.2
Machine Configurator
For the CSE driver it is also necessary to assign these two spindle objects. The C component
must be classified and assigned as a spindle as well as the S component. The default setup for
main spindle is S.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 37 / 56

CAM/SIM MACH Content


15.1.3

Adapted CSE-controller functions

SETMS
The Sinumerik NC-command SETMS set the active main spindle. (1 for S; 2 for C)

Tool length correction


The CSE driver for sim09 query tool correction data from ISV (using GV_bUseSetToolCorrection
== TRUE). The method for the tool length correction is divided into three different cases:
Case1 - 0 rotated B-Head (vertical) and G17 working plane for milling/drilling

Case2 - 0 rotated B-Head (vertical) and G18 working plane for turning
considered the non-centered tool tip and the L-correction on first axis

Case3 - 180 rotated B-Head (horizontal) and G18 working plane for turning

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 38 / 56

CAM/SIM MACH Content

The following picture illustrates the reason for the advanced customization in the third case of the
tool length correction method. The head rotation from vertical (B0) into horizontal position (B180),
causes an offset value (101,6mm) which must be considered in the tool length correction. The
function calculateIKSLinears calculates this offset value.

15.1.4
Turning specific NC section
Turning operations take place in the XZ-working plane (G18). Therefore its required to swivel
(ROT) the coordinate system into the correct working plane.
For asymmetric tools (e.g. turning tool) the tool tip must be orientated (SPOS) into the correct
cutting direction.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 39 / 56

CAM/SIM MACH Content

15.2

Changes of the Post

15.2.1
Def-File
Adresses
S
Change [S$spindle=]
M_spindle
Change [M$spindle=]
spos
Change "SPOS1="
frame_rot_z Added
15.2.2
Limits

PUI

mom_kin_4th_axis_min_limit
mom_kin_4th_axis_plane
mom_kin_4th_axis_vector(2)
mom_kin_5th_axis_max_limit
mom_kin_5th_axis_plane
mom_kin_max_fpm
15.2.3
TCL
MOM_initial_move:
Removed
Template
Added
Custom
Command
Added
Template
Changed
Parameter

15.2.4
Added

"S"
"M"
"SPOS="
ROT Z

Auto Tool Change


Template

Change
Change
Change
Change
Change
Change

Old
0
ZX
0
360
0
10000

New
-360
Other
1
360000
-360000
15000

set_spindle
PB_CMD_TURN_reset_rotary
set_spindle (if TURN)
mom_siemens_5axis_mode = SWIVELING
in PB_CMD_set_Sinumerik_default_setting

Frame_z_rot

Added Custom Commands: PB_CMD_TURN_reset_rotary


Changed Auto_Tool_Change to output ROT Z,90 to rotate coordinate system
Compensate for the 180 position of the head
SPOS to select the correct spindle for tool change/turning

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 40 / 56

CAM/SIM MACH Content

16 Creating your own CSE examples based on the OOTB mach


examples
It is possible to re-use the OOTB examples to build your own machine tool simulation by either
selecting an alternative controller (SINUMERIK, Fanuc and TNC) or a comparable machine tool.
If the target machine tool is too complex to be derived from one of our OOTB examples, please
contact you Siemens PL service representative.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 41 / 56

CAM/SIM MACH Content

17 Appendix
A.

Example NC code TRAORI and circles

The used NC code example of TRAORI and circle handling


N90 G40 G17 G710 G94 G90 G60 G601 FNORM
N340 T="UGT0203_005"
N350 M6
G54
D6
G0 X0.0 Y0.0 Z0.0
; This NC code example should explain and demonstrate how circle handling
; and TRAORI plays together.
;
; TEST A:
; Position to a point on the geometry
G0 X26.750670246 Y42.242178464 Z0.0
; make a circle
F1000
G3 X26.750670246 Y-42.242178464 I-26.750670246 J-42.242178464
;
; TEST B:
; rotate the table including the part and do the motion again.
G0 B-60 C0.0
G0 X26.750670246 Y42.242178464 Z0.0
G3 X26.750670246 Y-42.242178464 I-26.750670246 J-42.242178464
; For sure the motion is the same - no one tell the controller to do different
;
; TEST C:
; Activate TRAORI and try again
ORIWKS
TRAORI
G0 X0.0 Y0.0 Z0.0
G0 X26.750670246 Y42.242178464 Z0.0
G3 X26.750670246 Y-42.242178464 I-26.750670246 J-42.242178464
; TRAORI activates the compensation for the moved coordinate system.
; so the circle is done in the rotated plane.
;
; TEST D:
; There are cases where the machine should do the circle still in the XY-Plane
; of the machine tool,
; (not in the rotated plane defined by the rotation and TRAORI
; Deactivate output TRAORI, to have circle in the original (XY) plane
TRAFOOF
G0 X0.0 Y0.0 Z0.0
;
; TRAORI is off
; so the NC code needs to have the offset of the rotation calculated (!).
;
; The values are based on the rotation -60 around B and 0 around C
; on the position of the original coordinate system in respect to the rotary
; NC axis (kinematics model)
;
G0 X141.506583681 Y0.0 Z-254.902851038
G0 X=141.506583681+13.375335123 Y=0.0+42.242178464 Z=-254.902851038-23.166760002
G3 X=141.506583681+13.375335123 Y=0.0-42.242178464 I-26.750670246 J-42.242178464
;
;
;
;
;
;

Summary:
The NC code examples shows, that the case 'D is general possible,
but this not supported by the OOTB post processors.
So the rule here is:
Activate TRAORI and avoid outputting circle statements G2/G3
after activating TRAORI and have NC axes rotated

M30

B.

Detailed information about ini files

A setup-specific INI file could contain, for example

a list of setup-specific tools and tool count


initial machine positions
default fixture offset register
inch or metric unit selection

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 42 / 56

CAM/SIM MACH Content


Putting such INI files directly into the mach kit affects all setups that share the same machine.
When creating your own copies of the OOTB machine tool examples, consider the following
execution order for INI files:
All INI files in the MACH library directory parallel to the place where the MCF file is
located
All INI files in the CAM-Setup-part working directory (subfolder cse_files)
All INI files in the directory specified by the UGII_CAM_CSE_USER_DIR environment
variable
Within a directory, the execution order is specified by the optional last hyphen. If the order is
omitted then execution order 0 is implied, and the ordering is further determined alphabetically by
programName. Should programName be the same then the entire programName-ChannelexecutionOrder is compared.

C.

Example of a tool change subprogram

This example is taken from the sim05 Sinumerik. (ToolChange.SPF)


G0 G90
; Set the tool change position values in metric X,Y,Z
R501=800.000
R502=-1000.000
R503=700.000
; check the active unit and change values if inch is in use
IF ($P_GG[13] == 2)
R501 = R501 / 25.4;
R502 = R502 / 25.4;
R503 = R503 / 25.4;
ENDIF
; move to the tool change position
G0 G53 X=R501 Y=R502
G0 G53 Z=R503
;Activate AC and do the tool mount based on preselected tool data
##LANGUAGE AC
INT nToolID;
STRING sToolName;
nToolID
= getVariable("$P_TOOLP");
sToolName = getArrayElement("$TC_TP2",nToolID);
IF (sToolName != "");
generateTool (sToolName, "S");
ELSE;
IF (nToolID > 0);
generateTool (getToolNameByNumber(nToolID), "S");
ELSE;
// ERROR no Tool preselected - ?? Send error message ??
ENDIF;
ENDIF;
IF (exist(getCurrentTool("S")));
collision (OFF, getCurrentTool("S"));
visibility (
getCurrentTool("S"), OFF, TRUE);
release
(
getCurrentTool("S"));
ENDIF;
IF (exist(getNextTool("S")));
grasp
(
getNextTool("S"),
position
(
getNextTool("S"),
visibility (
getNextTool("S"),
collision (ON, getNextTool("S"),
activateNextTool ("S");
ENDIF;
; switch back to Sinumerik syntax
##LANGUAGE NATIVE

getJunction("SPINDLE", "S"));
0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
ON, TRUE);
2, -0.01);

; return t o main program


RET

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 43 / 56

CAM/SIM MACH Content

D.

Post Processor features of the OOTB examples

This chapter describes the supported functions of the example posts of the MACH library
machine tools. All post processors are available as inch and metric versions.
Milling Machine Posts
Standard functions for 3-5 milling machines:

Standard linear, circular and rapid motion (G0,G1, G2 and G3)


Standard drilling cycles supported by NX. (G80-G89/CYCLE81-CYCLE89)
Cutter compensation (G40, G41 and G42)
Tool length compensation (G43/G43.1 for Fanuc)
Work coordinate offsets (G53-G59 /G505/G54.1 P1 etc )
Spindle control (M03, M04, M05, S)
Coolant (M08, M09)
The five- axis posts support coordinate system output on machines that have two rotary
axes. This is commonly a G68/ROT/CYCLE SPATIAL. The posts will create a local
coordinate system on the fly using the tool axis.
Five axis tool tip control G43.4/TRAORI/M128

Turning Machine Posts


Standard functions for two axis lathes.

Standard linear, circular and rapid motion (G0,G1, G2 and G3)


Standard centerline drilling cycles supported by NX (G80-G85)
Cutcom (G40, G41 and G42)
Work coordinate offsets (G53-G59)
Spindle control (M03, M04, M05)
Coolant (M08, M09)

Specific Functions in Sample Posts


Specific functions supported:
ini file will be generated by post for SINUMERIK controller including fixture offset values
and tool information.
Remove the tool at end of program for milling machine: example: T0 M06
For 4 or 5 axis machine, rotary axis limit setting in postprocessor should be same as the
machine model.
For SINUMERIK machine, tool offset value D is decided by adjust register number in CAM
setup.
Fixture offset registers range
SINUMERIK G54-G57 G505-G599
Fanuc G54-G59 G54.1 P1 G54.1 P2.
Fixture offset number in CAM setup will decide fixture offset output.
For SINUMERIK machine, if number is between 1 and 4, corresponding output is G54G57, if number is 5 output will be G505 and so on.
For Fanuc machines, if number is between 1 and 6, corresponding output is G54-G59, if
number is greater than 6, G54.1 Px will be output. X = number -6.
Tool tip control
TRAORI and M128 are similar function in Sinumerik and Heidenhain T530. They are both
kinematics independent, means mom_mcs_goto should be output instead of mom_pos for
X Y Z position.
But for OOTB Fanuc examples, G43.4 only has capability to compensate tool axis length
in variable axes milling operations. G43.1 should be used in fixed axes milling with head
rotation. G43 is used in all operations with Z orientation spindle.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 44 / 56

CAM/SIM MACH Content

E.

Example of an INI file


CHANDATA(1)
; define the offsets G54 is for $P_UIFR[1]
; define the offsets G55 is for $P_UIFR[2]
; define the offsets G...is for $P_UIFR[...]
$P_UIFR[1]=CTRANS(X,100.0,Y,80.0,Z,110.0)
;
; What is needed to place tool data into this file without having alarms.
; This is related to the tool handling mechanism in the archive.
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;

1. The used tool ID is needed to be assigned to a magazine


Therfore use:
TC_MPP6[1,2]=100
This places the tool with the number 100 to the second pocket
on the first magazine
Set the tool name or number
$TC_TP1[100]=1
$TC_TP2[100]="1401631125" ;
$TC_TP7[1]=1
;
$TC_TP8[1]=10
;

used inside the NC code to the tool 100


Tool identifier in the NC code
Magazin number for the tool
Release status of the tool
set Bit 1 - release and bit 3 tool is measured.
this is the default on the machine tool

Set tool offset values for the related D number of the tool 100
$TC_DP1[100,1]=120
; tool type 120->milling
$TC_DP2[100,1]=133.00 ; flute length
$TC_DP3[100,1]=133.00 ; length
$TC_DP6[100,1]=68.500 ; radius
$TC_DP7[100,1]=0
; corner radius

$TC_TP1[1]=1
$TC_TP2[1]="UGT0203_065"
$TC_TP7[1]=1
$TC_TP8[1]=10
$TC_DP1[1,1]=120
$TC_DP2[1,1]=29.00
$TC_DP3[1,1]=109.00
$TC_DP6[1,1]=4.0
$TC_DP7[1,1]=4.0
$TC_MPP6[1,1]=1
;$TX_TOOLCOUNT = 9 ; tool numbers
M17

F.

Swiveling Cycles

All three CCFs for TNC, Sinumerik and Fanuc include one swivel cycle implementation for the
related NC code PLANE SPATIAL, TCARR/PAROT and G68.2. The way how that is
implemented is consolidate over the different controllers and follow one general workflow. Here
the details of that workflow:
Initialize the system/global variables to define chain kinematics.
Apply work piece coordinate rotation (and translation) to transformation
(WPFRAME for Sinumerik, ROTATIONAL for Fanuc, PLANE for TNC).
Calculate the tool vector after work piece coordinate rotation.
Calculate tool angle and part rotating angle with rotated tool vector.
Select the tool and part rotating angle based on the restriction (SEQ, limitation).
Compensate the linear offset caused by tool and part rotating.
Compensate the rotating offset caused by table rotating if applicable
(for HeadTable and TableTable machine).
Move and rotate head and/or table.

G.

PLANE SPATIAL

Inside the used MCF global variable are set related to the type of the machine tool and the axis
vector directions. Name of the variables are:
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 45 / 56

CAM/SIM MACH Content


GV_strMachineType (T, M,P)
GV_strFourthAxisName (fourth axis name)
GV_strFifthAxisName
(fifth axis name is dependent on forth axis for T and P; for M it is the one near to the
part)
GV_dFourthAxisX (x component of forth axis)
GV_dFourthAxisY (y component of forth axis)
GV_dFourthAxisZ (z component of forth axis)
GV_dFifthAxisX (x component of fifth axis)
GV_dFifthAxisY (y component of fifth axis)
GV_dFifthAxisZ (z component of fifth axis)
GV_dFourthAxisLimitMin (fourth axis limit min)
GV_dFourthAxisLimitMax (fourth axis limit max)
GV_dFifthAxisLimitMin (fifth axis limit min)
GV_dFifthAxisLimitMax (fifth axis limit max)
Here an example how that will look like in the case of the complex DMU EVO machine tool

GV_strMachineType: "P"
GV_strFourthAxisName: "B"
GV_strFifthAxisName: "C"
GV_dFourthAxisX 0.584825
GV_dFourthAxisY -0.573576
GV_dFourthAxisZ 0.573576
GV_dFifthAxisX
0.0
GV_dFifthAxisY 0.0
GV_dFifthAxisZ -1.0
GV_dFourthAxisLimitMin -9999
GV_dFourthAxisLimitMax 9999
GV_dFifthAxisLimitMin -9999
GV_dFifthAxisLimitMax 9999

About SEQ+/- parameter in PLANE SPATIAL


Choose the shortest way as the preferred solutions. Implement this in the CCF file. First check if
both solutions are achievable due to limits of the axis. If neither solution is within traverse
range, error message will be generated. This mechanism uses the axis limits set in the MCF file.
About TABLE ROT/COORD ROT in PLANE SPATIAL
Transformation mode is an optional parameter for Plane function and TABLE ROT. This takes
effect only if the configuration is TABLE ROT, machine type head-head and SPC>0 (Q122=0)
Workflow of internal PLANE SPATIAL implementation

Apply SPA SPB SPC rotation to PLANE


Calculate the tool vector with SPA SPB SPC rotation
Generate possible tool and part angle solution using calculateIKSAngles
Get valid tool and part angle solution via GMe_SwivelingGetRotateSolution
Set Q120 Q121 Q122 accordingly
Set linear compensation due to tool holder rotation via GMe_SwivelingCalculateLinears
Align WCS on table rotation via GMe_SwivelingCompTableRotation
Handle TABLE ROT exception
Move rotary axis with meta code MOVE/TURN/STAY and ABST.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 46 / 56

CAM/SIM MACH Content

H.

CYCLE800

Basic Workflow
The CYCLE800.SPF consists of two subprograms, which are:
On Powerline: TOOLCARR.SPF
On Solutionline: CUST_800.SPF
In addition CYCLE800 makes use of lots of system-variables and machine data, e.g.
TC_CARRxx[x] that holds the kinematic configuration and also needs some definition files like
PGUD.DEF and SMAC.DEF so on Powerline even more.

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 47 / 56

CAM/SIM MACH Content


Basic about TCARR and PAROT
The command TCARR calculates rotational axis angle, and calculates the translation
compensation based on current kinematics, and apply it to the according transformation. The
command PAROT rotates the transformation PARTFRAME for the table.
Depending on the mode of $P_GG[42] (TCOABS, TCOFR) the compensation is calculated in
TCARR.
With TCOABS
Based on the angles defined in TC_CARR13 and TC_CARR14
With TCOFR
Based on the current tool orientation the angles are calculated first IKS and picker
required simCYCLE800 consists of two subprograms: CYCLE800.SPF(Siemens),

TOOLCARR.SPF(CUST_800 is the name used in current CYCLE800.SPF) It moves and rotates


the tool or table according to the input mode. Currently it is implemented for M20 M40 M41
cases.
M20 Rotate the tool or table according to $TC_CARR13 and $TC_CARR14
M40 The initiation behavior defined by the user
M41 Tool retract Axis Z

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 48 / 56

CAM/SIM MACH Content


Workflow of TCARR
Start TCARR

YES

0 >= Value

Reset
transformation

NO

TCOFR

TCOABS
Assign
TC_CARR13&14
to
partAngle&toolAng
le

Calculate IKS
Angles
Set $P_TCSOL &
$P_TCANG value
Gme_GetRotateS
olution

TRUE

TCOABS or
TCOFR

Gme_Caculateline
ars

$P_TCSOL>0

Assign
TCANG1&2 to
partAngle&toolAng
le

YES

CARR13==TC
ANG3 AND
CARR14==TC
ANG4AND
CARR13!=0AN
D CARR14!=0

Assign
TCANG3&4 to
partAngle&toolAng
le

FALSE

NO

Gme_Caculateline
ars

End TCARR

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 49 / 56

CAM/SIM MACH Content


Workflow of PAROT

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 50 / 56

CAM/SIM MACH Content


How to set $TC_CARR37
The OOTB examples uses the Solutionline version 4.4 example: $TC_CARR37[1]=201003003

I.

G68.2

Workflow of internal G68.2 implementation


Apply XYZ translation and IJK rotation to ROTATIONAL
Calculate the tool vector with IJK rotation
Generate possible tool and part angle solution using calculateIKSAngles
Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 51 / 56

CAM/SIM MACH Content


Select the tool and part rotating angle based on the axis limitation by
GMe_SwivelingGetRotateSolution.
Set GV_dFourthAxisAngle and GV_dFifthAxisAngle accordingly
Set linear compensation due to tool holder rotation using GMe_SwivelingCalculateLinears
Align WCS on table rotation via GMe_SwivelingCompTableRotation
About G53.1
If G68.2 specifies the relationship between the feature coordinate system and the work piece
coordinate system, G53.1 will automatically specifies the +Z direction of the feature coordinate
system as the tool axis direction even if no angle is specified for the rotary axis.
G53.1 must be specified in a block after the block that contains G68.2
G53.1 must be specified in a block in which there is no other command.

J.

Default controller settings inside the CCFs

This section list the settings, which are take place when a CSE simulation is initialized based on
the OOTB CCF. Thus the method CSEInitializeChannel is called, which sets these defaults.
Afterwards possible ini files get registered, which add addition defaults or can overwrite the ones
already set.
Sinumerik:
Defaults set in the CCF:
G0 G17 G54 G60 G601 G710 G90 G94 CFC NORM G450 BRISK ORIMKS DIAMOF
TCOABS
GV_bUseLoadOffset=FALSE to deactivate the LoadOffset functionality.
GV_bUseSetToolCorrection=FALSE to not use SetToolCorrection in D-Metacode and use
data from ini file instead.
$MC_FRAME_ADD_COMPONENTS=1. This means G58 and G59 can be used. Also
means that TRANS stores in $P_PFRAME[.., TR] and ATRANS stores in $P_PFRAME[..,
FI]
Defaults from the ini File:
TO_INI ; load a to_ini file including tool and offset data produced by the OOTB post
(the file TO_INI is handled like a subprogram. If this is not found the system will NOT raise
an error message as usual)
SMAC ; definition subprogram from Siemens SL
PGUD ;definition subprogram from Siemens SL
TC_CARR ; Sets data for the CYCLE800 see TC_CARR.DEF
G40 D0
$MN_MM_NUM_TOOL_CARRIER=1
$TX_TOOLCOUNT=1000
Fanuc:
Defaults set in the CCF:

G21 G0 G17 G90 G94


Default-Configuration for the controller:#983=1 : Serie M - machining centers.
(Change in INI program to 0 for Serie T
#3401=1: calculator notation, G-Code System
ABit 0: 1 = calculator notation; 0 = smallest increment notationBit 6+7: 0 = G-Code System
A; 64 = G-Code
System B; 128 = G-Code System CThe smallest increment multiplier can be specified in
GMe_SetUnit (Default:

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 52 / 56

CAM/SIM MACH Content


1000.0).#19696=0 : rotating table coordinate system for G43.4/5. Change in INI program
to 32 for non-rotating
workpiece coordinate system
GV_bUseLoadOffset=TRUE to activate the LoadOffset functionality
Defaults from the ini File:
(#19696=0 : rotating table coordinate system for G43.4/5. Change in INI program to 32 for
non-rotating workpiece coordinate system)
#19696=32
G54
(Implement the setting of the reference point G28 unit dependent)
G10L52
N1240P1R0
N1240P2R0
N1240P3R-200.000
G11
TNC Heidenhain:
Defaults set in the CCF:
GV_bUseLoadOffset=TRUE (used for CYCLE_DEF_7)
GV_bUseLoadOffset247=FALSE (used for CYCLE_DEF_247)
Defaults from the ini File:
No ini File

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 53 / 56

CAM/SIM MACH Content

K.

OOTB MCS Handling output details

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 54 / 56

CAM/SIM MACH Content

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 55 / 56

CAM/SIM MACH Content

Working-with-OOTB-MACH-Simulation-Examples-NX902.docx

Page 56 / 56

Вам также может понравиться