You are on page 1of 642

Volume 3 Chapter 4 Numeric Variables

4 Numeric Variables

Numeric variables are variables that represent numeric values in the MP language. The MP language
has only two types of variables: numeric values and character strings. The numeric variables are all
stored internally by the post executable as double real values.
A numeric variable is identified by a label. The label represents a specific memory location that holds
the value of the numeric variable. By using the variable label in the post customization file, you can
access the value the variable represents. The numeric variables can be parameters passed from the NCI
file, values calculated in the post executable for a specific routine, switches that enable or disable
posting options, variables defined by the post writer to be used within the post customization file. Some
numeric variables do not use the value associated with them but use the label or name to trigger a
routine in the post executable. These variables are called command variables.
For more information about the use of numeric variables see Volume 1, Numeric Variables.

Numeric variable categories


The MP language contains hundreds of predefined numeric variables. It can be very difficult to find the
numeric variable you need without putting them into some type of order. Presented here are lists of
categories and sub-categories by product. See “Numerical Variables within each category” in this
chapter for a complete list of the variables.

Mill, Router and Lathe Wire


Post switches Post switches
Buffer files Buffer files
Error file Error file
Drill Sequence number
Sequence number Debug
Debug Cutter compensation
Subprogram Arc
Cutter compensation Version
Arc Motion modification
Version Process modification
Motion modification Preparatory
Process modification Next
Preparatory Output
Rotary Leader
Next Implied arc conversion
Output UV output
Leader 2D conversion

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-1


Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire


Commands Commands
Sub file Sub file
Output Output
V8 subprograms
Lathe canned cycle

Global post variables Global post variables


DLL_vers DLL_vers
Tool data Version
Version Stock
Stock SIM (HASP) Data
SIM (HASP) Data

Tool change information Tool change information


Tool data Tool data
Tool change position Tool change position
Misc int/real Misc int/real
Operation type Operation type
Rotary Cutter compensation
Tool plane Work offset
Cutter compensation Power/flush/wire
Work offset
Work coordinate system

Machine functions Machine functions


Coolant
Spindle

Cutter compensation Cutter compensation

Sequence number Sequence number

Dwell Dwell

Motion Motion
Linear motion Linear motion
Arc motion UV taper
Rotary motion Arc motion
Five axis UV direct

Taper
2D_output
UV_direct
UV_output

Feed rate Feed rate

Canned text Canned text

Power_Flush_Wire

Technology

4-2 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire


Drill Wire_canned_cycle
Five-axis
Block drill 2D_conversion

Thread

Right-angle head support Subprogram

Subprogram
V8 subprograms
Tool plane
Transform
Sub file

Sub file Tracking


Path position
Tracking Path motion
Path position Output
Path motion Debug
Operation type UV output
Drill
Output
Arc
Debug
Lathe canned cycle NCI
Gcode
NCI Linear position data
Gcode Arc position data
Linear position data Cutter compensation
Arc position data Tool plane
Cutter compensation Construction plane
Tool plane Path position
Construction plane UV direct
Path position

Five-axis
Rev 5-axis
Five-axis routines Preparatory

Preparatory Parameter

Parameter Next

Next Break

Break Time/date

Time/date Tolerance

Tolerance Math/function
Constants
Math/function 3D vector function
Constants Intersection function
November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-3
Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire


3D vector function String function
Intersection function User prompt
String function
Comment
User prompt
Future development
Comment
Internal
Future development
Obsolete
Internal Whatno
Tool data
Obsolete Tool change position
Whatno Work offset
Synclath
Rolldie Not used
Five-axis routines
Not used in Wire (future)
Not used
Subprogram
Motion
V8 subprograms
Tool plane
Transform variables
Motion modification
Tolerance

Numeric variables within each category


Mill, Router and Lathe Wire
Post switches
Buffer files
buf_no_index (v9) buf_no_index (v9)

Error file
error_msg (v9) error_msg (v9)
err_file (v9) err_file (v9)

Drill

bdrl_use_lead (Router v9)


omitrefht
peckacel
skp_lead_flgs
usecanbore1
usecanbore2
usecanchip

4-4 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire


usecandrill
usecanmisc1
usecanmisc2
usecanpeck
usecantap

Sequence number

omitseq omitseq

Debug

bug1 bug1
bug2 bug2
bug3 bug3
bug4 bug4
fastmode fastmode

Subprogram

sub_level

Cutter compensation

cc_1013 cc_1013

Arc

arccheck
arctype arccheck
breakarcs arctype
do_full_arc (v9) breakarcs
helix_arc (v9) do_full_arc (v9)

Version

rpd_typ_v7 rpd_typ_v7
strtool_v7 strtool_v7

Motion modification

brklinestype fil_sharp_neg (v9)


linarc fil_sharp_pos (v9)
newglobal fil_sharp_uv (v9)
nobrk linarc
ra_length make_fishtail (v9)
ra_on newglobal
ra_strt_on scalex, scaley, scalez
rtnrefht
scalex, scaley, scalez
November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-5
Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire

Process modification

cant_tlchng cant_tlchng
no_updprv no_updprv
redo_proc (v9) redo_proc (v9)
skp_lead_flgs skp_lead_flgs
skipmotest skipmotest
surrogate surrogate
tlchng_aft tlchng_aft
tool_zero tool_zero
uselstation

Preparatory

bldnxtool bldnxtool
tooltable listrad
listtpr
tooltable

Rotary

rotaxtyp

Next

get_1004 get_1004
getnextop getnextop

Output

eob eob
omitcrlf omitcrlf
progname progname
spaces spaces
transchr transchr

Leader

ldrcode ldrcode
ncldr ncldr

Implied arc
conversion

G60_mode

4-6 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire


UV output

qrtyp

2D conversion

use_2d_uv
plot_2d_uv

Commands
Sub file

clearaux clearaux
clearext clearext
clearsub clearsub
mergeaux mergeaux
mergeext mergeext
mergesub mergesub
mrg_subfile (v9) mrg_subfile (v9)
newaux newaux
newext newext
newsub newsub
subfile (v9) subfile (v9)

Output

comment comment
e e
ex ex
exitpost exitpost
nci_rewind nci_rewind

V8 subprograms

c_mmlt
c_msng

Lathe canned cycle

c_rcc_setup

Global post variables


nchar nchar
progno progno
pst_mode pst_mode

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-7


Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire

Tool data

ntools

Version

DLL_vers DLL_vers
m_vers_no m_vers_no
post_version post_version
vers_no vers_no

Stock

stck_crnr stck_crnr
stck_ht stck_ht
stck_thck stck_thck
stck_wdth stck_wdth
stck_x, stck_y, stck_z stck_x, stck_y, stck_z

SIM (HASP) Data


sim_no sim_no
sim_type sim_type

Tool change information


Tool data

first_tool first_tool
lstation inittaper
ltool_id next_tool
lturret pass
n_flutes tcr
n_tap_thds tldia
next_tool tlrad
orient
spindle_no
t
tcr
tldia
tlngno
tloffno
tlrad
tool_typ
trflat
ttblend

4-8 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire

Tool change position

x4, y4, z4 cutx, cuty


xh, yh, zh rpd_hght
xr, yr, zr contour_pos
contour_typ
landheight
startx, starty, startz
threadx, thready, threadz
trimplane1, trimplane2
up_st_vecx, up_st_vecy,
up_st_vecz
uvheight
xyheight
Misc integer/real

mi1 - mi10 mi1 - mi10


mr1 - mr10 mr1 - mr10
miscops_mi1 - mi10
miscops_mr1 - m10

Operation type

drill5 end_op_id
end_op_id end_opcode
end_opcode met_tool
met_tool nocore_fin
mill5 op_id
op_id opcode
opcode (Mill/Router) pdo_type
opcode (Lathe) posttype
posttype skimpass
tool_op (Mill/Router) tabcut
tool_op (Lathe) tool_op
up_st_mode
wtrim

Rotary

axis
rotary_axis
rotary_type
rotary_vecx, rotary_vecy ,
rotary_vecz
rotaxis
rotaxis_dir
rotdia

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-9


Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire


Tool plane

end_tlplnno
fg1014
tlplnno

Cutter compensation

cc_computer cc_computer
cctotip

Work offset

tox4, toy4, toz4 workofs


tox, toy, toz wox, woy
workofs

Work Coord. System

t_origin_x,y,z (v9)
t_wcs_m1-m9 (v9)
Power / flush / wire

wire

Machine functions

cgstop cgstop
cstop cstop

Coolant

coolant

Spindle

css_actv
maxss
spdir
ss (Mill/Router)
ss (Lathe)

Lathe Miscellaneous Operations (V9)

clmp_op
clmp_spindle
stck_adv_fr
stck_appr_fr

4-10 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire


stck_chuk_end_dx
stck_chuk_end_dz
stck_chuk_end_x
stck_chuk_end_z
stck_chuk_st_dx
stck_chuk_st_dz
stck_chuk_st_x
stck_chuk_st_z
stck_clear
stck_final_z
stck_grip
stck_init_z
stck_op
stck_spindle
stck_tool_x
tlstck_on

Cutter compensation

cc_pos cc_pos
ccomp ccomp
p_svec, q_svec, r_svec

Sequence number

n n
seqinc seqinc
seqmax seqmax
seqno seqno

Dwell

dwell dwell

Motion

absinc g20code
gcode g30code
plane gcode
plane

Linear

u, v, w x, y, z
x, y, z

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-11


Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire

UV taper

u, v, w

Arc

arc_pitch (v9) arcrad


arcrad ea
ea eo
eo full_arc_flg (v9)
full_arc_flg (v9) i, j, k
i, j, k sa
sa so
so sweep
sweep wfull_arc_flg

Rotary

a
c
xs, ys

UV direct

wx, wy, wz
wxc, wyc

Five-axis

vtoolx, vtooly, vtoolz

Taper
2D output

immediate
last_g60_wt
tofs
wt
wt_immd

UV direct

qstep
wtpr

4-12 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire

UV output

wq
wr

Feed rate

fr (Mill/Router) fr
fr (Lathe) pst_rpd_fr
fr_pos
frplunge
ipr_actv
pst_rpd_fr

Canned text

cant_no cant_no
cant_pos1 - cant_pos10 cant_pos1 - cant_pos10
cant_val1 - cant_val10 cant_val1 - cant_val10
cantext cantext

Drill

depth
drillcur
drillcyc
drl_prm1 - drl_prm10
drl_rot_vecx
drl_rot_vecy
drl_rot_vecz
initht
peck1
peck2
peckclr
refht
retr
rev_drl5
shftdrl
tosz
xdrl
zdrl

Five-axis

zdrill

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-13


Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire


Block drill
bdrl_ofs_x
bdrl_ofs_y
bdrl_ofs_z
bdrl_tool_grp
bdrl_tool_no –
bdrl_tool_no9
bdrl_wrk_ofs
bdrl_u
bdrl_v
bdrl_w
bdrl_use_lead
bdrl_x
bdrl_y
bdrl_z
bdrl_x2
bdrl_y2
bdrl_z2

Power / flush / wire


power
tank
thrd_cut
water

Technology

ccode
offset
overburn
reg1 – reg10

Right-angle head support

ra_head_no
ra_hvecx
ra_hvecy
ra_hvecz
ra_rot_head
ra_svecx
ra_svecy
ra_svecz
ra_translated
ra_tvecx
ra_tvecy
ra_tvecz
ra_type
ra_vecx
ra_vecy
ra_vecz
4-14 Mastercam Version 9.1 MP Post Reference Guide November 2002
Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire


Thread

add_thdzclr (v9)
nspring
nstarts
thda1
thda2
thdangle
thddepth
thdequcut
thdface
thdfinish
thdfirst
thdflat
thdlast
thdlead
thdlng
thdncuts
thdpass
thdpulloff
thdtaper
thdtype
thdx1, thdx2, thdx3
thdxclr
thdz1, thdz2
thdzclr

Subprogram

subno
subtyp

V8 subprograms

esub_chn_no
esub_grp_id
esub_op_id
esub_ref_id
esub_sec_no
esub_totl_no
esub_trns_id
main_prg_no
sub_chn_no
sub_grp_id
sub_inc
sub_mny_t
sub_nxt_h
sub_nxt_t
sub_nxt_tid
sub_op_id
sub_prg_no
November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-15
Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire


sub_ref_id
sub_sec_no
sub_totl_no
sub_trns_id

(following added in Version 9:)


sub_org_chn_no
sub_org_grp_id
sub_org_inc
sub_org_m1- m9
sub_org_mny_t
sub_org_nst_flg
sub_org_nxt_h
sub_org_nxt_t
sub_org_nxt_tid
sub_org_op_id
sub_org_ref_id
sub_org_sec_no
sub_org_totl_no
sub_org_trnmthd
sub_org_trns_id
sub_org_trnstyp
sub_org_trnsx
sub_org_trnsy
sub_org_trnsz
sub_rd_level
sub_seq_typ

Tool plane

sub_m1 - sub_m9

Transform

sub_trnmthd
sub_trnstyp
sub_trnsx, sub_trnsy ,
sub_trnsz

Wire canned cycle

cancyc
canned2 – canned7
drl_prm1 - drl_prm10
initht
retr
rev_drl5

4-16 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire

2D conversion

g30code_2, g30code_3, g30code_4


wcor_rad_2, wcor_rad_3, wcor_rad_4
wx_2, wy_2, wz_2
wxc_2, wyc_2
wx_3, wy_3, wz_3
wxc_3, wyc_3
wx_4, wy_4, wz_4
wxc_4, wyc_4

Subfile

auxprg auxprg
extprg extprg
nchaux nchaux
nchext nchext
nchsub nchsub
no_nc_out no_nc_out
subout subout
subprg subprg

Tracking
Path position

cutpos cutpos2
cutpos2

Path motion

dirchg dirchg
motst motst
move_ang move_ang
move_ang3

Operation type

cuttyp
Drill

bug9

Output

nc_lout nc_lout

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-17


Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire

Arc

dmax

Debug

nci_line nci_line

UV output

uvflag

Lathe canned cycle

rcc_flg

NCI
Gcode

gnci gnci

Linear position

xnci, ynci, znci xnci, ynci, znci

Arc position

xc, yc, zc xc, yc, zc


xcnci, ycnci , zcnci xcnci, ycnci , zcnci

Cutter compensation

cc cc

Tool plane

cm1 – cm9 m1 – m9
m1 – m9

Construction plane

corgx, corgy, corgz corgx, corgy, corgz


cplnno cplnno

4-18 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire

Path position

cend cend
cstart cstart
cur_cflg cur_cflg
rpd_typ

UV direct

wcc
wfr
wplane

Five-axis
Rev 5-axis

angle_found
lower_x, lower_y, lower_z
rev5
upper_x, upper_y, upper_z
vert_tol
vert_tool

Five-axis routines

matm1 - matm9
vtlofsx, vtlofsy, vtlofsz

Preparatory

ttplane ttplane
x_max, y_max, z_max wt_max
x_min, y_min, z_min x_max, y_max, z_max
x_min, y_min, z_min

Parameter

param_read param_read
prmcode prmcode

Next

nextccomp nextccomp
nextcflg nextcflg
nextdc nextdc
nextop nextop
November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-19
Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire


nextplane nextwc
nextu, nextv, nextw nextwt
nextx, nexty, nextz nextwt_immd
nextxc, nextyc nextx, nexty
nextxc, nextyc

Break

brk_cantext brk_cantext
brk_cc brk_cc
brk_cc_pos brk_cc_pos
brk_ccomp brk_ccomp
brk_cend brk_cend
brk_cgstop brk_cgstop
brk_commvar brk_commvar
brk_cstop brk_cstop
brk_cutpos2 (v9) brk_cutpos2 (v9)
brk_nextccomp brk_nextccomp
brk_nextcflg brk_nextcflg
brk_nextop brk_nextop
brk_rpd_typ brk_thrd_cut

Time/date

date date
day day
mc_day mc_day
mc_hour mc_hour
mc_min mc_min
mc_mon mc_mon
mc_sec mc_sec
mc_year mc_year
mon mon
month month
time time
year year

Tolerance
atol atol
brklineslen chord_tol
ltol ltol
maxrad maxrad
mtol mtol
vtol vtol
xtol xtol

4-20 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire

Math/function
Constants

deg2rad deg2rad
no no
pi pi
rad2deg rad2deg
yes yes

3D vector function

axisx, axisy, axisz axisx, axisy, axisz


ptfixx, ptfixy, ptfixz ptfixx, ptfixy, ptfixz

Intersection
ptnearx , ptneary, ptnearz ptnearx , ptneary,
t1 ptnearz
t2 t1
xresult t2
xresult
String

end_str_ix end_str_ix
st_str_ix st_str_ix

User prompt

nqc nqc

Comment

commlng commlng
commvar commvar
comm_call (v9.1) comm_call (v9.1)
comm_cnt (v9.1) comm_cnt (v9.1)

Future development

chord_tol wdum2
rotaxis1 wdum3
rotaxis2
rotdir1
rotdir2
wdum2
wdum3

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-21


Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire


Internal variables

bool____result bool____result
dum dum

Obsolete variables

brklines brklines
indexang indexang
mergenumber td_ct_flg
mi1drl tlname
mi2drl usemr1
thdmaj wiredirect
tlname
usemr1

Whatno variables

whatline whatline
whatno whatno

Synclath

merge_end
syncaxis
syncbfor
synclath
syncmode

Rolldie

ofs
rolldie

Five-axis routines

ldina1
ldina2
ldinl1
ldinl2
ldouta1
ldouta2
ldoutl1
ldoutl2
rhtilt
tilt
vdirx, vdiry, vdirz
vox, voy, voz

4-22 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Mill, Router and Lathe Wire

Tool data

dofs
lofs
t

Tool change
position

xh, yh, zh
xr, yr, zr

Work offset

zx, zy

Not used

azero cancelcc
b initfr
bzero omitround
cancelcc tlgth
cutretr
czero
frcandrill
initfr
lima1, lima2
limb1, limb2
limc1, limc2
mapfg
omitround
omitz
reva, revb, revc
subno
subtyp
tlgth
vtlngx, vtlngy
vtlngz

Not used in Wire (future)


Subprogram

sub_level

Motion

absinc
November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-23
Chapter 4 Numeric Variables Volume 3

Mill, Router and Lathe Wire

V8 Subprograms

esub_chn_no
esub_grp_id
esub_op_id
esub_ref_id
esub_sec_no
esub_totl_no
esub_trns_id
main_prg_no
sub_chn_no
sub_grp_id
sub_inc
sub_mny_t
sub_nxt_h
sub_nxt_t
sub_nxt_tid
sub_op_id
sub_prg_no
sub_ref_id
sub_sec_no
sub_totl_no
sub_trns_id

Not used in V8
Wire, Tool plane

sub_m1 - sub_m9

Transform

sub_trnmthd
sub_trnstyp
sub_trnsx, sub_trnsy,
sub_trnsz

Motion
modification

brklinestype
nobrk

Tolerance

brklineslen

4-24 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Predefined numeric variable descriptions


Not all variables are supported by all products or by all post versions. The following symbols designate
variables whose use is limited to certain products:

M Mill
L Lathe
R Router
W Wire

If there is no symbol, the variable is used by all products.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-25


Chapter 4 Numeric Variables Volume 3

M L a, c
Variable Type Calculated variable
Category Motion, Rotary motion
Description Axis of rotation in degrees.
Values Value
Code Example pblock # A postblock
n, x, y, z, a, c, e
Notes When rotaxtyp is –3, -2, -1, 0, or 1, only the c variable is returned.
rotaxtyp set to 3 calculates a and c variables are returned. Any
other setting requires the post writer to calculate the angles in the
post customization file.
See Volume 2, Rotary Processing for more information.

4-26 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M L absinc
Variable Type NCI variable
Category Motion
Description Designate NC output as absolute or incremental
(NCI variable with subprograms).
Values

0 Absolute
1 Incremental
Code Example None

Notes The post customization file must support the output styles.
The output is not controlled in the post executable.
See Volume 2, Subprograms for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-27


Chapter 4 Numeric Variables Volume 3

W absinc
Variable Type NCI variable
Category Not used in V8 Wire, Motion
Notes

4-28 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L add_thdzclr
Variable Type Post switch variable
Category Thread
Description add_thdzclr adds the value thdzclr to thdz1 and zeroes thdzlcr.
This happens before the postblock pthread0 is called, so the post
calculations using thdz1 work correctly. This mainly affects
tapered threading calculations. (New in Version 9.)
Values Value
0 Off
1 On
Code Example add_thdzclr : 1 # declare and set = 1 to enable this option

Notes See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-29


Chapter 4 Numeric Variables Volume 3

M R angle_found
Variable Type Calculated variable
Category Five-axis, Rev 5-axis
Description Tool5ax C-Hook request for next or previous motion vector with
current vector vertical. Indicates if a valid vector was found.
Values

0 Failure
1 Success
Code Example None

Notes This routine is triggered with the numeric variable rev5.


See Volume 2, Rotary Processing for more information.

4-30 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L arc_pitch
Variable Type Calculated variable
Category Motion
Description The linear axis pitch distance of the helix motion currently being
processed. This is the distance the linear axis would move in a
360 degree sweep of the circular motion of the helix.
Values Signed value
Code Example None

Notes See helix_arc for related information

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-31


Chapter 4 Numeric Variables Volume 3

arccheck
Variable Type Post switch variable
Category Post switch, Arc
Description Enables routines that filter invalid arcs from the NCI file.
Values

1 Check the arc length. Convert the arc into line segments if the
length is less than the given length tolerance in the numeric
variable ltol.
2 Check the angles (θ1 and θ2) of the triangle formed by the start
point, center point and end point of the arc. Convert the arc into a
line if the angles are different by more than a given angular
tolerance in degrees in the numeric variable atol.

END START
θ2 θ1

CENTER

3 Test the arcs using both methods for length and angle. Convert the
arc into a line if either test result is greater than the given
tolerance.
Code Example atol : .01 #Angularity tolerance for arccheck = 2
ltol : .002 #Length tolerance for arccheck = 1
arccheck : 3 #Check for small arcs, convert to linear
Notes

4-32 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

arcrad
Variable Type Calculated variable
Category Motion, Arc
Description Radius of the current arc.
Values Value
Code Example pcir # Circular postblock
n, x, y, z, arcrad, e
Notes The distance from the arc center to the arc endpoint.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-33


Chapter 4 Numeric Variables Volume 3

arctype
Variable Type Post switch variable
Category Post switch, Arc
Description Specify the arc center type (I, J and K).
Values

1 Absolute center
2 Delta (start to center)
3 Delta (center to start)
4 Unsigned incremental (use absolute format)
Code Example arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.

Notes arctype does not set the output for arc radius. The numeric
variable arcrad must be entered in the post customization file.
Almost all released posts do this automatically with user-defined
post switches.
Caution: When changing from absolute center to incremental
arctyp, make sure to modify the format statement for i, j, and k
from absolute to delta.

4-34 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

atol
Variable Type Tolerance variable
Category Tolerance
Description Angle tolerance.
Values Value
Default 0.0
Code Example None

Notes Used with arccheck to validate an arc.


Used with g60_mode to determine tangency (Wire only).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-35


Chapter 4 Numeric Variables Volume 3

auxprg
Variable Type Post switch variable
Category Sub files
Description Control use/creation of alternate program file (.AUX).
Values

0 Disabled
1 Open the file removing all contents.
2 Open the file and append to contents.
Code Example None

Notes To enable output to an .AUX file, the subout variable is set to 2.


See related variables mergeaux and clearaux.
See Volume 1, File Manipulation for more information.

4-36 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L axis
Variable Type Calculated variable
Category Tool change information, Rotary
Description
Current axis of tool plane rotation with rotaxtyp set to 1 or less.
Values

0 None
1 Rotation about the X axis.
2 Rotation about the Y axis.
3 Rotation about the Z axis.
Code Example None

Notes Rotation is relative to the world coordinate system (top view).


See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-37


Chapter 4 Numeric Variables Volume 3

axisx, axisy, axisz


Variable Type Helper variable
Category Math/function, 3D vector function
Description Rotation vector used with the rotate functions rotp and rotv.
Values Value
Code Example None

Notes By default, this vector is 0,0,0, so you must equate this vector to
the desired rotation axis.

4-38 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

azero
Variable Type None
Category Not Used
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-39


Chapter 4 Numeric Variables Volume 3

M R L b
Variable Type None
Category Not Used
Notes

4-40 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

R bdrl_ofs_x
Variable Type NCI variable
Category Block drilling (Router)
Description Distance of drill hole minus the lead drill position - X
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-41


Chapter 4 Numeric Variables Volume 3

R bdrl_ofs_y
Variable Type NCI variable
Category Block drilling (Router)
Description Distance of drill hole minus the lead drill position - Y
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

4-42 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

R bdrl_ofs_z
Variable Type NCI variable
Category Block drilling (Router)
Description Distance of drill hole minus the lead drill position -Z
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-43


Chapter 4 Numeric Variables Volume 3

R bdrl_tool_grp
Variable Type NCI variable
Category Block drilling (Router)
Description Group number
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

4-44 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

R bdrl_tool_no, bdrl_tool_no1 … bdrl_tool_no9


Variable Type NCI variable
Category Block drilling (Router)
Description Tool numbers for the first head (bdrl_tool_no) through the ninth
head (bdrl_tool_no9)
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-45


Chapter 4 Numeric Variables Volume 3

R bdrl_u
Variable Type NCI variable
Category Block drilling (Router)
Description Position of lead drill at initial height - X
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

4-46 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

R bdrl_v
Variable Type NCI variable
Category Block drilling (Router)
Description Position of lead drill at initial height - Y
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-47


Chapter 4 Numeric Variables Volume 3

R bdrl_w
Variable Type NCI variable
Category Block drilling (Router)
Description Position of lead drill at initial height - Z
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

4-48 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

R bdrl_use_lead
Variable Type Post switch variable
Category Block Drilling (Router)
Description Output the lead drill (on block drilling) as the drill position
Values

0 No
1 Yes
Code Example none

Notes This is only valid in the Mastercam Router product.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-49


Chapter 4 Numeric Variables Volume 3

R bdrl_wrk_ofs
Variable Type NCI variable
Category Block drilling (Router)
Description Work Offset for drill position
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

4-50 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

R bdrl_x
Variable Type NCI variable
Category Block drilling (Router)
Description Axis position of the lead drill (on block drilling) at depth - X
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-51


Chapter 4 Numeric Variables Volume 3

R bdrl_y
Variable Type NCI variable
Category Block drilling (Router)
Description Axis position of the lead drill (on block drilling) at depth – Y
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

4-52 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

R bdrl_z
Variable Type NCI variable
Category Block drilling (Router)
Description Axis position of the lead drill (on block drilling) at depth - Z
Values

Code Example none

Notes This is only valid in the Mastercam Router product.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-53


Chapter 4 Numeric Variables Volume 3

R bdrl_x2
Variable Type NCI variable
Category Block drilling
Description X position for pblockdrl data collection
Values

Code Example none

Notes This is only valid in the Mastercam Router product.


See postblock pblockdrl for more information.

4-54 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

R bdrl_y2
Variable Type NCI variable
Category Block drilling
Description Y position for pblockdrl data collection
Values

Code Example none

Notes This is only valid in the Mastercam Router product.


See postblock pblockdrl for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-55


Chapter 4 Numeric Variables Volume 3

R bdrl_z2
Variable Type NCI variable
Category Block drilling
Description Z position for pblockdrl data collection
Values

Code Example none

Notes This is only valid in the Mastercam Router product.


See postblock pblockdrl for more information.

4-56 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

bldnxtool
Variable Type Post switch variable
Category Post switch, Preparatory
Description Enables the routine that makes the next tool variables available for
supporting staged tools in the post customization file.
Values

0 No
1 Yes
Code Example bldnxtool : 1 # Build “next” tool table

Notes Wire requires this to be enabled to build the wire radius and taper
lists.
See Volume 1, Preparatory Postblocks.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-57


Chapter 4 Numeric Variables Volume 3

bool___result
Variable Type Calculated variable
Category Internal
Description The result returned with the conditional branching statements
(if) and (while).
Values

0 False
1 True
Code Example None

Notes Caution: Never use this numeric variable. For internal


processing only.

4-58 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

breakarcs
Variable Type Post switch variable
Category Post switch, Arc
Description
Break arcs at the circle quadrants.
Break arcs to limit sweep angle to 180 degrees (added in v9).

Values

0 Arcs remain as they are read from the NCI file.


1 Arcs are broken at quadrants.
2 Arcs are broken so no segment is greater than 180 degrees of
sweep. (This option is new in Version 9)
Code Example breakarcs : 1 # Break arcs into quadrants

Notes See Volume 2, Breakup of motion for more information.


See do_full_arc for related information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-59


Chapter 4 Numeric Variables Volume 3

brk_cantext
Variable Type Calculated variable
Category Break
Description Provide the current value of cantext during break up of move.
Values See cantext for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

4-60 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

brk_cc
Variable Type Calculated variable
Category Break
Description Provide the current value of cc during break up of move.
Values See cc for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-61


Chapter 4 Numeric Variables Volume 3

brk_cc_pos
Variable Type Calculated variable
Category Break
Description Provide the current value of cc_pos during break up of move.
Values See cc_pos for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is set to the previous value until the original endpoint is
output. See Volume 2, Breakup of motion for more information.

4-62 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

brk_ccomp
Variable Type Calculated variable
Category Break
Description Provide the current value of ccomp during break up of move.
Values See ccomp for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-63


Chapter 4 Numeric Variables Volume 3

brk_cend
Variable Type Calculated variable
Category Break
Description Provide the current value of cend during break up of move.
Values See cend for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

4-64 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

brk_cgstop
Variable Type Calculated variable
Category Break
Description Provide the current value of cgstop during break up of move.
Values See cgstop for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-65


Chapter 4 Numeric Variables Volume 3

brk_commvar
Variable Type Break
Variable Type Calculated variable
Category Break
Description Provide the current value of commvar during break up of move.
Values See commvar for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

4-66 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

brk_cstop
Variable Type Calculated variable
Category Break
Description Provide the current value of cstop during break up of move.
Values See cstop for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed and until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-67


Chapter 4 Numeric Variables Volume 3

brk_cutpos2
Variable Type Calculated variable
Category Break
Description Provide the current value of cutpos2 flag during break up of move .
Values See cutpos2 for values.
Code Example None

Notes See Volume 2, Breakup of motion for more information.

4-68 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

brk_nextccomp
Variable Type Calculated variable
Category Break
Description Provide the current value of nextccomp during break up of move.
Values See nextccomp for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is given the value of ccomp until the original endpoint is
output. See Volume 2, Breakup of motion for more information..

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-69


Chapter 4 Numeric Variables Volume 3

brk_nextcflg
Variable Type Calculated variable
Category Break
Description Provide the current value of nextcflg during break up of move.
Values See nextcflg for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

4-70 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

brk_nextop
Variable Type Calculated variable
Category Break
Description Provide the current value of nextop during break up of move.
Values See nextop for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is assigned the value of gcode until the original endpoint is
output. See Volume 2, Breakup of motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-71


Chapter 4 Numeric Variables Volume 3

M R L brk_rpd_typ
Variable Type Calculated variable
Category Break
Description Provide the current value of rpd_typ during break up of move.
Values See rpd_typ for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed and until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

4-72 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W brk_thrd_cut
Variable Type Calculated variable
Category Break
Description Provide the current value of thrd_cut during break up of move.
Values See thrd_cut for values.
Code Example None

Notes During a post executable routine that breaks motion, the current
value is zeroed and until the original endpoint is output.
See Volume 2, Breakup of motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-73


Chapter 4 Numeric Variables Volume 3

brklines
Variable Type Post switch variable
Category Obsolete
Description Use of this numeric variable is not recommended. It has been
superseded by the numeric variable brklinestype.
Notes

4-74 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L brklineslen
Variable Type Tolerance variable
Category Tolerance
Description Length of the broken line segment with brklinestype.
Values Value
Default 0.0
Code Example None

Notes Used with brklinestype.


See Volume 2, Breakup of motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-75


Chapter 4 Numeric Variables Volume 3

W brklineslen
Variable Type Calculated variable
Category Not used in Wire, Tolerance
Notes

4-76 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L brklinestype
Variable Type Post switch variable
Category Post switch, Motion modification
Description Specify the method the post executable uses to break linear moves
into segments. Linear motion may be broken using chord height
or segment length.
Values

Break method Do not break these lines:


0 No break
1 X motion only
2 Y motion only
3 Z motion only
4 Chord height Toward/from/parallel to the X axis
5 Toward/from/parallel to the Y axis
6 Toward/from/parallel to the Z axis
7 Break all lines
8 X motion only
9 Segment length Y motion only
10 Z motion only
11 Break all lines
Code Example pblock # A postblock
if cuttype = two, #Polar
[
brklinestype = rotary_axis + three
linarc = one
]
Notes See variable brklineslen for related information.
See Volume 2, Breakup of motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-77


Chapter 4 Numeric Variables Volume 3

W brklinestype
Variable Type Post switch variable
Category Not used in Wire, Motion modification
Notes

4-78 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

buf_no_index
Variable Type Post switch variable
Category Buffer files
Description buf_no_index, when set to true, stops the automatic indexing of
the buffer record number variable argument in the rbuf and wbuf
functions. (New in Version 9)
Values

0 Off
1 On

Code Example rc1 : 1 # Declare and initialize buffer read record index
ppostblock
buf_no_index = 1 # Do not automatically increment buffer index
x = rbuf( one , rc1 )
# rc1 is still one after the buffer read function

Notes See Volume 2, How buffer files work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-79


Chapter 4 Numeric Variables Volume 3

bug1
Variable Type Post switch variable
Category Post switch, Debug
Description A post switch that controls the display editor/view of the NC file.
Values

0 No NC file displayed.
1 Display the NC file in a viewing window after processing.
2 Display the NC file in the editor program specified in the current
Mastercam configuration file.
Code Example bug1 : 2 # 0=No display, 1=Generic list box, 2=Editor

Notes This is not effective when executing the post from the Mastercam
Operation Manager or Batch Mode.
See Volume 1, Post Debugging Techniques for more information.

4-80 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

bug2
Variable Type Post switch variable
Category Post switch, Debug
Description A debug switch that displays the label of either the first and last
postblock or all postblocks. Called to produce the current NC
line. Display starts in the column specified in the command, for
example, bug2: 30. The display is appended to the current NC
line.
Values

0 Do not display the postblock label.


positive value Write the label of the first postblock called and, if additional
postblocks are called, the last postblock called to the NC output.
(The last postblock is the one that writes the end-of-line to the NC
output line.) The appended information starts in the column
specified by the value.
negative value Write all postblock labels used to output each line statement in the
NC output. The appended information starts in the column
specified by the value.
Code Example bug2 : 30

Notes The fastmode numeric variable must be off to enable bug2, bug3,
and bug4.
See Volume 1, Post Debugging Techniques for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-81


Chapter 4 Numeric Variables Volume 3

bug3
Variable Type Post switch variable
Category Post switch, Debug
Description A debug switch that adds the value of the variable whatline to the
end of each line of NC code output.
Values

0 No
1 Yes
Code Example bug3 : 0

Notes The fastmode numeric variable must be off to enable bug2, bug3,
and bug4. It is not recommended to use the whatno routines in any
post customization files.
See Volume 1, Post Debugging Techniques and Volume 1,
Changes to the MP Post for more information.

4-82 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

bug4
Variable Type Post switch variable
Category Post switch, Debug
Description A debug switch that adds the current NCI file line number
position to the end of each line of NC line output. The NCI file
number indicates a row in the NCI file.
Values

0 Do not add NCI line numbers.


1 Add NCI line numbers.
-1 Add NCI line numbers.
Alter debug numeric variable output (with “~” variable modifier).
The numeric variable is output without using the numeric format
to allow the post writer to see the value as it is stored in memory.
Code Example bug4 : 1 # Append NCI line number to each NC line?

Notes The fastmode numeric variable must be off to enable bug2, bug3,
and bug4.
SSee Volume 1, Post Debugging Techniques for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-83


Chapter 4 Numeric Variables Volume 3

M R L bug9
Variable Type Tracking
Category Drill
Description Indicates the current drill position with long drill code output.
Values Integer, 0 through 8, specific to cycle.
Code Example None

Notes See Volume 1, Drill Cycles for more information.

4-84 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W bug9
Variable Type Calculated variable
Category Not used in Wire, Drill
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-85


Chapter 4 Numeric Variables Volume 3

M R L bzero
Variable Type None
Category Not Used
Notes

4-86 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W c
Variable Type Calculated variable
Category Not used in Wire, Rotary motion
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-87


Chapter 4 Numeric Variables Volume 3

M R L c_mmlt
Variable Type Command variable
Category Command, V8 subprograms
Description Calls the routine and postblocks for transform subprograms with
multiple tools. This allows the post writer to control the location
where the subprogram is called and the output stream is switched
in the tool change postblocks.
Code Example psof #Start of file for non-zero tool number
pbld, n, *smetric, e #Set for Inch or Metric mode
pbld, n, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e
pfbld, n, sgabsinc, *sg28ref, "Z0.", e # Home Z
pfbld, n, *sg28ref, "X0.", "Y0.", e # Home X,Y
pfbld, n, "G92", *xh, *yh, *zh, e # Set G92 Origin
comment #Comments from Operation
pcan #Canned text output (before)
c_mmlt #Multiple tool subprogram call
pbld, n, *t, "M6", e
pcan1, pbld, n, *sgcode, *sgabsinc, pwcs, pfxout, pfyout,
*speed, *spindle, pgear, strcantext, e
Notes See Volume 2, Subprograms for more information.

4-88 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W c_mmlt
Variable Type Command variable
Category Not used in Wire, V8 subprograms
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-89


Chapter 4 Numeric Variables Volume 3

M R L c_msng
Variable Type Command variable
Category Command, V8 subprograms
Description Calls the routine and postblocks for transform subprograms with
a single tool. This allows the post writer to control the location
where the subprogram is called and the output stream is switched
in the tool change postblocks.
Code Example psof #Start of file for non-zero tool number
pbld, n, *smetric, e #Set for Inch or Metric mode
pbld, n, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e
pfbld, n, sgabsinc, *sg28ref, "Z0.", e # Home Z
pfbld, n, *sg28ref, "X0.", "Y0.", e # Home X,Y
pfbld, n, "G92", *xh, *yh, *zh, e # Set G92 Origin
comment #Comments from Operation
pcan #Canned text output (before)
c_mmlt #Multiple tool subprogram call
pbld, n, *t, "M6", e
pcan1, pbld, n, *sgcode, *sgabsinc, pwcs, pfxout, pfyout,
*speed, *spindle, pgear, strcantext, e
c_msng #Single tool subprogram call
Notes See Volume 2, Subprograms for more information.

4-90 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W c_msng
Variable Type Command variable
Category Not used in Wire, V8 subprograms
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-91


Chapter 4 Numeric Variables Volume 3

L c_rcc_setup
Variable Type Command variable
Category Command, Lathe canned cycle
Description Calls the routine and postblocks for lathe canned cycle to capture
values from the roughing tool. This allows the post writer to
control the location where the information is captured in the tool
change postblocks.
Code Example ltlchg #Tool change, lathe
toolchng = one
gcode = zero
copy_x = vequ(x)
pcc_capture #Capture LCC ends, stop output RLCC
c_rcc_setup #Save original in sav_xa and shift copy_x for LCC
pcom_moveb #Get machine position, set inc. from c1_xh
c_mmlt #Position multi-tool sub, sets inc. current if G54...
Notes See Volume 2, Lathe Canned Cycles for more information.

4-92 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W c_rcc_setup
Variable Type Command variable
Category Not used in Wire, Lathe Canned Cycle
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-93


Chapter 4 Numeric Variables Volume 3

cancelcc
Variable Type None
Category Not Used
Notes

4-94 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W cancyc
Variable Type NCI variable
Category Wire canned cycle
Description Type of wire canned cycle.
Values

0 through 19 Custom cycles


Code Example None

Notes See Volume 1,Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-95


Chapter 4 Numeric Variables Volume 3

W canned2 through canned7


Variable Type NCI variable
Category Wire canned cycle
Description The custom canned parameters passed with the drill cycle NCI
Gcode 81 data.
Values Value
Code Example None

Notes The custom drill parameters are provided to allow custom


support in the post customization file.
See Volume 1,Working with Drill Cycles for more information.

4-96 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cant_no
Variable Type Calculated variable
Category Canned text
Description The number of canned text entries on the NCI Gcode 1025 line.
Values Integer
Code Example None

Notes See Volume 1, Working with Cantext for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-97


Chapter 4 Numeric Variables Volume 3

cant_pos1 through cant_pos10


Variable Type Calculated variable
Category Canned text
Description Defines the position of the value in cant_val1 through cant_val10
passed on the NCI Gcode 1025 line: before, with, or after the
output NC line.
Values

-1 Off
0 Before
1 With
2 After
Code Example None

Notes See Volume 1, Working with Cantext for more information.

4-98 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cant_tlchng
Variable Type Post switch variable
Category Post switch, Process modification
Description Control canned text when tlchng_aft is on.
Values

0 Allow canned text values in the tool change NCI block to be


overwritten by any canned text values on the following NCI
position.
1 Save the canned text values in the tool change NCI block and
overwrite any canned text values on the following NCI position.
Code Example tlchng_aft : 2 #Delay call to tool change until move line
cant_tlchng : 1 #Ignore cantext entry on move with tlchng_aft
Notes It is recommended to use tlchng_aft in all modern post
customization files.
See Volume 1, Changes to the MP Post and Volume 1, Working
with Cantext for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-99


Chapter 4 Numeric Variables Volume 3

cant_val1 through cant_val10


Variable Type Calculated variable
Category Canned text
Description The actual canned text value passed on the NCI Gcode 1025 line.
Values Value
Code Example None

Notes See cant_pos1 - cant_pos10 for related information.


See Volume 1, Working with Cantext for more information.

4-100 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cantext
Variable Type Calculated variable
Category Canned text
Description Obsolete canned text variable.
Values Integer
Code Example None

Notes The value from the first entry on the NCI Gcode 1025 line is
copied to this variable for backwards compatibility. It is
recommended to use new canned text variables and routines in
all modern post customization files.
See Volume 1, Working with Cantext for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-101


Chapter 4 Numeric Variables Volume 3

cc
Variable Type NCI variable
Category NCI, Cutter compensation
Description Cutter compensation value read directly from NCI file.
Values

0 Off
40 Cancel cutter compensation in the control.
41 Cutter compensation in the control = left.
42 Cutter compensation in the control = right.
140 Cancel compensation in the control with last move.
Code Example None

Notes Use of this numeric variable is not recommended. It has been


superseded by the numeric variable cc_pos.

4-102 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cc_1013
Variable Type Post switch variable
Category Post switch, Cutter compensation
Description Enables calculating cc_pos (modal cutter compensation) when
the NCI 1013 line is read in the tool change NCI block.
Values

0 Do not calculate cc_pos with the cutter compensation value on


the NCI Gcode 1013 line.
1 Calculate cc_pos with the cutter compensation value on the NCI
Gcode 1013 line.
Code Example cc_1013 : 1
Notes See cc_pos. It is recommended to use cc_pos as the numeric
variable selector for cutter compensation string select function.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-103


Chapter 4 Numeric Variables Volume 3

cc_computer
Variable Type NCI variable
Category Tool change information, cutter compensation (in computer)
Description Flag to indicate cutter compensation in computer is set.
Values

0 Cutter compensation in computer is not set


1 Cutter compensation in computer is set.
Code Example None

Notes See cc_pos for compenstation in control.

4-104 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cc_pos
Variable Type Calculated variable
Category Cutter compensation (in control)
Description Modal cutter compensation variable.
Values

0 Off (G40)
1 Left (G41)
2 Right (G42)
Code Example # Cutter compensation G code selection
scc0 G40 #Cancel cutter compensation
scc1 G41 #Cutter compensation left
scc2 G42 #Cutter compensation right
sccomp #Target for string

fstrsel scc0 cc_pos sccomp

pblock # A postblock
n, sgcode, sccomp, x, y, z, e
Notes It is recommended to use cc_pos as the numeric variable selector
for cutter compensation string select function. When motion is
broken into multiple moves in the post executable, cc_pos remains
equal to the previous value until the final move.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-105


Chapter 4 Numeric Variables Volume 3

W ccode
Variable Type NCI variable
Category Technology
Description Current wire condition
Values Integer
Code Example pconchg #Control setting change
if gcode = 1010, pbld, n, ccode, offset, e
else, ccode, offset
Notes This variable was formerly called dofs in previous Wire post
processors. The value is copied to the dofs variable for backward
compatibility.

4-106 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

ccomp
Variable Type Calculated variable
Category Cutter compensation
Description Cutter compensation in control status of NCI data.
Values

0 No change
1 Cancel
2 Left
3 Right
4 Cancel with last move.
Code Example None

Notes Use of this numeric variable for output is not recommended.


It has been superseded by the numeric variable cc_pos.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-107


Chapter 4 Numeric Variables Volume 3

M R L cctotip
Variable Type NCI variable
Category Tool change information, Cutter compensation
Description Indicate whether cutter compensation is offset from the tool
center or tool tip.
Values

0 Compensate to tool center.


1 Compensate to tool tip.
Code Example None

Notes For Mill and Router, the proper setting of cctotip will generally
depend on how the system generates tool offsets from the part
surface. Some offset methods are designed for tool center milling,
often when using a ball endmill, while some are designed for tool
tip milling, often used for a bull-nose endmill.

cctip = 0
X, Y, AND Z SPECIFY
TOOL CENTER MOTION

cctip = 1
X, Y, AND Z SPECIFY
TOOL TIP MOTION

4-108 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cend
Variable Type NCI variable
Category NCI, Path position
Description End-of-contour flag.
Values

0 No
1 Yes
Code Example None

Notes The cend flag indicates the last point where the tool is on the
selected contour or surface.
For wire motion NCI lines, the contour flag is combined to
indicate the end of the contour and to indicate the location where
cutter compensation is cancelled on a lead out (even when no
compensation was selected).
The numbering follows:
1 = End-of-contour flag
2 = Compensation cancel point
3 = Both on same point
See cstart for related information.
This variable is extracted from the contour flag variable cur_cflg.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-109


Chapter 4 Numeric Variables Volume 3

cgstop
Variable Type Calculated variable
Category Machine function
Description Optional program (glue) stop.
Values

0 No
1 Yes.
Code Example None

Notes See cstop for related information.

4-110 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L chord_tol
Variable Type Tolerance variable
Category Future development
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-111


Chapter 4 Numeric Variables Volume 3

W chord_tol
Variable Type Tolerance variable
Category Tolerance
Description Angle tolerance.
Values Value
Default 0.0005
Code Example None

Notes Used with plot-2d-uv to set chord tolerance of arc break up to 4-


axis direct wire path.
See Volume 2, Wire 2-Axis to 4-Axis Conversion for more
information.

4-112 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

clearaux
Variable Type Command variable
Category Command, Sub file
Description Removes contents of the open alternate file output stream auxprg.
Code Example pblock # A postblock
clearaux
Notes Sets the numeric variable nchaux to 0. If the file is not opened,
the contents are not cleared.
See the related variable mergeaux.
See Volume 1, File Manipulation for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-113


Chapter 4 Numeric Variables Volume 3

clearext
Variable Type Command variable
Category Command, Sub file
Description Removes contents of the open alternate file output stream extprg.
Code Example pblock # A postblock
clearext
Notes Sets the numeric variable nchext to 0. If the file is not opened, the
contents are not cleared.
See the related variable mergeext.
See Volume 1, File Manipulation for more information.

4-114 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

clearsub
Variable Type Command variable
Category Command, Sub file
Description Removes contents of the open alternate file output stream subprg.
Code Example pblock # A postblock
clearsub
Notes Sets the numeric variable nchsub to 0. If the file is not opened,
the contents are not cleared.
See the related variable mergesub.
See Volume 1, File Manipulation for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-115


Chapter 4 Numeric Variables Volume 3

L clmp_op
Variable Type NCI variable
Category Lathe MiscOps - Chuck function information
Description The selected operation mode.
Values Integer
0 Clamp
1 Un-clamp
2 Re-position
Code Example None

Notes

4-116 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L clmp_spindle
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Active spindle for clamp/unclamp
Values Integer
0 Left spindle
1 Right spindle
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-117


Chapter 4 Numeric Variables Volume 3

M R L cm1 through cm9


Variable Type NCI variable
Category NCI, Tool plane
Description Construction plane matrix
Values Values
Code Example None

Notes See m1 through m9. This matrix is rarely used.

4-118 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W cm1 through cm9


Variable Type NCI variable
Category Not used in Wire, Tool plane
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-119


Chapter 4 Numeric Variables Volume 3

comment
Variable Type Command variable
Category Command, Output
Description Outputs the comments taken from the NCI and buffered at the
tool change. This allows the post writer to position the location
where comments are written in the tool change postblocks and
end-of-file postblock.
Code Example psof #Start of file for non-zero tool number
pbld, n, *smetric, e #Set for Inch or Metric mode
pbld, n, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e
pfbld, n, sgabsinc, *sg28ref, "Z0.", e # Home Z
pfbld, n, *sg28ref, "X0.", "Y0.", e # Home X,Y
pfbld, n, "G92", *xh, *yh, *zh, e # Set G92 Origin
comment #Comments from Operation
pcan #Canned text output (before)
pbld, n, *t, "M6", e
pcan1, pbld, n, *sgcode, *sgabsinc, pwcs, pfxout, pfyout,
*speed, *spindle, pgear, strcantext, e
Notes See Volume 1, Posting Comments into the NC File for more
information.

4-120 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

commlng
Variable Type Calculated variable
Category Comment
Description Number of characters in a comment from the NCI file.
Values Integer
Code Example None

Notes See Volume 1, Posting Comments into the NC File for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-121


Chapter 4 Numeric Variables Volume 3

commvar
Variable Type NCI variable
Category Comment
Description Converted comment from the NCI file to a number.
Values Value
Code Example None

Notes A comment from the NCI file is converted to a number if the


string consists of all numeric characters.
See Volume 1, Posting Comments into the NC File for more
information.

4-122 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

comm_call
Variable Type Calculated variable
Category Comment
Description Reports how many times the comment output loop has been
called (calls to the pcomment postblock), either by the command
word comment, or internally from MP.This makes the count from
a tool change different than from a motion postblock call.
Values Value
Code Example None

Notes Initializing comm._cnt = -1 will allow the comment output loop to


be called only with the command word comment.
See Volume 1, Posting Comments into the NC File for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-123


Chapter 4 Numeric Variables Volume 3

comm_cnt
Variable Type Calculated variable
Category Comment
Description Reports how many comments have been buffered in from the
NCI data prior to output in a comment output loop.
Values Value
Code Example None

Notes comm._cnt allows the user to control the comment buffer output
by redefining the number of comments that MP has written to the
comment buffer. This tricks the MP executable into ending or
rereading the buffered comments
See Volume 1, Posting Comments into the NC File for more
information.

4-124 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W contour_pos
Variable Type NCI variable
Category Tool change information, Tool change position
Description Chain height button selected on the Contour parameters page
Values

0 XY height
1 Land height
2 UV height
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-125


Chapter 4 Numeric Variables Volume 3

W contour_typ
Variable Type NCI variable
Category Tool change information, Tool change position
Description Contour type button selected on the Contour parameters page
Values 0, 1, 2, 3, 4 (left right on the dialog box)
Code Example None

Notes The dialog box looks like the following picture:

4-126 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L coolant
Variable Type NCI variable
Category Machine function, Coolant
Description Coolant status.
Values

0 Off
1 Flood
2 Mist
3 Tool (spindle)
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-127


Chapter 4 Numeric Variables Volume 3

corgx, corgy, corgz


Variable Type NCI variable
Category NCI, Construction plane
Description Construction plane origin.
Values Values
Code Example None

Notes

4-128 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cplnno
Variable Type NCI variable
Category NCI, Construction plane
Description Construction plane number.
Values Integer
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-129


Chapter 4 Numeric Variables Volume 3

M R L css_actv
Variable Type Calculated variable
Category Machine function, Spindle
Description Constant surface speed flag.
Values

0 Off (always with Mill and Router toolpaths)


1 On
Code Example None

Notes

4-130 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cstart
Variable Type NCI variable
Category NCI, Path position
Description Start-of-contour flag.
Values

0 No
1 Yes
Code Example None

Notes With 5-axis toolpaths (NCI Gcode 11), it indicates the first point
where the tool is on the selected surface.
With contour toolpaths, it is set at the endpoint of the first actual
move. (The second point in the toolpath).
For Wire motion NCI lines, the contour flag is combined to
indicate the start of the contour and to indicate the location where
cutter compensation is engaged on a lead in (even when no
compensation was selected).
The numbering follows:
1= Start-of-contour flag
2 = Compensation point
3 = Both on same point

See cend for related information.


This variable is extracted from the contour flag variable cur_cflg.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-131


Chapter 4 Numeric Variables Volume 3

cstop
Variable Type Calculated variable
Category Machine function
Description Program stop.
Values

0 No
1 Yes
Code Example None

Notes See the related variable cgstop.

4-132 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cur_cflg
Variable Type NCI variable
Category NCI, Path position
Description Contour flag. This variable is not normally accessed directly but
the flags carried in it are extracted by the numeric variables.
Values Integer
Code Example None

Notes Control flags are place position values that are extracted from the
number passed in the parameter. Variables that have more than a
single state are shifted by one so that 0 is a no change condition.
The actual setting is obtained by subtracting 1. This is done
automatically in the executable. Zero is implied when the
leading place fields are empty.

M R
1 Contour stop cstop
10 Contour optional stop cgstop
100 Contour end cend
1000 Contour start cstart
100000 Coolant off coolant
200000 Coolant flood coolant
300000 Coolant mist coolant
400000 Coolant tool coolant
1000000 5-axis flip/same as previous rev5
2000000 5-axis same as next rev5
3000000 5-axis 180-degree rev5
4000000 5-axis previous + 180 rev5
5000000 5-axis next + 180 rev5

L
1 Contour stop cstop
10 Contour optional stop cgstop
100 Contour end cend
1000 Contour start cstart
10000 Clear to home rpd_typ
20000 Rapid to start rpd_typ
30000 Rapid around obstruction rpd_typ
40000 Rapid between points rpd_typ
50000 Entry/exit rpd_typ
60000 End/Start of rough turning cycles rpd_typ
100000 Coolant off coolant

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-133


Chapter 4 Numeric Variables Volume 3

200000 Coolant flood coolant


300000 Coolant mist coolant
400000 Coolant tool coolant

W
1 Contour stop cstop
10 Contour optional stop cgstop
100 Contour end cend
200 Wire Compensation OFF <see note below>
1000 Contour start cstart
2000 Wire compensation ON <see note below>
10000 Thread the wire thrd_cut
20000 Cut the wire thrd_cut
100000 Water off water
200000 Water on water
300000 Water option 1 water
1000000 Power off power
2000000 Power on power
10000000 Tank empty tank
20000000 Tank fill tank
See the appropriate variable for more information.
Note: Unlike the other contour flags, the Wire Compensation flag values are added
to cend and cstart flag, if they exist at the same location in the NCI file.
It is important to note that the wire compensation flags (200 and 2000) are independent of
wire compensation actually being programming in the wirepath progra. They mark where
wire compensation would normally be activated and canceled in the wirepath by Mastercam.

4-134 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W cutlength
Variable Type Tracking
Category Obsolete
Description Calculated length of the wire cut.
It is available at the peof postblock.
Values

Code Example None

Notes This data has not been written to the Wire NCI file since Version 8.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-135


Chapter 4 Numeric Variables Volume 3

cutpos
Variable Type NCI variable
Category Tracking, Path position
Description 5-axis toolpath position flag.
Values

0 Before start point, reset at each tool change, including null.


1 Start point, first point on surface.
2 In cut.
3 On end of cut, last point on surface.
4 Lead in motion.
5 Lead out motion.
Code Example None

Notes If the numeric variable rpd_typ_v7 is set, a cutpos of 5 (lead out


motion) is converted to 4. This is extracted from the tool
parameters flag (rev5+cutpos+cuttyp) on the NCI Gcode 11 line.

4-136 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

cutpos2
Variable Type Calculated variable
Category Tracking, Path position
Description Universal toolpath position flag.
Values

0 Before start point; reset at each tool change, including null.


1 Start point, first point on surface, chained contour, etc.
2 In cut.
3 On end of cut, last point on surface, chained contour, etc.
4 After end of cut.
Code Example None

Notes The purpose of this flag is to provide feedback as to where a


particular move is in a toolpath. The flag relies on the NCI data
providing accurate data. See cstart, cend variables.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-137


Chapter 4 Numeric Variables Volume 3

M R L cutretr
Variable Type None
Category Not used
Notes

4-138 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L cuttyp
Variable Type NCI variable
Category Tracking, Operation type
Description 5-axis cut motion type
Values

1 Zig-zag
2 One way
3 Circular
4 Swarf
Code Example None

Notes This is extracted from the tool parameters flag


(rev5+cutpos+cuttyp) on the NCI Gcode 11 line.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-139


Chapter 4 Numeric Variables Volume 3

W cutx, cuty
Variable Type NCI variable
Category Tool change information, Tool change position
Description Wire cut position available at the tool change NCI block, NCI
Gcode 1015 data.
Values Value
Code Example None

Notes CAUTION: These variables are not relative to the work offset
shift in Wire Version 8. In Wire Version 9, they are relative to the
work offset values.
See related variables startx, starty, startz and threadx, thready, threadz

4-140 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L czero
Variable Type None
Category Not used
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-141


Chapter 4 Numeric Variables Volume 3

date, time
Variable Type System data variable
Category Time/date
Description Current date and time.
Values See below.
Code Example None

Notes These variables may be used as numeric variables or command


variables. If the variable has no format assignment, it is used as a
command variable. If it has a format assignment, it is used as a
numeric value.
The formatted time is a number HH.MMSS.
Variable Unformatted Formatted
Date DD-MM-YY Day of week 0-6
Time HH:MM 14.1156

See related variables: day, month, year, mon

4-142 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

day, month, year, and mon


Variable Type System data variable
Category Time/date
Description These variables provide system values for the day, month and
year.
Values See below.

Code Example fs 6 0.1


fmt 6 day
fmt 6 month
fmt 6 year2
...
year2 = year + 2000 # Change 02 to 2002
Notes These variables may be used as numeric variables or command
variables. If the variable has no format assignment, it is used as a
command variable. If it has a format assignment, it is used as a
numeric value.

Variable Unformatted Formatted


mon Sep 9.0
month 09 9.0
year 01 1.0
day 26 26.0

See related variables: date, time.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-143


Chapter 4 Numeric Variables Volume 3

deg2rad
Variable Type Constant
Category Math/function, Constant
Description The value required to convert constant degrees to radians.
Value 0.017453292519943296
Code Example None

Notes

4-144 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L depth
Variable Type Calculated variable
Category Drill
Description 3-axis drill: Absolute Z position of the drill point at the bottom.
5-axis drill: Incremental distance from reference height to the
bottom.
Values Value
Code Example pdrill #Canned Drill Cycle
n, x, y, depth, refht, dwell, fr_pos, e
Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-145


Chapter 4 Numeric Variables Volume 3

dirchg
Variable Type Calculated variable
Category Tracking, Path motion
Description Indicates if any of the axes (X, Y or Z) changed directions.
Values

0 No change
1 Change
Code Example None

Notes Only tests with linear motion.

4-146 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

DLL_vers
Variable Type System variable
Category System variable, Version
Description Mastercam post processor (DLL) version number
Values Value
Code Example serr_wrongdll "THIS POST MUST RUN WITH MP.DLL V9.03"
ppostblock
if dll_vers < 9.06,
[
result = mprint(serr_wrongdll)
exitpost
]
Notes Used to check that the post processor is compatible with the post
executable DLL.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-147


Chapter 4 Numeric Variables Volume 3

dmax
Variable Type Calculated variable
Category Tracking, Arc
Description Maximum X or Y axis move with current circular motion.
Values Value
Code Example None

Notes If the change in X is greater than Y, return the change in X.


Otherwise, return the change in Y.

4-148 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

do_full_arc
Variable Type Post switch variable
Category Post switch, Arc
Description
Allow full circle (360-degree sweep) arc motion output.
(Only valid for toolpaths created in Version 9 or above)

Values

0 Full 360-degree arcs will be broken into two 180-degree moves.


1 Any full 360-degree arcs will passed to the post processor.
Code Example do_full_arc : 1 #Allow full arc output data to post processor (PST)

Notes See Volume 2, Breakup of motion for more information.


do_full_arc : 1 setting overrides the breakarcs setting whenever a
full arc is encountered during processing.
See breakarcs for related information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-149


Chapter 4 Numeric Variables Volume 3

W dofs
Variable Type NCI variable
Category Obsolete, Tool data
Description Current wire condition.
Notes Use of this numeric variable is not recommended. It has been
superseded by the numeric variable ccode.

4-150 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L drill5
Variable Type Calculated variable
Category Tool change information, Operation type
Description Flag to indicate 5-axis drilling is active.
Values

0 5-axis drilling is not active.


1 5-axis drilling is active.
Greater than 1 If rotaxtyp is less than 6, this variable acts as a counter and is
incremented for each additional continuous drill position.
Code Example None

Notes This variable is not set at the tool change.


See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-151


Chapter 4 Numeric Variables Volume 3

M R L drillcur
Variable Type Calculated variable
Category Drill
Description Indicates a drill cycle (long or canned) is active.
Values

0 Drilling not active


1 Drilling active
Code Example None

Notes This variable is not available at the tool change. It is set after the
drill cycle NCI Gcode 81 or 100 and is shut off with the next
NCI line read.
See Volume 1, Working with Drill Cycles for more information.

4-152 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L drillcyc
Variable Type NCI variable
Category Drill
Description Type of canned drill cycle.
Values

0 Simple
1 Peck
2 Chip break
3 Tap
4 Bore #1
5 Bore #2
6 Misc #1
7 Misc #2
8-19 Custom cycles
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-153


Chapter 4 Numeric Variables Volume 3

M R L drl_prm1 through drl_prm10


Variable Type NCI variable
Category Drill
Description The custom drill parameters passed with the drill cycle NCI
Gcode 82 data.
Values Value
Code Example None

Notes The custom drill parameters are provided to allow custom


support in the post customization file.
See Volume 1, Working with Drill Cycles for more information.

4-154 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W drl_prm1 through drl_prm10


Variable Type NCI variable
Category Wire canned cycle
Description The custom canned parameters passed with the canned cycle
NCI Gcode 82 data.
Values Value
Code Example None

Notes The custom canned parameters are provided to allow custom


support in the post customization file.
See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-155


Chapter 4 Numeric Variables Volume 3

M R L drl_rot_vecx, drl_rot_vecy, drl_rot_vecz


Variable Type NCI variable (Future development)
Category Drill
Description

Values

Code Example None

Notes Reserved for future right angle head support.

4-156 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

dum
Variable Type Calculated variable
Category Internal
Description Used with debug numeric variable output formatting.
Code Example None

Notes Never use this numeric variable. For internal processing only.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-157


Chapter 4 Numeric Variables Volume 3

dwell
Variable Type NCI variable
Category Dwell
Description Machine dwell time.
Values Value
Code Example pdwl_spd #Call from NCI gcode 4
pcan #Canned text output (before)
if fmtrnd(dwell), pcan1, pbld, n, *sgcode, *dwell, e
pcan2 #Canned text output (after)
Notes Dwell can be received on both the drill cycle NCI Gcode 81 and
dwell/speed change NCI Gcode 4 lines.

4-158 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

e
Variable Type Command variable
Category Command, Output
Description Output a carriage return/line feed on a postline.
Code Example pwritecc # User-defined postblock to "cancel ccomp"
*e # Empty line with only cr/lf
n, "G40", e
Notes As of Version 9, the post processor automatically outputs a
carriage return/line feed to the NC file from predefined
postblocks. However, in the future it will be necessary to
explicitly enter the e carriage return/line feed on all postlines.
It is a good habit to start doing it now!

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-159


Chapter 4 Numeric Variables Volume 3

ea
Variable Type Calculated variable
Category Motion, Arc
Description End angle (in degrees) of an arc move.
Values Value
Code Example None

Notes See the related variable sa.

4-160 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

end_op_id
Variable Type Calculated variable
Category Tool change information, operation type
Description In postblock ptoolend, this is the Operation ID on the next tool
change.
Values Value
Code Example ptoolend #End of tool path, before reading new tool data
if end_gcode = 1000,
[
#Null toolchange
if end_op_id <> op_id, pretract_mov
]
else,
[
#Actual toolchange
pretract
]
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-161


Chapter 4 Numeric Variables Volume 3

end_opcode
Variable Type Calculated variable
Category Tool change information, operation type
Description In postblock ptoolend, this is the Operation code on the next tool
change.
Values Value
Code Example ptoolend #End of tool path, before reading new tool data
if end_gcode = 1000,
[
#Null toolchange
if end_op_id <> op_id, pretract_mov
]
else,
[
#Actual toolchange
pretract
]
Notes

4-162 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

end_str_ix
Variable Type Helper variable
Category Math/function, String function
Description Holds the ending match index in a string variable for the string
functions strstr and scan.
Values Integer
Code Example None

Notes See Volume 3, Formulas for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-163


Chapter 4 Numeric Variables Volume 3

M R L end_tlplnno
Variable Type Calculated variable
Category Tool change information, Tool plane
Description In postblock ptoolend, this is the tool plane (Tplane) number on
the next tool change.
Values Value
Code Example ptoolend #End of tool path, before reading new tool data
if end_gcode = 1000,
[
#Null toolchange
if end_op_id <> op_id, pretract_mov
]
else,
[
#Actual toolchange
pretract
]

4-164 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

eo
Variable Type Calculated variable
Category Motion, Arc
Description End octant of the current arc.
Values Integer (0 through 16)
Code Example None

Notes The octant numbers on a quadrant line are assigned for arcs
having endpoints that fall within the vtol tolerance of the matching
quadrant. For arcs with endpoints falling outside the tolerance
zone of a quadrant, the octant numbers within the interior of the
matching quadrant are assigned.

14

13 2 15
3 1

12 4 0/8 16

5 7
11 6 9
10

See the related variables sa , ea and so .

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-165


Chapter 4 Numeric Variables Volume 3

eob
Variable Type Post switch variable
Category Post switch, Output
Description Optional end-of-block character. The post executable can output
two end-of-block characters by setting the previous prv_eob end-
of-block character.
Values

0 Turn off end-of-block character.


1 to 255 ASCII decimal equivalent of the end-of-block character.
Code Example pblock # A postblock
eob = 36
In this example, "$" is added to the end of every line
N100(1)X1.Y2.Z.5$
pblock # A postblock
eob = 65
prv_eob = 66
In this example, 65 = A, 66 = B, both are output
N10X20Y30.AB
Notes The eob and prv_eob characters do not replace the carriage
return/line feed written to the end of the NC output by default.
Use omitcrlf to accomplish this task. To output the null character,
insert 0 (the ASCII decimal equivalent) at the end of the output
postline.

4-166 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

err_file
Variable Type Post switch variable
Category Post switch, Process modification
Description Controls if the .ERR error log file is saved after post processing.
Values

0 Keep the error file only if fatal post errors were generated.
(default setting)
1 Keep the error file if fatal or non-fatal errors were generated.
2 Keep the error file if any post errors were generated or there were
any mprint messages.
3 Keep the error file if any post errors, mprint messages, or user
prompts (fq post questions during processing) were generated.
4 Always keep the (.ERR) error log file
Code Example err_file : 1 # Keep error file only if there were fatal errors

Notes Starting in Version 9, if errors are encountered during posting, an


error log file is created and the user is prompted to OK or Cancel.
If OK is selected, the error log file will be displayed in the default
text editor that is defined in the Mastercam configuration (CFG)
file.
Note: If error_msg is not defined in the PST, the default behavior
is the 0 setting.
The error log file is placed in the NC file destination folder with
the same file name as the NC file, but with an .ERR extension.
See error_msg for related information.
Note: error_msg was in the MP*.DLLs (v9.00r) that shipped with
Mastercam v9.0. The err_file variable was added after to the
MP*.DLLs (v9.02).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-167


Chapter 4 Numeric Variables Volume 3

error_msg
Variable Type Post switch variable
Category Post switch, Process modification
Description Controls the display of error messages during post processing.
Values

0 Send all error messages to an error log file (default setting).


1 Send all error messages encountered to screen.
2 Send only one error message of each type encountered to screen.
Code Example error_msg : 1 # Display error each error message only once

Notes Starting in v9, if errors are encountered during posting, an error


log file is created and the user is prompted to OK or Cancel. If
OK is selected, the error log file will be displayed in the default
text editor that is defined in the Mastercam configuration (CFG)
file.
Note: If error_msg is not defined in the PST, the default behavior
is the 0 setting.
The error log file is placed in the NC file destination folder with
the same file name as the NC file, but with an .ERR extension.
See err_file for related information.

4-168 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L esub_chn_no
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: chain number
Transform: not used
Values Integer
Code Example None

Notes These are the parameters with the NCI Gcode 1019 (end of
subprogram).
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-169


Chapter 4 Numeric Variables Volume 3

W esub_chn_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-170 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L esub_grp_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: operation ID #
Transform: operation ID #
Values Integer
Code Example None

Notes These are the parameters with the NCI Gcode 1019 (end of
subprogram).
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-171


Chapter 4 Numeric Variables Volume 3

W esub_grp_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-172 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L esub_op_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: subprogram #
Transform: subprogram #
Values Integer
Code Example None

Notes These are the parameters with the NCI Gcode 1019 (end of
subprogram).
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-173


Chapter 4 Numeric Variables Volume 3

W esub_op_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-174 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L esub_ref_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: Reference,
0 = non-transform
< 0 = non-transform being referenced by a transform.
Transform: Reference,
> 0 is a transform.
Values Integer
Code Example None

Notes These are the parameters with the NCI Gcode 1019 (end of
subprogram).
See Volume 2, How Subprograms Work for more information..

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-175


Chapter 4 Numeric Variables Volume 3

W esub_ref_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-176 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L esub_sec_no
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: output sub = 1 iterate from base 1, valid > 0,
negative if copy in a transform.
Transform: output sub = 0 iterate from base 0, valid >=0.
Values Integer
Code Example None

Notes These are the parameters with the NCI Gcode 1019 (end of
subprogram).
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-177


Chapter 4 Numeric Variables Volume 3

W esub_sec_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-178 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L esub_totl_no
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: Total number of instances, 1-based.
Transform: Total number of instances, 1-based.
Values Integer
Code Example None

Notes These are the parameters with the NCI Gcode 1019 (end of
subprogram).
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-179


Chapter 4 Numeric Variables Volume 3

W esub_totl_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-180 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L esub_trns_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: Not used.
Transform: Not used.
Values None
Code Example None

Notes These are the parameters with the NCI Gcode 1019 (end of
subprogram).
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-181


Chapter 4 Numeric Variables Volume 3

W esub_trns_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-182 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

ex
Variable Type Command variable
Category Command, Output
Description Aborts the current postline at the location of the command and
returns to the NCI file to read the next set of NCI lines.
Code Example pheader #NC header information
if progno = 0, ex # EXIT this postblock immeadiately!
*progno, e
Notes Use the ex variable in post customization files is not
recommended. Use conditional branching statements for post
logic. It is very difficult to debug when this command is used.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-183


Chapter 4 Numeric Variables Volume 3

exitpost
Variable Type Command variable
Category Command, Output
Description Aborts the entire posting process and exits the post executable.
Code Example pheader #NC header information
if progno = 0, exitpost
*progno, e
Notes

4-184 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

extprg
Variable Type Post switch variable
Category Sub files
Description Control use/creation of alternate program file (EXT).
Values

0 Disabled
1 Open the file and remove all contents.
2 Open the file and append to contents.
Code Example None

Notes To enable output to an .EXT file, the subout variable is set to 3.


See related variables mergeext, clearext and nchext.
See Volume 1, File Manipulation for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-185


Chapter 4 Numeric Variables Volume 3

fastmode
Variable Type Post switch
Category Debug
Description Speed up post processing by suppressing progress-indicator dots
(displayed in Mastercam message area) and debug information,
even if bug2, bug3 or bug4 are set. Also ignore the post scaling
variables scalex, scaley, scalez.
Values

0 Do not use fastmode


1 Use fastmode
Code Example fastmode : 1 # Declare and set =1 to enable mode.

Notes See Volume 1, Post Debugging Techniques for more


information.

4-186 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L fg1014
Variable Type Calculated variable
Category Tool change information, Tool plane
Description Flag presence of NCI Gcode 1014 in the NCI tool change block.
Values

0 No NCI Gcode 1014.


1 NCI Gcode 1014 is present.
Code Example None

Notes This flag is obsolete. The NCI file always has the NCI Gcode
1014 line in every NCI tool change block.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-187


Chapter 4 Numeric Variables Volume 3

W fil_sharp_neg
Variable Type Post switch variable
Category Motion modification
Description Inserts arcs at intersecting corners and the move is in the CW
direction. The inserted arc inherits the intersecting corner type.
Values
0 Off
1 On
Code Example None

Notes Notes for make_fishtail, fil_sharp_pos and fil_sharp_neg:


The g60_mode must be disabled. The 2D conversion routine must
be enabled. Conical, sharp, constant and fixed modes insert an
arc with a radius equal to the wire diameter divided by two on the
XY plane. Other and fishtail modes insert the arc radius based on
the parameter set with the corner type selection. Re-assign tldia to
produce a different radius for conical, sharp, constant and fixed
corner types. Initial sweep and atol are used to determine
intersection angle tolerance. See g60_mode for additional details
on determining tangency. See also fil_sharp_uv.
CAUTION: The fillet routines do not check for overlapping
motion. MPWIRE.DLL v9.03 does not acquire the correct values
for nextx or nexty within the vicinity of the inserted arcs.

4-188 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W fil_sharp_pos
Variable Type Post switch variable
Category Motion modification
Description Inserts arcs at intersecting corners and the move is in the CCW
direction. The inserted arc inherits the intersecting corner type.
Values
0 Off
1 On
Code Example None

Notes Notes for make_fishtail, fil_sharp_pos, fil_sharp_neg:


The g60_mode must be disabled. The 2D conversion routine must
be enabled. Conical, sharp, constant and fixed modes insert an
arc with a radius equal to the wire diameter divided by two on the
XY plane. Other and fishtail modes insert the arc radius based
on the parameter set with the corner type selection. Re-assign
tldia to produce a different radius for conical, sharp, constant and
fixed corner types. Initial sweep and atol are used to determine
intersection angle tolerance. See g60_mode for additional details
on determining tangency. See also fil_sharp_uv.
CAUTION: The fillet routines do not check for overlapping
motion. MPWIRE.DLL v9.03 does not acquire the correct values
for nextx or nexty within the vicinity of the inserted arcs.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-189


Chapter 4 Numeric Variables Volume 3

W fil_sharp_uv
Variable Type Post switch variable
Category Motion modification
Description Inserts an arc radius equal to the wire diameter divided by two
with the sharp corner type specified on arc elements in a 2D
wirepath. The intersecting corners generated on the UV plane are
filleted.
Values
0 Off
1 On
Code Example None

Notes Re-assign tldia to override the default radius calculation.


Also see make_fishtail, fil_sharp_pos and fil_sharp_neg.

4-190 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

first_tool
Variable Type Calculated variable
Category Tool change information, Tool data
Description First tool number used in the program.
Values Integer
Code Example peof #End of file for non-zero tool
pbld, n, *first_tool, e
n, "M30", e
"%", e
Notes This variable is commonly used at the end of the NC program to
change to the first tool to be used with a pre-staged tool change.
The bldnxtool variable must be set to 1 to access the first_tool
variable.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-191


Chapter 4 Numeric Variables Volume 3

M R fr
Variable Type NCI variable
Category Feed rate
Description Feed rate of current tool movement.
Values

Positive Feed rate in inches or mm per minute


-1 Feed rate unchanged
-2 Rapid
Code Example None

Notes Use of this numeric variable is not recommended. It has been


superseded by the numeric variable fr_pos.

4-192 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L fr
Variable Type NCI variable
Category Feed rate
Description Feed rate of current tool movement.
Values

Positive Feed rate in inches or millimeters per minute.


Negative Feed rate in inches or millimeters per revolution.
Code Example None

Notes Use of this numeric variable is not recommended. It has been


superseded by the numeric variable fr_pos.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-193


Chapter 4 Numeric Variables Volume 3

W fr
Variable Type NCI variable
Category Feed rate
Description Feed rate of current tool movement.
Values Feed rate in inches or millimeters per minute
Code Example pblock # A postblock
n, x, y, z, fr, e
Notes

4-194 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L fr_pos
Variable Type Calculated variable
Category Feed rate
Description Positive feed rate. This numeric variable keeps the modal
positive value of fr.
Values Value (always positive)
Code Example pblock # A postblock
n, x, y, z, fr_pos, e
Notes Use of fr_pos is recommended in all modern post customization
files.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-195


Chapter 4 Numeric Variables Volume 3

M R L frcandrill
Variable Type None
Category Obsolete
Notes

4-196 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L frplunge
Variable Type NCI variable
Category Feed rate
Description Feed rate for the current drilling cycle.
Values See fr.
Code Example None

Notes It is recommended to assign the numeric variable fr_pos with


frplunge when using the canned drill cycle output.
See Volume 1, Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-197


Chapter 4 Numeric Variables Volume 3

W frplunge
Variable Type Calculated variable
Category Not used in Wire, Feed rate
Notes

4-198 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

full_arc_flg
Variable Type Calculated variable
Category Motion, Arc motion
Description Flags if current arc is a full circle (360-degree sweep)
in a single NC block. (new in v9)
Values

0 No, this is not a full arc.


1 Yes, this is a full arc.
Code Example None

Notes See related variables do_full_arc and breakarcs.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-199


Chapter 4 Numeric Variables Volume 3

W g60_mode
Variable Type Post switch variable
Category Post switch, Implied arc conversion
Description Enable a routine to replace line-arc-line tangent conditions with
the intersection of the lines, and set the numeric variable arcrad
for output as the implied corner radius. The arc move is skipped.
Values

0 Off
1 Enable the routine
2 See Notes.
Code Example g60_mode :1 # G60 radius conversion
sweep : 179 # Max. angle for G60_mode conversion
atol :1 # Min. angle for G60_mode conversion
Notes If a line-arc-line tangent condition is found and the arc is
removed, g60_mode is set to 2, indicating that this is the altered
location.
The sweep of the arc is tested before the routine is called. The
arc sweep limit is set by initializing sweep to the desired limit
(for example, sweep : 179). This must be done in the
initialization as it is only read once from this section, (sweep is
piggy-backed for this routine).
The numeric variable atol is used to determine if intersections are
tangent in the routine. (Again, atol is piggy-backed for this
routine.)
If g60_mode is active, then nextwt is set to the first taper at the arc
start and nextwt_immd is set to the taper of the next actual move.
Do not set g60_mode active when using use_2d_uv.

4-200 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W g20code
Variable Type NCI variable
Category Motion
Description Gcode from the first line in the four-line set NCI file read with 4-
axis direct wirepaths. This is also set with 2D contours.
Values

0 Rapid
1 Linear
2 Arc CW
3 Arc CCW
Code Example None

Notes The Gcode determines the pre-defined postblock calls.


See The NCI File in Volume 1 and Volume 3 for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-201


Chapter 4 Numeric Variables Volume 3

W g30code
Variable Type NCI variable
Category Motion
Description Gcode from the third line in the four-line set NCI file read with
4-axis direct wirepaths.
Values

0 Rapid
1 Linear
2 Arc CW
3 Arc CCW
Code Example None

Notes The Gcode determines the pre-defined postblock calls.


See The NCI File in Volume 1 and Volume 3 for more
information.

4-202 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W g30code_2, g30code_3, g30code_4


Variable Type Calculated variable
Category 2D conversion
Description The upper contour Gcode results of the conversion are stored in
these variables.
Values Integer
Code Example None

Notes See Volume 2, Wire 2-Axis to 4-Axis Conversion for more


information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-203


Chapter 4 Numeric Variables Volume 3

gcode
Variable Type NCI variable
Category Motion
Description Gcode from the first line in the two-line set NCI file read.
Values Integer
Code Example None

Notes The Gcode determines the predefined postblock calls.


See The NCI File in Volume 1 and Volume 3 for more
information.

4-204 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

get_1004
Variable Type Post switch variable
Category Post switch, Next
Description Read the NCI Gcode 1004 line with the getnextop routine.
Values

0 Skip the NCI Gcode 1004 when getting the nextop variable.
1 Read the NCI Gcode 1004 when getting the nextop variable.
Code Example get_1004 : 1 #Find gcode 1004 with getnextop?

Notes The numeric variable getnextop must be set to 1.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-205


Chapter 4 Numeric Variables Volume 3

getnextop
Variable Type Post switch variable
Category Post switch, Next
Description Access specific variables for the next NCI line.
Values

0 Do not enable the getnextop variables.


1 In Mill and Lathe, access nextop, nextplane, nextccomp, nextdc,
nextxc, nextyc, nextplane, nextx, nexty, nextz, nextu, nextv, nextw and
nextcflg variables.
For Wire, nextop, nextccomp, nextdc, nextx, nexty, nextxc, nextyc,
nextwt, nextwt_immd, nextwc and nextcflg are available.
2 Access the next/previous angle information required in
conjunction with the rev5 variable.
See Volume 2, Rotary Processing for more information.
Code Example getnextop : 1 #Declare and set =1 to enable getnext variables

Notes The post switch builds a duplicate list with the numeric variables
listed. This is read one line ahead of the actual NCI file when the
function is enabled.

4-206 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

gnci
Variable Type NCI variable
Category NCI, Gcode
Description Capture the Gcode from the NCI file.
Values Integer
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-207


Chapter 4 Numeric Variables Volume 3

M R L helix_arc
Variable Type Post switch variable
Category Post switch, Arc
Description Controls output of arcs when doing helix motion. (added in v9)
Values Integer
0 Do not output arcs on helix motion (linearize the motion).
1 Allow arc output on helix motion in all planes.
2 Allow arc output on helix motion XY plane only.
Code Example helix_arc : 1 #Support helix output, 1=all planes, 2=XY plane only.

Notes See arc_pitch for related information.

4-208 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

i, j, k
Variable Type Calculated variable
Category Motion, Arc motion
Description Arc center description.
Values Value
Code Example pblock # A postblock
n, x, y, z, i, j, k, e
Notes These numeric variables are calculated from the xc, yc, zc NCI
data. See the post switch arctype for output options.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-209


Chapter 4 Numeric Variables Volume 3

W immediate
Variable Type Calculated variable, Post switch
Category Taper, 2D output
Description Enable conversion of the two points generated in 2D wirepath for
an immediate taper change to a single point. The variable is used
to return the status of the immediate taper change
Values

0 Do not use the routine (initialization).


1 Enable the routine (initialization), not an immediate taper change
during NCI file processing.
2 g60_mode is 0 (off) or currently 1 : Immediate taper.

3 g60_mode is currently 2: Immediate taper is on the start of


replaced arc.
4 g60_mode is currently 2: Immediate taper is on the end of
replaced arc.
5 g60_mode is currently 2: Immediate taper is on the start and end
of replaced arc.
Code Example None

Notes See Volume 2, 4-Axis Wire Output Processing for more


information.

4-210 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

indexang
Variable Type None
Category Obsolete
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-211


Chapter 4 Numeric Variables Volume 3

initfr
Variable Type None
Category Not used
Notes

4-212 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L initht
Variable Type Calculated variable
Category Drill
Description 3-axis drill: Absolute position of the Z location of the initial
height.
5-axis drill: Incremental distance from the selected drill point to
initial height.
Values Value
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-213


Chapter 4 Numeric Variables Volume 3

W initht
Variable Type Not used
Category Wire canned cycle
Description Not used
Code Example None

Notes

4-214 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W inittaper
Variable Type NCI variable
Category Tool change information, Tool data
Description Taper angle in degrees at the initial point in the wirepath. This
value is available at the tool change postblock calls.
Values Value
Code Example None

Notes The initial taper inittaper has the same meaning as wt in the
wirepath.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-215


Chapter 4 Numeric Variables Volume 3

M R L ipr_actv
Variable Type Calculated variable
Category Feed rate
Description Indicate feed rate units (per revolution or per minute).
Values

0 Units per minute


1 Units per revolution
Code Example None

Notes It is recommended that you use ipr_actv as the numeric variable


selector for string select function. In Mill/Turn applications, the
post executable sets this to 0 (units per minute) for Mill toolpaths.

4-216 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W landheight
Variable Type NCI variable
Category Tool change information, position
Description Land height value from wirepath contour parameters page.
Values Value
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-217


Chapter 4 Numeric Variables Volume 3

W last_g60_wt
Variable Type Calculated variable
Category Taper, 2D output
Description Holds the taper for the immediate taper changes at the start of a
replaced arc move when the g60_mode is active.
Values Value
Code Example None

Notes When g60_mode is active and an arc is being replaced (that is,
when g60_mode is 2), the immediate flag is set as follows:
immediate is 3 if the immediate taper is on the start of the
replaced arc.
immediate is 4 if the immediate taper is on the end of the
replaced arc.
immediate is 5 if the immediate taper is on the start and end
of the replaced arc.
When immediate is set from 3 to 5, four wire taper positions are
returned to correspond with the four possible wire tapers at the
replaced arc. In order of the wirepath:
prv_last_g60_wt and last_g60_wt hold the tapers at the start of
the arc.
wt and wt_immd hold the tapers at the end of the arc.
When immediate is 3 or 5, prv_last_g60_wt is set for the first point
of the immediate taper change at the start of replaced arc.
When immediate is 3, 4 or 5, last_g60_wt is set for the immediate
taper change (second point) at the start of replaced arc.
In all cases, wt is the replaced arc’s end wire taper value.
When immediate is 4 or 5, wt_immd is set for the immediate
change at the end of replaced arc (second point).
See Volume 2, 4-Axis Wire Output Processing for more
information.

4-218 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M ldina1, ldina2
Variable Type Post switch variable
Category Obsolete, Five-axis routines
Description 5-axis lead in and lead out routine.
Notes Use of this numeric variable is not recommended. It has been
superseded with support within Mastercam.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-219


Chapter 4 Numeric Variables Volume 3

M ldinl1, ldinl2
Variable Type Post switch variable
Category Obsolete, Five-axis routines
Description 5-axis lead in and lead out routine.
Notes Use of this numeric variable is not recommended. It has been
superseded with support within Mastercam.

4-220 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M ldouta1, ldouta2
Variable Type Post switch variable
Category Obsolete, Five-axis routines
Description 5-axis lead in and lead out routine.
Notes Use of this numeric variable is not recommended. It has been
superseded with support within Mastercam.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-221


Chapter 4 Numeric Variables Volume 3

M ldoutl1, ldoutl2
Variable Type Post switch variable
Category Obsolete, Five-axis routines
Description 5-axis lead in and lead out routine.
Notes Use of this numeric variable is not recommended. It has been
superseded with support within Mastercam.

4-222 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

ldrcode
Variable Type Post switch variable
Category Post switch, Leader
Description Sets the ASCII decimal equivalent of the tape trailer/leader code.
Values

1 to 255 ASCII decimal equivalent of the trailer/leader character.


Code Example ldrcode : 65 # Leader character decimal equivalent.

Notes The number of lead/trailer codes to output when fleader is


encountered in a post is set by ncldr.
See Volume 1, Functions for more information on fleader.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-223


Chapter 4 Numeric Variables Volume 3

M lima1, lima2
Variable Type None
Category Not used
Notes

4-224 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M limb1, limb2
Variable Type None
Category Not used
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-225


Chapter 4 Numeric Variables Volume 3

M limc1, limc2
Variable Type None
Category Not used
Notes

4-226 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L W linarc
Variable Type Post switch
Category Motion modification
Description Breaks arc moves into line segments.
Values

0 No – do not breakup arc motion.


1 Yes – break up (linearize) arc moves.
Code Example linarc : 1 # Break all arc motion in the post processor
pblock # A postblock
linarc = zero
if cuttype = two, #Polar
[
brklinestype = rotary_axis + three
linarc = one # Conditionaly break all arc motion
]
Notes Search the post customization file for all occurrences of linarc to
be certain it is not being set in the postblocks when a global break
up of motion is desired.
See Volume 2, Breakup of Motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-227


Chapter 4 Numeric Variables Volume 3

W listrad
Variable Type Post switch variable
Category Post switch, Preparatory
Description Enables the call to the postblock pradlist to generate the wire
radius list.
Values

0 No
1 Yes
Code Example #Variables required to build wire radius and taper lists, reference
bldnxtool : 0 # Builds table of taper and radius
listrad : 0 # Enable radius list output, see pradlist

pradlist # List of wire radii, only offset and tlrad are read
*offset, " = ", *tlrad, e
Notes The list must be built internally in the post executable by setting
bldnxtool to 1.
See Volume 1, How Preparatory Postblocks Work for more
information.

4-228 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W listtpr
Variable Type Post switch variable
Category Post switch, Preparatory
Description Enables the call to the postblock ptprlist to generate the wire taper
list.
Values

0 No
1 Yes
Code Example #Variables required to build wire radius and taper lists, reference
bldnxtool : 1 # Builds table of taper and radius
listtpr : 1 # Enable taper list output, see ptprlist

ptprlist # List of taper angles, only tofs (index) and wt are read
# List is checked in linear/circular (0,1,2,3) and "tofs" set
*tofs, " = ", *wt, e
Notes The list must be built internally in the post executable by setting
bldnxtool to 1.
See Volume 1, How Preparatory Postblocks Work for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-229


Chapter 4 Numeric Variables Volume 3

W lofs
Variable Type NCI variable
Category Obsolete, Tool data
Description Current offset register number entered in Mastercam.
Notes Use of this numeric variable is not recommended. It has been
superseded by the numeric variable offset.

4-230 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L lower_x, lower_y, lower_z


Variable Type Calculated variable
Category Five-axis, Rev 5-axis
Description Tool5ax C-Hook request for next or previous motion vector with
current vector vertical. The XYZ position of the vector found.
Values Value
Code Example None

Notes Mill:
This routine is triggered with the numeric variable rev5.
See Volume 2, Rotary Processing for more information.
Lathe:
With lathe canned rough and pattern repeat toolpaths, the lower_x,
lower_y, lower_z variables hold the ending position of the finish
profile. Lathe canned groove captures the last corner in lower_x,
lower_y, lower_z.
See Volume 2, How Lathe Canned Cycles Work for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-231


Chapter 4 Numeric Variables Volume 3

M R L lstation
Variable Type NCI variable
Category Tool change information, Tool data
Description Lathe station for mill/turn applications.
Values Integer
Code Example None

Notes See related variable uselstation.


This value is not available in Mastercam V8.

4-232 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

ltol
Variable Type Tolerance variable
Category Tolerance
Description Angle tolerance.
Values Value
Default 0.0005 (inch), 0.01 (metric)
Code Example None

Notes Used with arccheck to validate an arc.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-233


Chapter 4 Numeric Variables Volume 3

M R L ltool_id
Variable Type NCI variable
Category Tool change information, Tool data
Description Unique tool ID in Lathe.
Values Integer
Code Example None

Notes

4-234 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L lturret
Variable Type NCI variable
Category Tool change information, Tool data
Description Which turret is used.
Values

0 Bottom turret
1 Upper turret
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-235


Chapter 4 Numeric Variables Volume 3

m_vers_no
Variable Type NCI variable
Category Global post variable, Version
Description Mastercam minor version number.
Values V8.xx where ‘xx’ is the minor version number.
V9.xx where ‘xx’ is the minor version number.
Code Example None

Notes In Version 8, this value is always set to 33.


In Version 9, this value is set to 34.
This value is not used by the post processor.

4-236 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

m1 through m9
Variable Type NCI variable
Category NCI, Tool plane
Description Tool plane matrix.
Values Values
Code Example None

Notes

The tool plane matrix is defined relative to the world coordinate


system, which is always the top view matrix.
m1 through m3 represent the X vector (X, X through X, Z).

m4 through m6 represent the Y vector (Y, X through Y, Z).

m7 through m9 represent the Z vector (Z, X through Z, Z).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-237


Chapter 4 Numeric Variables Volume 3

M R L main_prg_no
Variable Type Calculated variable
Category Subprogram, V8 subprogram
Description Transform subprogram number.
Values Integer
Code Example None

Notes The value in sub_op_id is written to main_prg_no if sub_ref_id is


greater than 0.
See Volume 2, How Subprograms Work for more information.

4-238 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W main_prg_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-239


Chapter 4 Numeric Variables Volume 3

W make_fishtail
Variable Type Post switch variable
Category Motion modification
Description Produces an arc move when the fishtail corner type is selected on
intersecting corners. The inserted arc is always generated on the
obtuse angle portion of the intersection.
Values
0 Off
1 On
Code Example None

Notes Notes for make_fishtail, fil_sharp_pos, fil_sharp_neg:


The g60_mode must be disabled. The 2D conversion routine must
be enabled. Conical, sharp, constant and fixed modes insert an
arc with a radius equal to the wire diameter divided by two on the
XY plane. Other and fishtail modes insert the arc radius based
on the parameter set with the corner type selection. Re-assign
tldia to produce a different radius for conical, sharp, constant and
fixed corner types. Initial sweep and atol are used to determine
intersection angle tolerance. See g60_mode for additional details
on determining tangency. See also fil_sharp_uv.
CAUTION: The fillet routines do not check for overlapping
motion. MPWIRE.DLL v9.03 does not acquire the correct values
for nextx or nexty within the vicinity of the inserted arcs.

4-240 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L mapfg
Variable Type None
Category Not used
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-241


Chapter 4 Numeric Variables Volume 3

M R L matb1 through matb9


Variable Type Future development
Category none
Description

Values

Code Example

Notes

4-242 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L matm1 through matm9


Variable Type 5-axis
Category 5-axis, 5-axis routines
Description Internal mapping matrix.
Values Value
Code Example None

Notes These variables expose the internal coordinate mapping matrix


for rotaxtyp = 2 and rotaxtyp = 4.
See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-243


Chapter 4 Numeric Variables Volume 3

W matm1 through matm9


Variable Type NCI variable
Category Not used in Wire, 5-axis routines
Notes

4-244 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

maxrad
Variable Type Tolerance variable
Category Tolerance
Description Maximum radius value to output for arc moves.
Values Value
Default 0.0 (Off)
Code Example None

Notes Controllers limit the size of a value that can be read. It is


possible to have an arc with a radius larger than the controller can
handle.
If the post executable finds an arc move with a radius larger than
maxrad, the arc will be linearized, that is, converted into line
segments. Like linarc, maxrad uses the chordal deviation set by
the variable vtol for linearization.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-245


Chapter 4 Numeric Variables Volume 3

M R L maxss
Variable Type NCI variable
Category Machine function, Spindle
Description Maximum spindle speed set in Mastercam.
Values Value
Code Example None

Notes

4-246 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

mc_day, mc_mon, mc_year, mc_hour, mc_min, mc_sec


Variable Type NCI variable
Category Time/date
Description Mastercam time/date stamp of the MC8 or MC9 file.
Values Integer
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-247


Chapter 4 Numeric Variables Volume 3

M L merge_end
Variable Type Obsolete
Category Obsolete, Synclath
Description Used to support the Runclath C-Hook to flag the last operation in
the final NC file merged.
Notes

4-248 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

mergeaux
Variable Type Command variable
Category Command, Sub file
Description Merge contents of the open alternate file output stream auxprg
with the currently open output stream. This is defined by the
numeric variable subout = 2.
Code Example pblock # A postblock
subout = 0
mergeaux
Notes Do not attempt to merge the alternate file into itself.
See related variables clearaux and nchaux.
See Volume 1, File Manipulation for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-249


Chapter 4 Numeric Variables Volume 3

mergeext
Variable Type Command variable
Category Command, Sub file
Description Merges contents of the open alternate file output stream extprg
with the currently open output stream. This is defined by the
numeric variable subout = 3.
Code Example pblock # A postblock
subout = 0
mergeext
Notes Do not attempt to merge the alternate file into itself.
See related variables clearext and nchext.
See Volume 1, File Manipulation for more information.

4-250 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M L mergenumber
Variable Type NCI variable
Category Obsolete
Description Used to support the Runclath C-Hook to provide the ordered
sequence number of the current operation.
Values

0 File contains all Lathe or all Mill operations and is not split.
non-zero Sequence number of current operation.
999 End of file.
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-251


Chapter 4 Numeric Variables Volume 3

mergesub
Variable Type Command variable
Category Command, Sub file
Description Merges contents of the open alternate file output stream subprg
with the currently open output stream. This is defined by the
numeric variable subout = 1.
Code Example pblock # A postblock
subout = 0
mergesub
Notes Do not attempt to merge the alternate file into itself.
See related variables clearsub and nchsub.
See Volume 1, File Manipulation for more information.

4-252 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

met_tool
Variable Type NCI variable
Category Tool change information, Operation type
Description Metric flag.
Values

0 English (inch) configuration setting.


1 Metric configuration setting.
Code Example None

Notes The flag is set in the NCI file, it is written based the current
setting in the Mastercam System Configuration dialog box. This
variable is used in the English/Metric selection with the post
function fs2 format statement.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-253


Chapter 4 Numeric Variables Volume 3

mi1-mi10
Variable Type NCI variable
Category Tool change information, Misc integer/real
Description Miscellaneous integers entered in Mastercam Miscellaneous
values dialog box.
Values Integer
Code Example None

Notes The miscellaneous integers are provided to allow custom support


in the post customization file. These may have specific meanings
based on how the post was written. Always open the post
customization file in an editor and read the comments on how the
post is using the miscellaneous integers.
See mr1-mr10 for related information.

4-254 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M L mi1drl, mi2drl
Variable Type NCI variable
Category Obsolete
Description

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-255


Chapter 4 Numeric Variables Volume 3

M R L mill5
Variable Type Calculated variable
Category Tool change information, Operation type
Description Flag to indicate 5-axis operation.
Values

0 Not 5-axis
1 Mill 5-axis
2 Drill 5-axis
Code Example None

Notes This variable is available at the tool change when using the
tlchng_aft routines in a modern post customization files.
See Volume 2, Rotary Processing and Volume 1, Changes to the
MP Post for more information.

4-256 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L miscops_mi1 - miscops_mi10
Variable Type NCI variable
Category Lathe Misc Ops information, Misc integers
Description Miscellaneous integers entered in the Custom Parameters values
dialog box from within a Misc Ops function.
Values Integer value
Code Example None

Notes The miscellaneous integers are provided to allow custom support


in the post customization file. These may have specific meanings
based on how the post was written. Always open the post
customization file in an editor and read the comments on how the
post is using the miscellaneous integers.
See miscops_mr1 - miscops_mr10 for related information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-257


Chapter 4 Numeric Variables Volume 3

L miscops_mr1 - miscops_mr10
Variable Type NCI variable
Category Lathe Misc Ops information, Misc reals
Description Miscellaneous reals entered in the Custom Parameters values
dialog box from within a Misc Ops function.
Values Decimal value
Code Example None

Notes The miscellaneous reals are provided to allow custom support in


the post customization file. These may have specific meanings
based on how the post was written. Always open the post
customization file in an editor and read the comments on how the
post is using the miscellaneous reals.
See miscops_mi1 - miscops_mi10 for related information

4-258 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

mon, month
Variable Type Time/date
Category None
Description Along with day and year, structures the day, month, and year of a
date in any order. You can format, concatenate, or use them as
selector variables, although you cannot use them in equations (+)
or assignments (=).
Values
fs 6 2 0ln
Code Example
fmt 6 day
fmt 6 month
fmt 6 year2 # Do not use 'yr' here, which means y-rapid.

year2 = year + 2000 # Change 02 to 2002

Notes These variables may be used as strings or numeric values. If the


variable has no format assignment, it is used as a string. If it has a
format assignment, it is used as a numeric value. When the
variable is used as output on a postline, either the string or the
format value may be used.

Variable String example Value example


mon Sep 9.0
month 09 9.0
year 94 94.0
day 26 26.0

See related variables date,time and day, year.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-259


Chapter 4 Numeric Variables Volume 3

motst
Variable Type Calculated variable
Category Tracking, Path motion
Description Linear axis motion indicator.
Values

0 No motion
1 Motion in X only
2 Motion in Y only
3 Motion in X and Y only
4 Motion in Z only
5 Motion in X and Z only
6 Motion in Y and Z only
7 Motion in X, Y, and Z only
8 No motion except wire taper or wire corner change with Wire.
9 No motion except wire corner change with Wire.
Code Example None

Notes Use the numeric variable mtol for tolerance in the routine.

4-260 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

move_ang
Variable Type Calculated variable
Category Tracking, Path motion
Description Angle between the current move and the next move in the XY
plane, as seen from the top view. The next move after contour is
determined by the nextop value.
Values The range of move_ang is from -180 degrees to 180 degrees.
positive Indicates a turn to the left of the current direction of motion.
negative Indicates a turn to the right of the current direction of motion.
-9999 No next or previous move. move_ang is always set to -9999 on
first and last moves because there is no previous or next move.
8888 Motion along Z axis. move_ang3 variable may be able to provide
the needed angular information.
Code Example None

Notes The getnextop variable must be set to activate the move_ang


variable. The mov_ang variable is not used with 4-axis direct
Wire posts.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-261


Chapter 4 Numeric Variables Volume 3

M R L move_ang3
Variable Type Calculated variable
Category Tracking, Path motion
Description Angle between the current move and the next move as viewed
from the plane formed by the two moves.
Values This angle is always a positive value.
positive Angle (0 – 360 degrees). 0 degrees is tangent.
-9999 First or last toolpath move.
+9999 No motion (coincident positions).
Code Example None

Notes The getnextop variable must be set to activate the move_ang3


variable. See the mov_ang variable for related information.

4-262 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W move_ang3
Variable Type Calculated variable
Category Not used in Wire, Path Motion
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-263


Chapter 4 Numeric Variables Volume 3

mr1 through mr10


Variable Type NCI variable
Category Tool change information, Miscellaneous integer/real
Description Miscellaneous reals entered in the Mastercam Miscellaneous
values dialog box.
Values Value
Code Example None

Notes The miscellaneous reals are provided to allow custom support in


the post customization file. These may have specific meanings
based on how the post was written. Always open the post
customization file in an editor and read the comments on how the
post is using the miscellaneous reals.
See mi1-mi10 for related information.

4-264 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

mrg_subfile
Variable Type Command variable
Category Command, Sub file
Description Merges contents of all the subprogram output streams.
Code Example None

Notes With nested subprograms, it is possible to have an unknown


number of nested subprogram levels. This command
automatically takes each nested level file and appends it to the
NC file. The initial sub_level of 3 or 4 determines if the top level
is written before (3) or after (4) the nested levels.
subout is automatically set to 0 (merge to NC output).
See Volume 1, File Manipulation for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-265


Chapter 4 Numeric Variables Volume 3

mtol
Variable Type Tolerance variable
Category Tolerance
Description Tolerance used in motion test.
Values Value
Default 1.0E-12
Code Example None

Notes Used with motst to determine which linear axis moved.

4-266 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

n
Variable Type Calculated variable
Category Sequence number
Description NC program sequence number.
Values Integer
Code Example pblock # A postblock
n, x, y, z, e
Notes The sequence number is incremented internally by the post
processor when a postline contains n and is output, or if n is
forced (*n). Sequence numbers start at seqno and are
incremented by seqinc. The value of n is reset to seqno when it
exceeds seqmax.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-267


Chapter 4 Numeric Variables Volume 3

M R L n_flutes
Variable Type NCI variable
Category Tool change information, Tool data
Description Number of flutes on cutter.
Values Integer
Code Example None

Notes

4-268 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W n_flutes
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-269


Chapter 4 Numeric Variables Volume 3

M R L n_tap_thds
Variable Type NCI variable
Category Tool change information, Tool data
Description Number of threads on tap.
Values Value
Code Example None

Notes

4-270 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nc_lout
Variable Type Calculated variable
Category Tracking, Output
Description Indicates if NC output was generated.
Values

-1 No output was generated.


0 and greater Indicates the postblock level that generated output.
Code Example None

Notes See no_updprv for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-271


Chapter 4 Numeric Variables Volume 3

nchar
Variable Type Calculated variable
Category Global post variable
Description Current number of characters written to the NC file.
Values Integer
Code Example if nchar = 0, “NOTHING WAS WRITTEN TO THE FILE”

Notes The NC file refers to the output stream for subout = 0.

4-272 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nchaux
Variable Type Calculated variable
Category Sub files
Description Current number of characters written to the .AUX file.
Values Integer
Code Example if nchaux = 0, “NOTHING WAS WRITTEN TO THE FILE”

Notes The .AUX file refers to the output stream for subout = 2.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-273


Chapter 4 Numeric Variables Volume 3

nchext
Variable Type Calculated variable
Category Sub files
Description Current number of characters written to the .EXT file.
Values Integer
Code Example if nchext = 0, “NOTHING WAS WRITTEN TO THE FILE”

Notes The .EXT file refers to the output stream for subout = 3.

4-274 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nchsub
Variable Type Calculated variable
Category Sub files
Description Current number of characters written to the .SUB file.
Values Integer
Code Example if nchsub = 0, “NOTHING WAS WRITTEN TO THE FILE”

Notes The .SUB file refers to the output stream for subout = 1.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-275


Chapter 4 Numeric Variables Volume 3

nci_line
Variable Type Calculated variable
Category Tracking, Debug variable
Description NCI line number currently being processed.
Values Integer
Code Example if nci_line = 20, bug2 = -30

Notes

4-276 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nci_rewind
Variable Type Command variable
Category Command, Output
Description Restarts the NCI file read from the location of the command
word in the post customization file. The NCI file is reset to the
start of the file.
Code Example loop_var : 0

peof # A postblock
while loop_var < 2,
[
nci_rewind
loop_var = loop_var + 1
]

In this example, the post is run through twice


Notes This command does not reinitialize the post variables from the
state they are in when the command is called.
Note !!! Logic must be embedded in the post customization file
to prevent an endless loop!

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-277


Chapter 4 Numeric Variables Volume 3

ncldr
Variable Type Post switch variable
Category Post switch, Leader
Description Sets the number of leader characters output by the fleader
function.
Values Enter the integer for the number of characters.
Code Example ncldr : 20 # Number of leader characters

Notes The character to output for the lead/trailer code when fleader is
encountered in a post is set by ldrcode.
See Volume 1, Functions for more information on fleader.

4-278 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

newaux
Variable Type Command variable
Category Command, Sub file
Description Closes and reopens the open alternate file output stream auxprg
with a new path, file name, or extension.
Code Example snewname newname #A new file name

pblock # A postblock
snameaux = snewname
newaux
Notes The setting of auxprg determines if the file to be opened is new or
to keep the contents of the file.
See Volume 1, File Manipulation for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-279


Chapter 4 Numeric Variables Volume 3

newext
Variable Type Command variable
Category Command, Sub file
Description Closes and reopens the open alternate file output stream extprg
with a new path, file name or extension.
Code Example snewname newname #A new file name

pblock # A postblock
snameext = snewname
newext
Notes The setting of extprg determines if the file to be opened is new or
to keep the contents of the file.
See Volume 1, File Manipulation for more information.

4-280 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

newglobal
Variable Type Post switch variable
Category Post switch, Motion modification
Description Controls when global variables are computed.
Values

0 Compute global variables only when they are output on a postline,


used in a string select function, or when forced to update with the
variable modifier “!” update numeric variable.
1 Compute global variables whenever they appear on a postline,
including output statements, string select function calls, formula
statements, and conditional branching statements.
Code Example newglobal : 1 # Error checking for global variables

Notes It is recommended that you set newglobal to 1 if you plan to use


global variables.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-281


Chapter 4 Numeric Variables Volume 3

newsub
Variable Type Command variable
Category Command, Sub file
Description Close and reopen the open alternate file output stream subprg
with a new path, file name or extension.
Code Example snewname newname #A new file name

pblock # A postblock
snamesub = snewname
newsub
Notes The setting of subprg determines if the file to be opened is new or
to keep the contents of the file.
See Volume 1, File Manipulation for more information.

4-282 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

next_tool
Variable Type Calculated variable
Category Tool change information, Tool data
Description Next tool number used in the program at the current tool change.
Values Integer
Code Example psof # Start of file for non-zero tool number
pbld, n, *smetric, e # Set for Inch or Metric mode
pbld, n, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e
pfbld, n, sgabsinc, *sg28ref, "Z0.", e # Home Z
pfbld, n, *sg28ref, "X0.", "Y0.", e # Home X,Y
pfbld, n, "G92", *xh, *yh, *zh, e # Set G92 Origin
comment # Comments from Operation
pcan # Canned text output (before)
c_mmlt # Multiple tool subprogram call
pbld, n, *t, "M6", e
pbld, n, *next_tool, e
pcan1, pbld, n, *sgcode, *sgabsinc, pwcs, pfxout, pfyout,
*speed, *spindle, pgear, strcantext, e
Notes This variable is used to select tools for tool changes that require
pre-staging the next tool to run. At each tool change NCI Gcode
1001 or 1002, the post executable gets the next tool’s value. The
last tool change returns the first tool number to next_tool.
The bldnxtool variable must be set to 1 to access the next_tool
variable. See related variable first_tool.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-283


Chapter 4 Numeric Variables Volume 3

nextccomp
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode cutter compensation.
Values See ccomp for values.
Code Example None

Notes The post switch variable getnextop must be set to 1 to access the
value.

4-284 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nextcflg
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode contour flag.
Values See cur_cflg for values.
Code Example None

Notes The post switch variable getnextop must be set to 1 to access the
value.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-285


Chapter 4 Numeric Variables Volume 3

nextdc
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode 81 drill cycle selector.
Values See drillcyc for values.
Code Example None

Notes This variable is only found at a drill cycle tool change. The post
switch variable getnextop must be set to 1 to access the value.
Note: If the post uses tlchng_aft, read the value of nextdc in the
ptlchg1002 postblock.

4-286 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nextop
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode.
Values See gcode for values.
Code Example None

Notes The label of this variable is misleading. It is the next NCI Gcode
value, not the next operation. The post switch variable getnextop
must be set to 1 to access the value.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-287


Chapter 4 Numeric Variables Volume 3

M R L nextplane
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode plane.
Values See plane for values.
Code Example None

Notes The post switch variable getnextop must be set to 1 to access the
value.

4-288 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L nextu, nextv, nextw


Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode 11, U, V, and W coordinates.
Values See u, v, w for values.
Code Example None

Notes The post switch variable getnextop must be set to 1 to access the
value.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-289


Chapter 4 Numeric Variables Volume 3

W nextwc
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode wire corner.
Values See wc for values.
Code Example None

Notes The post switch variable getnextop must be set to 1 to access the
value.

4-290 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W nextwt
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode wire taper.
Values See wt for values.
Code Example None

Notes The post switch variable getnextop must be set to 1 to access the
value.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-291


Chapter 4 Numeric Variables Volume 3

W nextwt_immd
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode immediate wire taper.
Values See wt, wt_immd for values.
Code Example None

Notes nextwt_immd is set to nextwt by default.

If g60_mode is active, then nextwt is set to the first taper at the arc
start and nextwt_immd is set to the taper of the next actual move.
The post switch variable getnextop must be set to 1 to access the
value.

4-292 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nextx, nexty, nextz


Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode, X, Y, and Z coordinates.
Values See xnci, ynci, znci for values.
Code Example None

Notes The post switch variable getnextop must be set to 1 to access these
values.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-293


Chapter 4 Numeric Variables Volume 3

nextxc, nextyc
Variable Type NCI variable
Category Next
Description Provides the next NCI Gcode, X center and Y center coordinates.
Values See xc, yc for values.
Code Example None

Notes The post switch variable getnextop must be set to 1 to access these
values.

4-294 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

no
Variable Type Constant
Category Math/function, Constant
Description False condition
Value 0
Code Example None

Notes Do not use n for a false response to a system numbered question


in the post customization file. n is the sequence number in this
context.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-295


Chapter 4 Numeric Variables Volume 3

no_nc_out
Variable Type Post switch variable
Category Sub files
Description Inhibits NC output or forces NC output if inhibited by
subprograms.
Values

-1 Override all output inhibitors and forces output.


0 Process normally.
1 Process post instructions internally; inhibit NC output.
Code Example None

Notes Set omitseq to –1 to prevent sequence numbering from


incrementing during inhibited internal processing without NC
output. See Volume 2, How Subprograms Work for more
information.

4-296 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

no_updprv
Variable Type Post switch variable
Category Post switch, Process modification
Description Provides control over when or if the previous value prv_[var] of a numeric variable
updates on NC output.
Values
0 Process normally
1 Buffer the following output statement variable types:
Undressed numeric variable (var)
Forced numeric variable (*var)
Dependent numeric variable (`var)
Numeric variable selector (used within a string select function)
Update the previous values after the NC line is output.
2 Do not update any of the previous values of any of the numeric variables. The post
writer must update each numeric variable using the update numeric variable modifier
(!var).
Code Example no_updprv : 1

pblock # A postblock
n, x, py, z, e
py # A postblock to output y
if x = prv_x, y

In this example, without no_updprv would always evaluate true because ‘x’ would update as
a postline statement.
Notes This processing option was added to allow testing on a previous value prv_[var] while
the output line is being generated without the post executable updating the previous
values until after the NC line is output. Otherwise, the previous value prv_[var] is
updated as each output statement is processed.
Up to 25 numeric variables can be buffered on any single output postline for updating
the previous value.
The numeric variable nc_lout is set to the current internal postblock call level
immediately after the output postline to help determine if any NC output occurred. If no
NC output was generated at the last postblock call level, nc_lout is set to –1.
no_updprv also prevents the post executable from updating the previous of x, xr, xh and y,
yr, yh and z, zr, zh with themselves.
In Wire, the cross reference updating is the previous of x, threadx, startx and y, thready,
starty and z, threadz, startz.
Note: bug2, bug3 and bug4 disrupt this function.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-297


Chapter 4 Numeric Variables Volume 3

M R L nobrk
Variable Type Post switch variable
Category Post switch, Motion modification
Description Controls output of 3-axis moves as a single XYZ move or
separate Z and XY or XY and Z motion.
Values

0 Break rapid moves into two moves depending on Z motion.


• If the motion is from a greater Z value to a lesser Z value,
interpret the move as going into the part and make the XY
move first, followed by a move in Z.
•If the motion is going from a lesser Z to a greater Z, interpret
the move as going out of the part and make the Z move first,
followed by a move in XY.
1 Output moves as a single XYZ (3-axis) move.
2 Break any single feed move into two moves. Break helical motion
into an XY arc and a Z line component, or a Z line and an XY arc
component. Similar to setting nobrk = 0.
Code Example nobrk : yes #Omit breakup of x, y & z rapid moves

Notes Use of breakup of motion is not recommended in the post


customization file. The backplot and what is generated will not
match and potential problems may not be identified. nobrk is
particularly problematic with rotary axis motion because the
relative Z motion can become confused.
See Volume 2, Breakup of Motion for more information.

4-298 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W nobrk
Variable Type Post switch variable
Category Not used in Wire, Motion modification
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-299


Chapter 4 Numeric Variables Volume 3

W nocore_fin
Variable Type NCI variable
Category Tool change information, Operation type
Description Flag to indicate that the pass is the finish contour operation that
was spawned from a no core operation.
Values

0 Normal contour
1 Associated to no core finish contour.
Code Example None

Notes

4-300 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nqc
Variable Type Calculated variable
Category User prompt
Description Number of characters in the string that answers a user-defined
post question.
Values Integer
Code Example None

Notes A user prompt function (fq) can use a numeric variable or a string
variable as a result. If it is a string variable, the number of
characters is assigned to nqc .
See Volume 1, How Prompt Questions Work for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-301


Chapter 4 Numeric Variables Volume 3

L nspring
Variable Type NCI variable
Category Thread
Description Number of spring cuts entered in Mastercam for the current
threading cycle.
Values Integer
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

4-302 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L nstarts
Variable Type NCI variable
Category Thread
Description Number of starts for threading cycle (multiple start thread).
Values Integer
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-303


Chapter 4 Numeric Variables Volume 3

M R L ntools
Variable Type Calculated variable
Category Global post variable, Tool data
Description Number of tools used.
Values Integer
Code Example psof #Start of file for non-zero tool number
if ntools = one,
[
#skip single tool outputs, stagetool must be on
stagetool = m_one
!next_tool
]
Notes This variable is available only when the post switch variable
bldnxtool is enabled.

4-304 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W offset
Variable Type NCI variable
Category Technology
Description Current offset register number entered in Mastercam.
Values Integer
Code Example pconchg #Control setting change
if gcode = 1010, pbld, n, ccode, offset, e
else, ccode, offset
Notes This variable was formerly called lofs in previous Wire post
processors. The value is copied to the variable for backward
compatibility.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-305


Chapter 4 Numeric Variables Volume 3

M R L ofs
Variable Type Calculated variable
Category Obsolete, Roll die
Description Used with the post executable imbedded roll die routine
Notes Use of this numeric variable is not recommended. It has been
superseded with support within Mastercam.

4-306 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

omitcrlf
Variable Type Post switch variable
Category Post switch, Output
Description Omits the carriage return/line feed at the end of each NC line.
Values

0 Output the CR/LF.


1 Do not output the CR/LF.
Code Example omitcrlf : 1 # Over-ride the std. CR/LF output

Notes The ASCII decimal equivalents for CR/LF are 10/13.


See the eob variable for related information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-307


Chapter 4 Numeric Variables Volume 3

M R L omitrefht
Variable Type Post switch variable
Category Post switch, Drill
Description None
Values 0
Code Example None

Notes This variable is no longer used.

4-308 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

omitround
Variable Type None
Category Not used
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-309


Chapter 4 Numeric Variables Volume 3

omitseq
Variable Type Post switch variable
Category Post switch, Sequence number
Description Turns sequence number output on or off.
Values

0 No
1 Yes
-1 Enable sequence numbering but inhibit numbering when NC
output is inhibited by no_nc_out, subprograms, or canned cycles.
Code Example omitseq : 1 # Do NOT output sequence numbers

Notes Even when omitseq equals 1, the sequence number output can still
be forced by adding an asterisk to the sequence number variable
*n, or by declaring the variable non-modal in its format statement.

4-310 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M / L omitz
Variable Type None
Category Not used
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-311


Chapter 4 Numeric Variables Volume 3

M R opcode
Variable Type NCI variable
Category Tool change information, Operation type
Description Operation code of the current Mill / Router operation.
Values

0 Neither
1 2D contour
2 3D contour
3 Drill
4 Pocket
5 Ruled
6 2D swept
7 3D swept
8 Revolution
9 Loft
10 Coons
11 Fillet
12 Flowline
13 Multisurface finish
14 Multisurface rough
15 Point
16 Drill 5-axis
17 Swarf 5-axis
18 Curve 5-axis
19 Face
Code Example None

Notes opcode is for general classification of a toolpath. Use tool_op for


the specific toolpath.

4-312 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L opcode
Variable Type NCI variable
Category Tool change information, Operation type
Description Operation code of the current Lathe operation.
Values

0 Neither
101 Rough
102 Finish
103 Groove
104 Thread
105 Drill
106 Point
Code Example None

Notes opcode is for general classification of a toolpath. Use tool_op for


the specific toolpath.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-313


Chapter 4 Numeric Variables Volume 3

W opcode
Variable Type NCI variable
Category Tool change information, Operation type
Description Operation code of the current Wire operation.
Values

0 Neither
201 2D contour
202 3D contour
203 Canned
204 No core
205 4-axis taper, no skim cuts
206 2D reverse skim cuts
207 Not used
208 4-axis direct, reverse skim cuts
209 4-axis direct, no skim cuts
210 4-axis taper, reverse skim cuts
211 4-axis taper, one-way skim cuts
212 4-axis direct, one-way skim cuts
213 2D one-way skim cuts
214 Rapid point
Code Example None

Notes

4-314 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

op_id
Variable Type NCI variable
Category Tool change information, Operation type
Description Operation ID number.
Values Integer
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-315


Chapter 4 Numeric Variables Volume 3

M R L orient
Variable Type NCI variable
Category Tool change information, Tool data
Description Lathe tool orientation. (In Mill and Router is always set to 0.)
Values Integer
1 Vertical tool - insert down, left
2 Vertical tool - insert down, right
3 Vertical tool - insert up, right
4 Vertical tool - insert up, left
5 Horizontal tool - insert down, left
6 Horizontal tool - insert down, right
7 Horizontal tool - insert up, right
8 Horizontal tool - insert up, left
Code Example None

Notes

4-316 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W overburn
Variable Type NCI variable
Category Technology
Description The overburn amount entered in Mastercam Wire.
Values Value
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-317


Chapter 4 Numeric Variables Volume 3

M R L p_svec, q_svec, r_svec


Variable Type NCI variable
Category Cutter compensation
Description Surface normal vector.
Values Value
Code Example None

Notes These numeric variables are for 3-axis cutter compensation.


They are the surface normal at the current tool position with NCI
Gcode 11 data.

4-318 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

param_read
Variable Type Calculated variable
Category Parameter
Description Controls how toolpath parameters are passed.
Values

0 Read parameters from the NCI file (default).


1 Read parameters (limited) from the OPS file but only to remove
redundant and duplicate information.
-1 Read parameters from the OPS file.
2 Read parameters from both NCI file and OPS file but use OPS
file read only to remove redundant and duplicate information.
-2 Read parameters from both NCI file and OPS file.
3 Do not read parameters from either file.
Code Example None

Notes This variable can be overridden in the postblock pprep but is


normally used to view the status.
See Volume 2, Parameter Information for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-319


Chapter 4 Numeric Variables Volume 3

W pass
Variable Type NCI variable
Category Tool change information, Tool data
Description Current wire pass number.
Values Integer
Code Example None

Notes

4-320 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W pdo_type
Variable Type NCI variable
Category Tool change information, Operation type
Description Flag to indicate the type of contour chained.
Values

0 Punch
1 Die
2 Open
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-321


Chapter 4 Numeric Variables Volume 3

M R L peck1
Variable Type NCI variable
Category Drill
Description Incremental distance, first peck amount
Values Value
Code Example ppeck #Peck Canned Drill Cycle
n, x, y, depth, refht, peck1, dwell, fr_pos, e
Notes See Volume 1, Working with Drill Cycles more information.

4-322 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L peck2
Variable Type NCI variable
Category Drill
Description Incremental distance, additional peck amounts
Values Value
Code Example ppeck #Peck Canned Drill Cycle
n, x, y, depth, refht, peck1, peck2, dwell, fr_pos, e
Notes See Volume 1, Working with Drill Cycles more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-323


Chapter 4 Numeric Variables Volume 3

M R L peckacel
Variable Type Post switch variable
Category Post switch, Drill
Description Percentage of peck deceleration for non-canned drilling cycles.
The post executable automatically reduces the size of each
subsequent peck by this percentage.
Values Range: 0.0 to 1.0
Code Example peckacel : 0 .5

Notes Only used with usecanpeck : no or usecanchip : no

4-324 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L peckclr
Variable Type NCI variable
Category Drill
Description Incremental distance, Peck clearance
Values Value
Code Example None

Notes See Volume 1, Working with Drill Cycles more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-325


Chapter 4 Numeric Variables Volume 3

pi
Variable Type Constant
Category Math/function, Constant
Description Value of π.
Value 3.14159265358979323846
Code Example None

Notes

4-326 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L plane
Variable Type NCI variable
Category Motion
Description Current cutting plane.
Values

0 XY plane, G17
1 YZ plane, G19
2 XZ plane, G18
Code Example Mill exmaple:
parc # IJK arc center output
if plane = zero, *i, *j, k # G17 plane - force I & J output
if plane = one , i, *j, *k # G19 plane - force J & K output
if plane = two , *i, j, *k # G18 plane - force I & K output
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-327


Chapter 4 Numeric Variables Volume 3

W plot_2d_uv
Variable Type Post switch variable
Category Post switch, UV output
Description Activates the UV display and/or routines to generate post calls
that emulate 4-axis direct and taper NCI calls from 2D contour.
Values

0 Do not display backplot.


1 Normal backplot.
2 Keep geometry after backplot.
3 Do not display backplot.
negative value Enable calls for output as 4-axis direct. Setting linarc to 1 with
negative plot_2d_uv produces taper output.
Code Example plot_2d_uv : 1 #Post generated backplot of converted 2D path

Notes This routine relies on the post switch use_2d_uv and linarc.
See Volume 2, Wire 2-Axis to 4-Axis Conversion for more
information.

4-328 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

post_version
Variable Type Post data variable
Category Global post variable, Version
Description Post version tag information (new for v9)
Values The value comes from the Post Numbered Question:
1999. Product major version number that post supports? 9
Code Example None

Notes If the value entered in the post numbered question 1999


is less than the current product version, the post executable
(MP.DLL, MPL.DLL or MPWIRE.DLL) will issue a warning
that the post should be updated.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-329


Chapter 4 Numeric Variables Volume 3

posttype
Variable Type Calculated variable
Category Tool change information, Operation type
Description Flag to indicate the product that generated the current toolpath.
Values

0 Neither
1 Mill toolpaths
2 Lathe toolpaths
Code Example None

Notes This is needed for mill/turn operations. Wire never sets this
variable. It remains 0 in the Wire post executable.
See Volume 2, Mill / Turn Applications for more information.

4-330 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W power
Variable Type Calculated variable
Category Power/flush/wire
Description Current power status.
Values

0 Off
1 On
Code Example None

Notes This variable is set both within the NCI tool change block and
extracted from the contour flag variable cur_cflg.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-331


Chapter 4 Numeric Variables Volume 3

prmcode
Variable Type NCI variable
Category Parameter
Description This is the Gcode used with the parameter reading routines.
Values Integer
Code Example pparameter #Information from parameters
if prmcode = 10000, stoper = sparameter
if prmcode = 20103, stinsert2 = sparameter
Notes prmcode and gcode have the same origin: the first line in the two-
line-set NCI line. It is used with the string variable sparameter,
which holds the associated parameter.
See Volume 2, Parameter Information for more information

4-332 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

progname
Variable Type Post switch variable
Category Post switch, Output
Description Outputs the NC file name as typed or uppercase. This numeric
variable is also a command variable that outputs the program
name as a string when encountered on an output postline.
Values

0 Output as typed.
1 Output in all capital letters.
Code Example progname : 1 # Use uppercase for program name

pblock # A postblock
#Valid for all versions, including v9
"(PROGRAM NAME - ", progname, ")", e

pblock # A postblock
# Preferred method for v9 on…
"(PROGRAM NAME - ", sprogname, ")", e #Use the string var.
Notes This is a unique variable that is both a post switch variable and
command variable.
Note: The string variable sprogname is new in Version 9. This
string variable is intended to replace the command variable use of
progname. In the future, progname will be just a post switch
variable that does the variable initialization setting of progname:1,
which tells the post to output the text string data in the string
variable sprogname in uppercase letters.
See Volume 3, String Variables for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-333


Chapter 4 Numeric Variables Volume 3

progno
Variable Type NCI variable
Category Global post variable
Description Program number.
Values Integer
Code Example pheader #Call before start of file
"%", e
*progno, e

Notes

4-334 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

pst_mode
Variable Type System data variable
Category Global post
Description Holds the value that represents the method used in Mastercam to
launch the post executable.
Values

0 Post mode off (not the DLL).


1 Post run in batch mode.
2 Post run from the Operations Manager.
3 Post run from the menu selection, Run.
4 Post run using the C-Hook shortcut (Alt+C).
Code Example if pst_mode = 1, “YOU ARE RUNNING FROM THE OP MANAGER”

Notes This flag is used by the post executable to write errors to an


external file when posting in batch mode. The file is the NCI file
name with the .ERR file extension.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-335


Chapter 4 Numeric Variables Volume 3

pst_rpd_fr
Variable Type Post data variable
Category Feed rate
Description Rapid feed rate setting
Values Set from the Post numbered questions:
38. Rapid feed rate? 300.0
1538. Rapid feed rate (metric)? 10000.0
Code Example None

Notes Which value is read depends on whether the active Mastercam


configuration (CFG) setting is English (inch) or metric.

4-336 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

ptfixx, ptfixy, ptfixz


Variable Type Helper variable
Category Math/function, 3D vector function
Description Rotation point used with the rotate functions rotp and rotv.
Values Value
Code Example None

Notes By default, this point is 0,0,0 (the origin).


See Volume 3, Formulas for more information on rotp and rotv..

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-337


Chapter 4 Numeric Variables Volume 3

ptnearx, ptneary, ptnearz


Variable Type Helper variable
Category Math/function, Intersection function
Description Used by 2D intersection functions to select a point when two
intersection points are found. Returns the point closest to this
position.
Values Value
Code Example None

Notes See Volume 2, Intersection Function for more information.

4-338 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W qrtyp
Variable Type Post switch variable
Category Post switch, UV output
Description Set options for wirepath coordinate output.
Values

0 2D contour:
Normal process. Do not set wq, wr.
4-Axis Direct:
Normal process. Set wq, wr.
4-Axis Taper:
Delta u, v, w. Do not set wq, wr.
Delta u, v, w, calculated as:
u=u-x
v=v-y
w=w–z
1 2D contour:
Normal process. Do not set wq, wr.
4-Axis Direct:
Normal process. Set wq, wr.
4-Axis Taper:
Normal process. Set wq, wr.
2 2D contour:
Normal process. Set wq, wr (wq equals wt, wr equals 0).
4-Axis Direct:
Normal process. Set wq, wr.
4-Axis Taper:
Normal process. Do not set wq, wr.
Code Example qrtyp : 2 # 4 axis calcuation type setting

Notes Wire angle perpendicular wq (Q) and parallel wr (R) to the


current wire motion (Agie style).
See Volume 2, 4-Axis Wire Output Processing for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-339


Chapter 4 Numeric Variables Volume 3

W qstep
Variable Type NCI variable
Category Taper, UV direct
Description Status of an immediate taper change with 4-axis direct.
Values

0 No immediate taper change.


1 Immediate taper change.
Code Example None

Notes

4-340 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R ra_head_no
Variable Type NCI variable
Category Right-angle head support
Description Head number
Values

Code Example none

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-341


Chapter 4 Numeric Variables Volume 3

M R ra_hvecx, ra_hvecy, ra_hvecz


Variable Type NCI variable
Category Right-angle head support
Description Vector from zero reference to head reference (user defined)
Notes

4-342 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R ra_offset
Variable Type NCI variable
Category Right-angle head support
Description Work offset overide
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-343


Chapter 4 Numeric Variables Volume 3

M R ra_rot_head
Variable Type NCI variable
Category Right-angle head support
Description Flags when the head has rotary capabilities
Values
0 Fixed head
1 Rotary motion in head
Code Example none

Notes From parameter 17 of the 1028 NCI line.

4-344 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R ra_svecx, ra_svecy, ra_svecz


Variable Type NCI variable
Category Right-angle head support
Description Unit vector of initial tool direction (tip to pivot)
Notes For independent head rotation reference.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-345


Chapter 4 Numeric Variables Volume 3

M R ra_translated
Variable Type NCI variable
Category Right-angle head support
Description Flags coordinate translation to the machine view.
Values
0 Coordinates are not translated to the machine view.
1 All coordinates are translated to the machine view.
Notes From parameter 16 of the 1028 NCI line

4-346 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R ra_tvecx, ra_tvecy, ra_tvecz


Variable Type NCI variable
Category Right-angle head support
Description Vector representing the offset from the head pivot
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-347


Chapter 4 Numeric Variables Volume 3

M R ra_type
Variable Type NCI variable
Category Right-angle head support
Description Defined head type
Values
0 No head (off)
1 Right-angle head
2 Compound-angle head
3 Block drill
Notes

4-348 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R ra_vecx, ra_vecy, ra_vecz


Variable Type NCI variable
Category Right-angle head support
Description Unit vector of tool direction (tip to pivot)
Notes OAL from tool definition is tool length to pivot and is used to
scale this vector when needed.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-349


Chapter 4 Numeric Variables Volume 3

rad2deg
Variable Type Constant
Category Math/function, Constant
Description Value used to convert radians to degrees.
Value 57.2957795130823209
Code Example None

Notes

4-350 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L rcc_flg
Variable Type Tracking
Category Tracking, Lathe canned cycle
Description Tracks the processing position in the Lathe canned turning
cycles.
Values Integer, 0 through 8
Code Example None

Notes See Volume 2, How Lathe Canned Cycles Work for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-351


Chapter 4 Numeric Variables Volume 3

W rcc_flg
Variable Type Calculated variable
Category Not used in Wire, Lathe Canned Cycle
Notes

4-352 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L W redo_proc
Variable Type Command variable
Category Process control
Description The command variable redo_proc allows exiting the current
postline and all subsequent processing on the current NCI line.
The posting process is then restarted on the NCI line that the
redo_proc exited on. The purpose of this command variable is to
enter an internal MP procedure and then abort the process in
order to restart it with a different condition. Some examplese are
to linearize arcs after calling into pcir, to break lines after calling
into plin, to switch long drill cycles on or off, etc.
To avoid endless looping, a call to redo_proc is performed once
and then is disabled until the next NCI line is read.
Caution: This procedure can produce undesirable effects on tool
tables, etc. There is no control over what internal variables are
updated before a procedure is restarted! Generally, the sooner
the procedure is aborted, the safer it is.
New postblocks have been added to allow the user to see when
the procedure has exited in the normal read loop. These
postblocks are called just before the next NCI line set is read.
Variables can safely be reset here that are modified before the
redo_proc is called.
Added Mill/Router/Lathe postlocks:
plin_end - Gcode 0 or 1 termination
pcir_end - Gcode 2 or 3 termination
pmx_end - Gcode 11 termination
pdrl_end - Gcode 81 or 100 termination
pthd_end - Gcode 201 termination
psof_end - Gcode 1001 termination or tlchng_aft completion
ptlchg0_end - Gcode 1000 termination or tlchng_aft completion
ptlchg_end - Gcode 1002 termination or tlchng_aft completion
Added Wire postblocks:
plin_end - Gcode 0, 1, 30 or 31 termination
pcir_end - Gcode 2, 3, 32, 33 termination
pedm_end - Gcode 11 termination
pcan_end - Gcode 81 or 100 termination
plow_uv_end - Gcode 20, 21, 22, 23 termination (direct lower
wire read)
psof_end - Gcode 1001 termination or tlchng_aft completion
ptlchg0_end - Gcode 1000 termination or tlchng_aft completion
ptlchg_end - Gcode 1002 termination or tlchng_aft completion
November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-353
Chapter 4 Numeric Variables Volume 3

Code Example pcir #Output to NC of circular interpolation


if sweep >= 180,
[
breakarcs = 1
redo_proc
]
prapid
pcir_end #End of circular
breakarcs = 0
Notes See Volume 3, Postblocks for more information.

4-354 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L refht
Variable Type Calculated variable
Category Drill
Description 3-axis drill: Absolute position of the Z location of the reference
height.
5-axis drill: Incremental distance from the selected drill point to
reference height.
Values Value
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-355


Chapter 4 Numeric Variables Volume 3

W reg1 through reg10


Variable Type NCI variable
Category Technology
Description Current register entry for technology settings.
Values Integer
Code Example pconchg #Control setting change
if gcode = 1010, pbld, n, ccode, offset, reg1, reg2, e
else, ccode, offset, reg1, reg2
Notes The register parameters are provided to allow custom support in
the post customization file for technology settings.

4-356 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L retr
Variable Type NCI variable
Category Drill
Description Incremental distance, chip break retract.
Values Value
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-357


Chapter 4 Numeric Variables Volume 3

W retr
Variable Type Not Used
Category Wire canned cycle
Description Not used
Code Example None

Notes

4-358 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R rev_drl5
Variable Type NCI variable
Category Drill
Description Reverses the drill direction from the UVW point to the XYZ
point.
Values

0 Normal drill direction


1 Backward drill direction
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-359


Chapter 4 Numeric Variables Volume 3

W rev_drl5
Variable Type NCI variable
Category Wire canned cycle
Description Reverses the canned tool direction.
Values

0 Normal drill direction


1 Backward drill direction
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information

4-360 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R rev5
Variable Type Calculated variable
Category Five-axis, Rev 5-axis
Description Generated by the Tool5ax C-Hook to manipulate the NCI
Gcode11 5-axis toolpaths. The value of this variable indicates
how to process the primary and secondary axes.
Values

0 Off
1 Non-vertical tool: flip angle
Vertical tool: same as previous
2 Same angle as next
3 180 degree angle
4 Same angle as previous + 180 degrees
5 Same angle as next + 180 degrees
Code Example None

Notes The post customization file must have code in it to support this
procedure.
See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-361


Chapter 4 Numeric Variables Volume 3

M R L reva, revb, rec


Variable Type None
Category Not used
Notes

4-362 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L rhtilt
Variable Type Tolerance variable
Category Obsolete, Five-axis routines
Description 5-axis lead/lag routine.
Notes Use of this numeric variable is not recommended. It has been
superseded with support within Mastercam.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-363


Chapter 4 Numeric Variables Volume 3

M R L rolldie
Variable Type Post switch variable
Category Obsolete, Rolldie
Description Used with the post executable imbedded rolldie routine.
Notes Use of this numeric variable is not recommended. It has been
superseded with support within Mastercam.

4-364 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L rotary_axis
Variable Type Calculated variable
Category Tool change information, Rotary
Description The rotary axis rotation axis in terms of the current tool plane.
Values

0 None
1 Rotation about the X axis.
2 Rotation about the Y axis.
3 Rotation about the Z axis.
Code Example None

Notes Values > 0 are available when the Rotary Axis dialog has
been set.
See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-365


Chapter 4 Numeric Variables Volume 3

M R L rotary_type
Variable Type Calculated variable
Category Tool change information, Rotary
Description The type of rotary selection made in the Rotary Axis dialog box.
Values

0 None
1 Axis substitution
2 Polar conversion
3 Tool plane positioning
Code Example None

Notes See Volume 2, Rotary Processing for more information.

4-366 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L rotary_vecx, rotary_vecy, rotary_vecz


Variable Type NCI variable
Category Tool change information, Rotary
Description The rotary axis rotation vector in terms of the current tool plane.
Values Value
Code Example None

Notes Available when the Rotary Axis dialog has been set.
See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-367


Chapter 4 Numeric Variables Volume 3

M R L rotaxis
Variable Type NCI variable
Category Tool change information, Rotary
Description Axis substitution.
Values

-2 Axis substitution, substitute Y, CCW


-1 Axis substitution, substitute X, CCW
0 None
1 Axis substitution, substitute X, CW
2 Axis substitution, substitute Y, CW
11 Polar conversion, rotate about X
12 Polar conversion, rotate about Y
13 Polar conversion, rotate about Z
21 4-axis, rotate about X
22 4-axis, rotate about Y
23 4-axis, rotate about Z
Code Example None

Notes Available when the Rotary Axis dialog has been set.
See Volume 2, Rotary Processing for more information.

4-368 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L rotaxis_dir
Variable Type Calculated variable
Category Tool change information, Rotary
Description Direction (CW or CCW) of rotary axis.
Values

0 CW
1 CCW
Code Example None

Notes Available when the Rotary Axis dialog has been set.
See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-369


Chapter 4 Numeric Variables Volume 3

M R L rotaxis1, rotaxis2
Variable Type Post switch variable
Category Future development
Notes

4-370 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L rotaxtyp
Variable Type Post switch variable
Category Post switch, Rotary
Description Set the rotary axis procedure to be used by the post executable
file.
Values

-3 Single-axis rotation. Set the reference tool plane matrix to the side
view for c angle equal to 0. Rotation is about the Z axis of the
WCS. c is returned in the range 0 to 360 degrees, CCW positive.
-2 Single-axis rotation. Set the reference tool plane matrix to the
front view for c angle equal to 0. Rotation is about the Z axis of
the WCS. c is returned in the range 0 to 360 degrees, CCW
positive.
-1 Single-axis rotation. Set the reference tool plane matrix to the top
view for c angle equal to 0. Rotation is about the X or Y axis of
the WCS. c is returned in the range 0 to 360 degrees, CW
positive about X and CCW positive about Y.
0 Single-axis rotation. Set the reference tool plane matrix to the first
operation view in the NCI file for c angle equal to 0. Rotation is
about the X, Y or Z axis of the WCS. c is returned in the range 0
to 360 degrees, CW positive about X and CCW positive about Y
and Z.
1 Single-axis rotation. Set the reference tool plane matrix to the top
view for c angle equal to 0. Rotation is about the X or Y axis of
the WCS. c is returned in the range 0 to 360 degrees, CW
positive about X and CCW positive about Y. This is identical to
the –1 setting.
2 5-axis rotation, intended for rotary motion in the tables.
Tool plane toolpaths: Support in the post customization file by
calls to the postblock pmx0 on every motion postblock call. The
post writer is responsible for all rotary calculations and position
mapping.
3 Mill/Turn applications. Resolve a and c angles when rotated about
the X axis.
Cross: The base view must be view 3 for c angle equal to 0. c is
returned in the range 0 to 360 degrees, CCW positive. a is
returned as 0.
Face: The base view must be view 5 for c angle equal to 0. c is
November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-371
Chapter 4 Numeric Variables Volume 3

returned in the range 0 to 360 degrees, CCW positive. a is


returned as 90.
Back: The base view must be view 6 for c angle equal to 0. c is
returned in the range 0 to 360 degrees, CCW positive. a is
returned as -90.
See Volume 2, Mill / Turn Applications for more information.
4 5-axis rotation, intended for rotary motion in the head.
Tool plane positioning: Support in the post customization file by
calls to the postblock pmx0 on every motion postblock call. The
post writer is responsible for all rotary calculations and position
mapping.
5 Shut off rotation. No mapping or angle calculations are performed
for tool plane positioning.
Greater than 6 5-axis rotation, intended to allow rotary support in the post
customization file by calls to the postblock pmx0 on every motion
postblock call from prapid to pg32e. (See “Database Order
Mill/Lathe” in Volume 3, Postblocks.) Calls for the output
postblocks are limited to those normally called with 2D and 3D
contour motion. The post writer is responsible for all rotary
calculations and position mapping.
Note: rotaxtyp should be set to a large value (for example, 9999) to
allow future expansion of this variable by CNC Software, Inc.
Code Example rotaxtyp : 0 #Set the rotary axis option

Notes Single-axis rotation types require that subsequent tool plane


matrix (views) maintain the original matrix rotation vector. For
example, if rotation is about the X axis of the original matrix and
the X axis vector is positive, the subsequent tool plane matrix
must maintain the X axis vector in the positive direction. A
reversal of the vector generates an error and incorrect coordinates.
See Volume 2, Rotary Processing for more information.
See related variables a, c

4-372 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L rotdia
Variable Type NCI variable
Category Tool change information, Rotary
Description Current rotary axis diameter set in Mastercam for axis
substitution.
Values Value
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-373


Chapter 4 Numeric Variables Volume 3

M R L rotdir1, rotdir2
Variable Type Post switch variable
Category Future development
Notes

4-374 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W rpd_hght
Variable Type NCI variable
Category Tool change information, Tool change position
Description Wire upper head rapid height.
Values Value
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-375


Chapter 4 Numeric Variables Volume 3

L rpd_typ
Variable Type NCI variable
Category NCI, Path position
Description Contour flag.
Values

0 No flags - normal move


1 Clearance moves to home position.
2 Rapid moves from home position to start position.
3 Rapid moves created around an obstruction.
4 Rapid moves between points.
5 Entry and exit moves.
6 End and start of canned turning cycle roughing path.
Code Example None

Notes This variable is extracted from the contour flag variable cur_cflg.

4-376 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

rpd_typ_v7
Variable Type Post switch variable
Category Post switch, Version
Description Enables the conversion of NCI data and post executable routine
variations to emulate Version 7 posting.
Values

0 Use Version 8 data and routines.


1 Convert data and use routines to emulate Version 7 form.
Code Example rpd_typ_v7 : 1 #Use Version 7 style contour flags/processing

Notes This switch was added to provide backward compatibility for


existing post customization files. When the C-Hook UPTXT8 is
run, this is written to the post customization file.
See Volume 1, Changes to the MP Post for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-377


Chapter 4 Numeric Variables Volume 3

M R L rtnrefht
Variable Type Post switch variable
Category Post switch, Motion modification
Description Specifies the value to use for the last drill position for subsequent
operations when canceling a canned drill cycle.
Values

0 Use the initial height initht value as the cycle return position.
1 Use the reference height refht value as the cycle return position.
Code Example rtnrefht : 0 # Use initial height value

Notes The canned drill cycle output must be enabled (that is, the
appropriate usecan… variable is set to 1). You can override these
values by assigning a value to prv_z in the postblock pcanceldc.
See Volume 1, Working with Drill Cycles for more information.

4-378 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sa
Variable Type Calculated variable
Category Motion, Arc
Description Start angle in degrees of the current arc calculated.
Values Value
Code Example None

Notes See related variable ea.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-379


Chapter 4 Numeric Variables Volume 3

scalex, scaley, scalez


Variable Type Post switch variable
Category Post switch, Motion modification
Description Scaling factors for x, y, and z. The scaling factors are also applied
to xnci, ynci, znci, i, j, k, xr, yr, zr, xh, yh, zh, arcrad, u, v, w, wx, wy, wz,
threadx, thready, threadz, startx, starty, and startz where applicable.
Values Any value may be used. If 0 is used, it is converted to 1 when
the post customization file is parsed.
Code Example # Position control variables
scalex : 0 # Scale factor for X, zero is off for scale
scaley : 0 # Scale factor for Y
scalez : 0 # Scale factor for Z
Notes It is not recommended to use the scaling in the Mill, Router, or
Lathe post customization files. In the Wire post customization
file, it is generally safe to use scaling. Note! The post executable
ignores these scaling factors when fastmode is set to 1.

4-380 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

seqinc
Variable Type NCI variable
Category Sequence number
Description Sequence number increment as set in Mastercam.
Values Integer
Code Example None

Notes This value is read only at the start of the NCI file (NCI Gcode
1002). The variable has nothing to do with numbered questions
100 and 101, which are used by Mastercam's renumber function.
seqno and seqinc are integers in the NCI file, but are converted to
real numbers in the post executable. It is possible to have a
decimal point in sequence numbers but the values must be
reassigned in pheader, before n is output.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-381


Chapter 4 Numeric Variables Volume 3

seqmax
Variable Type Post switch variable
Category Sequence number
Description Sets the maximum sequence number allowed by the post
processor.
Values Value
Code Example None

Notes The system will reset to the starting sequence number seqno if
the seqmax value is exceeded. For example, if seqmax = 100 and
seqno = 1, then n = 97, 98, 99, 100, 1, 2, etc.
See seqno and seqinc and n for related information.

4-382 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

seqno
Variable Type NCI variable
Category Sequence number
Description Starting sequence number as set in Mastercam.
Values Integer
Code Example None

Notes This value is read only at the start of the NCI file (NCI Gcode
1002). The variable has nothing to do with numbered questions
100 and 101, which are used by Mastercam's renumber function.
seqno and seqinc are integers in the NCI file, but are converted to
real numbers in the post executable. It is possible to have a
decimal point in sequence numbers but the values must be
reassigned in pheader, before n is output.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-383


Chapter 4 Numeric Variables Volume 3

M R L shftdrl
Variable Type NCI variable
Category Drill
Description Incremental distance, boring bar clearance shift amount.
Values Value
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information.

4-384 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sim_no
Variable Type Global variable
Category SIM (HASP) data
Description Holds the SIM (HASP) serial number.
Values Value
Code Example None

Notes New starting with Version 9.06 of the MP DLLs.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-385


Chapter 4 Numeric Variables Volume 3

sim_type
Variable Type Global variable
Category SIM (HASP) data
Description Holds the SIM (HASP) user type.
Values

0 industrial
1 educational
2 dealer
3 control
Code Example None

Notes New starting with Version 9.06 of the MP DLLs.

4-386 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W skimpass
Variable Type NCI variable
Category Tool change information, Operation type
Description Skim cut setting for multiple contour passes.
Values

0 No skimcut
1 First skim pass on a contour
-1 Subsequent skim pass on a contour
-2 Last skim pass on a contour
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-387


Chapter 4 Numeric Variables Volume 3

skipmotest
Variable Type Post switch variable
Category Post switch, Process modification
Description Controls the postblock call of a linear move that contains the
same coordinate data as the previous motion.
Values

0 Skip standard postblock call if no motion.


1 Perform standard postblock regardless of motion.
Code Example skipmotest : 1 #Yes, SKIP the internal (MP.DLL) motion check test

Notes If the previous X, Y, and Z coordinates are identical to the current


X, Y, and Z coordinates (formatted values), the line contains no
motion. This option is rarely used in modern posts.

4-388 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

skp_lead_flgs
Variable Type Post switch variable
Category Post switch, Process modification
Description Controls the handling of the contour flags.
Values

0 Use new style contour flags.


1 Do NOT use new style contour flags
Code Example skp_lead_flgs : 1 #Do NOT use new style contour flags.

Notes Indicates that the new style leads (2000s and 200s, 3000s and
300s) for cstart and cend should be converted to Version 9.0 and
earlier style. This replaces the rpd_typ_v7 variable that was used in
Wire for this purpose.
See cur_cflg for contour flag information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-389


Chapter 4 Numeric Variables Volume 3

so
Variable Type Calculated variable
Category Motion, Arc
Description Start octant of the current arc.
Values Integer (0 through 16)
Code Example None

Notes The octant numbers on a quadrant line are assigned for arcs
having endpoints that fall within the vtol tolerance of the matching
quadrant. For arcs with endpoints falling outside the tolerance
zone of a quadrant, the octant numbers within the interior of the
matching quadrant are assigned.

14

13 2 15
3 1

12 4 0/8 16

5 7
11 6 9
10

ea and eo are related variables.

4-390 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

spaces
Variable Type Post switch variable
Category Post switch, Output
Description The number of spaces inserted before an output variable.
The first output variable on an NC line has the spaces removed.
Values 0 through 10
Code Example spaces : 1 # Number of spaces to add between fields

For example,
Spaces NC Output
0 N100X1.0Y2.0
1 N100 X1.0 Y1.0
2 N100 X1.0 Y1.0
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-391


Chapter 4 Numeric Variables Volume 3

M R L spdir
Variable Type NCI variable (calculated for Mill)
Category Machine function, Spindle
Description Spindle direction.
Values

0 Off
1 Forward
-1 Reverse
Code Example None

Notes

4-392 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L spindle_no
Variable Type NCI variable
Category Tool change information, Tool data
Description Right spindle is used.
Values

0 Left spindle (sometimes referred to as “main” spindle)


1 Right spindle (sometimes referred to as “sub” spindle)
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-393


Chapter 4 Numeric Variables Volume 3

W spindle_no
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes

4-394 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R ss
Variable Type NCI variable
Category Machine function, Spindle
Description Spindle speed.
Values
0 Stop spindle
negative Reverse tool rotation
positive Forward tool rotation
Code Example None

Notes Returned as signed value. Use absolute value with spdir.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-395


Chapter 4 Numeric Variables Volume 3

L ss
Variable Type NCI variable
Category Machine function, Spindle
Description Spindle speed.
Values Signed integer value
negative Spindle speed in CSS
positive Spindle speed in RPM
Code Example None

Notes Returned as signed value. Use css_actv to determine mode.


Use absolute value with spdir.

4-396 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

st_str_ix
Variable Type Helper variable
Category Math/function, String function
Description Holds the starting match index in a string variable for the string
functions strstr and scan.
Values Integer
Code Example None

Notes See Volume 3, Formulas for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-397


Chapter 4 Numeric Variables Volume 3

W startx, starty, startz


Variable Type NCI variable
Category Tool change information, Tool change position
Description Start position of the wirepath.
Values Value
Code Example None

Notes These variables were formerly called xh, yh, and zh in previous
Wire post processors. The values are copied to those variables
for backward compatibility.
See related variables threadx, thready and cutx, cuty.

4-398 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L stck_adv_fr
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Stock advance feed rate for stock push/pull operation.
Values Value
Code Example None

Notes See stck_appr_fr.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-399


Chapter 4 Numeric Variables Volume 3

L stck_appr_fr
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Stock approach feed rate for stock push/pull operation.
Values Value
Code Example None

Notes See stck_adv_fr.

4-400 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L stck_chuk_end_dx
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Destination chuck X axis reference position after transfer
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-401


Chapter 4 Numeric Variables Volume 3

L stck_chuk_end_dz
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Destination chuck Z axis reference position after transfer.
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900)

4-402 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L stck_chuk_end_x
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Final X axis chuck position
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900), Lathe
Stock Flip function (NCI 901), Lathe Stock Advance (Bar-
Feed/Pull) function (NCI 902) and Lathe Chuck function (NCI
903).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-403


Chapter 4 Numeric Variables Volume 3

L stck_chuk_end_z
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Final Z axis chuck position
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900), Lathe Stock
Flip function (NCI 901), Lathe Stock Advance (Bar-Feed/Pull)
function (NCI 902) and Lathe Chuck function (NCI 903).

4-404 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L stck_chuk_st_dx
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Destination chuck X axis reference position before transfer.
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-405


Chapter 4 Numeric Variables Volume 3

L stck_chuk_st_dz
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Destination chuck Z axis reference position before transfer.
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900).

4-406 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L stck_chuk_st_x
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Initial X axis chuck position
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900), Lathe Stock
Flip function (NCI 901), Lathe Stock Advance (Bar-Feed/Pull)
function (NCI 902) and Lathe Chuck function (NCI 903).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-407


Chapter 4 Numeric Variables Volume 3

L stck_chuk_st_z
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Initial Z axis chuck position
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900), Lathe Stock
Flip function (NCI 901), Lathe Stock Advance (Bar-Feed/Pull)
function (NCI 902) and Lathe Chuck function (NCI 903).

4-408 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L stck_clear
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Stock clearance value for stock pull operation.
Values

Code Example None

Notes See stck_op. Used with Lathe Stock Advance (Bar-Feed/Pull)


function (NCI 902).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-409


Chapter 4 Numeric Variables Volume 3

stck_crnr
Variable Type NCI variable
Category Global post variable, Stock
Description Stock origin corner.
Values Position of selected location on stock block:
0 Top - center (always 0 in Lathe)
1 Top - upper left
2 Top - upper right
3 Top - lower right
4 Top - lower left
5 Bottom - upper left
6 Bottom - upper right
7 Bottom - lower right
8 Bottom - lower left
Code Example None

Notes

4-410 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L stck_final_z
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Final Z position of the stock
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900), Lathe Stock
Flip function (NCI 901), Lathe Stock Advance (Bar-Feed/Pull)
function (NCI 902), Lathe Tailstock function (NCI 904) and
Lathe SteadyRest function (NCI 905).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-411


Chapter 4 Numeric Variables Volume 3

L stck_grip
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Grip length value for stock pull operation.
Values

Code Example None

Notes See stck_op. Used with Lathe Stock Advance (Bar-Feed/Pull)


function (NCI 902).

4-412 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

stck_ht
Variable Type NCI variable
Category Global post variable, Stock
Description Stock X component (width).
Values Value
Code Example None

Notes For Lathe, length of stock along the Z axis.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-413


Chapter 4 Numeric Variables Volume 3

L stck_init_z
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Initial Z position of the stock
Values

Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900), Lathe Stock
Flip function (NCI 901), Lathe Stock Advance (Bar-Feed/Pull)
function (NCI 902), Lathe Tailstock function (NCI 904) and
Lathe SteadyRest function (NCI 905).

4-414 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L stck_op
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Stock advance operation method
Values

0 Push stock.
1 Push stock with Use tool stop option.
2 Pull stock.
Code Example None

Notes See stck_clear and stck_grip. Used with Lathe Stock Advance
(Bar-Feed/Pull) function (NCI 902).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-415


Chapter 4 Numeric Variables Volume 3

L stck_spindle
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Active spindle with stock to transfer
Values

0 Left spindle (sometimes referred to as “main” spindle)


1 Left spindle (sometimes referred to as “sub” spindle)
Code Example None

Notes Used with Lathe Stock Transfer function (NCI 900), Lathe Stock
Flip function (NCI 901) and Lathe Stock Advance (Bar-
Feed/Pull) function (NCI 902).

4-416 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

stck_thck
Variable Type NCI variable
Category Global post variable, Stock
Description Stock Z component (thickness).
Values Value
Code Example None

Notes For Lathe, maximum diameter of stock.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-417


Chapter 4 Numeric Variables Volume 3

L stck_tool_x
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Tool X axis position for bar stop/puller.
Values

Code Example None

Notes Used with Lathe Stock Advance (Bar Feed/Pull) function


(NCI 902).

4-418 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

stck_wdth
Variable Type NCI variable
Category Global post variable, Stock
Description Stock Y component (height).
Values Value
Code Example None

Notes For Lathe, maximum diameter of stock.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-419


Chapter 4 Numeric Variables Volume 3

stck_x, stck_y, stck_z


Variable Type NCI variable
Category Global post variable, Stock
Description Position of the stock origin.
Values Value
Code Example None

Notes See stck_crnr. For Lathe, the center of stock along Z axis is held
in stck_x and all other values are 0.

4-420 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

strtool_v7
Variable Type Post switch variable
Category Post switch, Version
Description Controls how and where the tool name string is read.
Values

0 Read the tool name from the NCI Gcode 1013 line.
1 Read the tool name from the NCI Gcode 20001 line. Split the
name into path components
2 Read the tool name from the NCI Gcode 20001 line. Split the
name into path components but keep strtool as the string that was
read.
Code Example None

Notes The numeric variable strtool_v7 was introduced in Mastercam V7


when the tool name in Mill became generic based on the tool
type, and the tool definition index became the tool identifier to
allow the tool description to appear as in Mastercam V6.
It is used to capture the description from the tool definition to
replace the tool name that is on the NCI Gcode 1013 line. This
description is entered in the Define Tool dialog under the
Parameters tab and Tool name. The tool name is replaced if
strtool_v7 is set. The string is copied into the predefined string
variables strtool, strtoolpath and strtoolext.
See Volume 3, String Variables for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-421


Chapter 4 Numeric Variables Volume 3

M R L sub_chn_no
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: chain number
Transform: not used
Values Integer
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-422 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_chn_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-423


Chapter 4 Numeric Variables Volume 3

M R L sub_grp_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: operation ID #
Transform: operation ID #
Values Integer
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-424 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_grp_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-425


Chapter 4 Numeric Variables Volume 3

M R L sub_inc
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Subprogram absolute or incremental flag.
Values

0 Absolute
1 Incremental
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-426 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_inc
Variable Type NCI variable
Category V8 subprogram
Notes Not used in V8 Wire

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-427


Chapter 4 Numeric Variables Volume 3

M R L sub_level
Variable Type Post switch variable
Category Post switch, Subprogram
Description Enables automatic subprograms.
Values

-2 Disable/ignore all subprogram NCI data and calls.


-1 Temporarily disable the automatic subprogram level call. This
must be done in the postblocks psub_call_m, psub_call_mm, or
psub_call_s.
0 Disable automatic alternate file output control. The subprogram
postblocks and routines are called.
1 Output the top calling level (NC level) to be written to the NC
file, subout = 0.
2 Output the top calling level (NC level) to be written to the
alternate file (AUX file), subout = 3. This allows merging the
files with subprograms before the top level NC code.
Code Example sub_level : 1

Notes The above values are used as the NC code is created. During
processing of the NCI file, sub_level is set instead to indicate the
current subprogram level. During this process, it is set to 0 to
indicate the top level output, 1 to indicate the main (transform)
subprogram level, and 2 to indicate the sub (non-transform)
subprogram level.
See Volume 2, How Subprograms Work for more information.

4-428 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_level
Variable Type Post switch variable
Category Not used in V8 Wire, Subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-429


Chapter 4 Numeric Variables Volume 3

M R L sub_m1 through sub_m9


Variable Type NCI variable
Category Subprogram, Tool plane
Description Transform subprogram transform tool plane matrix.
Values Value
Code Example None

Notes See Volume 2, How Subprograms Work for more information..

4-430 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_m1 through sub_m9


Variable Type NCI variable
Category Not used in V8 Wire, Tool plane
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-431


Chapter 4 Numeric Variables Volume 3

M R L sub_mny_t
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Transform subprogram contains more than one tool.
Values

0 Single tool in subprogram.


1 Multiple tools in subprogram.
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-432 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_mny_t
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-433


Chapter 4 Numeric Variables Volume 3

M R L sub_nxt_h
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Subprogram first head number in the transform group.
Values Integer
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-434 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_nxt_h
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-435


Chapter 4 Numeric Variables Volume 3

M R L sub_nxt_t
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Subprogram first tool in the transform group.
Values Integer
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-436 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_nxt_t
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-437


Chapter 4 Numeric Variables Volume 3

M R L sub_nxt_tid
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Not used.
Values None
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-438 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_nxt_tid
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-439


Chapter 4 Numeric Variables Volume 3

M R L sub_op_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: subprogram #
Transform: subprogram #
Values Integer
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-440 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_op_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-441


Chapter 4 Numeric Variables Volume 3

sub_org_chn_no
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Non-transform: Unique number for new chain/chain shift.
Transform: iteration of transform, base 1.
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

4-442 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_org_grp_id
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Operation ID as seen in the Operations Manager
(the transform operation ID when a Transform subprogram).
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-443


Chapter 4 Numeric Variables Volume 3

sub_org_inc
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Subprogram absolute or incremental flag
Values Integer
0 Absolute
1 Incremental
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

4-444 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_org_m1 – sub_org_m9
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Transform subprogram transform tool plane matrix
Values

Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-445


Chapter 4 Numeric Variables Volume 3

sub_org_mny_t
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Transform subprogram contains more than one tool.
Values Integer
0 Single tool in subprogram.
1 Multiple tools in subprogram.
Code Example None

Notes The first subprogram information read at the current nested level
See Volume 2, How Subprograms Work for more information.

4-446 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_org_nst_flg
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Flag indicates conditions on nested subprogram levels that do not
require a coordinate shift.
Values Integer
0 Shift should be applied to this subprogram call.
1 Original copied source in nested chain
2 Source path in nested chain to new pattern
10 Single level nested call depth
100 All nested subprograms consist of separate subs.
1000 All nested subprograms consist of incremental subs.
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-447


Chapter 4 Numeric Variables Volume 3

sub_org_nxt_h
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Subprogram first head number in the transform group.
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

4-448 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_org_nxt_t
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Subprogram first tool in the transform group.
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-449


Chapter 4 Numeric Variables Volume 3

sub_org_nxt_tid
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Subprogram first tool ID in the transform group.
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

4-450 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_org_op_id
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Non-transform: subprogram #
Transform: subprogram #
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-451


Chapter 4 Numeric Variables Volume 3

sub_org_ref_id
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Non-transform: Reference, 0 = non-transform < 0 = non-
transform being referenced by a transform somewhere else.
Transform: Reference, greater than 0 is a transform.
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

4-452 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_org_sec_no
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Non-transform: output sub = 1 iterate from base 1, valid > 0,
negative if copy in a transform.
Transform: output sub = 0 iterate from base 0, valid > = 0.
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-453


Chapter 4 Numeric Variables Volume 3

sub_org_totl_no
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Non-transform: Total number of instances, 1-based.
Transform: Total number of instances, 1-based.
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level
See Volume 2, How Subprograms Work for more information.

4-454 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_org_trnmthd
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Transform subprogram transform method
Values On sub_trnstyp:
0 Mirror - 0=X axis, 1=Y axis, 2=entity
1 Rotate - 0=Tplane, 1=Tplane origin only, 2=coordinates
2 Scale (Not used)
3 Translate - 0=Tplane, 1=Tplane origin only, 2=coordinates
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-455


Chapter 4 Numeric Variables Volume 3

sub_org_trns_id
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Non-transform: Not used.
Transform: Not used.
Values Integer
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

4-456 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_org_trnstyp
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Transform subprogram transform type
Values

0 Mirror
1 Rotate
2 Scale (Not used)
3 Translate
Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-457


Chapter 4 Numeric Variables Volume 3

sub_org_trnsx, sub_org_trnsy, sub_org_trnsz


Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Transform subprogram transform method
Values On sub_trnstyp:
0 Mirror -
sub_trnsx: Y mirror, X intersection
sub_trnsy: X mirror, Y intersection
sub_trnsz: not used
1 Rotate -
sub_trnsx: X center rotation
sub_trnsy: Y center rotation
sub_trnsz: Z center rotation
2 Scale (Not used)
3 Translate -
sub_trnsx: X trans. relative origin
sub_trnsy: Y trans. relative origin
sub_trnsz: Z trans. relative origin

Code Example None

Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.

4-458 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L sub_prg_no
Variable Type Calculated variable
Category Subprogram, V8 subprogram
Description Non-transform subprogram number.
Values Integer
Code Example None

Notes The value in sub_op_id is written to sub_prg_no if sub_ref_id is 0


or less.
See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-459


Chapter 4 Numeric Variables Volume 3

W sub_prg_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-460 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sub_rd_level
Variable Type Calculated variable
Category Subprogram, V9 subprogram
Description Current internal subprogram nested level
Values Integer
-1 Non-transform subprogram
0 The main output level (NC)
Greater than 0 Current internal nested subprogram level. Output is buffered at
tool changes, use sub_level to get the current output level.
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-461


Chapter 4 Numeric Variables Volume 3

M R L sub_ref_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform and transform reference.
Values

<0 Non-transform being referenced by a transform somewhere else.


0 Non-transform
>0 Transform
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-462 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_ref_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-463


Chapter 4 Numeric Variables Volume 3

M R L sub_sec_no
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description For non-transform subprograms, the flag indicates the current
iteration of the subprogram pattern. The numbering is from base
1 with non-transform subprograms and the subprogram code is
output when the value is 1 (indicates the first iteration). The
values are negative if the patterns are copies nested in a transform
toolpath to prevent output of the copies.
For transform subprograms, the flag indicates the current
iteration of the transformed toolpath. The numbering is from base
0 and the subprogram code is output when the value is 0.
Values Integer
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-464 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W sub_sec_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-465


Chapter 4 Numeric Variables Volume 3

sub_seq_typ
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Subprogram sequence number control
Values Integer
0 No sequence numbering control
1 Resets the sequence number to seqno at the start of each
subprogram.
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

4-466 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L sub_totl_no
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: Total number of instances, 1-based.
Transform: Total number of instances, 1-based.
Values Integer
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-467


Chapter 4 Numeric Variables Volume 3

W sub_totl_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-468 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L sub_trnmthd
Variable Type NCI variable
Category Subprogram, Transform
Description Transform subprogram transform method.
Values On sub_trnstyp:
0 Mirror - 0=X axis, 1=Y axis, 2=entity
1 Rotate - 0=Tplane, 1=Tplane origin only, 2-coordinates
2 Scale (not used)
3 Translate - 0=Tplane, 1=Tplane origin only, 2=coordinates
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-469


Chapter 4 Numeric Variables Volume 3

W sub_trnmthd
Variable Type NCI variable
Category Not used in V8 Wire, Transform
Notes

4-470 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L sub_trns_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform: not used.
Transform: not used.
Values None
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-471


Chapter 4 Numeric Variables Volume 3

W sub_trns_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes

4-472 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L sub_trnstyp
Variable Type NCI variable
Category Subprogram, Transform
Description Transform subprogram transform type.
Values

0 Mirror
1 Rotate
2 Scale (not used)
3 Translate
Code Example None

Notes See Volume 2, How Subprograms Work for more information.


See related variables sub_trnsx, sub_trnsy, sub_trnsz

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-473


Chapter 4 Numeric Variables Volume 3

W sub_trnstyp
Variable Type NCI variable
Category Not used in V8 Wire, Transform
Notes

4-474 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L sub_trnsx, sub_trnsy, sub_trnsz


Variable Type NCI variable
Category Subprogram, Transform
Description Transform subprogram transform method.
Values On sub_trnstyp:
0 Mirror -
sub_trnsx: Y mirror, X intersection
sub_trnsy: X mirror, Y intersection
sub_trnsz: not used
1 Rotate -
sub_trnsx: X center rotation
sub_trnsy: Y center rotation
sub_trnsz: Z center rotation
2 Scale (not used)
3 Translate -
sub_trnsx: X trans. relative origin
sub_trnsy: Y trans. relative origin
sub_trnsz: Z trans. relative origin

Code Example None

Notes See Volume 2, How Subprograms Work for more information..

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-475


Chapter 4 Numeric Variables Volume 3

W sub_trnsx, sub_trnsy, sub_trnsz


Variable Type NCI variable
Category Not used in V8 Wire, Transform
Notes

4-476 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

subfile
Variable Type Post switch variable
Category Sub files
Description Controls use/creation of nested subprogram files.
Values

0 Disabled.
1 Open the file, removing all contents.
2 Open the file and append to contents.
Code Example None

Notes With nested subprograms, it is possible to have an unknown


number of nested subprogram levels. Each nested level (tracked
with sub_level) must open a file to write the NC output to.
Analogous to subprg = 1 or 2.
See Volume 1, File Manipulation and Volume 2, How
Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-477


Chapter 4 Numeric Variables Volume 3

M R L subno
Variable Type None
Category Not used
Notes

4-478 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W subno
Variable Type NCI variable
Category Subprogram
Description Subprogram number
Values Integer
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-479


Chapter 4 Numeric Variables Volume 3

subout
Variable Type Post switch variable
Category Sub files
Description Sets the output file to be written to.
Values

0 Output stream is to the NC file (.NC)


1 Output stream is to the Sub file (.SUB) - See subprg.
2 Output stream is to Aux file (.AUX) - See auxprg.
3 Output stream is to Ext file (.EXT) - See extprg.
Code Example subout = 0 # Direct output to main (NC) file

Notes See Volume 1, File Manipulation for more information.

4-480 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

subprg
Variable Type Post switch variable
Category Sub files
Description Controls the use/creation of alternate program file (SUB).
Values

0 Disabled
1 Open the file removing all contents.
2 Open the file and append to contents.
Code Example subprg : 1 # Open the .SUB file when post execution starts

Notes To enable output to the .SUB file, the subout variable is set to 1.
See related variables mergesub, clearsub and nchsub.
See Volume 1, File Manipulation for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-481


Chapter 4 Numeric Variables Volume 3

M R L subtyp
Variable Type None
Category Not used
Notes

4-482 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W subtyp
Variable Type NCI variable
Category Subprogram
Description Specifies the subprogram type.
Values

0 Not a subprogram wirepath.


1 Write to the subprogram.
2 Write the call to the subprogram.
Code Example None

Notes See Volume 2, How Subprograms Work for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-483


Chapter 4 Numeric Variables Volume 3

surrogate
Variable Type Post switch variable
Category Post switch, Process modification
Description Skips reading the NCI file.
Values

0 Process NCI file.


1 Skip the NCI file read.
Code Example surrogate : 0

Notes surrogate allows access to the postblocks pprep and ppost. For
example, it is used with the post customization file generated with
the Runold C-Hook to launch the a post from within a post.
See Volume 3, Postblocks for more information on pprep and
ppost.

4-484 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

sweep
Variable Type Calculated variable
Category Motion, Arc
Description Sweep angle in degrees of the current arc, measured from the
start angle to the end angle in the direction of motion.
Values 0 to 360
positive Counterclockwise
negative Clockwise
Code Example None

Notes See related variables do_full_arc and breakarcs.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-485


Chapter 4 Numeric Variables Volume 3

L syncaxis
Variable Type Calculated variable
Category Obsolete, Synclath
Description Used to support the Synclath C-Hook.
Notes

4-486 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L syncbfor
Variable Type Calculated variable
Category Obsolete, Synclath
Description Used to support the Synclath C-Hook.
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-487


Chapter 4 Numeric Variables Volume 3

L synclath
Variable Type Calculated variable
Category Obsolete, Synclath
Description Used to support the Synclath C-Hook.
Notes

4-488 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L syncmode
Variable Type Calculated variable
Category Obsolete, Synclath
Description Used to support the Synclath C-Hook.
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-489


Chapter 4 Numeric Variables Volume 3

M R L t
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool number.
Values Integer
Code Example None

Notes See related variables first_tool and next_tool.

4-490 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W t
Variable Type NCI variable
Category Obsolete, Tool data
Description Current pass number.
Notes Use of this numeric variable is not recommended. It has been
superseded by the numeric variable pass.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-491


Chapter 4 Numeric Variables Volume 3

t_origin_x, t_origin_y, t_origin_z


Variable Type NCI variable
Category Global post variable
Description Work Coordinate System (WCS) origin.
Values

Code Example None

Notes See t_wcs_m1 - t_wcs_m9.

4-492 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

t_wcs_m1 - t_wcs_m9
Variable Type NCI variable
Category NCI, Work Coordinate System plane
Description Work Coordinate System matrix.
Values

Code Example None

Notes

The tool plane matrix is defined relative to the world coordinate


system
t_wcs_m1 through t_wcs_m3 represent the X vector,
(X, X through X, Z).
t_wcs_m4 through t_wcs_m6 represent the Y vector,
(Y, X through Y, Z).
t_wcs_m7 through t_wcs_m9 represent the Z vector,
(Z, X through Z, Z).
See t_origin_x, t_origin_y, t_origin_z.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-493


Chapter 4 Numeric Variables Volume 3

t1, t2
Variable Type Helper variable
Category Math/function, Intersection function
Description Relative position of intersections for 2D intersection postline
functions. t1 provides the position along the first intersecting
element; t2 provides the position along the second.
Values

0 to 1 Intersection along an original element, relative to the original


element's length, the first endpoint being 0.
Less than 0 or Projected intersection, that is, not actually on the element.
greater than 1 Relative to the original element's length, the first endpoint being
0.
-9999 No intersection
Code Example None

Notes If a second intersection exists, t1and t2 represent the first


intersection, and prv_t1 and prv_t2 represent the second
intersection.
See Volume 2, Intersection Function for more information.

4-494 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W tabcut
Variable Type NCI variable
Category Tool change information, Operation type
Description Tab cut type for the current wirepath.
Values

0 Not a tab cut path


1 Tab cut path
2 Contour with tab cut included
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-495


Chapter 4 Numeric Variables Volume 3

W tank
Variable Type Calculated variable
Category Power/flush/wire
Description Tank fill/empty flag.
Values

0 Empty
1 Fill
Code Example None

Notes This variable is set both within the NCI tool change block and
extracted from the contour flag variable cur_cflg.

4-496 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L tcr
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool corner radius.
Values Value
Code Example None

Notes In Wire, the wire radius.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-497


Chapter 4 Numeric Variables Volume 3

W td_ct_flg
Variable Type NCI variable
Category Obsolete
Description Controls how thrd_cut is read.
Values

0 Don’t allow initial thread or final cut.


1 Allow initial thread only.
2 Allow final cut only.
3 Allow initial thread and final cut.
Notes thrd_cut is now modal and carried as a contour flag.

4-498 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thda1
Variable Type NCI variable
Category Thread
Description Thread V profile, front angle.
Values Value (in radians)
Code Example None

Notes Use of this numeric variable is not recommended. It has been


superseded by the numeric variable thdangle. This is used in the
post executable to calculate for volume of cut.
See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-499


Chapter 4 Numeric Variables Volume 3

L thda2
Variable Type NCI variable
Category Thread
Description Thread V profile, rear angle.
Values Value (in radians)
Code Example None

Notes This is used in the post executable to calculate for volume of cut.
See Volume 2, Lathe Threading Cycles for more information.

4-500 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdangle
Variable Type NCI variable
Category Thread
Description Thread infeed angle.
Values Integer
Code Example pg76old #G76 threading old style
pbld, n, *sthdgcode, pfxout, pfzout, *thdrdlt, *thddepth,
*thdfirst, *thdangle, pffr, e
Notes It is recommended to use thdangle in all modern post
customization files. See Volume 2, Lathe Threading Cycles for
more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-501


Chapter 4 Numeric Variables Volume 3

L thddepth
Variable Type Calculated variable
Category Thread
Description Thread depth of the current thread pass.
Values Value
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

4-502 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdequcut
Variable Type NCI variable
Category Thread
Description Use equal depth thread cuts.
Values

0 Off
1 On
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-503


Chapter 4 Numeric Variables Volume 3

L thdface
Variable Type Calculated variable
Category Thread
Description Indicates a face thread.
Values

0 No
1 Yes
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

4-504 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdfinish
Variable Type NCI variable
Category Thread
Description Finish allowance amount for the current thread.
Values Value
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-505


Chapter 4 Numeric Variables Volume 3

L thdfirst
Variable Type NCI variable
Category Thread
Description Amount of the first cut of the thread.
Values Value
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

4-506 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdflat
Variable Type Calculated variable
Category Thread
Description The flat on the standard V thread profile.
Values Value
Code Example None

Notes The calculation for thdflat can be changed in the postblocks


pthdext and pthdint. The default settings are:

Internal - thdlead multiplied by 0.08333


External - thdlead multiplied by 0.16667
See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-507


Chapter 4 Numeric Variables Volume 3

L thdlast
Variable Type NCI variable
Category Thread
Description Amount of the last cut of the thread.
Values Value
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

4-508 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdlead
Variable Type NCI variable
Category Thread
Description Thread lead for the current thread.
Values Value
Code Example None

Notes thdlead is always converted from lead to units/thread.


This does not happen in the pre-read (preparatory) function.
See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-509


Chapter 4 Numeric Variables Volume 3

L thdlng
Variable Type Calculated variable
Category Thread
Description Thread length of the current thread.
Values Value
Code Example None

Notes Calculated as thdz1 – thdz2.


See related variables add_thdzclr.
See Volume 2, Lathe Threading Cycles for more information.

4-510 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdmaj
Variable Type Post switch variable
Category Obsolete
Description Former thread major technique.
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-511


Chapter 4 Numeric Variables Volume 3

L thdncuts
Variable Type NCI variable
Category Thread
Description Number of cuts to be performed during the current threading
operation.
Values Integer
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

4-512 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdpass
Variable Type Calculated variable
Category Thread
Description Current thread pass number.
Values Integer
Code Example None

Notes This is not calculated for Canned thread (thdtype = 1).


See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-513


Chapter 4 Numeric Variables Volume 3

L thdpulloff
Variable Type NCI variable
Category Thread
Description Anticipated pull-off in Z for the current thread.
Values Integer
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

4-514 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdtaper
Variable Type Calculated variable
Category Thread
Description Thread taper angle in degrees.
Values Value
Code Example None

Notes See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-515


Chapter 4 Numeric Variables Volume 3

L thdtype
Variable Type Calculated variable
Category Thread
Description Current thread type.
Values

0 Simple (long cycle, G32)


1 Canned thread (G76)
2 Box thread (G92)
3 Alternating (long cycle, G32)
Code Example None

Notes See Volume 2, Lathe Threading Cycles and thdface for more
information.

4-516 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdx1, thdx2, thdx3


Variable Type NCI variable
Category Thread
Description X-axis coordinates used to define the current thread.
Values Value
Code Example None

Notes thdx1 = X coordinate of the first endpoint of the geometry's


vertical line.
thdx2 = X coordinate of the second endpoint of the geometry's
vertical line.
thdx3 = X coordinate of the second endpoint of the geometry's
horizontal line.
See related variables thdz1, thdz2.
See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-517


Chapter 4 Numeric Variables Volume 3

L thdxclr
Variable Type NCI variable
Category Thread
Description Allows additional clearance over thread.
Values Value
Code Example None

Notes See related variable thdzclr.


See Volume 2, Lathe Threading Cycles for more information.

4-518 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

L thdz1, thdz2
Variable Type NCI variable
Category Thread
Description Z axis coordinates used to define the current thread.
Values Value
Code Example None

Notes thdz1 = Z coordinate of the first endpoint of the geometry's


horizontal line.
thdz2 = Z coordinate of the second endpoint of the geometry's
horizontal line.
See related post switch variable add_thdzclr.
See Volume 2, Lathe Threading Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-519


Chapter 4 Numeric Variables Volume 3

L thdzclr
Variable Type NCI variable
Category Thread
Description Stock clearance on the Z axis.
Values Value
Code Example None

Notes See related post switch variable add_thdzclr. (Version 9)


See Volume 2, Lathe Threading Cycles for more information.

4-520 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W thrd_cut
Variable Type Calculated variable
Category Power/flush/wire
Description Current wire status.
Values

0 Wire is cut (initial state).


1 Wire is threaded.
2 Wire is cut.
Code Example None

Notes It is recommended to use thrd_cut as the numeric variable selector


for a string select function. This variable is extracted from the
contour flag variable cur_cflg.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-521


Chapter 4 Numeric Variables Volume 3

W threadx, thready, threadz


Variable Type NCI variable
Category Tool change information, Tool change position
Description Wire thread (rapid) position in the wirepath.
Values Value
Code Example None

Notes With the introduction of the wire thread cut flag thrd_cut, the
meaning of this position as the thread position is lost. These
variables were formerly called xr, yr, and zr in previous Wire post
processors. The values are copied to those variables for
backward compatibility.
See related variables startx, starty, startz and cut x, cuty.

4-522 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L tilt
Variable Type Tolerance variable
Category Obsolete, Five-axis routines
Description 5-axis lead/lag routine.
Notes Use of this numeric variable is not recommended. It has been
superseded with support within Mastercam.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-523


Chapter 4 Numeric Variables Volume 3

time
Variable Type Time/date
Category None
Description Current time.
Values

Code Example None

Notes See date for related information.

4-524 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

tlchng_aft
Variable Type Post switch variable
Category Post switch, Process modification
Description The numeric variable tlchng_aft is introduced to avoid skipping
the feed rate, contour flags and to establish the initial table angles
with 4- and 5-axis toolpaths that are only available on the first
move following the NCI tool change block. This processing
method allows the post executable to read the first move
following the NCI tool change block as part of a tool change. In
Mastercam V8, the rapid position move is always repeated after
every NCI tool change block, making the tool change after
mechanism the desired processing method.
Values

0 Call the tool change postblocks on the NCI Gcode 1000, 1001,
1002 tool change.
1 Call the tool change postblock for null tool change on the NCI
Gcode 1000 tool change. Otherwise, delay the tool change call
until the first motion is read.
2 Delay the tool change call until the first motion is read on all the
NCI Gcode 1000, 1001, 1002 tool changes.
Code Example tlchng_aft : 2 #Delay call to tool change until move line

Notes It is highly recommended to use tlchng_aft in all modern post


customization files. Caution must be exercised when adding this
to an older post, especially with threading and drill cycle
toolpaths.
See Volume 3, Changes to the MP Post for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-525


Chapter 4 Numeric Variables Volume 3

tldia
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool diameter.
Values Integer
Code Example None

Notes See related variable tlrad.

4-526 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

tlgth
Variable Type None
Category Not used
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-527


Chapter 4 Numeric Variables Volume 3

tlname
Variable Type Command variable
Category Obsolete
Description Command method of tool name output.
Notes Use of this numeric variable is not recommended. It has been
superseded by the string variable strtool.
See Volume 3, String Variables for more information.

4-528 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L tlngno
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool length offset number entered in Mastercam.
Values Integer
Code Example None

Notes Always 0 in Lathe.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-529


Chapter 4 Numeric Variables Volume 3

W tlngno
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes

4-530 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L tloffno
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool diameter offset number set in Mastercam.
Values Integer
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-531


Chapter 4 Numeric Variables Volume 3

W tloffno
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes

4-532 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L tlplnno
Variable Type NCI variable
Category Tool change information, Tool plane
Description Current tool plane number.
Values

0 None specified
1 Top view matrix
2 Front view matrix
3 Back view matrix
4 Bottom view matrix
5 Side view matrix
6 Left view matrix
7 Isometric view matrix
8 Axonometric view matrix
greater than 8 Views created in Mastercam other than the standard views
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-533


Chapter 4 Numeric Variables Volume 3

W tlplnno
Variable Type NCI variable
Category Not used in Wire, Tool plane
Notes

4-534 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

tlrad
Variable Type Calculated variable
Category Tool change information, Tool data
Description Tool radius
Values Value
Code Example None

Notes Calculated as tldia/2.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-535


Chapter 4 Numeric Variables Volume 3

L tlstck_on
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Retract or engage the tailstock
Values

0 Retract tailstock operation


1 Engage tailstock operation
Code Example None

Notes Used with Lathe Tailstock function (NCI 904).

4-536 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W tofs
Variable Type Calculated variable
Category Taper, 2D output
Variable Type Taper
Category 2D output
Description Return the number of the taper offset list matching the actual
taper value.
Values Integer
Code Example plin # A postblock
n, x, y, z, tofs, e
Notes The list is only called on the NCI Gcodes 0, 1, 2, 3 for 2D
contours. The list must be built internally in the post executable
by setting bldnxtool to 1.
See Volume 1, How Preparatory Postblocks Work and listtpr for
more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-537


Chapter 4 Numeric Variables Volume 3

L tool_op
Variable Type Calculated variable
Category Tool change information, Operation type
Description Specific toolpath operation code
Values
60 Rough
61 Finish
62 Grooving
63 Threading
64 Drill
65 Point
66 Facing
67 Cutoff
68 Plunge rough
69 Manual entry
70 Merged ASCII
201 Canned finish
202 Canned rough
203 Canned rough and finish
204 Canned rough face
205 Canned rough and finish face
206 Canned pattern repeat rough
207 Canned pattern repeat rough and finish
208 Canned groove rough
209 Canned groove finish
210 Easy (quick) rough
211 Easy (quick) finish
212 Easy (quick) groove
Code Example None

Notes

4-538 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R tool_op
Variable Type Calculated variable
Category Tool change information, Operation type
Description Specific toolpath operation code
Values
1 Contour
2 Drill
3 Pocket
4 Version 7 linear array; Version 8 mirror, rotate, translate
5 Multi-surface rough parallel
6 Multi-surface rough radial
7 Multi-surface rough project
8 Multi-surface rough flowline
9 Multi-surface rough contour
10 Multi-surface rough pocket
11 Multi-surface finish parallel
12 Multi-surface finish radial
13 Multi-surface finish project
14 Multi-surface finish flowline
15 Multi-surface finish contour
16 For C-Hook-created operations
17 Manual entry
18 Version 8
19 Point
20 Trimmed
21 Ruled
22 Revolved
23 Letters
24 Swept 2D
25 Swept 3D
26 Coons
27 Lofted
28 5-axis drilling

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-539


Chapter 4 Numeric Variables Volume 3

29 5-axis curve
30 Project toolpath onto a plane
31 Project toolpath onto a cylinder
32 Project toolpath onto a sphere
33 Project toolpath onto a cone
34 Project toolpath onto a cross section
35 Project toolpath onto a surface
36 Non-associative contour
37 Non-associative drilling
38 Non-associative pocketing
39 Multi-surface finish pencil trace
40 Multi-surface finish leftover stock
41 Multi-surface finish steep
42 Multi-surface finish shallow
43 Multi-surface finish constant scallop
44 Multi-surface rough plunge
45 Multi-surface finish 5-axis flowline
46 Multi-surface finish 4-axis
47 Merged in ASCII NCI
48 5-axis swarf
49 5-axis roll die
51 Face contouring
52 Cross contouring
53 C-axis contouring
54 Non-associative drilling, not used
55 Face drilling
56 Cross drilling
57 C-axis drilling
100 Thread mill
101 Edit common operation parameters
102 Facing
Code Example None

Notes

4-540 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W tool_op
Variable Type Calculated variable
Category Tool change information, Operation type
Description Specific toolpath opcode
Values
74 Contour
75 Canned
76 No core
77 Manual entry
78 Point
79 4-axis
80 Transform
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-541


Chapter 4 Numeric Variables Volume 3

M R L tool_typ
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool type number
Values
0 Undefined
1 Center drill
2 Spot drill
3 Drill
4 Right hand tap
5 Left hand tap
6 Reamer
7 Boring bar
8 Counter bore
9 Counter sink
10 End mill - flat
11 End mill - spherical
12 Chamfer mill
13 Face mill
14 Slot mill
15 Radius mill
16 Dovetail mill
17 Tapered mill
18 Lollipop mill
19 End mill - bullnose
Code Example None

Notes

4-542 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W tool_typ
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-543


Chapter 4 Numeric Variables Volume 3

tool_zero
Variable Type Post switch variable
Category Post switch, Process modification
Description Enables calling the Tool Zero-type postblocks:
psof0, peof0, lsof0, leof0, msof0, meof0.
Values

0 Do NOT call Tool Zero-type postblocks


1 Call Tool Zero-type postblocks (if Tool # = 0)
Code Example tool_zero : 1 # Do call “Tool Zero” type postblocks

Notes The Tool Zero-type postblocks are rarely used.


They are NOT required to be in the PST file.
To use these postblocks, you must define them, and tool_zero : 1<
in the PST, so the postblocks will be called (if current tool # = 0).
See Volume 3, Postblocks for more information.

4-544 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

tooltable
Variable Type Post switch variable
Category Post switch, Preparatory
Description Enables the post executable routine to call the preparatory
postblocks.
Values

0 No
1 Yes
2 Same effect as 1.
Call the postblock pwrtt at the end of the preparatory read routine
3
on the NCI Gcode 1003 (end of file).
Code Example tooltable : 3 # Pre-read, call pwrtt

Notes See Volume 1, How Preparatory Postblocks Work for more


information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-545


Chapter 4 Numeric Variables Volume 3

M R L tosz
Variable Type Calculated variable
Category Drill
Description 3-axis drill: Absolute position of the Z location of the top of
stock.
5-axis drill: Not calculated.
Values Value
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information.

4-546 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L tox, toy, toz


Variable Type NCI variable
Category Tool change information, Work offset
Description X, Y, and Z coordinates of the tool plane origin.
Values Value
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-547


Chapter 4 Numeric Variables Volume 3

W toz
Variable Type Calculated variable
Category Not used in Wire, Tool Data
Notes

4-548 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L tox4, toy4, toz4


Variable Type Calculated variable
Category Tool change information, Work offset
Description At a tool change, the position of the tox, toy and toz mapped to the
top view.
Values Value
Code Example None

Notes The tox, toy and toz is the work origin position.
See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-549


Chapter 4 Numeric Variables Volume 3

transchr
Variable Type Post switch variable
Category Post switch, Output
Description Enables ASCII character translation.
Values

0 No
1 Yes
Code Example transchr : 1 # Use translation table

Notes Character translation is required for some machine tools that do


not accept the normal ASCII character set. The conversion table
is in an external file (MPTRANS.TBL) that maps ASCII
characters 0 to 255 to the corresponding integer in the file (again 0
to 255). The mapping is based on the file line numbers (starting at
0 for line 1) for the ASCII integer value and the replacement
value entered on the line. Any character that is not in the table
remains unchanged.
The translation table MPTRANS.TBL must be in the post
executable directory.

4-550 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L trflat
Variable Type Calculated variable
Category Tool change information, Tool data
Description Tool flat on the end of the cutter.
Values Value
Code Example None

Notes Calculated as (tlrad – tcr).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-551


Chapter 4 Numeric Variables Volume 3

W trimplane1
Variable Type NCI variable
Category Tool change information, Tool change position
Description 4-axis XY trimming plane height.
Values Value
Code Example None

Notes

4-552 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W trimplane2
Variable Type NCI variable
Category Tool change information, Tool change position
Description 4-axis UV trimming plane height.
Values Value
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-553


Chapter 4 Numeric Variables Volume 3

M R L ttblend
Variable Type Calculated variable
Category Tool change information, Tool data
Description Flag to indicate that the end of the tool table has been reached.
Values

0 Not at the end.


1 At the end.
Code Example if ttblend = 1, “THIS IS THE LAST TOOL CHANGE”

Notes This can be useful to identify the last actual tool change. The
bldnxtool variable must be set to 1 to access the first_tool variable.

4-554 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W ttblend
Variable Type Calculated variable
Category Not used in Wire, Tool Data
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-555


Chapter 4 Numeric Variables Volume 3

ttplane
Variable Type Calculated variable
Category Preparatory
Description Plane (XY, XZ, or YZ) of NCI motion between tool changes,
captured from arc motion.
Values

0 No plane other than XY found.


1 YZ plane found.
-1 XZ and YZ plane found.
2 XZ plane found.
Code Example None

Notes See Volume 1, How Preparatory Postblocks Work for more


information.

4-556 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L u, v, w
Variable Type NCI variable
Category Motion, Linear motion
Description Absolute endpoint coordinates of the tool axis vector away from
surface with 5-axis operations (only with NCI Gcode 11 data).
Values Value
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-557


Chapter 4 Numeric Variables Volume 3

W u, v, w
Variable Type NCI variable
Category Motion, UV taper
Description Absolute coordinates of the upper wirepath with 4-axis taper
(only with NCI Gcode 11 data).
Values Value
Code Example pblock # A postblock
n, x, y, z, u, v, w, e
Notes See qrtyp for related information.

4-558 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W up_st_mode
Variable Type NCI variable
Category Tool change information, Operation type
Description Optional tapered wire thread and wire cut position. Defines
which of the points to apply the taper to.
Values

0 None
1 Thread
2 Cut
3 Both
Code Example None

Notes See up_st_vecx, up_st_vecy and up_st_vecz.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-559


Chapter 4 Numeric Variables Volume 3

W up_st_vecx, up_st_vecy, up_st_vecz


Variable Type NCI variable
Category Tool change information, Tool change position
Description Optional tapered wire thread and wire cut position. This position
is an incremental distance from the 2D contour positions for wire
thread and wire cut in the wirepath. It applies to both points.
Values Value
Code Example None

Notes The post customization file must be written to support these


variables. See up_st_mode.

4-560 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L upper_x, upper _y, upper _z


Variable Type Calculated variable
Category Five-axis, Rev 5-axis
Description Tool5ax C-Hook request for next or previous motion vector with
current vector vertical. The UVW position of the vector found.
Values Value
Code Example None

Notes Mill and Router:


This routine is triggered with the numeric variable rev5.
See Volume 2, Rotary Processing for more information.
Lathe:
With lathe canned rough and pattern repeat toolpaths, the
upper_x, upper_y, upper_z variables hold the start position of the
finish profile. Lathe canned groove captures the first corner of
the groove in variables upper_x, upper_y, upper_z .
See Volume 2, How Lathe Canned Cycles Work for more
information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-561


Chapter 4 Numeric Variables Volume 3

W use_2d_uv
Variable Type Post switch variable
Category Post switch, UV output
Description Activates the conversion routine that produces 4-axis direct and
taper positions from the 2D contour.
Values

0 Disabled
1 Enabled
Code Example use_2d_uv : 1 #The 2D conversion routine to 4 axis

Notes This routine relies on the post switch plot_2d_uv. When


plot_2d_uv is set to call postblocks with the 4-axis emulation
routine, use_2d_plot becomes a calculated variable that indicates
which of a possible four 4-axis direct upper wire positions is
generated.
Position Variables
1 g30code, wx, wy, wz, wxc, wyc, wcor_rad

g30code_2, wx_2, wy_2, wz_2, wxc_2, wyc_2,


2
wcor_rad_2

g30code_3, wx_3, wy_3, wz_3, wxc_3, wyc_3,


3
wcor_rad_3

g30code_4, wx_4, wy_4, wz_4, wxc_4, wyc_4,


4
wcor_rad_4

See Volume 2, Wire 2-axis to 4-axis Conversion for more


information.

4-562 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L usecanbore1
Variable Type Post switch variable
Category Post switch, Drill
Description Selects canned drilling cycle output or long code drilling output.
Values

0 Output long code drilling, calls to linear feed and rapid


postblocks.
1 Enable call to canned drill cycles postblock pbore1, pbore1_2
Code Example usecanbore1 : yes # use canned cycle postblocks for this

Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-563


Chapter 4 Numeric Variables Volume 3

M R L usecanbore2
Variable Type Post switch variable
Category Post switch, Drill
Description Selects canned drilling cycle output or long code drilling output.
Values

0 Output long code drilling, calls to linear feed and rapid


postblocks.
1 Enable call to canned drill cycles postblock pbore2, pbore2_2
Code Example usecanbore2 : yes # use canned cycle postblocks for this

Notes See Volume 1, Working with Drill Cycles for more information.

4-564 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L usecanchip
Variable Type Post switch variable
Category Post switch, Drill
Description Selects canned drilling cycle output or long code drilling output.
Values

0 Output long code drilling, calls to linear feed and rapid


postblocks.
1 Enable call to canned drill cycles postblock pchpbrk, pchpbrk_2.
Code Example usecanchpbrk : yes # use canned cycle postblocks for this

Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-565


Chapter 4 Numeric Variables Volume 3

M R L usecandrill
Variable Type Post switch variable
Category Post switch, Drill
Description Selects canned drilling cycle output or long code drilling output.
Values

0 Output long code drilling, calls to linear feed and rapid


postblocks.
1 Enable call to canned drill cycles postblock pdrill, pdrill_2.
Code Example usecandrill : yes # use canned cycle postblocks for this

Notes See Volume 1, Working with Drill Cycles for more information.

4-566 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L usecanmisc1
Variable Type Post switch variable
Category Post switch, Drill
Description Selects canned drilling cycle output or long code drilling output.
Values

0 Output long code drilling, calls to linear feed and rapid


postblocks.
1 Enable call to canned drill cycles postblock pmisc1, pmisc1_2.
Code Example usecanmisc1 : yes # use canned cycle postblocks for this

Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-567


Chapter 4 Numeric Variables Volume 3

M R L usecanmisc2
Variable Type Post switch variable
Category Post switch, Drill
Description Selects canned drilling cycle output or long code drilling output.
Values

0 Output long code drilling, calls to linear feed and rapid


postblocks.
1 Enable call to canned drill cycles postblock pmisc2, pmisc2_2.
Code Example usecanmisc2 : yes # use canned cycle postblocks for this

Notes See Volume 1, Working with Drill Cycles for more information.

4-568 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L usecanpeck
Variable Type Post switch variable
Category Post switch, Drill
Description Selects canned drilling cycle output or long code drilling output.
Values

0 Output long code drilling, calls to linear feed and rapid


postblocks.
1 Enable call to canned drill cycles postblock ppeck, ppeck_2.
Code Example usecanpeck : yes # use canned cycle postblocks for this

Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-569


Chapter 4 Numeric Variables Volume 3

M R L usecantap
Variable Type Post switch variable
Category Post switch, Drill
Description Selects canned drilling cycle output or long code drilling output.
Values

0 Output long code drilling, calls to linear feed and rapid


postblocks.
1 Enable call to canned drill cycles postblock ptap, ptap_2.
Code Example usecantap : yes # use canned cycle postblocks for this

Notes See Volume 1, Working with Drill Cycles for more information.

4-570 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L uselstation
Variable Type Post switch variable
Category Post switch, Process modification
Description Allows the post executable to replace the t tool number variable
with the lstation lathe turret station variable in lathe toolpaths and
the head number in mill toolpaths. Intended for Mill / Turn
applications.
Values

0 No
1 Yes
Code Example None

Notes This is not functioning in Mastercam V8. Do not enable this


option.
This variable functions in V9, but Mill associates head to the
tool, so it is not of much use.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-571


Chapter 4 Numeric Variables Volume 3

usemr1
Variable Type Post switch variable
Category Obsolete
Description Specifies source of value for tool diameter.
Values

0 Use tool diameter set in Mastercam.


1 Use miscellaneous real 1 (mr1).
Notes

4-572 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W uvflag
Variable Type Calculated variable
Category Tracking, UV output
Description Indicates whether a wirepath is in the XY (Gcode 0-3) or
XY-UV plane (Gcode 20-23 and 30-33 for 4-axis Direct).
Values

0 2D contour or 4-axis taper


2 4-axis direct, linear upper wire
3 4-axis direct, arc upper wire
Code Example None

Notes See Volume 2, 4-Axis Wire Output Processing for more


information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-573


Chapter 4 Numeric Variables Volume 3

W uvheight
Variable Type NCI variable
Category Tool change information, Tool change position
Description UV height value entered in Mastercam.
Values Value
Code Example None

Notes See related variable xyheight.

4-574 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L vdirx, vdiry, vdirz


Variable Type Calculated variable
Category Obsolete, 5-axis routines
Description Returns the cut direction vector with 5-axis toolpaths.
Notes rotaxtyp must be less than 6 to access this variable.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-575


Chapter 4 Numeric Variables Volume 3

vers_no
Variable Type NCI variable
Category Global post variable, Version
Description Mastercam major version number.
Values V9.xx is 9
Code Example None

Notes

4-576 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R vert_tol
Variable Type Tolerance variable
Category Five-axis, Rev 5-axis
Description Tolerance applied to the tool vector in 5-axis toolpaths to
determine if the vector is to be considered vertical.
Values Value
Code Example None

Notes This routine is triggered with the numeric variable rev5.


See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-577


Chapter 4 Numeric Variables Volume 3

M R vert_tool
Variable Type Calculated variable
Category Five-axis, Rev 5-axis
Description Indicates if the tool vector in 5-axis toolpaths is vertical.
Values

0 Non-vertical
1 Vertical
Code Example None

Notes This routine is triggered with the numeric variable rev5.


See Volume 2, Rotary Processing for more information.

4-578 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L vox, voy, voz


Variable Type Tolerance variable
Category Obsolete, Five-axis routines
Description Add this vector for axis offset.
Values Value
Notes rotaxtyp must be 2 to access this variable. This is a limited
implementation and should not be used.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-579


Chapter 4 Numeric Variables Volume 3

M R L vtlngx, vtlngy
Variable Type None
Category Not used
Notes

4-580 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L vtlngz
Variable Type Helper Variable
Category 5-axis, 5-axis routines
Desciption vtlngz is the variable that is used to pass the tool length to the
referenced variables/function.
Values

Code Example None

Notes
See vtlofsx, vtlofsy, vtlofsz for related information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-581


Chapter 4 Numeric Variables Volume 3

M R L vtlofsx, vtlofsy, vtlofsz


Variable Type 5-axis
Category 5-axis, 5-axis routines
Description A scaled vector representing the tool axis calculated from the
mapped tool plane matrix when rotaxtyp is less than 6.
Values Value
Code Example None

Notes The result of vtoolx, vtooly, vtoolz scaled by vtlngz.


See Volume 2, Rotary Processing for more information.

4-582 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W vtlofsx, vtlofsy, vtlofsz


Variable Type NCI variable
Category Not used in Wire, 5-axis routines
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-583


Chapter 4 Numeric Variables Volume 3

vtol
Variable Type Tolerance variable

Category Tolerance
Description General tolerance.
Values Value
Default 0.0005
Code Example None

Notes Used with octant calculation with arcs, so, eo.


Used with brklinestype for linear chord tolerance.
Used with move_ang motion test.
Used with fsg1, fsg2, fsg3 determination.
Used with ipr_actv tolerance for fr.
Used with css_actv tolerance for ss.
See Volume 3, Formulas for information on fsg1, fsg2, fsg3

4-584 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L vtoolx, vtooly, vtoolz


Variable Type Calculated variable
Category Motion, 5-axis
Description A unit vector representing the tool axis calculated with 5-axis
toolpaths and from the tool plane matrix when rotaxtyp is greater
or equal to 2.
Values Value
Code Example None

Notes Describes the direction of the 5-axis toolpath vector from the
XYZ position to the UVW position or the tool plane matrix
vector m7, m8, m9.
See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-585


Chapter 4 Numeric Variables Volume 3

W warc_cortyp
Variable Type Corner type
Category UV direct
Description Wire arc corner type.
Values

Code Example None

Notes Used for the 20s and 30s Gcode. These variables are for access
to the parameters, but the values are not used in Mastercam.

4-586 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W warc_ctyp
Variable Type Corner type
Category 2D output
Description Arc geometry type.
Values

0 Conical
1 Sharp
2 Constant
3 Other
4 Fixed
5 Fishtail
Code Example None

Notes warc_ctyp as a parameter is added to all arc motion NCI lines


after the wc_rad variable. See related variable warc_rad.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-587


Chapter 4 Numeric Variables Volume 3

W warc_rad
Variable Type Corner type
Category 2D output
Description Radius for upper wire (UV) arc geometry and arc corner type
options other, fixed, and fishtail.
Values

Code Example None

Notes warc_rad as a parameter is added to the end of all arc motion.


See related variables warc_ctyp and wc_rad.

4-588 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W warc_radius
Variable Type Corner type
Category UV direct
Description

Values

Code Example None

Notes Used for the 20s and 30s Gcode. These variables are for access
to the parameters, but the values are not used in Mastercam.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-589


Chapter 4 Numeric Variables Volume 3

W water
Variable Type NCI variable
Category Power/flush/wire
Description Current water (flushing) status.
Values

0 Off
1 On
2 Other (a post-specific setting)
Code Example None

Notes This variable is set both within the NCI tool change block and
extracted from the contour flag variable cur_cflg.

4-590 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wc
Variable Type Corner type
Category 2D output
Description Corner type of the current position in the wirepath.
Values

0 Conical
1 Sharp
2 Constant
3 Other
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-591


Chapter 4 Numeric Variables Volume 3

W wc_rad
Variable Type Corner type
Category 2D output
Description Radius for other, fixed, and fishtail corner options when
geometry is intersecting.
Values

Code Example None

Notes wc_rad as a parameter is added to all linear and arc motion NCI
lines. See related variables warc_ctyp and warc_rad.

4-592 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wcc
Variable Type NCI variable
Category NCI, UV direct
Description Cutter compensation for 4-axis direct (UV) upper wirepaths.
Values Integer
Code Example None

Notes This variable is never used. See the numeric variable cc.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-593


Chapter 4 Numeric Variables Volume 3

W wcor
Variable Type Corner type
Category UV direct
Description Corner type for 4-axis direct (UV) upper wirepaths.
Values

Code Example None

Notes See related variable wcor_rad.

4-594 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wcor_rad
Variable Type Corner type
Category UV direct
Description Wire corner radius.
Values

Code Example None

Notes Used for the 20s and 30s Gcode. These variables are for access
to the parameters, but the values are not used in Mastercam.
See related variable wcor.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-595


Chapter 4 Numeric Variables Volume 3

W wcor_rad_2, wcor_rad_3, wcor_rad_4


Variable Type Calculated variable
Category 2D conversion
Description The upper corner radius results of the conversion are stored in
these variables.
Values Value
Code Example None

Notes See Volume 2, Wire 2-axis to 4-axis Conversion for more


information.

4-596 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

wdum2, wdum3
Variable Type None
Category Future development
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-597


Chapter 4 Numeric Variables Volume 3

W wfr
Variable Type NCI variable
Category NCI, UV direct
Description Feed rate setting of 4-axis direct (UV) upper wirepaths.
Values Value
Code Example None

Notes This variable is never used. See the numeric variable fr.

4-598 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wfull_arc_flg
Variable Type Post variable
Category Motion, Arc motion
Description Flags if current arc in the UV plane is a full circle
(360 deg. sweep) in a single NC block. (new in v9)
Values

0 No, this is not a full arc.


1 Yes, this is a full arc.
Code Example None

Notes See related variables do_full_arc , breakarcs and full_arc_flg.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-599


Chapter 4 Numeric Variables Volume 3

whatline
Variable Type Calculated variable
Category Obsolete, Whatno
Description Post executable internal motion counter. whatline is indexed from
1 to 4 as each line of the NCI file is read. Different procedures
are called depending on its value.
Notes It is not recommended to use whatline in any post customization
files!

4-600 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

whatno
Variable Type Post switch variable
Category Obsolete, Whatno
Description Controls the output calls based on the whatline count.
Values

0 Use the whatno postblock calling method.


1 Do not use the whatno postblock calling method.
Code Example whatno : yes #Do not perform whatline branches? (leave as yes!)

Notes It is not recommended to use the whatno postblock calling


method! Always have the above code example in all post
customization files and initialized as 1 (yes).

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-601


Chapter 4 Numeric Variables Volume 3

W wire
Variable Type NCI variable
Category Tool change information, Power/flush/wire
Description Wire status.
Values

0 Off
1 On
Code Example None

Notes

4-602 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wiredirect
Variable Type Calculated variable
Category Obsolete
Description Flags the presence of Gcodes in the 20s and 30s in the NCI code.
Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-603


Chapter 4 Numeric Variables Volume 3

workofs
Variable Type NCI variable
Category Tool change information, Work offset
Description Work offset number.
Values Integer
Code Example None

Notes

4-604 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wox, woy
Variable Type NCI variable
Category Tool change information, Work offset
Description X and Y coordinates of the tool plane origin.
Values Value
Code Example None

Notes

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-605


Chapter 4 Numeric Variables Volume 3

W wplane
Variable Type NCI variable
Category NCI, UV direct
Description Plane setting of 4-axis direct (UV) upper wirepaths.
Values Value
Code Example None

Notes This variable is never used. See the variable plane.

4-606 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wq, wr
Variable Type Taper
Category Taper, UV output
Description Wire angle perpendicular wq (Q) and parallel wr (R) to the
current wire motion (Agie style).
Values Value
Code Example pblock # A postblock
n, x, y, z, wq, wr, e
Notes See qrtyp and Volume 2, 4-Axis Wire Output Processing for
more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-607


Chapter 4 Numeric Variables Volume 3

W wt
Variable Type NCI variable
Category Taper, 2D output
Description Taper angle in degrees of the current position in the wirepath.
Values

Positive Right tilt in the direction of travel


Negative Left tilt in the direction of travel
Code Example plin # A postblock
n, x, y, z, wt, e
Notes If the immediate routine is enabled and immediate equals 2, wt
holds the taper at the current position and wt_immd is set for the
immediate taper change.

4-608 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wt_immd
Variable Type Calculated variable
Category Taper, 2D output
Description Taper angle in degrees of the second taper at an immediate taper
change.
Values

Positive Right tilt in the direction of travel


Negative Left tilt in the direction of travel
Code Example plin # A postblock
if immediate = 2, n, x, y, z, wt_immd, e
else, n, x, y, z, wt, e
Notes The immediate routine must be enabled and immediate equals 2.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-609


Chapter 4 Numeric Variables Volume 3

W wt_max
Variable Type Calculated variable
Category Preparatory
Description Largest wire taper encountered on the 2D contour wirepath
between tool changes (operations).
Values Value
Code Example None

Notes See Volume 1, How Preparatory Postblocks Work for more


information.

4-610 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wtpr
Variable Type NCI variable
Category Taper, UV direct
Description Taper angle in degrees of the current position.
Values

Positive Right tilt in the direction of travel


Negative Left tilt in the direction of travel
Code Example None

Notes This variable is never used. See the variable wt.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-611


Chapter 4 Numeric Variables Volume 3

W wtrim
Variable Type NCI variable
Category Tool change information, Operation type
Description 4-axis wirepath trimming option selection.
Values

0 Trim in computer.
1 Trim in control.
2 3D tracking
Code Example None

Notes

4-612 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wx, wy, wz
Variable Type NCI variable
Category Motion, UV direct
Description X, Y and Z coordinates of the 4-axis direct upper wirepath.
Values Value
Code Example if cuttype < two, u = vequ(wx)

Notes See Volume 2, 4-Axis Wire Output Processing for more


information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-613


Chapter 4 Numeric Variables Volume 3

W wx_2, wy_2, wz_2, wx_3, wy_3, wz_3, wx_4, wy_4, wz_4


Variable Type Calculated variable
Category 2D conversion
Description The upper contour position results of the conversion.
Values Value
Code Example None

Notes See Volume 2, Wire 2-axis to 4-axis Conversion for more


information.

4-614 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W wxc, wyc
Variable Type NCI variable
Category Motion, UV direct
Description Arc center (X, Y) of the 4-axis direct upper wirepath.
Values Value
Code Example if kltyp_lin = four, kout = vequ( wxc )

Notes See Volume 2, Wire 2-axis to 4-axis Conversion for more


information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-615


Chapter 4 Numeric Variables Volume 3

W wxc_2, wyc_2, wxc_3, wyc_3, wxc_4, wyc_4


Variable Type Calculated variable
Category 2D conversion
Description The upper arc center position results of the conversion.
Values Value
Code Example None

Notes See Volume 2, Wire 2-axis to 4-axis Conversion for more


information.

4-616 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

x, y, z
Variable Type Calculated variable
Category Motion, Linear motion
Description X, Y, and Z coordinates.
Values Value
Code Example pblock # A postblock
n, x, y, z, e
Notes These numeric variables are calculated from the xnci, ynci and znci
NCI data. Moves are often generated from the post executable for
broken motion routines.
See Volume 2, Breakup of Motion for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-617


Chapter 4 Numeric Variables Volume 3

x_max, y_max, z_max, x_min, y_min, z_min


Variable Type Calculated variable
Category Preparatory
Description Minimum and maximum values from NCI axis motion between
tool changes.
Values

Code Example None

Notes IMPORTANT: The post customization must capture these


variables in the pwrtt postblock in order to determine the
minimum and maximum values for the entire NCI file.
See Volume 1, How Preparatory Postblocks Work for more
information.

4-618 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L x4, y4, z4
Variable Type Calculated variable
Category Tool change information, Tool change position
Description At a tool change, the position of the prv_x, prv_y and prv_z
mapped to the top view. With linear motion only, the xnci, ynci
and znci mapped to the top view.
Values Value
Code Example None

Notes See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-619


Chapter 4 Numeric Variables Volume 3

xc, yc, zc
Variable Type NCI variable
Category NCI, Arc position data
Description The X center , Y center, and Z center of the current arc.
Values Value (absolute positions)
Code Example None

Notes See the variables i,j,k for related information.

4-620 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

xcnci, ycnci, zcnci


Variable Type NCI variable
Category NCI, Arc position data
Description The X center , Y center, and Z center of the current arc motion
from the NCI file.
Values Value
Code Example None

Notes It is not recommended to use these numeric variables for NC


output. See xc, yc, zc

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-621


Chapter 4 Numeric Variables Volume 3

M R L xdrl
Variable Type Calculated variable
Category Drill
Description 3-axis drill: Absolute position of the X location of the selected
drill point.
Values Value
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information.

4-622 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L xh, yh, zh
Variable Type NCI variable
Category Tool change information, Tool change position
Description Home position.
Values Value
Code Example None

Notes The home position variables are usually output at a tool change or
the end of the program to position the machine for the tool
change.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-623


Chapter 4 Numeric Variables Volume 3

W xh, yh, zh
Variable Type NCI variable
Category Obsolete, Tool change position
Description Start position of the wirepath.
Notes Use of these numeric variables is not recommended. They have
been superseded by the variables startx, starty, startz.

4-624 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

xnci, ynci, znci


Variable Type NCI variable
Category NCI, Linear position data
Description Captures the X, Y, and Z values from the NCI file.
Values Value
Code Example None

Notes It is not recommended to use these numeric variables for NC


output. Although these variables are supposed to remain
undisturbed, many routines in the post executable modify these
values. See x, y ,z

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-625


Chapter 4 Numeric Variables Volume 3

M R L xr, yr, zr
Variable Type NCI variable
Category Tool change information, Tool change position
Description Rapid position at the start of file and tool change line NCI Gcode
1000, 1001 and 1002.
Values Value
Code Example None

Notes Important: Modern posts should never use these variables. With
the tlchng_aft routines enabled, the normal motion output
variables x, y, z should be used exclusively. The use of these
variables defeats modality and adds confusion to the post
customization file.
See Volume 1, Changes to the MP Post for more information.

4-626 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W xr, yr, zr
Variable Type NCI variable
Category Obsolete, Tool change position
Description Wire thread (rapid) position in the wirepath.
Notes Use of these numeric variables is not recommended. They have
been superseded by the variables threadx, thready, threadz.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-627


Chapter 4 Numeric Variables Volume 3

xresult
Variable Type Helper variable
Category Math/function, Intersection function
Description Type of intersection bound by a 2D intersection postline
function.
Values Value
-1 Entities are coincident. (Does not apply to line-arc intersections.)
0 Entities do not intersect.
1 Entities have one intersection point.
2 Entities have two intersection points. Two lines can intersect at a
maximum of one point.
Code Example None

Notes See Volume 2, Intersection Function for more information.

4-628 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L xs, ys
Variable Type Calculated variable
Category Motion, Rotary motion
Description Axis substitution values calculated when rotaxis is selected. They
return values based on diameter to length in degrees.
Values Value

Code Example None

Notes Use of these numeric variables is not recommended. They are


not properly calculated with linear break up routines.
See Volume 2, Rotary Processing for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-629


Chapter 4 Numeric Variables Volume 3

xtol
Variable Type Tolerance variable
Category Tolerance
Description Intersection tolerance.
Values Value
Default 0.0001
Code Example None

Notes Used with intersection routines.


See Volume 2, Rotary Processing for more information.

4-630 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

W xyheight
Variable Type NCI variable
Category Tool change information, Tool change position
Description XY height value entered in Mastercam.
Values Value
Code Example None

Notes See related variable uvheight.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-631


Chapter 4 Numeric Variables Volume 3

year
Variable Type Time/date
Category None

Description Along with day and mon, structures the day, month, and year of a
date in any order. You can format, concatenate, or use them as
selector variables, although you cannot use them in equations (+)
or assignments (=).
Values

Code Example fs 6 2 0ln


fmt 6 day
fmt 6 month
fmt 6 year2 # Do not use 'yr' here, which means y-rapid.
year2 = year + 2000 # Change 02 to 2002
Notes These variables may be used as strings or numeric values. If the
variable has no format assignment, it is used as a string. If it has a
format assignment, it is used as a numeric value. When the
variable is used as output on a postline, either the string or the
format value may be used.
Variable String example Value example
mon Sep 9.0
month 09 9.0
year 94 94.0
day 26 26.0
See related variables date, time.

4-632 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

yes
Variable Type Constant
Category Math/function, Constant
Description True Condition
Value 1
Code Example None

Notes Do not use “y” as a true response for system numbered questions
in the post customization file. y is the calculated Y-axis position
in this context.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-633


Chapter 4 Numeric Variables Volume 3

M R L zdrill
Variable Type NCI variable
Category Drill, 5-axis
Description Current incremental distance from the reference point to the
current depth with long drill cycle output.
Values Value
Code Example None

Notes The drill cycle must be set to output long code (that is, the
appropriate usecan… variable = 0) and rotaxtyp must be set less
than 6 to access this variable.
See Volume 1, Working with Drill Cycles for more information.

4-634 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

M R L zdrl
Variable Type Calculated variable
Category Drill
Description 3-axis drill: Absolute position of the Z location of the selected
drill point.
5-axis drill: The selected drill point (always 0).
Values Value
Code Example None

Notes See Volume 1, Working with Drill Cycles for more information.

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-635


Chapter 4 Numeric Variables Volume 3

W zx, zy
Variable Type NCI variable
Category Obsolete, Work offset
Description X and Y coordinates of the tool plane origin.
Notes Use of these numeric variables is not recommended. They have
been superseded by the variables wox, woy.

4-636 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

Numeric Variables - Database Order (Mill/Lathe)


This section lists the variables in the order that they are listed in memory. They are added to the end of
an array in the order in which they are listed (if they are predefined), or in the order in which they are
found in the post (if they are user-defined).

x m2 thdfinish fg1014 angle_found


y m3 thdpulloff linarc rhtilt
z m4 thdx1 lima1 nextx
xh m5 thdx2 lima2 nexty
yh m6 thdx3 limb1 nextz
zh m7 thdz1 limb2 nextxc
xr m8 thdz2 limc1 nextyc
yr m9 thdlead limc2 nextplane
zr a thdfirst reva move_ang
xnci b thdlast revb move_ang3
ynci c thdzclr revc synclath
znci i thda1 drill5 syncmode
u j thda2 tilt syncaxis
v k thdtype ldinl1 syncbfor
w axis thddepth ldinl2 merge_end
xc tlgth thdtaper ldina1 vox
yc indexang thdlng ldina2 voy
zc usecandrill thdmaj ldoutl1 voz
cutpos usecanpeck thdncuts ldoutl2 newglobal
cuttyp usecanchip thdflat ldouta1 bool____result
cc usecantap thdpass ldouta2 progno
coolant usecanbore1 nobrk rolldie progname
depth usecanbore2 vtoolx cutretr n
drillcyc usecanmisc1 vtooly mapfg seqno
drillcur usecanmisc2 vtoolz mergenumber seqinc
dwell frcandrill rotaxtyp brklinestype seqmax
opcode omitz xdrl brklineslen omitseq
peck1 omitrefht dmax zdrill no_updprv
peck2 ntools xs rtnrefht spaces
peckclr nc_lout ys vtlngx bug1
refht peckacel vdirx vtlngy bug2
retr azero vdiry vtlngz bug3
rotaxis bzero vdirz brklines bug4
rotdia czero cctotip vert_tol ttime
ss scalex ofs vert_tool ddate
sweep scaley x4 upper_x day
trflat scalez y4 upper_y month
tox maxss z4 upper_z mon
toy orient initht lower_x year
toz spdir rev5 lower_y pie
m1 nspring zdrl lower_z deg2rad

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-637


Chapter 4 Numeric Variables Volume 3

rad2deg comment ccomp posttype sub_op_id


yes commlng cancelcc commvar sub_sec_no
no transchr usemr1 brk_commvar sub_totl_no
e omitcrlf dirchg cc_computer sub_ref_id
ex subprg skipmotest workofs sub_chn_no
breakarcs auxprg fastmode shftdrl sub_trnmthd
arctype extprg cantext mi1drl sub_inc
arcrad subout exitpost mi2drl sub_trnstyp
sa subno cm1 css_actv sub_m1
ea subtyp cm2 ipr_actv sub_m2
so mergesub cm3 fr_pos sub_m3
eo mergeaux cm4 st_str_ix sub_m4
axisx mergeext cm5 end_str_ix sub_m5
axisy clearsub cm6 met_tool sub_m6
axisz clearaux cm7 n_flutes sub_m7
ptfixx clearext cm8 spindle_no sub_m8
ptfixy newsub cm9 n_tap_thds sub_m9
ptfixz newaux op_id maxrad sub_trnsx
ptnearx newext tool_typ nstarts sub_trnsy
ptneary nchar tool_op thdface sub_trnsz
ptnearz nchsub cplnno thdxclr sub_nxt_t
t1 nchaux corgx tox4 sub_nxt_h
t2 nchext corgy toy4 sub_nxt_tid
xresult nqc corgz toz4 sub_mny_t
xtol ncldr ttblend cstop sub_nst_flg
vtol ldrcode bug9 cgstop wdum3
mi1 getnextop whatline cend esub_op_id
mi2 nextop whatno cstart esub_ref_id
mi3 nextccomp first_tool nextcflg esub_sec_no
mi4 nextdc next_tool brk_nextcflg esub_totl_no
mi5 dum x_max strtool_v7 esub_chn_no
mi6 plane y_max cc_pos chord_tol
mi7 omitround z_max cc_1013 matm1
mi8 gcode x_min tlchng_aft matm2
mi9 t y_min ltool_id matm3
mi10 tlname z_min lstation matm4
mr1 tldia ttplane uselstation matm5
mr2 tlrad nci_line lturret matm6
mr3 tcr brk_cantext get_1004 matm7
mr4 tlngno brk_cc rpd_typ matm8
mr5 tloffno brk_ccomp motst matm9
mr6 tlplnno brk_nextop mtol vtlofsx
mr7 tooltable brk_nextccomp cur_cflg vtlofsy
mr8 bldnxtool prmcode brk_cend vtlofsz
mr9 fr arccheck brk_cstop
mr10 frplunge ltol brk_cgstop
eob initfr angtol brk_rpd_typ

4-638 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

matb1 cant_val1 ra_on miscops_mr1


matb2 cant_val2 ra_offset miscops_mr2
matb3 cant_val3 ra_length miscops_mr3
matb4 cant_val4 ra_vecx miscops_mr4
matb5 cant_val5 ra_vecy miscops_mr5
matb6 cant_val6 ra_vecz miscops_mr6
matb7 cant_val7 ra_strt_on miscops_mr7
matb8 cant_val8 ra_svecx miscops_mr8
matb9 cant_val9 ra_svecy miscops_mr9
mill5 cant_val10 ra_svecz miscops_mr10
rotaxis1 cant_no drl_rot_vecx sub_org_op_id
rotaxis2 cant_tlchng drl_rot_vecy Sub_org_grp_id
rotdir1 rpd_typ_v7 drl_rot_vecz sub_org_trns_id
rotdir2 p_svec brk_cutpos2 sub_org_sec_no
main_prg_no q_svec do_full_arc sub_org_totl_no
sub_prg_no r_svec full_arc_flg sub_org_ref_id
sub_level tosz helix_arc sub_org_chn_no
sub_grp_id vers_no arc_pitch sub_org_inc
esub_grp_id m_vers_no tool_zero sub_org_trnstyp
c_msng mc_day end_gcode sub_org_trnmthd
c_mmlt mc_mon stck_spindle sub_org_m1
gnci mc_year stck_appr_fr sub_org_m2
xcnci mc_hour stck_adv_fr sub_org_m3
ycnci mc_min stck_init_z sub_org_m4
zcnci mc_sec stck_final_z sub_org_m5
brk_cc_pos rev_drl5 stck_chuk_st_x sub_org_m6
stck_ht rotary_type stck_chuk_st_z sub_org_m7
stck_wdth rotary_axis stck_chuk_end_x sub_org_m8
stck_thck rotaxis_dir stck_chuk_end_z sub_org_m9
stck_x pst_mode stck_chuk_st_dx sub_org_trnsx
stck_y rcc_flg stck_chuk_st_dz sub_org_trnsy
stck_z c_rcc_setup stck_chuk_end_dx sub_org_trnsz
stck_crnr thdangle stck_chuk_end_dz sub_org_nxt_t
drl_prm1 thdequcut clmp_spindle sub_org_nxt_h
drl_prm2 absinc clmp_op sub_org_nxt_tid
drl_prm3 no_nc_out tlstck_on sub_org_mny_t
drl_prm4 cutpos2 stck_op sub_org_nst_flg
drl_prm5 rotary_vecx stck_clear sub_seq_typ
drl_prm6 rotary_vecy stck_grip sub_rd_level
drl_prm7 rotary_vecz stck_tool_x error_msg
drl_prm8 sub_trns_id add_thdzclr err_file
drl_prm9 esub_trns_id subfile redo_proc
drl_prm10 param_read mrg_subfile db_save
nextu surrogate post_version db_restore
nextv t_wcs_m1 pst_rpd_fr db_repaint
nextw t_wcs_m2 miscops_mi1 db_lvl_src
cant_pos1 t_wcs_m3 miscops_mi2 db_lvl_trg
cant_pos2 t_wcs_m4 miscops_mi3 buf_no_index
cant_pos3 t_wcs_m5 miscops_mi4 dll_vers
cant_pos4 t_wcs_m6 miscops_mi5 nci_rewind
cant_pos5 t_wcs_m7 miscops_mi6
cant_pos6 t_wcs_m8 miscops_mi7
cant_pos7 t_wcs_m9 miscops_mi8
cant_pos8 t_orgin_x miscops_mi9
cant_pos9 t_orgin_y miscops_mi10
cant_pos10 t_orgin_z

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-639


Chapter 4 Numeric Variables Volume 3

Numeric Variables - Database Order (Wire)

x tlgth reg2 seqmax vtol


y indexang reg3 omitseq mi1
z scalex reg4 no_updprv mi2
threadx scaley reg5 spaces mi3
thready scalez wiredirect bug1 mi4
threadz wt wtrim bug2 mi5
startx wc tabcut bug3 mi6
starty xyheight linarc bug4 mi7
startz uvheight brklines ttime mi8
xnci power brklinestype ddate mi9
ynci wire brklineslen day mi10
znci cancyc nobrk month mr1
u canned1 uvflag mon mr2
v canned2 wq year mr3
w canned3 wr pie mr4
xc canned4 qstep deg2rad mr5
yc canned5 qrtyp rad2deg mr6
zc canned6 listtpr yes mr7
xh canned7 listrad no mr8
yh canned8 lofs e mr9
zh canned9 dofs ex mr10
xr cutlength zx breakarcs eob
yr trimplane1 zy arctype comment
zr trimplane2 nextwc arcrad commlng
cc wcc nextwt sa transchr
water wx tofs ea omitcrlf
initht wy toz so subprg
opcode wz c eo auxprg
retr wxc nextx axisx extprg
inittaper wyc nexty axisy subout
sweep wzc nextxc axisz subno
pass wfr nextyc ptfixx subtyp
offset wtpr move_ang ptfixy mergesub
ccode wcor move_ang3 ptfixz mergeaux
wox wplane newglobal ptnearx mergeext
woy skimpass bool____result ptneary clearsub
cutx cstop progno ptnearz clearaux
cuty cgstop progname t1 clearext
i cend n t2 newsub
j cstart seqno xresult newaux
k reg1 seqinc xtol newext

4-640 Mastercam Version 9.1 MP Post Reference Guide November 2002


Volume 3 Chapter 4 Numeric Variables

nchar cm6 nextcflg wx_4 esub_ref_id


nchsub cm7 met_tool wy_4 esub_sec_no
nchaux cm8 n_flutes wz_4 esub_totl_no
nchext cm9 spindle_no wxc_4 esub_chn_no
nqc op_id rpd_hght wyc_4 chord_tol
ncldr tool_typ maxrad wcor_rad_4 matm1
ldrcode tool_op thrd_cut cur_cflg matm2
getnextop cplnno wc_rad wt_immd matm3
nextop corgx warc_ctyp last_g60_wt matm4
nextccomp corgy warc_rad plot_2d_uv matm5
nextdc corgz brk_nextcflg brk_cend matm6
dum ttblend g20code brk_cstop matm7
plane bug9 g30code brk_cgstop matm8
omitround whatline strtool_v7 brk_thrd_cut matm9
gcode whatno sub_op_id vtlofsx
t first_tool cc_pos sub_sec_no vtlofsy
tlname next_tool cc_1013 sub_totl_no vtlofsz
tldia x_max wcor_rad sub_ref_id main_prg_no
tlrad y_max warc_cortyp sub_chn_no sub_prg_no
tcr z_max warc_radius sub_trnmthd sub_level
tlngno x_min get_1004 sub_inc sub_grp_id
tloffno y_min g60_mode sub_trnstyp esub_grp_id
tlplnno z_min motst sub_m1 c_msng
tooltable ttplane mtol sub_m2 c_mmlt
bldnxtool nci_line td_ct_flg sub_m3 gnci
fr brk_cantext immediate sub_m4 xcnci
frplunge brk_cc use_2d_uv sub_m5 ycnci
initfr brk_ccomp g30code_2 sub_m6 zcnci
ccomp brk_nextop wx_2 sub_m7 wt_max
cancelcc wy_2 sub_m8 nextwt_immd
usemr1 brk_nextccomp wz_2 sub_m9 brk_cc_pos
dirchg prmcode wxc_2 sub_trnsx nc_lout
skipmotest arccheck wyc_2 sub_trnsy stck_ht
fastmode ltol wcor_rad_2 sub_trnsz stck_wdth
cantext angtol g30code_3 sub_nxt_t stck_thck
exitpost posttype wx_3 sub_nxt_h stck_x
cm1 commvar wy_3 sub_nxt_tid stck_y
cm2 brk_commvar wz_3 sub_mny_t stck_z
cm3 cc_computer wxc_3 sub_nst_flg stck_crnr
cm4 workofs wyc_3 wdum3 drl_prm1
cm5 st_str_ix wcor_rad_3 esub_op_id drl_prm2
end_str_ix g30code_4

November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-641


Chapter 4 Numeric Variables Volume 3

drl_prm3 c_rcc_setup t_orgin_x sub_seq_typ


drl_prm4 absinc t_orgin_y sub_rd_level
drl_prm5 no_nc_out t_orgin_z error_msg
drl_prm6 cutpos2 brk_cutpos2 err_file
drl_prm7 sub_trns_id do_full_arc redo_proc
drl_prm8 esub_trns_id full_arc_flg db_save
drl_prm9 param_read wfull_arc_flg db_restore
drl_prm10 tank tool_zero db_repaint
cant_pos1 dwell end_gcode db_lvl_src
cant_pos2 rev_drl5 subfile db_lvl_trg
cant_pos3 overburn mrg_subfile buf_no_index
cant_pos4 reg6 post_version dll_vers
cant_pos5 reg7 pst_rpd_fr make_fishtail
cant_pos6 reg8 landheight fil_sharp_uv
cant_pos7 reg9 contour_typ fil_sharp_pos
cant_pos8 reg10 contour_pos fil_sharp_neg
cant_pos9 m1 sub_org_op_id nci_rewind
cant_pos10 m2 sub_org_grp_id
cant_val1 m3 sub_org_trns_id
cant_val2 m4 sub_org_sec_no
cant_val3 m5 sub_org_totl_no
cant_val4 m6 sub_org_ref_id
cant_val5 m7 sub_org_chn_no
cant_val6 m8 sub_org_inc
cant_val7 m9 sub_org_trnstyp
cant_val8 up_st_vecx sub_org_trnmthd
cant_val9 up_st_vecy sub_org_m1
cant_val10 up_st_vecz sub_org_m2
cant_no up_st_mode sub_org_m3
cant_tlchng pdo_type sub_org_m4
vers_no nocore_fin sub_org_m5
m_vers_no rpd_typ_v7 sub_org_m6
mc_day surrogate sub_org_m7
mc_mon t_wcs_m1 sub_org_m8
mc_year t_wcs_m2 sub_org_m9
mc_hour t_wcs_m3 sub_org_trnsx
mc_min t_wcs_m4 sub_org_trnsy
mc_sec t_wcs_m5 sub_org_trnsz
tlchng_aft t_wcs_m6 sub_org_nxt_t
pst_mode t_wcs_m7 sub_org_nxt_h
rcc_flg t_wcs_m8 sub_org_nxt_tid
t_wcs_m9 sub_org_mny_t
sub_org_nst_flg

4-642 Mastercam Version 9.1 MP Post Reference Guide November 2002

You might also like