You are on page 1of 8

Siemens PLM Software

SIM 01 Mill 3 AX
OOTB - Simulation Sample Documentation
Table of content
1 General Information........................................................................................................1
2 Toolchange .....................................................................................................................2
2.1 Kinematic and axis configuration .............................................................................2
2.2 Tool change subrogram ............................................................................................3
3 Sim01 with generic controller .........................................................................................4
3.1 General.....................................................................................................................4
3.2 CAM Setup ..............................................................................................................4
3.3 Postprocessor ...........................................................................................................5
3.4 CSE Driver ...............................................................................................................5
1

1 General Information
This OOTB sample is a simple 3 axis milling machine and prepared for Sinumerik, Fanuc,
Heidenhain iTNC and a generic controller. Excerpt the generic controller the tool change
includes a moving tool magazine with pre-mounted tools on 8 pockets. The following chapter
explains the tool change process in detail to understand how it works. The generic controller
type is entirely written in Python.
2

2 Toolchange
2.1 Kinematic and axis configuration
The tool magazine moves in two different ways. The V axis, as linear axis, moves the entire
magazine including the premounted tools to the tool mount position and back after the tool
was prepositioned by the C axis, as rotary axis.

The tool magazine itself is a kinematic component classified as _DEVICE including the
rotary C axis. To have a setup with premounted tools it is mandatory to classify the magazine
pockets as _STATIC_HOLDER with a unique component and junction name, e.g.
POCKET_01  T1 junction.
3

2.2 Tool change subrogram


The movement for the tool change and the tool mounting itself takes place in the
ToolChange.spf/prg/h subprogram for each controller. This subprogram is called by command
M6 (Sinumerik, Fanuc) or TOOL CALL (Heidenhain) in NC program. The axis movement is
controlled with NC commands e.g. G0 G53 V=R504 (Sinumerik).

The following snipped comes from the ToolChange.prg of the Fanuc controller. All other
controller are similar and follow the same mechanism and workflow. The only differences are
the controller specific variable types and names.

#4120 is set by T-Metacode in MCF/CCF

getCarriertool returns the tool ID from


the given SlotID on the named carrier

setNextTool preselects the next tool


for the named carrier

If there is a tool already mounted on


Position the tool magazine and
the spindle this will be grasped to its
movement to the tool change position
previous pocket of the carrier
#4121 is set after the following if case

If the next tool is preselected, this tool


will be grasped on the spindle object
of the spindle. When the grasp is
finished the tool in the spindle gets
activated.
4

3 Sim01 with generic controller


3.1 General
The sim01 NC simulation sample includes a new generic controller driver written completely
in Python. The MCF file ‘sim01_mill_3ax_generic.MCF’ is the entry point for the simulation
driver. In there, is the setting for the implementation type ‘Python’ and which controller type is
used ‘Standard DIN66025’.
Note: Not all commands from DIN66025 are supported!

3.2 CAM Setup


Besides the existing cam setups for Fanuc, Heidenhain and Sinumerik controller there is also
a CAM setup available for generic controller.

This setup can be accessed by selecting the SIM01 Mill 3ax Generic from Manufacturing
Machine Samples palette

Note: file is located in: …\mach\samples\


nc_simulation_samples\sim01_mill_3ax_cam_generic.prt
5

3.3 Postprocessor
Postprocessor is created with Post Configurator.

3.4 CSE Driver


As mentioned in the introduction of this topic the cse driver (parser and controller
implementation) is almost completely written in Python.
The cse driver (parser and controller implementation) consist of the following files:

File (folder) Description

subprog Contains subprograms which are called via


metacodes
CSEStandard.py Start Up script for parser and controller
implementation
CseGeneric_Lex.py Parser lex token rule definition

CseGeneric_Yacc.py Parser yacc rule definition

Sim01_mill_3ax_generic.MCF Machine Configuration file for controller type,


python as implementation type, transformations
CseGeneric_Metacodes Script for metacode (Adresses, G/M-Codes,
etc.) controller implementation
CseGeneric_Methods Script for method controller implementation

CseGeneric_Variables Script for variable (NC, global, listener,


methods) implementation

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

Changelog
Date Author Description
2016-06-30 TF Initial version
2016-09-15 TF Adding chapter 1 and 2 explaining the toolchange
2018-06-15 TF Adding chapter 3

You might also like