Working With OOTB MACH Simulation Examples
Working With OOTB MACH Simulation Examples
Working With OOTB MACH Simulation Examples
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 2 / 45
CAM/SIM MACH Content
2 Overview
This document explains the handling and usage of the simulation examples provided out-of-the-
box (OOTB) with NX Version 8.5. 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 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-NX85.docx Page 3 / 45
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.
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.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 4 / 45
CAM/SIM MACH Content
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-NX85.docx Page 5 / 45
CAM/SIM MACH Content
All other used MCS‟s 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)
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
TRANS/ROT or CYCLE800 (based on UDE) -> SINUMERIK
G68 -> Fanuc
PLANE SPATIAL -> TNC
With these settings the example will look like:
MCS Name Purpose Fixture Offset Special Output Post S840D Post Fanuc Post TNC
MCS_MAIN Main 0 -
| MCS_G54 Local 1 Fixture Offset G54 G54 CYCL DEF 7.0
| MCS_G55 Local 2 Fixture Offset G55 G55 CYCL DEF 7.0
| ROT Local 2 (inherit) CSYS Rotation CYCLE800 G68.2 PLANE SPATIAL
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],
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 6 / 45
CAM/SIM MACH Content
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.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 7 / 45
CAM/SIM MACH Content
MCS-Main (G53)
|----MCS-Local-for-G54 mom_csys_matrix
|-----MCS-for CSYS rotation or other-purpose mom_parent_csys_matrix
This can be easily changed by drag the box “G0 AC” and drop it under TRAORI.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 8 / 45
CAM/SIM MACH Content
To restore 3Dcutcom output in OOTB post, remove the “#” before PB_CMD_calculate_cutcom in
PB_CMD_before_motion. And put PB_CMD_output_cutcom_mode into Initial move and First
Move as below.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 9 / 45
CAM/SIM MACH Content
6.4 Supported default UDEs of the OOTB Posts
This chapter gives a list of all user defined events (from the ude.cdl), which are supported by the
OOTB Posts. All other UDEs are not handled by the provided post processors.
Auxfun
Cutter Compensation
Dwell
Insert
Tool Length Compensation
Lock Axis
Optional Skip Off
Optional Skip ON
Optional Stop
Prefun
Pprint
Rotate
Sequence Number
Extra Spindle On
Spindle Off
Stop
User Defined
6.5 Coolant
OOTB post processors only support M8 (coolant on) and M9 (coolant off), to output other coolant
codes, post processors need to be customized.
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 don‟t output TRAORI anymore, but use CYCLE800 to swivel
the plane.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 10 / 45
CAM/SIM MACH Content
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 11 / 45
CAM/SIM MACH Content
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.
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.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 12 / 45
CAM/SIM MACH Content
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.
If needed, the values of the reference point can easily be changed in the ini file. All coordinates
are assumed to be metric.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 13 / 45
CAM/SIM MACH Content
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 14 / 45
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 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.
More details about the cycle and the way how it is implemented in CSE can be found in the
Appendix
11.2 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
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 15 / 45
CAM/SIM MACH Content
11.2.2 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.
milling operations and drilling operations needs to be 3+2 orientation
Sinumerik 840 UDE should be added on the operations, Transformation option should
choose “Swiveling” as shown below:
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 16 / 45
CAM/SIM MACH Content
$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
$TC_CARR31[1]=-9999999
$TC_CARR32[1]=90; software maximum limit of rotary axes
$TC_CARR33[1]=9999999
$TC_CARR34 tool holder name
$TC_CARR35 Axis name 1
$TC_CARR36 Axis name 2
$TC_CARR37 Identifier how to set it?
$TC_CARR40 Z axis retract value
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. (Since NX8)
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 doesn‟t 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 SIM13:
This machine tool is only available with a Fanuc controller model.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 17 / 45
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
+ C4
+ Z3
+ X1
+ Y1
+ B1
+ Z2
+ C2
+ C3 + Z1
+ X2
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 18 / 45
CAM/SIM MACH Content
13.2 ONT Coordinate systems setup
G53
G54
MZJ
Local 1
G59
G55
Local 2
G59
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 19 / 45
CAM/SIM MACH Content
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 20 / 45
CAM/SIM MACH Content
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.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 21 / 45
CAM/SIM MACH Content
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.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 22 / 45
CAM/SIM MACH Content
The contact point which needs to be selected is the point until the FXS motion should take place
to move the part mount junction position of the subspindle to the selected point.
To achieve the mounting of the work piece from the main to the sub spindle the subprogram
part_takeover.spf located in the subprog folder of sim15 takes the responsibility. The kernel
command deal with junction names, so that it is important to have the correct names of the
junctions. The two junctions with the name WORKPIECE_TAKE_OVER are used in this subprog
and need to be placed and named correctly in the CAM setup.
13.8 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.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 23 / 45
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:
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 24 / 45
CAM/SIM MACH Content
100mm
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 25 / 45
CAM/SIM MACH Content
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.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 26 / 45
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
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 27 / 45
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.
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:
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-NX85.docx Page 28 / 45
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.
mountHead(sHeadName, "S");
grasp(sHeadName, getJunction("POCKET", "S"));
The mountHead command registers the head‟s 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-NX85.docx Page 29 / 45
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 Any-
Controller 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);
grasp(sHeadName, getJunction("HEAD-"+ITOS(nHeadID),"HMJ"));
unmountHead("S");
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 30 / 45
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")
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 head’s 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-NX85.docx Page 31 / 45
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-NX85.docx Page 32 / 45
CAM/SIM MACH Content
16 Appendix
A. Example NC code TRAORI and circles
The used NC code example of TRAORI and circle handling
; 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
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"), getJunction("SPINDLE", "S"));
position ( getNextTool("S"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
visibility ( getNextTool("S"), ON, TRUE);
collision (ON, getNextTool("S"), 2, -0.01);
activateNextTool ("S");
ENDIF;
; switch back to Sinumerik syntax
##LANGUAGE NATIVE
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 34 / 45
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)
Multiple plane circular interpolation (G17, G18 and G19)
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 G54-
G57, 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-NX85.docx Page 35 / 45
CAM/SIM MACH Content
E. Example of an INI file
CHANDATA(1)
$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.
$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
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 variables for this functionality.
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-NX85.docx Page 36 / 45
CAM/SIM MACH Content
GV_strMachineType (“HeadHead”, “HeadTable”,”TableTable”)
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)
Here an example how that will look like in the case of the complex DMU EVO machine tool
GV_strMachineType: "TableTable"
GV_dFourthAxisX 0.584825
GV_dFourthAxisY -0.573576
GV_dFourthAxisZ 0.573576
GV_dFifthAxisX 0.0
GV_dFifthAxisY 0.0
GV_dFifthAxisZ -1.0
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_GetPlaneSolution
Set Q120 Q121 Q122 accordingly
Set linear compensation due to tool holder rotation via GMe_CalculateLinears
Align WCS on table rotation via GMe_CompTableRotation
Handle TABLE ROT exception
Move rotary axis with meta code MOVE/TURN/STAY and ABST.
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-NX85.docx Page 37 / 45
CAM/SIM MACH Content
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 38 / 45
CAM/SIM MACH Content
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),
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 39 / 45
CAM/SIM MACH Content
Workflow of TCARR
Start TCARR
Reset TCOABS or
TCOFR TCOABS
transformation TCOFR
Assign
TC_CARR13&14
Calculate IKS
to
Angles
partAngle&toolAng
le
Set $P_TCSOL &
$P_TCANG value
Gme_GetRotateS
Gme_Caculateline
olution
ars
TRUE $P_TCSOL>0
Assign
TCANG1&2 to
partAngle&toolAng
le
CARR13==TC
ANG3 AND
CARR14==TC
YES
ANG4AND
CARR13!=0AN
D CARR14!=0
Assign
TCANG3&4 to FALSE
partAngle&toolAng
le
NO
Gme_Caculateline
ars
End TCARR
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 40 / 45
CAM/SIM MACH Content
Workflow of PAROT
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 41 / 45
CAM/SIM MACH Content
How to set $TC_CARR37
The OOTB examples uses the Solutionline example:$TC_CARR37[1]=201003003
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 42 / 45
CAM/SIM MACH Content
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
Select the tool and part rotating angle based on the axis limitation.
Set GV_dFourthAxisAngle and GV_dFifthAxisAngle accordingly
Set linear compensation due to tool holder rotation using GMe_CalculateLinears
Align WCS on table rotation via GMe_CompTableRotation
About G53.1
If G68.2 specifies the relationship between the feature coordinate system and the wrokpiece
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.
Working-with-OOTB-MACH-Simulation-Examples-NX85.docx Page 43 / 45
CAM/SIM MACH Content
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:
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-NX85.docx Page 44 / 45