0% found this document useful (0 votes)
219 views15 pages

SIM 09 Mill 5AX: Siemens PLM Software

This document discusses the configuration of a Siemens PLM Software SIM 09 Mill 5AX machine tool simulation for using changeable heads and turning cycles. It describes the addition of a second spindle to represent the rotary table, configuration of channels and spindles, changes to the postprocessor for the new functionality, and how offset calculations are handled for different controller types when using an adapter head.

Uploaded by

Mario MT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
219 views15 pages

SIM 09 Mill 5AX: Siemens PLM Software

This document discusses the configuration of a Siemens PLM Software SIM 09 Mill 5AX machine tool simulation for using changeable heads and turning cycles. It describes the addition of a second spindle to represent the rotary table, configuration of channels and spindles, changes to the postprocessor for the new functionality, and how offset calculations are handled for different controller types when using an adapter head.

Uploaded by

Mario MT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Siemens PLM Software

SIM 09 Mill 5AX


OOTB - Simulation Sample Documentation
1 General Information ........................................................................................................1
1.1 Limitation.................................................................................................................1
2 Python based CSE Driver................................................................................................1
3 Axes, Spindles and Channel Configuration .....................................................................2
3.1 Spindles....................................................................................................................2
3.2 Channel Configuration .............................................................................................3
4 Postprocessor ..................................................................................................................3
4.1 Def-File - Adresses ...................................................................................................3
4.2 PUI - Limits .............................................................................................................3
4.3 TCL - MOM_initial_move: ......................................................................................4
4.4 Auto Tool Change ....................................................................................................4
5 Adapter Head ..................................................................................................................5
5.1 Device library entry ..................................................................................................5
5.1.1 SIM09 - Headchange enhancements ..................................................................5
5.2 Head Offset Calculation ...........................................................................................6
5.2.1 Head offset calculation for Sinumerik controller ................................................8
5.2.2 Head offset calculation for Heidenhain controller ..............................................8
5.2.3 Head offset calculation for Fanuc controller ......................................................8
6 Working with turning cycles ...........................................................................................9
6.1 Using SIM09 for CYCL DEF 800 with TNC640 ......................................................9
6.1.1 $TOOL Tranformation ......................................................................................9
6.1.2 Additional Spindle offset ...................................................................................9
6.1.3 Tool Correction Settings for Turning Tools ..................................................... 10
6.2 Using SIM09 for CYCLE 800 with Sinumerik Operate ..........................................10
6.2.1 CSE/Python driver settings .............................................................................. 10
6.3 Postprocessor Settings for CYCLE 800 turning ...................................................... 11
6.3.1 CYCLE800 is outputted instead of “ROT Z90” ............................................... 11
6.3.2 CYCLE800 parameters setup ..........................................................................12
1

1 General Information
SIM09 OOTB machine tool includes the feature for changeable head and cycle800 turning.
Doing so the machine becomes the capability to work with heads and their correction in
conjunction with 5 axis transformation (e.g. TRAORI, PLANE SPATIAL).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.

1.1 Limitation
5-axis simultaneous operations don’t work correctly under “ADAPTER HEAD”. They can only
be put under original spindle of sim09.

2 Python based CSE Driver


CSE driver for Sinumerik controller uses Python implementation for Parser and parts of
controller implementation. Implementation selection for Python is done in sim09_mill_
5ax_sinumerik.MCF file.

Relevant Python scripts


CSE840D.py Start Up script for parser and controller
implementation
CseS840D_Commands.py
CseS840D_Lex.py Parser lex token rule definition
CseS840D_Yacc.py Parser yacc rule definition
CseS840D_Metacodes.py Script for metacode (Adresses, G/M-Codes, etc.) controller
implementation
CseS840D_Methods.py Script for method controller implementation
Sim09_mill_5ax_sinumerik.MCF Machine Configuration file for controller type, python as
implementation type, transformations

Note: CseBasic.py and CSEWrapper.py files are also used and centralized located
under …mach/auxiliary/cse/
2

3 Axes, Spindles and Channel Configuration


3.1 Spindles
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.
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.

C
3

3.2 Channel Configuration


Spindles are assigned and referenced to channel “Main”. The “C” component must be classified
and assigned as a spindle as well as the “S” component. The initial main spindle is “S”.

4 Postprocessor
4.1 Def-File - Adresses
S Change [S$spindle=] "S"
M_spindle Change [M$spindle=] "M"
spos Change "SPOS1=" "SPOS="
frame_rot_z Added ROT Z

4.2 PUI - Limits


Old New
mom_kin_4th_axis_min_limit Change 0 -360
mom_kin_4th_axis_plane Change ZX Other
mom_kin_4th_axis_vector(2) Change 0 1
mom_kin_5th_axis_max_limit Change 360 360000
mom_kin_5th_axis_plane Change 0 -360000
mom_kin_max_fpm Change 10000 15000
4

4.3 TCL - MOM_initial_move:


Removed Template set_spindle
Added Custom PB_CMD_TURN_reset_rotary
Command
Added Template set_spindle (if TURN)
Changed Parameter mom_siemens_5axis_mode = SWIVELING
in PB_CMD_set_Sinumerik_default_setting

4.4 Auto Tool Change


Added Template 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
5

5 Adapter Head
With NX 11 a new HEAD device, without rotary axis, was introduced.

5.1 Device library entry


DATA |sim09_adapter-HEAD |3 |RA Adapter| HEAD
5.1.1 SIM09 - Headchange enhancements
The SIM09 OOTB samples for FANUC, Sinumerik and Heidenhain using a specific the
toolnumber to preselect the Adapter Head before mounting a tool
In that example, tools used together with the right angle head a 4 digit tollnumber and start
with '42'. This is the way how the controller knows that before mounting a tool the head need
to be mounted. e.g. The tool with the number ‘4203’ will mount the head plus the tool with the
number ‘4203’ onto the pocket of the head.
6

When the head is mounted, a new pocket and junction name will be used in the tool grasp
function.

5.2 Head Offset Calculation


The table below shows which controller commands are working with the headcorrection and
which transformation is used to recognize the head offset. Fanuc and Heidenhain controller uses
the ‘HEAD’ transformation and Sinumerik, as on the real controller, the transformation
‘PARTFRAME’.
7

Sinumerik Fanuc Heidenhain


Commands TCARR/PAROT, G43.4, G43.5, G53.1 M128, PLANE
TRAORI SPATIAL
Trafo Stack
8

5.2.1 Head offset calculation for Sinumerik controller


Sinumerik controller command TCARR activates specific chains depending on given number
to TCARR. The number is stored in “$P_TC”. This number is used from method
GMe_GetActiveChainName to set specific chain to GV_strSwivelingChainName.

The head offset itself is calculated and activated within PAROT command by calling
GMe_ActivateHeadCorrection("")

5.2.2 Head offset calculation for Heidenhain controller


Sim09 nc simulation sample for Heidenhain controller uses customized (MCF file) PLANE and
M128 controller commands for correct head offset calculation.
Heidenhain controller command PLANE activates specific chains and calculates head offset
depending on given number to method GMe_GetActiveChainName. Head offset calculation is
activated when a head is mounted on machine pocket. Name of this pocket is stored in
GV_strMachPocketJunction.
5.2.3 Head offset calculation for Fanuc controller
Sim09 nc simulation sample for Fanuc uses custom M-Command M3333 and customized
G43.3/5 (in MCF file) controller commands for correct head offset calculation
M command M3333 is called in toolchange.prg and activates specific head chain by using
method GMe_GetActiveChainName. In case of a mounted head the HEAD transformation will
be reset.
G commands G43.4/5 activating head offset correction in case of mounted head on the machine
pocket. Name of this pocket is stored in GV_strMachPocketJunction. Head offset is activated
in transformation “HEAD”.
9

6 Working with turning cycles


The SIM09 simulation sample for Sinumerik control is a fully configured machine tool kit
including cam setup, cse driver and postprocessor to work with CYCLE 800.
The turning functionality for TNC640 is prepared within the cse driver (HeidenhainTNC.CCF)
only.

6.1 Using SIM09 for CYCL DEF 800 with TNC640


To reuse the existing cse driver for custom project, there are several points which need to be
considered.
6.1.1 $TOOL Tranformation
Consider the position of $TOOL transformation. For kinematics similar to SIM09 add $TOOL
transformation to the stack and place it to the top position within the MCF file.

6.1.2 Additional Spindle offset


Use the INITIAL VALUE setting in the axis settings in kinematic model to add initial axis
value to the spindle. This can be the case (as it is configured within the sim09 nc simulation
sample) if the Y-Direction of tool mount junction is not congruent to X direction of initial
turning csys.
10

6.1.3 Tool Correction Settings for Turning Tools


Besides the tool correction settings within the method ‘GMe_ActivateToolCorrection’ for
milling tools there is a special method for turning tools for length correction. ‘GMe_
GMe_ActivateToolCorrectionTurning’
If necessary change the order or the sign from the offsets (L/Q/Z – Correction) within the vector

The check the correct length settings call the CYCL DEF 800 without any rotation. When
moving axes to a defined position (e.g. local offset) the tool tip of the turning tool should
position to that point.

6.2 Using SIM09 for CYCLE 800 with Sinumerik Operate


The cse driver of Sim09 Sinumerik NC Simulation sample uses Python implementation for the
turning capability. The required machine variables and settings are in CHAN_DATA.def and
TC_KIN.def defined
6.2.1 CSE/Python driver settings
All commands and methods regarding the Sinumerik cycle800 turning capability are
implemented in Python.
➢ D-Metacode
Turning tools will now be handled differently to milling tools within the D-Metacode. If the
tool length correction for turning tools gets activated the system looks at first if CUTMOD
($P_CUTMOD!=0) or CUTOMDK ($P_CUTMODK!=””) was activated. If so, each of the
Cutmod commands calling their own specific methods to calculate and activate the tool length
compensation. Only one type of cutter modification calculation is possible and valid.
11

GMe_ CalculateToolCorrection_CUTMOD
This method is called when cutter modification calculation is used with the tool carrier call
TCARR. Modify this method if necessary.
CalculateToolCorrection_CUTMODK
This (Python) method is called from CseS840D_Methods.py when cutter modification
calculation is used with the kinematic chain transformation TRAFOON.

This method calls internally the Python method "ToolLengthToMachAx” which must be
modified to match the turning tool length offsets to the initial turning working plane.

6.3 Postprocessor Settings for CYCLE 800 turning


With NX12.0.2, Post Configurator postprocessor sim09_mill_5ax_sinumerik is updated to
support cycle800 turning mode.
CYCLE800 now is outputted for all turning operations. Center line drilling operation is an
exception. It is turning mode operation in NX CAM. But due to Sinumerik CYCLE800 turning
mode don’t support drilling type tool, for center line drilling operations, it is outputted with
CYCLE800 off mode.

6.3.1 CYCLE800 is outputted instead of “ROT Z90”


“ROT Z90” is removed from NC codes for turning operations.
In sim09_mill_5ax_sinumerik_service_s840d.tcl file. Below command is comment out for it.
12

#LIB_GE_command_buffer_seq LIB_SPF_first_tool_path_motion TURN,CONSTANT


{@MAIN_ORIGIN_CALL
Rotate_coordinate_system_around_Z_for_turning_operations_in_sim09

Below command is added to output cycle800 for turning.


LIB_GE_command_buffer_edit_append LIB_SPF_first_tool_path_motion
TURN,CONSTANT {Settings_for_cycle800_mode_in_sim09} Settings_for_cycle800

6.3.2 CYCLE800 parameters setup


Parameters _TC, _ST, _MODE, _DMODE, _X0, _Y0, _Z0, _X1, _Y1, _Z1,_FR, _FR_I, _DIR
are hard coded in proc Settings_for_cycle800_mode_in_sim09 as following picture.

lib_parameter(cycle800,_A) : Calculated by work plane if lib_parameter(cycle800,_B) is zero.


lib_parameter(cycle800,_B) : Calculated by tool axis.
lib_parameter(cycle800,_C) : Same as tool flip orientation. Two possible values are 0 and 180.
Please notice if lib_parameter(cycle800,_B) is zero, it is flipped.
13

APPENDIX A
G54 X0 Y0 Z0
T11 M6
G54 X0 Y0 Z0 D1
X100
X0
Y100
Y0
Z100
Z0
G18 G54
X0 Y0 Z0
CYCLE800(0,"TURN",200,57,,,,0,0,0,,,,-1,,2)
X0 Y0 Z0
X100
X0
Y100
Y0
Z100
Z0
CYCLE800(0,"TURN",200,57,,,,0,-5,0,,,,-1,,2)
X0 Y0 Z0
X100
X0
Y100
Y0
Z100
Z0
CYCLE800(0,"TURN",200,57,,,,0,0,180,,,,-1,,2)
X0 Y0 Z0
X100
X0
Y100
Y0
Z100
Z0

You might also like