Professional Documents
Culture Documents
304 Numeric Variables
304 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.
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
Power_Flush_Wire
Technology
Thread
Subprogram
V8 subprograms
Tool plane
Transform
Sub file
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
Error file
error_msg (v9) error_msg (v9)
err_file (v9) err_file (v9)
Drill
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
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
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
c_rcc_setup
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
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
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
end_tlplnno
fg1014
tlplnno
Cutter compensation
cc_computer cc_computer
cctotip
Work offset
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)
clmp_op
clmp_spindle
stck_adv_fr
stck_appr_fr
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
UV taper
u, v, w
Arc
Rotary
a
c
xs, ys
UV direct
wx, wy, wz
wxc, wyc
Five-axis
Taper
2D output
immediate
last_g60_wt
tofs
wt
wt_immd
UV direct
qstep
wtpr
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
Technology
ccode
offset
overburn
reg1 – reg10
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
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
Tool plane
sub_m1 - sub_m9
Transform
sub_trnmthd
sub_trnstyp
sub_trnsx, sub_trnsy ,
sub_trnsz
cancyc
canned2 – canned7
drl_prm1 - drl_prm10
initht
retr
rev_drl5
2D conversion
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
Arc
dmax
Debug
nci_line nci_line
UV output
uvflag
rcc_flg
NCI
Gcode
gnci gnci
Linear position
Arc position
Cutter compensation
cc cc
Tool plane
cm1 – cm9 m1 – m9
m1 – m9
Construction plane
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
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
Math/function
Constants
deg2rad deg2rad
no no
pi pi
rad2deg rad2deg
yes yes
3D vector function
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
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
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
sub_level
Motion
absinc
November 2002 Mastercam Version 9.1 MP Post Reference Guide 4-23
Chapter 4 Numeric Variables Volume 3
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
M Mill
L Lathe
R Router
W Wire
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.
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.
W absinc
Variable Type NCI variable
Category Not used in V8 Wire, Motion
Notes
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
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
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
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
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.
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.
atol
Variable Type Tolerance variable
Category Tolerance
Description Angle tolerance.
Values Value
Default 0.0
Code Example None
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
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 By default, this vector is 0,0,0, so you must equate this vector to
the desired rotation axis.
azero
Variable Type None
Category Not Used
Notes
M R L b
Variable Type None
Category Not Used
Notes
R bdrl_ofs_x
Variable Type NCI variable
Category Block drilling (Router)
Description Distance of drill hole minus the lead drill position - X
Values
R bdrl_ofs_y
Variable Type NCI variable
Category Block drilling (Router)
Description Distance of drill hole minus the lead drill position - Y
Values
R bdrl_ofs_z
Variable Type NCI variable
Category Block drilling (Router)
Description Distance of drill hole minus the lead drill position -Z
Values
R bdrl_tool_grp
Variable Type NCI variable
Category Block drilling (Router)
Description Group number
Values
R bdrl_u
Variable Type NCI variable
Category Block drilling (Router)
Description Position of lead drill at initial height - X
Values
R bdrl_v
Variable Type NCI variable
Category Block drilling (Router)
Description Position of lead drill at initial height - Y
Values
R bdrl_w
Variable Type NCI variable
Category Block drilling (Router)
Description Position of lead drill at initial height - Z
Values
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
R bdrl_wrk_ofs
Variable Type NCI variable
Category Block drilling (Router)
Description Work Offset for drill position
Values
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
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
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
R bdrl_x2
Variable Type NCI variable
Category Block drilling
Description X position for pblockdrl data collection
Values
R bdrl_y2
Variable Type NCI variable
Category Block drilling
Description Y position for pblockdrl data collection
Values
R bdrl_z2
Variable Type NCI variable
Category Block drilling
Description Z position for pblockdrl data collection
Values
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.
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
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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..
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.
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.
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.
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.
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
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
W brklineslen
Variable Type Calculated variable
Category Not used in Wire, Tolerance
Notes
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
W brklinestype
Variable Type Post switch variable
Category Not used in Wire, Motion modification
Notes
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.
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.
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
Notes The fastmode numeric variable must be off to enable bug2, bug3,
and bug4.
See Volume 1, Post Debugging Techniques for more information.
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.
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
Notes The fastmode numeric variable must be off to enable bug2, bug3,
and bug4.
SSee Volume 1, Post Debugging Techniques for more
information.
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
W bug9
Variable Type Calculated variable
Category Not used in Wire, Drill
Notes
M R L bzero
Variable Type None
Category Not Used
Notes
W c
Variable Type Calculated variable
Category Not used in Wire, Rotary motion
Notes
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.
W c_mmlt
Variable Type Command variable
Category Not used in Wire, V8 subprograms
Notes
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.
W c_msng
Variable Type Command variable
Category Not used in Wire, V8 subprograms
Notes
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.
W c_rcc_setup
Variable Type Command variable
Category Not used in Wire, Lathe Canned Cycle
Notes
cancelcc
Variable Type None
Category Not Used
Notes
W cancyc
Variable Type NCI variable
Category Wire canned cycle
Description Type of wire canned cycle.
Values
Notes See Volume 1,Working with Drill Cycles for more information.
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
-1 Off
0 Before
1 With
2 After
Code Example None
cant_tlchng
Variable Type Post switch variable
Category Post switch, Process modification
Description Control canned text when tlchng_aft is on.
Values
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.
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
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
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
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
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.
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.
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
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
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
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.
cgstop
Variable Type Calculated variable
Category Machine function
Description Optional program (glue) stop.
Values
0 No
1 Yes.
Code Example None
M R L chord_tol
Variable Type Tolerance variable
Category Future development
Notes
W chord_tol
Variable Type Tolerance variable
Category Tolerance
Description Angle tolerance.
Values Value
Default 0.0005
Code Example None
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.
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.
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.
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
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
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.
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.
commvar
Variable Type NCI variable
Category Comment
Description Converted comment from the NCI file to a number.
Values Value
Code Example None
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
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.
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
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
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
Notes
cplnno
Variable Type NCI variable
Category NCI, Construction plane
Description Construction plane number.
Values Integer
Code Example None
Notes
M R L css_actv
Variable Type Calculated variable
Category Machine function, Spindle
Description Constant surface speed flag.
Values
Notes
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
cstop
Variable Type Calculated variable
Category Machine function
Description Program stop.
Values
0 No
1 Yes
Code Example None
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
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.
W cutlength
Variable Type Tracking
Category Obsolete
Description Calculated length of the wire cut.
It is available at the peof postblock.
Values
Notes This data has not been written to the Wire NCI file since Version 8.
cutpos
Variable Type NCI variable
Category Tracking, Path position
Description 5-axis toolpath position flag.
Values
cutpos2
Variable Type Calculated variable
Category Tracking, Path position
Description Universal toolpath position flag.
Values
M R L cutretr
Variable Type None
Category Not used
Notes
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
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
M R L czero
Variable Type None
Category Not used
Notes
date, time
Variable Type System data variable
Category Time/date
Description Current date and time.
Values See below.
Code Example None
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
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.
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
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.
dmax
Variable Type Calculated variable
Category Tracking, Arc
Description Maximum X or Y axis move with current circular motion.
Values Value
Code Example None
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
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.
M R L drill5
Variable Type Calculated variable
Category Tool change information, Operation type
Description Flag to indicate 5-axis drilling is active.
Values
M R L drillcur
Variable Type Calculated variable
Category Drill
Description Indicates a drill cycle (long or canned) is active.
Values
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.
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.
Values
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.
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.
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!
ea
Variable Type Calculated variable
Category Motion, Arc
Description End angle (in degrees) of an arc move.
Values Value
Code Example None
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
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
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
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
]
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
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
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
error_msg
Variable Type Post switch variable
Category Post switch, Process modification
Description Controls the display of error messages during post processing.
Values
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.
W esub_chn_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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.
W esub_grp_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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.
W esub_op_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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..
W esub_ref_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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.
W esub_sec_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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.
W esub_totl_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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.
W esub_trns_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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.
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
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
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
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
Notes This flag is obsolete. The NCI file always has the NCI Gcode
1014 line in every NCI tool change block.
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
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
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
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.
M R fr
Variable Type NCI variable
Category Feed rate
Description Feed rate of current tool movement.
Values
L fr
Variable Type NCI variable
Category Feed rate
Description Feed rate of current tool movement.
Values
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
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.
M R L frcandrill
Variable Type None
Category Obsolete
Notes
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
W frplunge
Variable Type Calculated variable
Category Not used in Wire, Feed rate
Notes
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
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.
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
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
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
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?
getnextop
Variable Type Post switch variable
Category Post switch, Next
Description Access specific variables for the next NCI line.
Values
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.
gnci
Variable Type NCI variable
Category NCI, Gcode
Description Capture the Gcode from the NCI file.
Values Integer
Code Example None
Notes
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.
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.
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
indexang
Variable Type None
Category Obsolete
Notes
initfr
Variable Type None
Category Not used
Notes
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.
W initht
Variable Type Not used
Category Wire canned cycle
Description Not used
Code Example None
Notes
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.
M R L ipr_actv
Variable Type Calculated variable
Category Feed rate
Description Indicate feed rate units (per revolution or per minute).
Values
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
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.
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.
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.
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.
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.
ldrcode
Variable Type Post switch variable
Category Post switch, Leader
Description Sets the ASCII decimal equivalent of the tape trailer/leader code.
Values
M lima1, lima2
Variable Type None
Category Not used
Notes
M limb1, limb2
Variable Type None
Category Not used
Notes
M limc1, limc2
Variable Type None
Category Not used
Notes
M R L W linarc
Variable Type Post switch
Category Motion modification
Description Breaks arc moves into line segments.
Values
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.
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.
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.
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.
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
ltol
Variable Type Tolerance variable
Category Tolerance
Description Angle tolerance.
Values Value
Default 0.0005 (inch), 0.01 (metric)
Code Example None
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
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
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
m1 through m9
Variable Type NCI variable
Category NCI, Tool plane
Description Tool plane matrix.
Values Values
Code Example None
Notes
M R L main_prg_no
Variable Type Calculated variable
Category Subprogram, V8 subprogram
Description Transform subprogram number.
Values Integer
Code Example None
W main_prg_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
M R L mapfg
Variable Type None
Category Not used
Notes
Values
Code Example
Notes
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
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
Notes
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
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.
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.
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
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.
met_tool
Variable Type NCI variable
Category Tool change information, Operation type
Description Metric flag.
Values
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.
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
M L mi1drl, mi2drl
Variable Type NCI variable
Category Obsolete
Description
Notes
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.
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
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
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.
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.
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
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
W move_ang3
Variable Type Calculated variable
Category Not used in Wire, Path Motion
Notes
mrg_subfile
Variable Type Command variable
Category Command, Sub file
Description Merges contents of all the subprogram output streams.
Code Example None
mtol
Variable Type Tolerance variable
Category Tolerance
Description Tolerance used in motion test.
Values Value
Default 1.0E-12
Code Example None
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.
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
W n_flutes
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes
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
nc_lout
Variable Type Calculated variable
Category Tracking, Output
Description Indicates if NC output was generated.
Values
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”
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.
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.
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.
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
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
]
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.
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.
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.
newglobal
Variable Type Post switch variable
Category Post switch, Motion modification
Description Controls when global variables are computed.
Values
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.
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.
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.
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.
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.
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.
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.
Notes The post switch variable getnextop must be set to 1 to access the
value.
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.
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.
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
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.
Notes The post switch variable getnextop must be set to 1 to access these
values.
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.
no
Variable Type Constant
Category Math/function, Constant
Description False condition
Value 0
Code Example None
no_nc_out
Variable Type Post switch variable
Category Sub files
Description Inhibits NC output or forces NC output if inhibited by
subprograms.
Values
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.
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
W nobrk
Variable Type Post switch variable
Category Not used in Wire, Motion modification
Notes
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
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.
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
L nstarts
Variable Type NCI variable
Category Thread
Description Number of starts for threading cycle (multiple start thread).
Values Integer
Code Example None
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.
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.
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.
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
M R L omitrefht
Variable Type Post switch variable
Category Post switch, Drill
Description None
Values 0
Code Example None
omitround
Variable Type None
Category Not used
Notes
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.
M / L omitz
Variable Type None
Category Not used
Notes
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
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
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
op_id
Variable Type NCI variable
Category Tool change information, Operation type
Description Operation ID number.
Values Integer
Code Example None
Notes
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
W overburn
Variable Type NCI variable
Category Technology
Description The overburn amount entered in Mastercam Wire.
Values Value
Code Example None
Notes
param_read
Variable Type Calculated variable
Category Parameter
Description Controls how toolpath parameters are passed.
Values
W pass
Variable Type NCI variable
Category Tool change information, Tool data
Description Current wire pass number.
Values Integer
Code Example None
Notes
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
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.
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.
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
M R L peckclr
Variable Type NCI variable
Category Drill
Description Incremental distance, Peck clearance
Values Value
Code Example None
pi
Variable Type Constant
Category Math/function, Constant
Description Value of π.
Value 3.14159265358979323846
Code Example None
Notes
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
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
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.
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
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.
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.
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
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.
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
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
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
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
W qstep
Variable Type NCI variable
Category Taper, UV direct
Description Status of an immediate taper change with 4-axis direct.
Values
Notes
M R ra_head_no
Variable Type NCI variable
Category Right-angle head support
Description Head number
Values
Notes
M R ra_offset
Variable Type NCI variable
Category Right-angle head support
Description Work offset overide
Notes
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
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
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
rad2deg
Variable Type Constant
Category Math/function, Constant
Description Value used to convert radians to degrees.
Value 57.2957795130823209
Code Example None
Notes
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.
W rcc_flg
Variable Type Calculated variable
Category Not used in Wire, Lathe Canned Cycle
Notes
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
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.
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
W retr
Variable Type Not Used
Category Wire canned cycle
Description Not used
Code Example None
Notes
M R rev_drl5
Variable Type NCI variable
Category Drill
Description Reverses the drill direction from the UVW point to the XYZ
point.
Values
Notes See Volume 1, Working with Drill Cycles for more information
W rev_drl5
Variable Type NCI variable
Category Wire canned cycle
Description Reverses the canned tool direction.
Values
Notes See Volume 1, Working with Drill Cycles for more information
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.
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.
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.
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.
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 Available when the Rotary Axis dialog has been set.
See Volume 2, Rotary Processing for more information.
M R L rotaxis
Variable Type NCI variable
Category Tool change information, Rotary
Description Axis substitution.
Values
Notes Available when the Rotary Axis dialog has been set.
See Volume 2, Rotary Processing for more information.
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.
M R L rotaxis1, rotaxis2
Variable Type Post switch variable
Category Future development
Notes
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
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
M R L rotdir1, rotdir2
Variable Type Post switch variable
Category Future development
Notes
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
L rpd_typ
Variable Type NCI variable
Category NCI, Path position
Description Contour flag.
Values
Notes This variable is extracted from the contour flag variable cur_cflg.
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
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.
sa
Variable Type Calculated variable
Category Motion, Arc
Description Start angle in degrees of the current arc calculated.
Values Value
Code Example None
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.
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.
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.
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.
sim_no
Variable Type Global variable
Category SIM (HASP) data
Description Holds the SIM (HASP) serial number.
Values Value
Code Example None
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
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
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
skp_lead_flgs
Variable Type Post switch variable
Category Post switch, Process modification
Description Controls the handling of the contour flags.
Values
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.
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
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
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
L spindle_no
Variable Type NCI variable
Category Tool change information, Tool data
Description Right spindle is used.
Values
Notes
W spindle_no
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes
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
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
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 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.
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
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
L stck_chuk_end_dx
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Destination chuck X axis reference position after transfer
Values
L stck_chuk_end_dz
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Destination chuck Z axis reference position after transfer.
Values
L stck_chuk_end_x
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Final X axis chuck position
Values
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).
L stck_chuk_end_z
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Final Z axis chuck position
Values
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).
L stck_chuk_st_dx
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Destination chuck X axis reference position before transfer.
Values
L stck_chuk_st_dz
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Destination chuck Z axis reference position before transfer.
Values
L stck_chuk_st_x
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Initial X axis chuck position
Values
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).
L stck_chuk_st_z
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Initial Z axis chuck position
Values
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).
L stck_clear
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Stock clearance value for stock pull operation.
Values
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
L stck_final_z
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Final Z position of the stock
Values
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).
L stck_grip
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Grip length value for stock pull operation.
Values
stck_ht
Variable Type NCI variable
Category Global post variable, Stock
Description Stock X component (width).
Values Value
Code Example None
L stck_init_z
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Initial Z position of the stock
Values
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).
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).
L stck_spindle
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Active spindle with stock to transfer
Values
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).
stck_thck
Variable Type NCI variable
Category Global post variable, Stock
Description Stock Z component (thickness).
Values Value
Code Example None
L stck_tool_x
Variable Type NCI variable
Category Lathe MiscOps functions information
Description Tool X axis position for bar stop/puller.
Values
stck_wdth
Variable Type NCI variable
Category Global post variable, Stock
Description Stock Y component (height).
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.
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
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
W sub_chn_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
W sub_grp_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
W sub_inc
Variable Type NCI variable
Category V8 subprogram
Notes Not used in V8 Wire
M R L sub_level
Variable Type Post switch variable
Category Post switch, Subprogram
Description Enables automatic subprograms.
Values
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.
W sub_level
Variable Type Post switch variable
Category Not used in V8 Wire, Subprogram
Notes
M R L sub_mny_t
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Transform subprogram contains more than one tool.
Values
W sub_mny_t
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
W sub_nxt_h
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
W sub_nxt_t
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
M R L sub_nxt_tid
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Not used.
Values None
Code Example None
W sub_nxt_tid
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
W sub_op_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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.
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.
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.
sub_org_m1 – sub_org_m9
Variable Type NCI variable
Category Subprogram, V9 subprogram
Description Transform subprogram transform tool plane matrix
Values
Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Notes The first subprogram information read at the current nested level.
See Volume 2, How Subprograms Work for more information.
M R L sub_prg_no
Variable Type Calculated variable
Category Subprogram, V8 subprogram
Description Non-transform subprogram number.
Values Integer
Code Example None
W sub_prg_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
M R L sub_ref_id
Variable Type NCI variable
Category Subprogram, V8 subprogram
Description Non-transform and transform reference.
Values
W sub_ref_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
W sub_sec_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
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
W sub_totl_no
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
W sub_trnmthd
Variable Type NCI variable
Category Not used in V8 Wire, Transform
Notes
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
W sub_trns_id
Variable Type NCI variable
Category Not used in V8 Wire, V8 subprogram
Notes
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
W sub_trnstyp
Variable Type NCI variable
Category Not used in V8 Wire, Transform
Notes
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
M R L subno
Variable Type None
Category Not used
Notes
W subno
Variable Type NCI variable
Category Subprogram
Description Subprogram number
Values Integer
Code Example None
subout
Variable Type Post switch variable
Category Sub files
Description Sets the output file to be written to.
Values
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.
M R L subtyp
Variable Type None
Category Not used
Notes
W subtyp
Variable Type NCI variable
Category Subprogram
Description Specifies the subprogram type.
Values
surrogate
Variable Type Post switch variable
Category Post switch, Process modification
Description Skips reading the NCI file.
Values
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.
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
L syncaxis
Variable Type Calculated variable
Category Obsolete, Synclath
Description Used to support the Synclath C-Hook.
Notes
L syncbfor
Variable Type Calculated variable
Category Obsolete, Synclath
Description Used to support the Synclath C-Hook.
Notes
L synclath
Variable Type Calculated variable
Category Obsolete, Synclath
Description Used to support the Synclath C-Hook.
Notes
L syncmode
Variable Type Calculated variable
Category Obsolete, Synclath
Description Used to support the Synclath C-Hook.
Notes
M R L t
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool number.
Values Integer
Code Example None
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.
t_wcs_m1 - t_wcs_m9
Variable Type NCI variable
Category NCI, Work Coordinate System plane
Description Work Coordinate System matrix.
Values
Notes
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
W tabcut
Variable Type NCI variable
Category Tool change information, Operation type
Description Tab cut type for the current wirepath.
Values
Notes
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.
M R L tcr
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool corner radius.
Values Value
Code Example None
W td_ct_flg
Variable Type NCI variable
Category Obsolete
Description Controls how thrd_cut is read.
Values
L thda1
Variable Type NCI variable
Category Thread
Description Thread V profile, front angle.
Values Value (in radians)
Code Example None
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.
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.
L thddepth
Variable Type Calculated variable
Category Thread
Description Thread depth of the current thread pass.
Values Value
Code Example None
L thdequcut
Variable Type NCI variable
Category Thread
Description Use equal depth thread cuts.
Values
0 Off
1 On
Code Example None
L thdface
Variable Type Calculated variable
Category Thread
Description Indicates a face thread.
Values
0 No
1 Yes
Code Example None
L thdfinish
Variable Type NCI variable
Category Thread
Description Finish allowance amount for the current thread.
Values Value
Code Example None
L thdfirst
Variable Type NCI variable
Category Thread
Description Amount of the first cut of the thread.
Values Value
Code Example None
L thdflat
Variable Type Calculated variable
Category Thread
Description The flat on the standard V thread profile.
Values Value
Code Example None
L thdlast
Variable Type NCI variable
Category Thread
Description Amount of the last cut of the thread.
Values Value
Code Example None
L thdlead
Variable Type NCI variable
Category Thread
Description Thread lead for the current thread.
Values Value
Code Example None
L thdlng
Variable Type Calculated variable
Category Thread
Description Thread length of the current thread.
Values Value
Code Example None
L thdmaj
Variable Type Post switch variable
Category Obsolete
Description Former thread major technique.
Notes
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
L thdpass
Variable Type Calculated variable
Category Thread
Description Current thread pass number.
Values Integer
Code Example None
L thdpulloff
Variable Type NCI variable
Category Thread
Description Anticipated pull-off in Z for the current thread.
Values Integer
Code Example None
L thdtaper
Variable Type Calculated variable
Category Thread
Description Thread taper angle in degrees.
Values Value
Code Example None
L thdtype
Variable Type Calculated variable
Category Thread
Description Current thread type.
Values
Notes See Volume 2, Lathe Threading Cycles and thdface for more
information.
L thdxclr
Variable Type NCI variable
Category Thread
Description Allows additional clearance over thread.
Values Value
Code Example None
L thdz1, thdz2
Variable Type NCI variable
Category Thread
Description Z axis coordinates used to define the current thread.
Values Value
Code Example None
L thdzclr
Variable Type NCI variable
Category Thread
Description Stock clearance on the Z axis.
Values Value
Code Example None
W thrd_cut
Variable Type Calculated variable
Category Power/flush/wire
Description Current wire status.
Values
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.
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.
time
Variable Type Time/date
Category None
Description Current time.
Values
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
tldia
Variable Type NCI variable
Category Tool change information, Tool data
Description Tool diameter.
Values Integer
Code Example None
tlgth
Variable Type None
Category Not used
Notes
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.
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
W tlngno
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes
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
W tloffno
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes
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
W tlplnno
Variable Type NCI variable
Category Not used in Wire, Tool plane
Notes
tlrad
Variable Type Calculated variable
Category Tool change information, Tool data
Description Tool radius
Values Value
Code Example None
L tlstck_on
Variable Type NCI variable
Category Lathe Misc Ops functions information
Description Retract or engage the tailstock
Values
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.
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
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
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
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
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
W tool_typ
Variable Type NCI variable
Category Not used in Wire, Tool Data
Notes
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
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
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.
Notes
W toz
Variable Type Calculated variable
Category Not used in Wire, Tool Data
Notes
Notes The tox, toy and toz is the work origin position.
See Volume 2, Rotary Processing for more information.
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
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
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
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
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
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.
W ttblend
Variable Type Calculated variable
Category Not used in Wire, Tool Data
Notes
ttplane
Variable Type Calculated variable
Category Preparatory
Description Plane (XY, XZ, or YZ) of NCI motion between tool changes,
captured from arc motion.
Values
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
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.
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
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
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
Notes See Volume 1, Working with Drill Cycles for more information.
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
Notes See Volume 1, Working with Drill Cycles for more information.
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
Notes See Volume 1, Working with Drill Cycles for more information.
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
Notes See Volume 1, Working with Drill Cycles for more information.
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
Notes See Volume 1, Working with Drill Cycles for more information.
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
Notes See Volume 1, Working with Drill Cycles for more information.
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
Notes See Volume 1, Working with Drill Cycles for more information.
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
Notes See Volume 1, Working with Drill Cycles for more information.
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
usemr1
Variable Type Post switch variable
Category Obsolete
Description Specifies source of value for tool diameter.
Values
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
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
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
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
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
M R L vtlngx, vtlngy
Variable Type None
Category Not used
Notes
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
Notes
See vtlofsx, vtlofsy, vtlofsz for related information.
vtol
Variable Type Tolerance variable
Category Tolerance
Description General tolerance.
Values Value
Default 0.0005
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.
W warc_cortyp
Variable Type Corner type
Category UV direct
Description Wire arc corner type.
Values
Notes Used for the 20s and 30s Gcode. These variables are for access
to the parameters, but the values are not used in Mastercam.
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
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
W warc_radius
Variable Type Corner type
Category UV direct
Description
Values
Notes Used for the 20s and 30s Gcode. These variables are for access
to the parameters, but the values are not used in Mastercam.
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.
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
W wc_rad
Variable Type Corner type
Category 2D output
Description Radius for other, fixed, and fishtail corner options when
geometry is intersecting.
Values
Notes wc_rad as a parameter is added to all linear and arc motion NCI
lines. See related variables warc_ctyp and warc_rad.
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.
W wcor
Variable Type Corner type
Category UV direct
Description Corner type for 4-axis direct (UV) upper wirepaths.
Values
W wcor_rad
Variable Type Corner type
Category UV direct
Description Wire corner radius.
Values
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.
wdum2, wdum3
Variable Type None
Category Future development
Notes
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.
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
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!
whatno
Variable Type Post switch variable
Category Obsolete, Whatno
Description Controls the output calls based on the whatline count.
Values
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
W wiredirect
Variable Type Calculated variable
Category Obsolete
Description Flags the presence of Gcodes in the 20s and 30s in the NCI code.
Notes
workofs
Variable Type NCI variable
Category Tool change information, Work offset
Description Work offset number.
Values Integer
Code Example None
Notes
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
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
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.
W wt
Variable Type NCI variable
Category Taper, 2D output
Description Taper angle in degrees of the current position in the wirepath.
Values
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
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
W wtpr
Variable Type NCI variable
Category Taper, UV direct
Description Taper angle in degrees of the current position.
Values
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
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)
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 )
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.
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
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
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.
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.
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.
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.
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.
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
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
xtol
Variable Type Tolerance variable
Category Tolerance
Description Intersection tolerance.
Values Value
Default 0.0001
Code Example None
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
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
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.
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.
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.
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.