Lathe Siemens 840D Post Processor creation

This post creation is still in progress but it show a pratical example on how you can customize the output gcode
Macro still need to be handled
Require eCam at least version 5.0 Build 237

Overview

In this page you can see a pratical example on how customize the post processor.

The interested controller is a Siemens 840D .

From this link is possible download the related manual in PDF format.

You can find the result in post processor download page.

Depending on controller configuration , Sinumerik may support both SINUMERIK and ISO dialect mode with G290/G291 code. 

In this page is used the SINUMERIK mode.

If you see something wrong or you want propose some correction , please contact me .

Before to start, take a look at page "How to edit post processor"


Create a new post processor file

The default g-code generated from eCam is "Fanuc like" code, i need to customize it in order to run in this machine.

First i need to clone an existing post processor and rename it . 

Please see related this documentation page for this step.


Change the default output file extension

The .MPF output file extension is required from this controller.

Set the [File Name Template] to {PRJ_FILENAME}.MPF

See this documentation page for more info on this step.


Edit program header and footer

% char are not supported and the comment require a ; char at start.

Update the template [Head New Program] like this: 

;{PRG_NAME}
{SIEMENS_840_WORKPIECE_DEFINITION}
;CREATED  {CREATION_DATE}
{TOOL_SUMMARY}
And remove the % from the program footer template [End Program] :
M5
M9
M30

Set the stock definition placeholder in program header

In the head template you can see the tag {SIEMENS_840_WORKPIECE_DEFINITION}

This tag contain the formatted string required from siemens 840D to define the workpiece used in machine graphic


Feed Mode

G95 is used instead of G99 to define the feed in mm/rev or inch/rev

G94 is used instead of G98 to define the feed in mm/min or inch/min

So search and update the post properties [SYNC Feed Mode] and [ASYNC Feed Mode] with G95 and G94 values.


Operation headers

The operation header templates are called to init the single machining operation.

When live tools are available, the operations that use it have a dedicated template.

Update the following templates like this :

[Operation head code] : 

This is default operation header .

EMPTY_LINE}
{LINE_N}
{ORIGIN}
;{OP_DESC}
{COOLANT_CODE}
{BRAKE_OFF_PLACEHOLDER}
{FEED_MODE}{WORKPLANE_SYSTEM}
G26S{REV_LIMIT_VALUE}
;Z MIN {MIN_Z_VALUE}
{TOOL_CALL_TEMPLATE}
TC(1)
{SPEED_MODE}S{SPEED_VALUE}{SPINDLE_ORIENTATION}

 [Operation head code (with NO TOOLCHANGE)] :

This header is called when the toolchange is not called .

{EMPTY_LINE}
;{OP_DESC}
;Z MIN {MIN_Z_VALUE}
{ORIGIN}
{SPEED_MODE}S{SPEED_VALUE}{SPINDLE_ORIENTATION}

[Operation head code (WITH LIVE TOOLS)] :

This header is called the lathe live tool is used in operation.

{EMPTY_LINE}
{LINE_N}
{ORIGIN}
;{OP_DESC}
{COOLANT_CODE}
{BRAKE_OFF_PLACEHOLDER}
{FEED_MODE}{WORKPLANE_SYSTEM}
;{RADIUS_COMP_INFO}
;{TOOL_LABEL}
;Z MIN {MIN_Z_VALUE}
{TOOL_CALL_TEMPLATE}
TC(1)
SPOS[4]={OPERATION_AXIS_C_ANGLE_VALUE}
{BRAKE_ON_PLACEHOLDER}
S{SPEED_VALUE}{SPINDLE_ORIENTATION}

[Operation head code (WITH LIVE TOOLS and NO TOOLCHANGE)] :

This header is called the lathe live tool is used in operation but the toolchange is not called .

{EMPTY_LINE}
;{OP_DESC}
;Z MIN {MIN_Z_VALUE}
{ORIGIN}
SPOS[4]={OPERATION_AXIS_C_ANGLE_VALUE}
S{SPEED_VALUE}{SPINDLE_ORIENTATION}
{EMPTY_LINE}


Spindle revolution limiter

For the spindle revolution limite G26 is used instead of G50 to define the spindle max revolution limit.

This change is already done in previous operation header.


Tool called by tool description

If the tool are called by tool description, not by tool number.

Search and edit the property [Define tool based on:] to ToolNameField

Note : the {TOOL_CALL_TEMPLATE} tag is used in operation header. 


Frontal milling in XC plane ( G12 equivalent )

Is required the code  TRANSMIT to initialize the polar coordinate in frontal milling XC plane.
Search and edit the "Activate polar coordinate" to  TRANSMIT

Search and edit the "Deactivate polar coordinate" to TRAFOOF 

This control use the Y coordinate instead of C coordinate , so check the property "Use Y Coordinate instead of C G12 Polar mode"

Still need help? Contact Us Contact Us