Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

V22LatheInstalling-Editing Post Processors

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

Lathe Post Editor

Installing and Editing Post-Processors

1
Installing a Post Processor

Step 1 Go to the www.bobcad.com website.

Step 2 Then, click on Support tab.

Step 3 Under Customer Resources, click on Post Processors (V22 MILL ONLY) or Post Processors
(V22 LATHE ONLY) depending on desired post.

Step 4 Navigate to the desired Post Processor by clicking on the corresponding controller name.

Step 5 Click on the desired Post Processor .exe file, and Save the file to your computer. Note that prior to
the file extension is a date code to verify revision dates. Example: the Haas VF (v22 011408).exe
was last modified on January 14 ,2008.

Step 6 Once Saved to your computer, and with the BobCAD-CAM software closed; double-click on the file
icon and Run, this will automatically launch the installation wizard. Click Next, Install and Finish.

Your Post Processor is now installed into the BobCAD-CAM Version 22 software.

2
Editing a Post Processor

NOTE: Included with your BobCAD-CAM software is free post processor modifications and creation.
Please contact Technical Support at (727) 489-0003 for information regarding a post processor for
your machine controller. This section is intended for those who wish to modify or create a post
processors. This section assumes that the end-user is already familiar with Windows operating
system software.

IMPORTANT:

Be certain to create a copy of your post processor and rename the file, to avoid
overwriting, as saved changes cannot be easily undone.

Step 1 The post processor files are in the following location:

C:\Program Files\BobCAD-CAM\BobCAD-CAM V22\Posts\Mill, for the mill post processors with


the .MillPst file extension. Example: Haas VF.MillPst

C:\Program Files\BobCAD-CAM\BobCAD-CAM V22\Posts\Lathe, for the lathe post processors


with the .LathePst file extension. Example: Fanuc0T.LathePst

Create a copy of the post you desire to edit, and rename before editing.

Step 2 To edit the post processor you will first need to open the Lathe Post Editor (or Mill Post Editor)
this is an executable file located in the BobCAD-CAM V22 directory:

C:\Program Files\BobCAD-CAM\BobCAD-CAM V22\ MillEditPost.exe

C:\Program Files\BobCAD-CAM\BobCAD-CAM V22\ LatheEditPost.exe

Right-click on each file icon and send a shortcut to the desktop.

3
Step 3 Double-click on the short-cut icon to launch the application:

For editing all mill posts with the .MillPst extension

For editing all lathe posts with the .LathePst extension

The following window will appear for the corresponding applications:

Mill Post Editor

Mill Post Editor

Note: Most post editing is only slight; requiring only relocating existing variables, changing and or adding
hard output text. All mill and lathe Variables and Commands, with a brief description, are listed in
the end of this document.

Lathe - Post Tab

The following information is true for both post editors. On the Post tab, you may select the desired
post to be modified. Selection is determined from the pull down menu. You will note in the lower left
hand corner of the window is the Output debug comments check box. This is a handy feature
for determining from which code block the resultant NC code is generated. It will be discussed in
detail, further in this document. The following examples will be based upon the Fanuc 0T.MillPst
post processor, it has been selected for their complete use of standardized G and M codes. Post
can vary considerably, as such, the following examples are purely to be used as a guide. They are
not intend to, nor do they match all machine tool controllers.

4
Lathe - Edit code blocks tab – Starting blocks folder - Program header
After selecting the desired post to be modified, click on the Edit code blocks tab. In these fields is
where you may edit the various information to generate the desired machine tool NC output as
generated by the BobCAD-CAM V22 software. The blocks are programmed using Variables and
Commands, displayed in BLUE. Characters in quotes will be hard-coded, and displayed in RED.
You may encounter a variable in BLACK; this mean that the variable name is misspelled or the
variable is not defined in the PostingVariables.txt file. Even if a Variable or Command is
displayed in BLACK and not defined in the PostingVariables.txt, it still may function.

5
The above example is information contained in the Program header under Starting blocks. In a
future Build it will define the basic stock geometry and tool definitions for the Backplot feature
within the Predator CNC Editor – Level2 software. This information will be located prior to the
hard-coded “%”, indicating the beginning of the NC program file, it will be disregarded by the
controller. The current code blocks are written as follows:

"%"
"O",prog_n,"( PROGRAM NUMBER )"
default_add_spaces This command outputs nothing, only adds spaces to the program

The corresponding output will be posted as follows:

() NC file start
% Percent sign indicating start of NC file
O00001 ( PROGRAM NUMBER ) Program number as defined in the BobCAD software, no line number

Lathe - Edit code blocks tab – Starting blocks folder – Program start turning

The above example is information contained in the Program start turning. It is used to output
information regarding the program creation, any user comments, initial safety line, first tool change
and location of first machining operation. The code blocks are written as follows:

"( PROGRAM START - TURNING CYCLES )"


"( PROGRAM NAME: ",prog_name," )"
"( POST: FANUC 0T )"
"( DATE: ",output_date," )"

6
"( TIME: ",output_time," )"
user_comment_1
user_comment_2
user_comment_3
user_comment_4
user_comment_5
user_comment_6
user_comment_7
user_comment_8 The user comment will only display is selected to output and the field contains text
user_comment_9
user_comment_10
user_comment_11
user_comment_12
user_comment_13
user_comment_14
user_comment_15
output_tool_list
start_comment," ",end_comment
n,"G18",inch_mode,cancel_offset,"G80",absolute_coord,"G98"
start_comment,end_comment
n,rapid_move,"G28","U0.","W0."
start_comment,comment1,end_comment
start_comment,comment2,end_comment
n_forced,t
n,optional_stop
start_comment," ",end_comment
n,"G50",smax
n,"G97",out_css_rpm,spindle_on
n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
n,spsp_code,s

The corresponding output will be posted as follows:

( PROGRAM START - TURNING CYCLES ) Program start


( PROGRAM NAME: POST TEST.NC) Program name is output
( POST: FANUC 0T ) Post name is output
( DATE: FRI. 02/01/2008) Date output
( TIME: 03:29PM) Time output
( ) Start of safety line
N01 G18 G20 G40 G80 G90 G98 Safety line g-code Variables and hard-code
() Start of first tool change
N02 G00 G28 U0. W0. Automatic return to reference point, location hard-coded
(JOB 0 ROUGH CYCLE ) System comment as generate by Feature in CAM Tree
(TOOL #1 80 DEG. 1/64 ROUGH TURNING ) Feature name comment, as define by selected tool in Feature
N03 T0101 First tool change with offset
N04 M01 Optional stop to inspect insert
( ) Start of speeds and move to machining location
N05 G50 S3000 Set maximum spindle speed
N06 G97 S454 M03 RPM mode, speed and spindle on
N07 G54 X2. Z.1312 M08 Work coordinate, move to location and coolant on
N08 G96 S500 Change to CSS mode and speed

Lathe - Edit code blocks tab – Ending blocks folder – End of program turning

The End of program turning under Ending blocks, should contain information for turning off
operations and returning to a home or safe position.

7
The above example is information contained in the End of program turning. It is used to output
variables regarding the program end of file, turning off operations and returning to a safe location.
The code blocks are written as follows:
n,"M09"
n,spindle_off
start_comment," ",end_comment
n,rapid_move,"G28","U0.","W0."
n,"M30"
"%"

The corresponding output will be posted as follows:


N368 M09 Turn coolant off
N369 M05 Turn spindle off
( ) Start of program end
N370 G28 U0. W0. Automatic return to reference point, location hard-coded
N371 M30 End of program
% End of NC file

Lathe - Edit code blocks tab – Misc. folder

The Misc. folder contains the following fields for various code block definition, for calling within the
post in other fields:
Cutter comp. left "G41"
Cutter comp. right "G42"
Cutter comp. off "G40"
Tool length comp. "G43"

8
Lathe - Edit code blocks tab – Tool Change folder – Tool change turning

The Tool Change folder contains the Tool change turning, the Same tool turning and the Same
tool facing fields. These define how a tool change is to be executed in the NC file.

The above example is a code block definition contained in the Tool change turning field. It is used
to output variables regarding turning off operation, moving to the tool change position, executing the
change and moving to the next machining operation. You will note that the code blocks are similar,
if not the same as, the first tool change defined in the Program start turning. The code blocks are
written as follows:

n,"M09"
n,spindle_off
start_comment," ",end_comment
n,rapid_move,"G28","U0.","W0."
start_comment,comment1,end_comment
start_comment,comment2,end_comment
n_forced,t
n,optional_stop
start_comment," ",end_comment
n,"G50",smax
n,"G97",out_css_rpm,spindle_on
n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
n,spsp_code,s

The corresponding output will be posted as follows:

N209 M09 Coolant off, defined in M Codes tab


N210 M05 Spindle off, defined in M Codes tab
( ) Start of tool change
N211 G00 G28 U0. W0. Automatic return to reference point
(JOB 0 GROOVE CYCLE ) System comment as generate by Feature in CAM Tree
(TOOL #19 1/8 FACE ANVIL ) Feature name comment, as define by selected tool in Feature
N212 T1919 Tool change with offset
N213 M01 Optional stop to inspect insert

9
( ) Start of speeds and move to machining location
N214 G50 S3000 Set maximum spindle speed
N215 G97 S2750 M03 RPM mode, speed and spindle on
N216 G54 X.3125 Z0. M08 Work coordinate, move to location and coolant on
N217 G96 S450 Change to CSS mode and speed

Lathe - Edit code blocks tab – Tool Change folder – Same tool turning / grooving

Since the lathe philosophy and theory are different then mill, as far as the NC program layout, each
cut is treated much like a program unto itself. As such,the Same tool turning and the Same tool
facing fields are the same as the Tool change turning. This may NOT be the case for all machine
tool controllers (post processors), but this applies to the current example. No fields are shown.
Lathe - Edit code blocks tab – Rapid moves folder
The Rapid moves folder contains all code block definitions for rapid moves within the NC file. It
contains the following fields:

Rapid move z n,rapid_move,xr,zr

Lathe - Edit code blocks tab – Feed moves folder


The Feed moves folder contains all code block definitions for rapid moves within the NC file. It
contains the following fields:

Feed Move n,cc,feed_move,x_f,z_f,f


Arc move n,g_arc_move,x_f,z_f,arc_center,f

Lathe - Edit code blocks tab – Turning/Facing Operations


IMPORTANT:
These code blocks are independent for each controller; as a result they are the most difficult to
properly program. However, they will greatly reduce the length of the g-code NC program file and
increase the machine tool efficiency. Care must be taken when verifying the generated output to
ensure correct functionality.

10
The Turning/Facing Operations folder contains all the fields for defining the code blocks for each
canned cycle start and the independent termination of each cycle. It contains the following fields:
Turning/Facing Operations - Auto finish canned cycles (G70)
n,"M09"
n,spindle_off
start_comment," ",end_comment
n,rapid_move,"G28","U0.","W0."
start_comment,comment1,end_comment
start_comment,comment3,end_comment
n_forced,f_tool
n,optional_stop
start_comment," ",end_comment
n,"G50",smax
n,"G97",out_finish_css_rpm,spindle_on
n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
n,spsp_code,finish_s
n,"G70",n_first_finish,n_last_finish,finish_feed
n,cancel_offset
n,"G97"
n_forced,f_special
newvars

The corresponding output will be posted as follows (when selected in the Feature):

N24 M09 Coolant off, defined in M Codes tab


N25 M05 Spindle off, defined in M Codes tab
( ) Start of tool change
N26 G00 G28 U0. W0. Automatic return to reference point
(JOB 0 ROUGH CYCLE ) System comment as generate by Feature in CAM Tree
(TOOL #2 80 DEG. 1/64 FINISH TURNING ) Feature name comment, as define by BobCAD and selected tool in Feature
N27 T0202 Tool change with offset
N28 M01 Optional stop to inspect insert
( ) Start of speeds and move to machining location
N29 G50 S3000 Set maximum spindle speed
N30 G97 S429 M03 RPM mode, speed and spindle on
N31 G54 X-.0156 Z0. M08 Work coordinate, move to location and coolant on
N32 G96 S450 Change to CSS mode and speed
N33 G70 P11 Q20 F.015 Executes G70 Finish Cycle for line 11 through 20 in previous cycle
N34 G40 Cancel offset
N35 G97 Cancel CSS mode, return to RPM
N36 T0200 Cancel tool offset

Turning/Facing Operations - Rough turning start (G71)

n,"G71",roughing_depth_of_cut_x,rough_retract_amount
n,"G71",n_first_rough,n_last_rough,rough_x_allowance,rough_z_allowance,rough_feed

The corresponding output will be posted as follows (when selected in the Feature):

N09 G71 U.1 R.1 G71 Rough turning cycle – Two line format
N10 G71 P11 Q20 U.05 W.05 F15. Executes G71 Rough turning cycle for
N11 G00 X-.0156 line 11 through 20 with established parameters
N12 G42 G01 X.7834
N13 G03 X.9153 Z-.0919 I-.1406 K0.
N14 G01 X1. Z-.3209
N15 Z-.7656
N16 G02 X1.1977 Z-.9971 I0. K.2344
N17 G01 X1.256 Z-1.0063
N18 G03 X1.6365 Z-1.285 I-.5093 K-.0806
N19 G01 X2. Z-2.0119
N20 Z-2.7656

11
Turning/Facing Operations - Rough turning end

n,cancel_offset
n,"G97"
n_forced,special

The corresponding output will be posted as follows (for all):

N21 G40 Cancel offset


N22 G97 Cancel CSS mode, return to RPM
N23 T0100 Cancel tool offset

Turning/Facing Operations - Rough facing start (G72)

n,"G72",roughing_depth_of_cut_z,rough_retract_amount
n,"G72",n_first_rough,n_last_rough,rough_x_allowance,rough_z_allowance,rough_feed

The corresponding output will be posted as follows (when selected in the Feature):

N09 G72 W.1 R.1 G72 Rough facing cycle – Two line format
N10 G72 P11 Q20 U.05 W.05 F15. Executes G72 Rough facing cycle for
N11 G00 X-.0156 line 11 through 20 with established parameters
N12 G42 G01 X.7834
N13 G03 X.9153 Z-.0919 I-.1406 K0.
N14 G01 X1. Z-.3209
N15 Z-.7656
N16 G02 X1.1977 Z-.9971 I0. K.2344
N17 G01 X1.256 Z-1.0063
N18 G03 X1.6365 Z-1.285 I-.5093 K-.0806
N19 G01 X2. Z-2.0119
N20 Z-2.7656

Turning/Facing Operations - Rough facing end

n,cancel_offset
n,"G97"
n_forced,special

The corresponding output will be posted as follows (for all):

N21 G40 Cancel offset


N22 G97 Cancel CSS mode, return to RPM
N23 T0100 Cancel tool offset

Turning/Facing Operations - Finish turning start (G73)

n,"G73",finish_x_spring_pass_stock_radius,finish_z_spring_pass_stock_radius
,finish_number_of_cuts_two_line
n,"G73",n_first_rough,n_last_rough,finish_x_allowance,finish_z_allowance
,rough_feed

The corresponding output will be posted as follows (when selected in the Feature):

N33 G73 U.04 W.04 R5 G73 Finish turning cycle – Two line format
N34 G73 P35 Q45 U0. W0. F5. Executes G73 Rough turning cycle for
N35 G00 X-.0156 line 35 through 45 with established parameters
N36 G42 G01 X.7834
N37 G03 X.9153 Z-.0919 I-.1406 K0.
N38 G01 X1. Z-.3209
N39 Z-.7656
N40 G02 X1.1977 Z-.9971 I0. K.2344
N41 G01 X1.256 Z-1.0063
N42 G03 X1.6365 Z-1.285 I-.5093 K-.0806
N43 G01 X2. Z-2.0119
N44 Z-2.7656
N45 G00 Z0.

12
Turning/Facing Operations - Finish turning end

n,cancel_offset
n,"G97"
n_forced,special

The corresponding output will be posted as follows (for all):

N46 G40 Cancel offset


N47 G97 Cancel CSS mode, return to RPM
N48 T1000 Cancel tool offset

Turning/Facing Operations - Groove turning start (G75)

n,"G75",groove_retract_amount
n,"G75",groove_x_bottom,groove_z_bottom,groove_peck_increment,groove_depth_of_cut
,groove_rvalue,rough_feed

The corresponding output will be posted as follows (when selected in the Feature):

N72 G75 R.1 G75 Groove turning cycle – Two line format
N73 G75 X5. Z-2.5838 I0. K.05 R0. F12. Executes G75 Groove turning cycle

Turning/Facing Operations - Groove turning end

n,cancel_offset
n,"G97"
n_forced,special

The corresponding output will be posted as follows (for all):

N74 G40 Cancel offset


N75 G97 Cancel CSS mode, return to RPM
N76 T2200 Cancel tool offset

Turning/Facing Operations - Groove facing start (G75)

n,"G74",groove_retract_amount
n,"G74",groove_x_bottom,groove_z_bottom,groove_peck_increment,groove_depth_of_cut
,groove_rvalue,rough_feed

The corresponding output will be posted as follows (when selected in the Feature):

N58 G74 R.1 G74 Groove facing cycle – Two line format
N59 G74 X.5625 Z5. I.025 K.025 R0. F10. Executes G74 Groove facing cycle

Turning/Facing Operations - Groove facing end

n,cancel_offset
n,"G97"
n_forced,special

The corresponding output will be posted as follows (for all):

N60 G40 Cancel offset


N61 G97 Cancel CSS mode, return to RPM
N62 T1900 Cancel tool offset

13
Turning/Facing Operations - Drill facing start (G74)

n,"G74",groove_retract_amount
n,"G74",groove_x_bottom,groove_z_bottom,groove_peck_increment,groove_depth_of_cut
,groove_rvalue,rough_feed

The corresponding output will be posted as follows (when selected in the Feature):

N103 G74 R.1 G74 Drill facing cycle – Two line format
N104 G74 X0. Z-1. I0. K.25 R0. F12. Executes G74 Drill facing cycle

Turning/Facing Operations - Drill facing end


n,"G97"
n_forced,special

The corresponding output will be posted as follows (for all):

N105 G97 Cancel CSS mode, return to RPM


N106 T5200 Cancel tool offset

Turning/Facing Operations - Threading start

In this post processor case the field is blank.

Turning/Facing Operations - Start of G76 thread cycle

n,thread_angle_out_start
n,"G76",thread_angle_in,thread_last_cut,thread_machine_allowance
n,"G76",thread_x2,thread_z2,thread_height,thread_first_cut,thread_lead
n,thread_angle_out_end

The corresponding output will be posted as follows (when selected in the Feature):

N86 G01 X1.6382 F.0714 Start of thread


N87 M23 Chamfer on, selected in Feature, from M Codes tab
N88 G76 P010060 Q.03 R.001 G76 Complex thread cycle – Two line format
N89 G76 X1.5763 Z-2. K2999 D0500 F.071429 Executes Complex thread cycle with established parameters
N90 M24 Chamfer off selected in Feature, from M Codes tab
N91 G00 X5. Rapid to location X
N92 Z5. Rapid to location Z

Turning/Facing Operations - End of G76 thread cycle

In this post processor case the field is blank.

Turning/Facing Operations - Start of G33 thread cycle

In this post processor case the field is blank.

Turning/Facing Operations - End of G33 thread cycle

In this post processor case the field is blank.

14
Turning/Facing Operations - Threading end

n,cancel_offset
n,"G97"
n_forced,special

The corresponding output will be posted as follows (for all):

N93 G40 Cancel offset


N94 G97 Cancel CSS mode, return to RPM
N95 T0400 Cancel tool offset

Turning/Facing Operations - G33 Thread cut move

n,thread_g33_gcode,thread_g33_xmove,thread_g33_zmove,thread_g33_feedrate

The corresponding output will be posted as follows (when selected in the Feature):

N88G33 X1.9579 Z-2. F.0714 Start of G33 Simple thread cut move
N89 X2.0619
N90 X1.6522 Z-1.1807
N91 X1.5285

Turning/Facing Operations - G33 Thread line move

n,thread_g33_gcode,thread_g33_xmove,thread_g33_zmove,thread_g33_feedrate

The corresponding output will be posted as follows (when selected in the Feature):

N92G33 X1.9381 Z-2. F.0714 Start of G33 Simple thread line move
N93 X2.0619
N94 G00 X5.
N95 Z5.

Turning/Facing Operations - Cutoff start

In this post processor case the field is blank. The corresponding output will be posted as follows (for
all, depending on Feature parameters selection):

N136 G42 G01 X1.9 F15. Feed into cutoff location


N137 G00 X2.1 Retract to X clearance
N138 Z-3.025 Rapid to Z location
N139 G01 X2. Feed to X location
N140 G03 X1.9 Z-3.125 I0. K-.1 Fillet Corner break selected in Feature
N141 G01 X-.01 Feed past center
N142 G00 X5. Rapid to X location
N143 Z5. Rapid to Z location

Turning/Facing Operations - Cutoff end

n,cancel_offset
n,"G97"
n_forced,special
n,"M09"
n,spindle_off

15
The corresponding output will be posted as follows (for all):

N144 G40 Cancel offset


N145 G97 Cancel CSS mode, return to RPM
N146 T0800 Cancel tool offset
N147 M09 Spindle off, as defined in M Codes tab
N148 M05 Spindle off, as defined in M Codes tab

Turning/Facing Operations - Auto finish no CC start

In this post processor case the field is blank.

Turning/Facing Operations - Auto finish no CC end

n,cancel_offset
n,"G97"
n,special

The corresponding output will be posted as follows (for all):

N154 G40 Cancel offset


N155 G97 Cancel CSS mode, return to RPM
N156 T0100 Cancel tool offset

Turning/Facing Operations - Stock feed start

start_comment," ",end_comment
"( STOCK FEED )"
start_comment," ",end_comment
rapid_to_pickup_z
rapid_to_position_x
n,"M11"
n,"G04","X.5"
rapid_to_stock_feed_z
n,"G04","X.5"
n,"M10"
n,"G04","X.5"
rapid_to_position_z

The corresponding output will be posted as follows (for all):

( )
( STOCK FEED ) Stock feed start
( )
N149 Z0. Rapid to Z pick up
N150 X2. Rapid to X position
N151 M11 Clamp off
N152 G04 X.5 Dwell for 0.5 seconds
N153 Z-3.25 Rapid to stock feed Z location
N154 G04 X.5 Dwell for 0.5 seconds
N155 M10 Clamp on
N156 G04 X.5 Dwell for 0.5 seconds
N157 Z3. Rapid to Z position

16
The following tabs in the Lathe Post Editor contain small fields and check boxes for editing
and tuning the NC program file to the required output. They are self explanatory, as such, we will
not show an output for each field change. The best method for understanding the functionality is;
edit a single field, save the post file and re-post NC code to view results.

Lathe – Format tab

The Format tab contains fields to define or select which code is Modal output (or not), how
Sequence numbers output, leading and trailing output for Real numbers, Drilling canned cycles
for controller (blank), amount of Arc sweep type, Arc center type, # of digits for Program
Numbers, Add spaces to NC file, # of digits for G code, Output for reversing signs, X Output for
Radius or Diameter mode, Coordinates sign, Depth format, Canned cycles type and Tool
numbering and offset definitions.

17
Lathe – Misc. parameters tab

The Misc. parameters tab contains fields to define or select the Misc strings for comments and
block deletes, Cutting conditions to set maximum spindle speeds and gear ranges, Tools for
defining tool number and offset output and Two line canned cycles retract and allowances.

18
Lathe – G Codes tab

The G Codes tab contains fields to enter the format of the Defined variables to be output in the NC
file and the Work Offsets number, g code definition and number of offsets.

19
Lathe – M Codes tab

The M Codes tab contains fields to enter the format of the Defined variables to be output in the NC
file.

20
Lathe – Prefixes tab

The Prefixes tab contains fields to enter the format of the Defined variables to be output in the NC
file.

21
Lathe – Notes on Editing the Code blocks field – Getting Variables/Commands

All Commands and Variables can be pulled-up (displayed) and selected when editing a field in the
Edit code blocks tab. Simply place your cursor at the location to enter the desired variables and or
commands. Right-click, and select the desired folder, Get Variable or Get Command.

22
A new window called, Commands – Variables will display. You may change selections by
clicking on the corresponding Post Commands or Post Variables tab. Select the desired folder,
by click on the on the pull-down menu and then double-clicking on the variable name. You may also
high-light the variable name and click OK.

With either method the high-lighted variable will be placed in the location we determine in the Edit
code blocks field. As you will see, it is quite easy to build the Edit code blocks fields to generate
the NC file for your machine tool with your edited post processor.

23
Lathe – Notes on Editing the Code blocks field – Outputting debug comments

On the Post tab in the lower left-hand corner is the Output debug comments check box. If you
check the box, and click Save, the code will post with comments. These comments will indicate
where the Edit code block field and the resultant output was derived.

24
The example below this a program using Output debug comments (high-lighted in yellow).

**********0 - Starting blocks//Program header **********


%
O00001 ( PROGRAM NUMBER )
**********2 - Starting blocks//Program start turning **********
( PROGRAM START - TURNING CYCLES )
( PROGRAM NAME: POST TEST.NC)
( POST: FANUC 0T )
( DATE: MON. 02/04/2008)
( TIME: 03:45PM)
( )
N01 G18 G20 G40 G80 G90 G98
()
N02 G00 G28 U0. W0.
(JOB 0 ROUGH CYCLE )
(TOOL #1 80 DEG. 1/64 ROUGH TURNING )
N03 T0101
N04 M01
( )
N05 G50 S3000
N06 G97 S477 M03
N07 G54 X2. Z0. M08
N08 G96 S500
**********20 - Rapid moves//Rapid move **********
**********62 - Turning//Facing Operations/Rough turning start **********
N09 G71 U.1 R.1
N10 G71 P11 Q20 U.05 W.05 F15.
**********20 - Rapid moves//Rapid move **********
N11 G00 X-.0156
**********21 - Feed moves//Feed move **********
N12 G42 G01 X.7834
**********25 - Feed moves//Arc move **********
N13 G03 X.9153 Z-.0919 I-.1406 K0.
**********21 - Feed moves//Feed move **********
N14 G01 X1. Z-.3209
**********21 - Feed moves//Feed move **********
N15 Z-.7656
**********25 - Feed moves//Arc move **********
N16 G02 X1.1977 Z-.9971 I0. K.2344
**********21 - Feed moves//Feed move **********
N17 G01 X1.256 Z-1.0063
**********25 - Feed moves//Arc move **********
N18 G03 X1.6365 Z-1.285 I-.5093 K-.0806
**********21 - Feed moves//Feed move **********
N19 G01 X2. Z-2.0119
**********21 - Feed moves//Feed move **********
N20 Z-2.7656
**********63 - Turning//Facing Operations/Rough turning end **********
N21 G40
N22 G97
N23 T0100
**********60 - Turning//Facing Operations/Auto finish canned cycles **********
N24 M09
N25 M05
( )
N26 G00 G28 U0. W0.
(JOB 0 ROUGH CYCLE )
(TOOL #2 80 DEG. 1/64 FINISH TURNING )
N27 T0201
N28 M01
( )
N29 G50 S3000
N30 G97 S429 M03
N31 G54 X-.0156 Z0. M08
N32 G96 S450

25
N33 G70 P11 Q20 F.015
N34 G40
N35 G97
N36 T0200
**********5 - Ending blocks//End of program turning **********
N37 M09
N38 M05
( )
N39 G00 G28 U0. W0.
N40 M30
%

You will note that each debug comment has a number prefix, this corresponds to the function
number in the .MillPst file. Remember to turn off Output debug comments, Save the changes and
re-post code; prior to saving or sending the NC file to your machine tool.

The example below this the same program with Output debug comments turned off and the
corresponding code blocks listed to the right of each line.

% "%"
O00001 ( PROGRAM NUMBER ) "O",prog_n,"( PROGRAM NUMBER )"
( PROGRAM START - TURNING CYCLES ) "( PROGRAM START - TURNING CYCLES )"
( PROGRAM NAME: POST TEST.NC) "( PROGRAM NAME: ",prog_name," )"
( POST: FANUC 0T ) "( POST: FANUC 0T )"
( DATE: MON. 02/04/2008) "( DATE: ",output_date," )"
( TIME: 03:49PM) "( TIME: ",output_time," )"
( ) start_comment," ",end_comment
N01 G18 G20 G40 G80 G90 G98 n,"G18",inch_mode,cancel_offset,"G80",absolute_coord
,"G98"
() start_comment," ",end_comment
N02 G00 G28 U0. W0. n,rapid_move,"G28","U0.","W0."
(JOB 0 ROUGH CYCLE ) start_comment,comment1,end_comment
(TOOL #1 80 DEG. 1/64 ROUGH TURNING ) start_comment,comment2,end_comment
N03 T0101 n_forced,t
N04 M01 n,optional_stop
( ) start_comment," ",end_comment
N05 G50 S3000 n,"G50",smax
N06 G97 S477 M03 n,"G97",out_css_rpm,spindle_on
N07 G54 X2. Z0. M08 n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
N08 G96 S500 n,spsp_code,s
N09 G71 U.1 R.1 n,"G71",roughing_depth_of_cut_x,rough_retract_amount
N10 G71 P11 Q20 U.05 W.05 F15. n,"G71",n_first_rough,n_last_rough,rough_x_allowance
,rough_z_allowance,rough_feed
N11 G00 X-.0156 n,rapid_move,xr,zr
N12 G42 G01 X.7834 n,cc,feed_move,x_f,z_f,f
N13 G03 X.9153 Z-.0919 I-.1406 K0. n,g_arc_move,x_f,z_f,arc_center,f
N14 G01 X1. Z-.3209 n,cc,feed_move,x_f,z_f,f
N15 Z-.7656 n,cc,feed_move,x_f,z_f,f
N16 G02 X1.1977 Z-.9971 I0. K.2344 n,g_arc_move,x_f,z_f,arc_center,f
N17 G01 X1.256 Z-1.0063 n,cc,feed_move,x_f,z_f,f
N18 G03 X1.6365 Z-1.285 I-.5093 K-.0806 n,g_arc_move,x_f,z_f,arc_center,f
N19 G01 X2. Z-2.0119 n,cc,feed_move,x_f,z_f,f
N20 Z-2.7656 n,cc,feed_move,x_f,z_f,f
N21 G40 n,cancel_offset
N22 G97 n,"G97"
N23 T0100 n_forced,special
N24 M09 n,"M09"
N25 M05 n,spindle_off
( ) start_comment," ",end_comment
N26 G00 G28 U0. W0. n,rapid_move,"G28","U0.","W0."
(JOB 0 ROUGH CYCLE ) start_comment,comment1,end_comment
(TOOL #2 80 DEG. 1/64 FINISH TURNING ) start_comment,comment3,end_comment
N27 T0201 n_forced,f_tool
N28 M01 n,optional_stop
( ) start_comment," ",end_comment

26
N29 G50 S3000 n,"G50",smax
N30 G97 S429 M03 n,"G97",out_finish_css_rpm,spindle_on
N31 G54 X-.0156 Z0. M08 n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
N32 G96 S450 n,spsp_code,finish_s
N33 G70 P11 Q20 F.015 n,"G70",n_first_finish,n_last_finish,finish_feed
N34 G40 n,cancel_offset
N35 G97 n,"G97"
N36 T0200 n_forced,f_special
N37 M09 n,"M09"
N38 M05 n,spindle_off
( ) start_comment," ",end_comment
N39 G00 G28 U0. W0. n,rapid_move,"G28","U0.","W0."
N40 M30 n,"M30"
% "%"

Lathe – Notes on Editing the Code blocks field – Post text file

The .LathePst are actually ASCII text files, as such they may be opened with a text editor.
NotePad, NotePad++ or the Predator CNC Editor may be used to manually edit the post
processor file without going through the Lathe Post Editor application.

IMPORTANT:
Extreme care should be taken when editing with a text editor application, since you cannot verify
the variable spelling or post format and the text color will not be indicated.

The file below is the Fanuc 0T.LathePst file, opened in the Predator CNC Editor.

"Customization file for Fanuc 0T Two Line format Lathe - SDP"

Post variables listed in PostVariables.txt

****Version number MONTH DAY YEAR****


1000. Version Information = Version Month Day Year? "1.2 01 21 2008"

0. File Header.
"%"
"O",prog_n,"( PROGRAM NUMBER )"
default_add_spaces

1. Start of program live tooling cycle.


"( PROGRAM START - LIVE TOOLING CYCLES )"
"( PROGRAM NAME: ",prog_name," )"
"( POST: FANUC 0T )"
"( DATE: ",output_date," )"
"( TIME: ",output_time," )"
user_comment_1
user_comment_2
user_comment_3
user_comment_4
user_comment_5
user_comment_6
user_comment_7
user_comment_8
user_comment_9
user_comment_10
user_comment_11
user_comment_12
user_comment_13
user_comment_14
user_comment_15
output_tool_list

27
n,absolute_coord,"G80",cancel_offset,inch_mode
n_forced,rapid_move,"G28","U0.","W0."
start_comment,comment1,end_comment
start_comment,comment2,end_comment
n,"M45"
n,"G28","H0"
n,rapid_move,"G54","G97","S100",t,live_spindle_on

3. Tool change for turning cycles.


n,"M09"
n,spindle_off
start_comment," ",end_comment
n,rapid_move,"G28","U0.","W0."
start_comment,comment1,end_comment
start_comment,comment2,end_comment
n_forced,t
n,optional_stop
start_comment," ",end_comment
n,"G50",smax
n,"G97",out_css_rpm,spindle_on
n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
n,spsp_code,s

4. Next operation same tool turning.


n,"M09"
n,spindle_off
start_comment," ",end_comment
n,rapid_move,"G28","U0.","W0."
start_comment,comment1,end_comment
start_comment,comment2,end_comment
n_forced,t
n,optional_stop
start_comment," ",end_comment
n,"G50",smax
n,"G97",out_css_rpm,spindle_on
n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
n,spsp_code,s

5. End of turning cycles.


n,"M09"
n,spindle_off
start_comment," ",end_comment
n,rapid_move,"G28","U0.","W0."
n,"M30"
"%"

6. Next operation same tool facing.


n,"M09"
n,spindle_off
start_comment," ",end_comment
n,rapid_move,"G28","U0.","W0."
start_comment,comment1,end_comment
start_comment,comment2,end_comment
n_forced,t
n,optional_stop
start_comment," ",end_comment
n,"G50",smax
n,"G97",out_css_rpm,spindle_on
n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
n,spsp_code,s

8. Set debug.
debug_off

10. Cancel cutter compensation.


"G40"

11. Cutter compensation left.


"G41"

12. Cutter compensation right.


"G42"

28
13. Tool length compensation.
"G43"

20. Rapid move.


n,rapid_move,xr,zr

21. Feed move.


n,cc,feed_move,x_f,z_f,f

25. Arc move.


n,g_arc_move,x_f,z_f,arc_center,f

60. Auto finish cycle for G71,G72,G73 for turning.


n,"M09"
n,spindle_off
start_comment," ",end_comment
n,rapid_move,"G28","U0.","W0."
start_comment,comment1,end_comment
start_comment,comment3,end_comment
n_forced,f_tool
n,optional_stop
start_comment," ",end_comment
n,"G50",smax
n,"G97",out_finish_css_rpm,spindle_on
n,rapid_move,"G54",force_x,xr,force_z,zr,coolant_on
n,spsp_code,finish_s
n,"G70",n_first_finish,n_last_finish,finish_feed
n,cancel_offset
n,"G97"
n_forced,f_special
newvars

62. Start of rough (G71) turning cycle.


n,"G71",roughing_depth_of_cut_x,rough_retract_amount
n,"G71",n_first_rough,n_last_rough,rough_x_allowance,rough_z_allowance,rough_feed

63. End of rough (G71) turning cycle.


n,cancel_offset
n,"G97"
n_forced,special

66. Start of rough (G72) facing cycle.


n,"G72",roughing_depth_of_cut_z,rough_retract_amount
n,"G72",n_first_rough,n_last_rough,rough_x_allowance,rough_z_allowance,rough_feed

67. End of rough (G72) facing cycle


n,cancel_offset
n,"G97"
n_forced,special

70. Start of finish (G73) turning cycle


n,"G73",finish_x_spring_pass_stock_radius,finish_z_spring_pass_stock_radius,finish_number_of_cuts_two_line
n,"G73",n_first_rough,n_last_rough,finish_x_allowance,finish_z_allowance,rough_feed

71. End of finish G73) turning cycle


n,cancel_offset
n,"G97"
n_forced,special

74. Start of groove (G75) turning cycle


n,"G75",groove_retract_amount
n,"G75",groove_x_bottom,groove_z_bottom,groove_peck_increment,groove_depth_of_cut,groove_rvalue,rough_feed

75. End of groove (G75) turning cycle


n,cancel_offset
n,"G97"
n_forced,special

78. Start of groove (G74) facing cycle


n,"G74",groove_retract_amount
n,"G74",groove_x_bottom,groove_z_bottom,groove_peck_increment,groove_depth_of_cut,groove_rvalue,rough_feed

79. End of groove (G74) facing cycle

29
n,cancel_offset
n,"G97"
n_forced,special

82. Start of drill (G74) cycle


n,"G74",groove_retract_amount
n,"G74",groove_x_bottom,groove_z_bottom,groove_peck_increment,groove_depth_of_cut,groove_rvalue,rough_feed

83. End of drill (G74) cycle


n,"G97"
n_forced,special

86. Start of threading cycles.

87. Start of thread (G76) cycle


n,thread_angle_out_start
n,"G76",thread_angle_in,thread_last_cut,thread_machine_allowance
n,"G76",thread_x2,thread_z2,thread_height,thread_first_cut,thread_lead
n,thread_angle_out_end

88. End of thread (G76) cycle

89. Start of thread (G33) cycle

90. End of thread (G33) cycle

91. End of threading cycles.


n,cancel_offset
n,"G97"
n_forced,special

92. G33 line move.


n,thread_g33_gcode,thread_g33_xmove,thread_g33_zmove,thread_g33_feedrate

93. G33 thread cut move.


n,thread_g33_gcode,thread_g33_xmove,thread_g33_zmove,thread_g33_feedrate

100. Start of cutoff cycle

101. End of cutoff cycle


n,cancel_offset
n,"G97"
n_forced,special

104. Start of auto finish no canned cycle.

105. End of auto finish no canned cycle.


n,cancel_offset
n,"G97"
n,special

108. Start of auto stock feed cycle.


start_comment," ",end_comment
"( STOCK FEED )"
start_comment," ",end_comment
rapid_to_pickup_z
rapid_to_position_x
n,"M11"
n,"G04","X.5"
rapid_to_stock_feed_z
n,"G04","X.5"
n,"M10"
n,"G04","X.5"
rapid_to_position_z

109. End of auto stock feed cycle.


n,optional_stop

199. Not Used

220. Is X modal? y
222. Is Z modal? y
223. Are the g codes modal? y

30
224. Are the xy (or yz or xz) coordinates modal in arc milling? y
225. Are the g codes (G02 and G03) modal in arc milling? y
228. Output sequence numbers? y
230. Delete the decimal point? n
231. Delete leading zeros? y
232. Delete trailing zeros? y
234. Places before decimal point for reals? 1
235. Number of places for G and M codes? 1
236. Places after decimal for feedrate ? 4
237. Scale factor for feedrate ? 1
239. Add spaces to the program? y
241. Break arcs into quadrants? n
242. Arc center a=absolute, b=incremental, d=unsigned inc., e=radius? b
243. Break arcs into two pieces if greater than 180 degrees? n
247. Sign of X Spindle 1 (p = pos, n = neg, e = either, r = reverse)? e
248. Sign of X Spindle 2 (p = pos, n = neg, e = either, r = reverse)? e
249. Output X as a diameter or radius (d/r)? r
250. Use canned cycle for drilling? n
251. Use canned cycle for peck drilling? n
252. Use canned cycle for chip break? n
253. Use canned cycle for tap? n
254. Use canned cycle for bore #1? n
255. Use canned cycle for bore #2? n
258. Use two line canned cycle format? y
259. Depth format (d = default, t = trailing)? d
260. Amount to add to t to obtain t1? 0
261. Amount to add to t to obtain t2? 0
262. Value of t1 at t = 0? 0
263. Value of t2 at t = 0? 0
265. Places before decimal point for angles? 1
300. Number of places for sequence numbers? 2
302. Number of places for program number? 5

411. R value (Retract amount) for first line of 2 line rough cycle? 0.1
412. R value (Retract amount) for first line of 2 line groove cycle? 0.1
413. R value (Thread machine allowance) 2 line G76 cycle? 0.001

512. Tool number format (1=n, 2=n*101, 3=100*n+toffset, 4=toofset, 5=n*100)? 3


513. Number of digits for tool number? 4
517. Medium gear spindle speed? 360
518. High gear spindle speed? 780
540. Number of decimal places real numbers metric ? 3
541. Number of decimal places real numbers inch ? 4
542. Number of decimal places angles ? 3

612. Reverse G2 and G3? n


613. Reverse the sign of I? n
614. Reverse the sign of K? n

705. Symbol for lead? "F"


706. Symbol for IPR feedrate? "F"
707. Symbol for IPM feedrate? "F"
710. Begin comment character? "("
711. End comment character? ")"
712. Threading chamfer out start code? "M23"
713. Threading chamfer out end code? "M24"
714. Inch mode machining? "G20"
715. Metric mode machining? "G21"
720. Absolute coordinates? "G90"
721. Incremental coordinates? "G91"
722. Coordinate zero set? "G92"
725. End of file? "M02"
726. Stop? "M00"
727. Optional Stop? "M01"
728. Subprogram call? "M98"
729. Subprogram return? "M99"
739. Cancel wire offset? "G40"
741. Prefix for radius values? "R"
742. Prefix for arc Z center? "I"
743. Prefix for arc X center? "K"
750. Wire comp left? "G41"
751. Wire comp right? "G42"
756. Block delete? "/"

31
773. Coolant on String ? "M08"
774. Coolant off String ? "M09"
780. Symbol for Spindle Speed ? "S"
781. Symbol for Tool Number Prefix ? "T"
782. Spindle forward String ? "M03"
783. Spindle reverse String ? "M04"
784. Spindle off String ? "M05"
785. Symbol for CSS spindle speed? "G96"
786. Symbol for RPM spindle speed? "G97"
787. Code for low spindle gear? "M40"
788. Code for medium spindle gear? "M41"
789. Code for high spindle gear? "M42"
790. Prefix for canned cycle start line Number? "P"
791. Prefix for canned cycle end line Number? "Q"
792. Prefix for thread G76 first cut amount? "D"
793. Prefix for thread height? "K"
794. Prefix for thread angle in? "P"
795. Prefix for thread last cut amount? "Q"
796. Prefix for thread machine allowance? "R"
797. GCode for Rapid Move? "G00"
798. GCode for Feed Move? "G01"
799. GCode for Arc CW? "G02"
800. GCode for Arc CCW? "G03"
801. Prefix for X Move? "X"
802. Prefix for Y Move? "Y"
803. Prefix for Z Move? "Z"
804. Prefix for Rough Cycle depth of cut? "D"
805. Prefix for Rough Cycle stock allowance X? "U"
806. Prefix for Rough Cycle stock allowance Z? "W"
807. Prefix for Rough Cycle retract amount? "R"
808. Prefix for Finish Cycle stock allowance X? "U"
809. Prefix for Finish Cycle stock allowance Z? "W"
810. Prefix for Finish Cycle X stock amount for spring passes? "U"
811. Prefix for Finish Cycle Z stock amount for spring passes? "W"
812. Prefix for Groove Cycle retract amount? "R"
813. Prefix for Groove Cycle X bottom? "X"
814. Prefix for Groove Cycle Z bottom? "Z"
815. Prefix for Groove Cycle depth of cut? "K"
816. Prefix for Groove Cycle peck increment? "I"
822. GCode for simple threading cycle? "G33"
823. Prefix for X depth for roughing cycle? "U."
824. Prefix for Z depth for roughing cycle? "W."
825. Prefix for groove dwell? "D"
826. Prefix for groove peck clearance? "R"
827. Prefix for groove peck retract? "R"

860. Standard Drill cycle live tool face? "G81"


861. Peck drill cycle live tool face? "G83"
862. High speed peck cycle live tool face? "G83"
863. Tap cycle live tool face? "G84"
864. Boring cycle 1 live tool face? "G85"
865. Boring cycle 2 live tool face? "G86"
866. Boring cycle 3 live tool face? "G89"

880. Standard Drill cycle live tool diameter? "G81"


881. Peck drill cycle live tool diameter? "G83"
882. High speed peck cycle live tool diameter? "G83"
883. Tap cycle live tool diameter? "G84"
884. Boring cycle 1 live tool diameter? "G85"
885. Boring cycle 2 live tool diameter? "G86"
886. Boring cycle 3 live tool diameter? "G89"

890. Canned cycle cancel? "G80"

32
Customization Variables and Commands for Lathe Post Processing

Commands
oldvars = use old position variables and misc. variables.
newvars = use new position position and misc. variables.
force_x = force the x value to be output next time even if modal.
force_y = force the y value to be output next time even if modal.
force_z = force the z value to be output next time even if modal.
force_drill_z = force the z value for drilling to be output next time even if modal.
memo_xmove = Memorize the current x movement for use later.
memo_ymove = Memorize the current y movement for use later.
memorize_line_number = Memorize sequence number for use later.
memorized_line_number = Use memorize sequence number.
debug_on = Turns on automatic debug comments in post output.
debug_off = Turns off automatic debug comments in post output.
outputxmemo = Output X value from memo_xmove
outputymemo = Output Y value from memo_ymove
start_add_block_delete = Add block delete to all lines until stop_add_block_delete is used
stop_add_block_delete = Stop adding block delete that started from using start_add_block_delete
force_no_add_spaces = Force no spaces even when default is set to add spaces.
default_add_spaces = Set add spaces back to condition before force_no_add_spaces was called.
output_tool_list = Output tool list.

Variables – Positioning
rapid_move = Output rapid move (G00).
feed_move = Output feed move (G01).
arc_move = Output arc feed move (G02,G03).
cr = C rapid with live tool, diameter and face machining.
xr = X rapid with live tool, diameter and face machining.
zr = Z rapid with live tool, diameter and face machining.
crl = C rapid with live tool, diameter and face machining.
xrl = X rapid with live tool, diameter and face machining.
zrl = Z rapid with live tool, diameter and face machining.
xh = X home position.
zh = Z home position.
xhl = X home position with live tooling.
zhl = Z home position with live tooling.
home = X, Z tool home position.
prev_x = Previous X position.
prev_z = Previous X position.
rapid_to_pickup_z =
rapid_to_position_x =
rapid_to_position_z =
rapid_to_stock_feed_z =
rapid_iplane_face = Rapid to iplane in face live tool (G0 Z.1)
rapid_rplane_face = Rapid to rplane in face live tool (G0 Z.1)
rapid_iplane_diam =
rapid_rplane_diam =
pos_rpm = Position move in RPM mode.
pos_rpm_prev = Position move with previous RPM.

Variables – Line Numbers


n = Sequence number.
n_forced = Output sequence number even if Q. 228 is set to NO.
n_first = P word for the first line number of turning canned cycle.
n_last = Q word for the last line number of turning canned cycle.
n_first_finish = P word for the first line number of turning canned cycle output to finish pass.
n_last_finish = Q word for the last line number of turning canned cycle output to finish pass.

33
Variables – Comments
prog_n = Program number.
prog_name = Program name.
output_date = Output current date.
comment1 = Job comment.
comment2 = Tool comment.
comment3 = Finish tool comment.
start_comment = Output start of comment string.
end_comment = Output end of comment string.
user_comment_1 = Output user comment 1 in Turning tools, Current settings, Posting
user_comment_2 = Output user comment 2 in Turning tools, Current settings, Posting
user_comment_3 = Output user comment 3 in Turning tools, Current settings, Posting
user_comment_4 = Output user comment 4 in Turning tools, Current settings, Posting
user_comment_5 = Output user comment 5 in Turning tools, Current settings, Posting
user_comment_6 = Output user comment 6 in Turning tools, Current settings, Posting
user_comment_7 = Output user comment 7 in Turning tools, Current settings, Posting
user_comment_8 = Output user comment 8 in Turning tools, Current settings, Posting
user_comment_9 = Output user comment 9 in Turning tools, Current settings, Posting
user_comment_10 = Output user comment 10 in Turning tools, Current settings, Posting
user_comment_11 = Output user comment 11 in Turning tools, Current settings, Posting
user_comment_12 = Output user comment 12 in Turning tools, Current settings, Posting
user_comment_13 = Output user comment 13 in Turning tools, Current settings, Posting
user_comment_14 = Output user comment 14 in Turning tools, Current settings, Posting
user_comment_15 = Output user comment 15 in Turning tools, Current settings, Posting

Variables – Tools
t = Output first tool number without prefix.
f_tool = Canned cycle auto finish tool number.
t1 = Tool number + #260 (without "T" prefix)
t2 = Tool number + #261 (without "T" prefix)
special = Tool number with offset canceled (ex. T0100)
f_special = Finish tool number with offset canceled (ex. T0100)
n_tool = N word with tool number.
n_ftool = N word with finish tool number.
first_tool = First tool number without 'T' code.
next_tool = Next tool number without 'T' code.
p_tool_num = P word with tool number for G10 line.
p_ftool_num = P word with finish tool for G10 line.
p_special = P word G10 line tool number with offset canceled.

Variables – Feed Rates


f = Feed rate with prefix.
finish_feed = F word with finish cycle feed rate.
rough_feed = F word with rough cycle fee rate

Variables – M Codes
coolant_on = M08 if coolant used, null if coolant not used.
coolant_off = M09 if coolant used, null if coolant not used.
live_spindle_on = M code for live tool on.
spindle_on = M03,M04 code for spindle on.
spindle_off = M05 code for spindle off
stop = M00 for program stop
optional_stop = M01 for program optional stop

Variables – Offset
cc = Cutter compensation code (G41,G42).
h = Output length offset register with prefix.

34
Variables – Misc. Codes
s = Output spindle speed with prefix "S1000".
finish_s = Output finish spindle speed with prefix "S1000".
smax = Maximum spindle speed.
sp_on_css = Spindle on using constant surface speed.
sp_on_rpm = Spindle on using RPM.
spsp_code = Rough spindle speed code (G96, G97).
spindle_gear = Output spindle gear.
g112 = Activate G112 live tooling mode.
g113 = Cancel G112 live tooling mode.
mill_radius_string = R word with live tool radius.
out_css_rpm = Output rough spindle speed in CSS/RPM mode
out_finish_css_rpm = Output finish spindle speed in CSS/RPM mode
finish_spsp_code = Finish spindle speed code (G96, G97).

Variables – Rough Canned Cycles


n_first_rough = word for the first line number of Roughing canned cycle.
n_last_rough = word for the last line number of Roughing canned cycle.
rough_x_allowance = Rough allowance X axis
rough_z_allowance = Rough allowance Z axis
rough_depth_of_cut = Rough depth of cut
rough_depth_of_cut_two_line = Rough depth of cut for two line canned cycles
rough_depth_of_cut_with_decimal = Rough depth of cut with decimal place
rough_depth_of_cut_two_line_decimal = Rough depth of cut with decimal place for two line canned cycles
rough_retract_amount = Rough retract amount
roughing_depth_of_cut_x = Rough depth of cut along X axis
roughing_depth_of_cut_z = Rough depth of cut along Z axis
roughing_depth_of_cut_x_decimal = Rough depth of cut with decimal along X axis
roughing_depth_of_cut_z_decimal = Rough depth of cut with decimal along Z axis

Variables – Canned Finish Cut


finish_x_spring_pass_stock_diameter = Spring pass allowance X axis for diameter mode
finish_z_spring_pass_stock_diameter = Spring pass allowance Z axis for diameter mode
finish_x_allowance = Finish allowance X axis
finish_z_allowance = Finish allowance Z axis
finish_number_of_cuts = Number of passes for finish cut
finish_x_spring_pass_stock_radius = Spring pass allowance X axis for radius mode
finish_z_spring_pass_stock_radius = Spring pass allowance Z axis for radius mode
finish_number_of_cuts_two_line = Number of passes for finish cut for two line canned cycles

Variables – Groove-Drill Canned Cycles


groove_x_bottom = Groove X location for final cut
groove_z_bottom = Groove Z location for final cut
groove_peck_increment = Groove peck increment
groove_depth_of_cut = Groove depth of cut
groove_retract_amount = Groove retract amount
groove_rvalue = Groove r value
drill_dwell = Dwell
first_peck = First peck increment
peck_increment = Next or peck increment
peck_clearance = Peck clearance retract
peck_retract = Peck retract
last_var_name = Output last variable name

Variables – Threading Canned Cycles


thread_x2 = Thread location X axis
thread_z2 = Thread location Z axis
thread_angle_out_start = Thread angle out start
thread_angle_out_end = Thread angle out end

35
Variables – Threading Canned Cycles - Cont'd

thread_height = Thread height


thread_first_cut = Thread first cut amount
thread_lead = Thread lead
thread_angle_in = Thread angle in
thread_last_cut = Amount of thread last cut
thread_machine_allowance = Thread machine allowance, defined in post file
thread_g33_gcode = Simple thread g code, defined in G Codes tab
thread_g33_xmove = Simple thread X move
thread_g33_zmove = Simple thread Z move
thread_g33_feedrate = Simple thread feed rate

Variables – Proflie Start-End


profile_start_x = Start of profile X axis
profile_start_z = Start of profile Z axis
profile_end_x = End of profile X axis
profile_end_z = End of profile Z axis

36

You might also like