RhinoCAM2020 PPG Decoded Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

Post-Processor

(PPG) Decoded
RhinoCAM 2020
Published: September 2020

MecSoft Corpotation
© Copyright 1998-2020
RhinoCAM 2020 PPG Decoded Guide
by MecSoft Corporation

User Notes:
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
________________________________
Contents 2

Table of Contents

Quick Start 3

Resource Guide 6

Introduction 7
1 What is
...................................................................................................................................
a Post-Processor? 8
2 What is
...................................................................................................................................
the PPG? 8
3 PPG Variables
...................................................................................................................................
& Macros 9

Decoding a Sample G-Code File 10


1 The Setup
...................................................................................................................................
& Post Processor 10
2 The Sample
...................................................................................................................................
Toolpaths 10
3 The Posted
...................................................................................................................................
Setup G-Code File 12
4 The 2½
...................................................................................................................................
Axis Profiling Operation G-Code 16
5 The 2½
...................................................................................................................................
Axis Hole Profiling Operation G-Code 19
6 The Deep
...................................................................................................................................
Drilling Operation G-Code 21

The Post-Processor Generator Dialog 24


1 PPG >
...................................................................................................................................
General 24
2 PPG >
...................................................................................................................................
Start/End 25
3 PPG >
...................................................................................................................................
Tool Change 28
4 PPG >
...................................................................................................................................
Setup 32
5 PPG >
...................................................................................................................................
Spindle 32
6 PPG >
...................................................................................................................................
Feed Rate 34
7 PPG >
...................................................................................................................................
Motion 36
8 PPG >
...................................................................................................................................
Circle 37
9 PPG >
...................................................................................................................................
Helical/Spiral 40
10 PPG >
...................................................................................................................................
Multi Axis Motion 42
11 PPG >
...................................................................................................................................
Cutter Compensation 43
12 PPG >
...................................................................................................................................
Cut Motion Start/End 46
13 PPG >
...................................................................................................................................
Cycles 47
14 PPG >
...................................................................................................................................
Misc 50
15 PPG >
...................................................................................................................................
Variables 52

Index 53

© 2020 MecSoft Corporation

2
3 RhinoCAM 2020 PPG Decoded Guide

Quick Start

RHINOCAM2020

Prefer Printed Documentation? Check Here!


Quick Start Guides for each RhinoCAM module are available in both PDF and Video format. Refer
to the following information to access these resources:

What's New
What's New in RhinoCAM 2020
Watch the What's New in 2020 Webinar!

The Complete Quick Start Video Play List


Here is a link to the complete 2020 Video Play List

How to Access the Quick Start Guide Documents


To help you quickly get started in working with each module, select one of the Help
buttons located on the RhinoCAM Learning Resources dialog.
You will find:
· Quick Start Guides
· What's New documents
· Online Help links
The Quick Start Guides will help you step through an example tutorial which will
illustrate how to use the module. To access the Learning Resources dialog:
1. From the Rhino Main Menu, drop down the Main menu and select Learn ...

© 2020 MecSoft Corporation


Quick Start 4

To access the Learning Resources dilog in RhinoCAM

2. Select a document from the Learning Resources dialog to get started using the
module of your choice.

You can also select the Open Quick Start Files Folder button located at the bottom
of the dialog to open the Quick Start folder where the source files (start and
completed versions) are located.

© 2020 MecSoft Corporation


5 RhinoCAM 2020 PPG Decoded Guide

Learning Resources Dialog

Related Topics
Find More Resources

© 2020 MecSoft Corporation


Resource Guide 6

Resource Guide
Download this PDF Guide for a list of the available RhinoCAM Resources.

2020 RhinoCAM Resource Guide

The 2020 RhinoCAM Resource Guide!


18 Pages
Lists PDF downloads and Online resources including Quick Start
Guides, Reference Guides, Exercise Guides, Tutorials and
More.

Click Here to download this Free guide!

© 2020 MecSoft Corporation


7 RhinoCAM 2020 PPG Decoded Guide

Introduction
This guide provides the basis for understanding how the PPG operates and how you can use it to
customize your posted g-code files. It uses a simple part file example with three toolpath
operations. Each toolpath is illustrated, examined and the resulting G-Code is color coded to the
portion of the PPG that controls it. Each section of the PPG is then explained and examined for
the part file example and its resulting G-Code.

NOTE: This guide includes sample CAM files, toolpath


operations, a customized haas post definition file and
the sample G-Code file. These source files are included in
your CAMJam download archive.

CAMJam Download Archive

Remember: The PPG is your friend! It can save you


and your CNC operator enormous amounts of time
during production!

© 2020 MecSoft Corporation


Introduction 8

How arc motions are defined for our sample.

3.1 What is a Post-Processor?


The post-processor converts the toolpath operations you create in MecSoft CAM into a suitable
format (called G-Code) that your CNC machine controller can interpret. The G-Code that MecSoft
CAM’s post-processors create adheres to ISO6983 (the international standard for numerical
controls). The post-processor also tailors the G-Code to a specific type of CNC controller such as
Haas, Fanuc, Mach3, WinCNC, etc. MecSoft’s CAM plugins come installed with over 300 post-
processor definition files that are pre-configured for a wide range of CNC machines & controllers
available on the market today.

3.2 What is the PPG?


The Post-Processor Generator (PPG) allows you to create and customize your post definition files.
These files have the file extension of *.spm. The names of these post definition files are what
you are selecting when you define your post-processor. For example when you select MILL >
Program > Post and select the Haas post-processor you can also select the Edit … button and the
Post-Processor Generator will display with the Haas.spm post definition file loaded for editing.
The default folder where these files are stored is also listed just below the post selection. This is
illustrated in the two dialog images below.

© 2020 MecSoft Corporation


9 RhinoCAM 2020 PPG Decoded Guide

Set Post-Processor Options

The Post-Processor Generator (PPG)

3.3 PPG Variables & Macros


The PPG uses hundreds of variables and macros that allow you to customize each post definition
file. The names of the variables are pre-defined. The values for many of the variables are
extracted from your CAM cutting tools, setups, toolpath operations, etc. Other variable values are
defined within the PPG itself specific to the post definition file. Load the PPG and select
Variables to see the complete name and value of each available variable. You can also use
algebraic expressions within the PPG. Just pick the Help button from the PPG dialog to learn
more.

© 2020 MecSoft Corporation


Decoding a Sample G-Code File 10

Decoding a Sample G-Code File


In this guide we will use the following sample part and toolpaths to see how internal variables for
CAM definitions such as stock size, tool size, feeds & speeds parameters, toolpath operation types
and various other cutting parameters, are used by the post-processor generator and the post
definition file to define the format and output of the resulting G-Code file.

4.1 The Setup & Post Processor


The Machine is defined as 3 Axis (this is used for both 2½ Axis and 3 Axis applications). The post-
processor definition file selected is a Haas post that we have specifically customized for this
article. The Haas machining center has an automatic tool changer. The post definition file is haas-
blog.spm. The stock is a 2-1/8" x 2-1/8" x 1/4" 6061 Aluminum plate. All sample files are included
in the download archive at the end of this document.

The Sample Machining Job


The Sample Part

4.2 The Sample Toolpaths


The sample toolpaths included in the test part are 2½ Axis Profiling with Cutter Compensation and
External Corners Loop using a ¼” diameter end mill, 2½ Axis Hole Profiling with a helical path
using a 1/8" diameter end mill and a Deep Drilling operation using a ¼” drill.

© 2020 MecSoft Corporation


11 RhinoCAM 2020 PPG Decoded Guide

Sample Part: 2½ Axis Profiling

Sample Part: 2½ Axis Hole Profiling

© 2020 MecSoft Corporation


Decoding a Sample G-Code File 12

Sample Part: Deep Drilling

4.3 The Posted Setup G-Code File


We right-clicked on the Setup and selected Post to output one G-Code
file that includes all three machining operations. The G-Code file is
shown below. We have color-coded each line of the G-Code file to its
corresponding section in the PPG.
The PPG we have selected (haas-blog.spm) directs the format and
content of code. Using these three toolpaths you see that in the 70
lines of code 12 of the 15 PPG sections are working together to define
the G-Code file. The PPG sections are shown in the image below.
Again, we have color-coded each section to help you identify each
line in the G-Code file.
Three PPG sections are not represented in this G-Code sample. They
are listed below along with the reason why. However these sections
are discussed is this article. PPG Dialog Selections
1. Setup: This is used for 4 and 5 Axis setups only. It does not
affect our G-Code sample file.
2. Multi-Axis Motion: Again, this is used for 4 and 5 Axis setups only. It does not affect our G-
Code sample file.
3. Cut Motion Start/End: This PPG section is not required for our G-Code sample file.

© 2020 MecSoft Corporation


13 RhinoCAM 2020 PPG Decoded Guide

Highlight Setup, right-click and select Post

© 2020 MecSoft Corporation


Decoding a Sample G-Code File 14

The first half of the complete G-Code file (79 lines) is shown color coded to each PPG section
that controls it.

© 2020 MecSoft Corporation


15 RhinoCAM 2020 PPG Decoded Guide

The second half of the complete G-Code file.

© 2020 MecSoft Corporation


Decoding a Sample G-Code File 16

4.4 The 2½ Axis Profiling Operation G-Code


This toolpath strategy has Compensation enabled, a Climb Cut Direction and linear entry and exit
motions. It also has External Corner Type set to Loop from the Cornering Parameters tab. With
the Fit Arcs option enabled from the Advanced Cut Parameters tab, the four corner loops are
automatically converted to arc motions, shown in dark blue in the illustration below.

The 2½ Axis Profiling Cut Parameters

© 2020 MecSoft Corporation


17 RhinoCAM 2020 PPG Decoded Guide

The 2½ Axis Profiling Operation and G-Code

© 2020 MecSoft Corporation


Decoding a Sample G-Code File 18

The portion of the G-Code sample file created for the 2½ Axis Profiling operation is shown.

The following PPG sections affect how the G-Code for this operation is defined:
General
Tool Change
Misc
Motion

© 2020 MecSoft Corporation


19 RhinoCAM 2020 PPG Decoded Guide

Cutter Compensation
Cycles

4.5 The 2½ Axis Hole Profiling Operation G-Code


This toolpath strategy is defined by a helical motion. Because Hole Depth is set to 0.25 and the
Helix Pitch Height is set to 0.125, a total of two helical motions are required. The options to
Create full (360 degree) helixes only and Output each helix individually are enabled. The Cut
Direction is set to Conventional (Up Cutting).

The 2½ Axis Hole Profiling Operation Cut Parameters

© 2020 MecSoft Corporation


Decoding a Sample G-Code File 20

The 2½ Axis Hole Profiling toolpath has a Clockwise spindle direction and a Convention (Up Cutting) Cut Direction. Two full 360
degree helical motions are created. At the bottom of the hole profile two 180 degree arc motions are defined.

The portion of the G-Code sample file created for the 2½ Axis Hole Profiling operation is
shown.

The following PPG sections affect how the G-Code for this operation is defined:
General
Tool Change
Misc
Motion
Helical/Spiral
Circle
Cycles

© 2020 MecSoft Corporation


21 RhinoCAM 2020 PPG Decoded Guide

4.6 The Deep Drilling Operation G-Code


This toolpath strategy is defined by a Drill cycle. The Hole Depth is set to 0.25. The Drill Type is set
to Deep Drill. This enables the Step Increment option which is set to 0.1 creating three drill
increments for each of the four holes (i.e., the drill will peck down three times to complete one
hole). We have also enabled Add Tool tip to Drill Depth. This ensures a thru hole by taking into
account the tip angle of the tool when calculating the drill depth. Minimum Distance Sort is also
selected from the Sorting tab determining the fastest drill sequence.

The Cut Parameters tab for the Drilling operation.

© 2020 MecSoft Corporation


Decoding a Sample G-Code File 22

The Drill toolpath is set to Deep Drill (G83) and has an Approach Distance of 0.1 and a Step Increment of 0.1. Add Tool tip to Drill
Depth makes the total drill depth 0.32 (shown on the G83 line) when the stock is only 0.25.

The portion of the G-Code sample file created for the Drilling operation is shown.

The following PPG sections affect how the G-Code for this operation is defined:
General
Tool Change

© 2020 MecSoft Corporation


23 RhinoCAM 2020 PPG Decoded Guide

Misc
Motion
Cycles

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 24

The Post-Processor Generator Dialog


The topics below show you how our sample post (haas-blog.spm) is defined within the PPG. We
began with the standard haas.spm post definition file and added a few changes and
customizations. ALL of the customizations were performed using the PPG dialog. The sample G-
Code file was not edited or formatted manually except for adding our color-codes. We added the
colors to make it easier for you to follow this article and better understand how the different PPG
sections work together to produce the G-Code.

5.1 PPG > General


The General section of the PPG includes options that affect the entire G-Code file. Modes are set,
Units are defined, Comments are enabled, Sequence #s are enabled and defined, along with
other formatting options. The Modal Output check boxes determine if values are repeated on
every line or only when the value changes.

This is the color code for the General section.

The General section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Resulting G-Code Sample

© 2020 MecSoft Corporation


25 RhinoCAM 2020 PPG Decoded Guide

5.2 PPG > Start/End


The Start/End section of the PPG allows you to define how the start and end sections of the G-
Code file are formatted and what codes are included in these sections. The Start Up section
typically includes codes to make sure various machine functions are turned off. We have
customized it to add the stock size.

This is the color code for the Start/End section.


The tables below lists Start Up Code and the End Code along with the variables used and how
those variables were defined. Note that variables are written within brackets [ ] and comments
are written within parentheses ( ).

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 26

The Start/End section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Start Up Code

Variable Derived From

[START_CHAR] File Start Reading Character from the General


section of the PPG.

[DELIMITER] Delimiter type from the General section of the


PPG. This is set to insert a space between
values just to make it easier to read the posted
output file.

[PARTNUM] Right-click > Properties on the first Machining


Operation (Mop) under the first Setup in the
Machining Job.

[SEQ_PRECHAR] Prefix Letter from the General section of the


PPG.

© 2020 MecSoft Corporation


27 RhinoCAM 2020 PPG Decoded Guide

[SEQNUM] Use Sequence #s from the General section of


the PPG.

[STOCK_LENGTH_X] MecSoft CAM > MILL > Machining Job > Stock >
Length (L)

[STOCK_LENGTH_Y] MecSoft CAM > MILL > Machining Job > Stock >
Width (W)

[STOCK_LENGTH_Z] MecSoft CAM > MILL > Machining Job > Stock >
Height (H)

ISO Codes Function

G40 Cutter Compensation Off

G49 Tool Length Compensation Off

G80 Canned Cycle Off

Resulting G-Code Sample

End Code

Variable Derived From

[DELIMITER] Delimiter type from the General section of the


PPG.

[SEQ_PRECHAR] Prefix Letter from the General section of the


PPG.

[SEQNUM] Use Sequence #s from the General section of


the PPG.

[STOP_CHAR] File Stop Reading Character from the General


section of the PPG.

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 28

ISO Codes Function

M30 End of Program

Resulting G-Code Sample

5.3 PPG > Tool Change


The Tool Change section of the PPG allows you to define the First Tool Load Macro and the Tool
Change Macro for subsequent tool changes. These macros define all of the information your CNC
controller needs to load and change cutting tools and move the tool into position.

This is the color code for the Tool Change section.


This section is ignored if your CNC machine does not have an automatic tool changer. The reason
these are called Macros is because they use nested variables. For example [SPINDLE_BLK] is the
result of the Spindle Block Format code defined in the Spindle section of the PPG.
First you will notice that Output tool list as comments at start of program is checked. Because
Comments are enabled in the General section of the PPG, the following comments are listed at
the top of the G-Code file:

Output tool list as comments

Now onto the macros.

© 2020 MecSoft Corporation


29 RhinoCAM 2020 PPG Decoded Guide

The Tool Change section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

First Load Tool Macro

Variable Derived From

[TOOL_DIA] MecSoft CAM > Tools > Create/Select Tool > Tool Dia.

[TOOL_LENGTH] MecSoft CAM > Tools > Create/Select Tool > Tool Length.

[OUTPUT_UNITS_CODE] Units Code from the General section of the PPG.

[TOOL_NUM] MecSoft CAM > Tools > Create/Select Tool > Tool Number.

[SPINDLE_BLK] Spindle Block from the Spindle section of the PPG.

[OUTPUT_MODE_CODE] Mode Code from the Spindle section of the PPG.

[G_CODE] This will be either G0 or G1 depending on the Transfer feed


rate value on the Feeds & Speeds tab of the first Mop.
G0=Rapid, G1=Feed Rate

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 30

[NEXT_NONMDL_X] The next X coordinate if different than the last (non modal).
Because Coordinate is checked under Model Output in the
General section, coordinates are only displayed if it is
different than the last coordinate value.

[NEXT_NONMDL_Y] The next Y coordinate if different than the last (non modal).

[NEXT_NONMDL_Z] The next Z coordinate if different than the last (non modal).

[TOOL_ADJST_REG] MecSoft CAM > Tools > Create/Select Tool dialog > Adjust
Register. Should be the same as Tool Number.

ISO Codes Function

M6 Tool Change

G43 Apply Tool Length Compensation

Resulting G-Code Sample

Tool Change Macro

Variable Derived From

[TOOL_DIA] MecSoft CAM > Tools > Create/Select Tool > Tool Dia.

[TOOL_LENGTH] MecSoft CAM > Tools > Create/Select Tool > Tool Length.

[OUTPUT_UNITS_CODE] Units Code from the General section of the PPG.

[TOOL_NUM] MecSoft CAM > Tools > Create/Select Tool > Tool Number.

© 2020 MecSoft Corporation


31 RhinoCAM 2020 PPG Decoded Guide

[WORK_OFFSET_PREFIX] Work Offset Code from the Misc section of the PPG.

[WORK_OFFSET_NUM] MecSoft CAM > Machining Job > Work Zero > Work Offset
Register Number.

[SPINDLE_BLK] Spindle Block from the Spindle section of the PPG.

[OUTPUT_MODE_CODE] Mode Code from the Spindle section of the PPG.

[G_CODE] This will be either G0 or G1 depending on the Transfer feed


rate value on the Feeds & Speeds tab of the first Mop.
G0=Rapid, G1=Feed Rate

[NEXT_NONMDL_X] The next X coordinate if different than the last (non modal).
Because Coordinate is checked under Model Output in the
General section, coordinates are only displayed if it is
different than the last coordinate value.

[NEXT_NONMDL_Y] The next Y coordinate if different than the last (non modal).

[NEXT_NONMDL_Z] The next Z coordinate if different than the last (non modal).

[TOOL_ADJST_REG] MecSoft CAM > Tools > Create/Select Tool dialog > Adjust
Register. Should be the same as Tool Number.

ISO Codes Function

M6 Tool Change

G43 Apply Tool Length Compensation

Resulting G-Code Sample

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 32

5.4 PPG > Setup


The Setup section of the PPG is only used if your Machine definition is set to 4 Axis or 5 Axis
(MecSoft CAM > Machining Job > Machine). It is used to output the rotation axis and angles for the
setup. This will be covered in a future guide.

The Setup section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

5.5 PPG > Spindle


The Spindle section of the PPG defines the Spindle Block variable [SPINDLE_BLK]. It is also used to
set the High and Low values for the Spindle RPM. These values will not be exceeded regardless of
the tool or toolpath parameters. This section also defines the Spindle Direction and other spindle
related values.

This is the color code for the Spindle section.

© 2020 MecSoft Corporation


33 RhinoCAM 2020 PPG Decoded Guide

The Spindle section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Spindle Block Format

Variable Derived From

[SPINDLE_SPD] MecSoft CAM > Tools > Create/Select Tool dialog > Feeds & Speeds or
Mop > Feeds & Speeds > Spindle Speed

[SPINDLE_ARC] MecSoft CAM > Tools > Create/Select Tool dialog > Feeds & Speeds or
Mop > Feeds & Speeds > Direction

ISO Codes Function

M3 Spindle On, Clockwise rotation

M4 Spindle On, Counter Clockwise rotation

Resulting G-Code Sample

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 34

5.6 PPG > Feed Rate


The Feed Rate section of the PPG defines the block format for Feed Rate. The Feed Rate Block is
inserted only when the feed rate changes if Feedrate is checked under Modal Output in the
General section of the PPG. You can also set the High and Low values for Feedrate here as well as
other parameters related to feed rate.

This is the color code for the Feed Rate section.

© 2020 MecSoft Corporation


35 RhinoCAM 2020 PPG Decoded Guide

The Feed Rate section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Feed Rate Block Format

Variable Derived From

[FEEDRATE] MecSoft CAM > Tools > Create/Select Tool


dialog > Feeds & Speeds or Mop > Feeds &
Speeds

Resulting G-Code Sample

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 36

5.7 PPG > Motion


The Motion section of the PPG defines the Linear Motion and Rapid Motion Block Format.
Anytime a linear or rapid motion is defined it is output in this format. This section also allows you
to control other aspects of motion coordinates including X, Y and Z Scale Factors, # of Decimal
Places and more.

This is the color code for the Motion section.

The Motion section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Linear Motion Block Format

Rapid Motion Block Format

© 2020 MecSoft Corporation


37 RhinoCAM 2020 PPG Decoded Guide

Variable Derived From

[G_CODE] Will be G1 for a Linear motion or G0 for a Rapid motion

[NEXT_Z] The next Z coordinate value

[NEXT_X] The next X coordinate value

[NEXT_Y] The next Y coordinate value

Resulting G-Code Sample

5.8 PPG > Circle


The Circle section of the PPG defines all arc motions. At the top you see the G-Code and Plane
Code sections. This is followed by the Output Format and Arc Center (I, J, K) sections. The options
in these two sections define how the arc code is formatted and specifically how the arc center is
calculated.

This is the color code for the Circle section.


Be sure to read the resulting G-Code sample illustration below to understand how the arc motions
are defined for our sample part.
What is needed to output Arc Motions:
· Your CNC controller must be able to read G02 and G03 arc motions.
· In MecSoft CAM go to MILL > Preferences > Machining and uncheck Output arcs as linear
segments and also uncheck Output helix motions as linear segments. If these boxes are
checked, arcs are converted to linear motions.

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 38

MILL > CAM Preferences > Machining dialog

· In the Advanced Cut Parameters tab for the Mop, check the box for Perform Arc Fitting and
enter a value for Fitting tolerance (t). As a rule, this value should be 2 times the value you
entered for Tolerance on the Cut Parameters tab. If you need a tighter tolerance, adjust
these two values together.

Tolerance value on the Cut Parameters tab for 2 ½ Axis Profiling

Perform Arc Fitting on the Advanced Cut Parameters tab for for 2½ Axis Profiling

© 2020 MecSoft Corporation


39 RhinoCAM 2020 PPG Decoded Guide

The Circle section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Circle Block Format

Variable Derived From

[CIR_PLANE] The Plane Code defined in this section of the PPG (G17=XY Plane,
G18=ZX Plane and G19=YZ Plane)

[G_CODE] The G Code defined in this section of the PPG (G02 for a clockwise arc
and G03 for a counter clockwise arc)

[NEXT_X] The X coordinate value for the arc end point

[NEXT_Y] The Y coordinate value for the arc end point

[NEXT_Z] The Z coordinate value for the arc end point

[NEXT_I] The X coordinate value for the arc center point

[NEXT_J] The Y coordinate value for the arc center point

[NEXT_K] The Z coordinate value for the arc center point

Resulting G-Code Sample

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 40

How arc motions are defined for our sample.

Notes:
1. I, J and K represent the arc center as an offset distance from the arc start. This is because
in the PPG, Arc Center ( I, J, K ) section we have select Vector from Center to Start. If you
want the arc center posted in absolute coordinates, select the Absolute option.
2. Because the plane of the arc is XY, no Z or K values are shown for the arc start and end.
3. The arc start is located on line N017 because it is the end point of the last linear motion.
4. The red boxes are our added annotations and are not part of the G-Code sample.

5.9 PPG > Helical/Spiral


The Helical/Spiral section of the PPG defines how all helical and spiral motions are defined. The
only difference between an arc and a helix is that a helix has a Z value (i.e., pitch). In fact, a helix
is defined using the Arc G-Code with the added Z value. We strongly recommended that you first
read the PPG > Circle section above to understand how arcs are defined before continuing.

© 2020 MecSoft Corporation


41 RhinoCAM 2020 PPG Decoded Guide

This is the color code for the Helical/Spiral section.

The Helical/Spiral section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Helical/Spiral Block Format

Variable Derived From

[CIR_PLANE] The Plane Code defined in this section of the PPG (G17=XY Plane,
G18=ZX Plane and G19=YZ Plane)

[G_CODE] The G Code defined in this section of the PPG (G02 for a clockwise arc
and G03 for a counter clockwise arc)

[NEXT_X] The X coordinate value for the helix end point

[NEXT_Y] The Y coordinate value for the helix end point

[NEXT_Z] The Z coordinate value for the helix end point

[NEXT_I] The X coordinate value for the helix center point

[NEXT_J] The Y coordinate value for the helix center point

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 42

[NEXT_K] The Z coordinate value for the arc center point

Resulting G-Code Sample

Notes:
1. Notice that the X, Y start of the helix is one line N046 and the Z start of the helix is on line
N050.
2. Lines N051 and N052 are the two helical motions. Notice that each includes a Z
coordinate value.
3. Line N051 create the first full helix starting a Z0 and ending at Z0.125.
4. Line N052 create the second full helix starting a Z0.125 and ending at Z0.25.
5. Lines N053 and N054 are the two arc motions located at the base of the hole. Together
they form a complete circle which serves as a clean up pass.

5.10 PPG > Multi Axis Motion


The Multi Axis Motion section of the PPG is only used if your Machine definition is set to 4 Axis or
5 Axis (MecSoft CAM > Machining Job > Machine). It is used to define the Rotation Axis Code,
Rotation Direction Code, Angle Value, and the Motion Block. This will be covered in a future blog
post.

© 2020 MecSoft Corporation


43 RhinoCAM 2020 PPG Decoded Guide

The Multi Axis Motion section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

5.11 PPG > Cutter Compensation


The Cutter Compensation section of the PPG is used to provide a way to adjust the toolpath at the
machine to compensate for tool size, tool wear, and tool deflection. The dialog provides the
block format for Cutter Compensation Left (G41), Cutter Compensation Right (G42) and Cutter
Compensation Off (G40). G41 is used for a climb (down cut) direction with a clockwise (right-
handed) spindle direction. G42 is used for a conventional (up cut) direction.

This is the color code for the Cutter Compensation section.


What is needed to output Cutter Compensation:
1. In the Cut Parameters tab under Global Parameters set Compensation to either Auto/On
or Control/On. In our example, we have it set to Control/On.

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 44

Compensation is set to CONTROL/ON and Cut Direction is set to Climb

2. In the Cut Parameters tab set Cut Direction to either Climb or Conventional. Do not set it
to Mixed as this will disable Cutter Compensation. In our example we have it set to Climb.
3. Your first cut motion must be linear. In our example, on the Entry/Exit tab of the 2½ Axis
Profiling Mop, Entry Motions is set to Lines & Arcs and the Engage Motion is set to Linear.
Similarly, the Exit Motions is set to Lines & Arcs and the Retract Motion is set to Linear.

Entry/Exit is set to Lines & Arcs with Engage Motion set to Linear

© 2020 MecSoft Corporation


45 RhinoCAM 2020 PPG Decoded Guide

4. In your tool definition make sure the Cutcom Register is set to the same value as the Tool
Number. Tool Number, Adjust Register and Cutcom Register should all be the same value.

Properties tab of the Create/Select Tool dialog

5. Make sure to specify the cutter compensation value and the compensation register in your
controller.

The Cutter Compensation section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 46

Cutter Compensation Block Format

Variable Derived From

[G_CODE] Will be a G1 linear motion

[TOOL_CUTCOM_REG] MecSoft CAM > Tools > Create/Select Tool > Properties > Cutcom
Register. Should be the same as the Tool Number.

ISO Codes Function

G41 Cutter Compensation Left

G42 Cutter Compensation Right

G40 Cutter Compensation Off

Resulting G-Code Sample

5.12 PPG > Cut Motion Start/End


The Cut Motion Start/End section of the PPG is used for inserting additional code at the start or
the end of every cut motion. For example, in the Motion section you can check the box to Output
cut motion start macro before plunge motion. If you add codes to the Start Up Code section
below, this option will include it prior to a Z plunge motion.

© 2020 MecSoft Corporation


47 RhinoCAM 2020 PPG Decoded Guide

The Cut Motion Start/End section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

5.13 PPG > Cycles


The Cycles section of the PPG is used for all canned cycles. These are cycles that your CNC
controller is programmed to understand. For example all Drill, Tap and Bore Mops are posted out
as canned cycles. Other cycles include User Defined Cycles, Turn Thread Cycles and Machine
Control Cycles.

This is the color code for the Cycles section.


All of these are defined in this Cycles section of the PPG. We have shown the Deep Drill cycle
dialog below since our part example has a Drill operation that is set to Deep Drill.
On the left of the PPG dialog you would expand the Cycles selection to see all of the supported
canned cycles. We are using the Deep cycle (G83).

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 48

Canned Cycles Supported

© 2020 MecSoft Corporation


49 RhinoCAM 2020 PPG Decoded Guide

The Cycles > Deep Drill section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Note: The Cycle Code shown below is actually one line! We separated it into two lines for
presentation purposes. Your G83 cycle code should be all on one line as shown in our part sample
below.

Cycle Code

Variable Derived From

[G_CODE] This will be the canned cycle code. Our part sample requires the
Deep Drill G83 cycle.

[CYCL_Z-DEPTH] MecSoft CAM > Drill > Cut Parameters > Drill Depth.

[CYCLE_Z+CLEAR] MecSoft CAM > Drill > Cut Parameters > Approach Distance.

[CYCLE_INC] MecSoft CAM > Drill > Cut Parameters > Step Increment.

[CYCLE_IPM] MecSoft CAM > Drill > Feeds & Speeds > Cut (Cf)

ISO Codes Function

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 50

G83 Deep Drill Cycle

R Position of the R (retract) plane

Q Depth of cut for each cutting feed (depth of each peck)

Resulting G-Code Sample

Notes:
1. Line N065 is the first deep drill cycle (G83). On this line Z is the Drill Depth of the hole, R
is the Z location of the Approach Distance value and Q is the Step Increment value.
2. Lines N066, N067 and N068 are the three remaining holes in the set. With Optimized
Cycle Output checked, only the change in X and Y are posted.
3. Line N069 cancels the canned cycle (G80).

5.14 PPG > Misc


The Misc section of the PPG is primarily used for Coolant Codes but also contains the Work Offset
Code.

This is the color code for the Misc section.

© 2020 MecSoft Corporation


51 RhinoCAM 2020 PPG Decoded Guide

The Misc section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

Resulting G-Code Sample

Notes:
1. To enable Coolant codes, make sure Coolant is set on the Feeds & Speeds tab of the Mop
(MecSoft CAM > Holes > Drill > Feeds & Speeds > Coolant).
2. Even if you have Coolant set for the Tool (MecSoft CAM > Create/Select Tool > Properties
> Coolant), it could be overwritten in the Feeds & Speeds tab of the Mop so see note #1
also.

© 2020 MecSoft Corporation


The Post-Processor Generator Dialog 52

5.15 PPG > Variables


The Variables section of the PPG lists ALL of the available variables in MecSoft CAM along with the
format of the expected values. Variables are used throughout the PPG and affect the format and
output of the entire sample G-Code file. We have color-coded this section but instead have listed
each variable used in each PPG section that affects the sample G-Code file.

The Variables section of the Post-Processor Generator (PPG) dialog for our haas-blog.spm post definition file.

© 2020 MecSoft Corporation


53 RhinoCAM 2020 PPG Decoded Guide

Index -H-
Helical 43
-2- Helical Motions
Sample G-Code 40
2 Axis Hole Profiling 10 Understanding 40
Cut Parameters 19
Posted G-Code
2 Axis Profiling 10
19
-L-
Cut Parameters 16 Learning Resources 3
Posted G-Code 16

-A- -M-
Macros 9
About this Guide 7 Motion
Arc/Circle Example G-Code 36
Sample G-Code 37 Multi Axis Motion 42
Similar to Helix 37
Variables 37
-P-
-C- Post-Processor 8
Post-Processor Generator 8
Cutter Compension Circle 37
Sample G-Code 43 Cut Motion Start/End 46
Variables 43 Cutter Compensation 43
What to do first 43 Cycles 47
What to Know 43 Feed Rate 34
Cycles General 24
Sample Deep Drill Cycle 47 Helical/Spiral 40
Misc 50

-D- Motion 36
Multi Axis Motion 42
Drilling 10 Sample G-Code 24, 25, 28, 32, 34, 36, 37, 40,
Cut Parameters 21 43, 47, 50
Posted G-Code 21 Setup 32
Spindle 32
Start/End 25
-F- Tool Change 28
Variables 52
Feed Rate 32 Post-Processor Generator Dialog 24
Sample G-Code Control 34
Print Media Archive 6
Print Tool List 28
-G-
General
G-Code Control 24, 32
© 2020 MecSoft Corporation
Index 54

-Q-
Quick Start Guides 3

-S-
Sample G-Code
2 Axis Hole Profiling 19
2 Axis Profiling 16
Arc/Circles 37
Cutter Compensation 43
Drill Cycles 47
Drilling 21
File 12
Flood/Mist 50
Helical 40
Tool Change 28
Sample Toolpath 10
Set Post 10
Setup 10
Spindle
Example G-Code 32
Start/End G-Code Control 25

-T-
Tool Change
Example G-Code 28
First Tool Load Macro 28
Print Tool List 28
Tool Change Macro 28
Variables Used 28

-V-
Variables 9

© 2020 MecSoft Corporation

You might also like