Professional Documents
Culture Documents
Working With Drill Cycles: Version 8 NCI Drill Cycle Format Changes
Working With Drill Cycles: Version 8 NCI Drill Cycle Format Changes
Null tool changes (NCI Gcode 1000) had been required to introduce the tool plane matrix necessary to
determine the angular movement, which required the drill cycle to be cancelled (NCI Gcode 80) for
each drill position in a new tool plane.
The new format also simplified the interpretation of 5-axis drilling because formerly there was no
vector data on the actual drill cycle (NCI Gcode 81). The post executable had to save the drill data
until the position move with 5-axis drilling.
Because of these changes, it has been necessary to provide a conversion process in the post executable
file to support the thousands of posts that were created before Mastercam V8 universal drilling format.
In the new NCI drilling format, the position data is described as a line with 3-dimensional endpoints at
the position represented by the bottom of the hole and the initial position of the tool above the drill
hole. Scalar positions along this line are then presented for the reference point, the top of stock, and the
point selected in Mastercam for the drill location.
To keep the existing post customization files compatible and, in general, to provide more usable data to
the post writer, the NCI data is then converted to represent the data as in the earlier NCI format. The
data presented for 3-axis drilling and 5-axis drilling has always been different, and those differences
have been maintained.
NCI Gcode 81
The following table describes the two-line set of NCI Gcode 81 (which defines the drill cycle) data
read from the NCI file. The second line shows the parameters that are written to the line. Below the
represented NCI line set is a table with a description of each parameter that was written.
Note: The table does not list the specific variable labels for the NCI values, just a description of each
parameter value. See Volume 3, The NCI File for detailed descriptions.
81
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Parameter Description
5 Dwell time
6 Feed rate
9 Peck clearance
11 Distance from the selected drill position to the initial height, sign positive for above
selected drill position
12 Distance from the selected drill position to the reference height, sign positive for above
selected drill position
13 Distance from the selected drill position to the top of stock, sign positive for above
selected drill position
Parameter Description
18 Control flags
19 Reverse the drill direction from the UVW point to the XYZ point.
Variable Description
Label
Variable Description
Label
Variable Description
Label
ynci Absolute Y position of the drill point at the bottom (zero in Lathe)
znci Absolute Z position of the drill point at the bottom
depth Incremental distance from reference height to the bottom.
dwell Dwell time (as read)
frplunge Feed rate (as read)
peck1 Incremental distance, first peck amount (as read)
peck2 Incremental distance, additional peck amounts (as read)
peckclr Incremental distance, peck clearance (as read)
retr Incremental distance, chip break retract (as read)
shftdrl Incremental distance, boring bar clearance shift amount (as read)
zdrl The selected drill point (always zero)
refht Incremental distance from the selected drill point to reference height.
initht Incremental distance from the selected drill point to initial height.
u Absolute X position of the reference height point
v Absolute Y position of the reference height point
w Absolute Z position of the reference height point
cur_cflg Control flags
rev_drl5 Reverse the drill direction from the UVW point to the XYZ point (as read).
1 2 3 4 5 6 7 8 9 10 11 12 13
Parameter Description
The NCI Gcode 100 variables are unique in that the numeric variables for u, v and w are relative to the
original tool plane matrix defined with the NCI Gcode 81 tool change preceding the NCI Gcode 100.
This rotation, which is defined with the rotary axis selection in Mastercam, is used by the post
executable to create a new tool plane matrix relative to the NCI Gcode 100 drill position. Backwards
compatibility is maintained by rotating the NCI data for the endpoints into the new tool plane.
Variable Description
Label
Variable Description
Label
In earlier versions of Mastercam, this rapid position was never written and the post customization file
would either call back to the tool change postblock or create the rapid positioning during the drill cycle
postblock calls. With the introduction of the mandatory rapid position in the NCI file, errors during
posting and in the NC output can be generated in posts written for the earlier NCI format when the
added rapid NCI line is encountered.
To avoid these problems, the numeric variable rpd_typ_v7 is added to the post customization file and is
set to 1. rpd_typ_v7 skips the rapid position after the tool change in the NCI file and reads the next two-
line set from the NCI file. This is usually the drill cycle definition (NCI Gcode 81) that was expected
by the older post customization file. rpd_typ_v7 also skips the new long code drilling calls if set on and
rotaxtyp is set to less than 6. See Volume 2, Rotary Processing for more information.
Drill cycle long code processing has been enhanced in the post executable file when the numeric
variable rpd_typ_v7 is disabled (that is, omitted or set to 0). The enhanced drill cycle long code provides
support in the post executable for tap, bore1, bore2, misc1 and misc2 drilling and boring cycles. All
these cycles are also supported with 5-axis drilling.
When numeric variable rpd_typ_v7 has been enabled, as required for earlier post customization files, the
long cycle drill motion must be explicitly generated in the post customization file for 5-axis drilling and
the tap, bore1, bore2, misc1 and misc2 drilling and boring cycles.
Note: With rpd_typ_v7 enabled, tap, bore1, bore2, misc1 and misc2 drilling and boring cycles call the
drill (feed in, rapid out) long code output.
The following tables describe the enhanced drill cycle long code, the variables modified, and postblock
calls generated.
Tap (drillcyc = 3)
This is important with canned drill cycle calls because the last Z location perceived by the post
executable is at the final drill depth. With the long code output enabled (that is, when one of the
usecan… variables is set to 0), the final position is controlled by the position output with linear motion
generated in the post executable. The canned drill cycle output returns the Z location internally just
before the call to the postblock pcanceldc by setting the numeric variable z. There is no Z location
adjustment if this is a 5-axis drill routine (drill5 = 1). In the postblock pcanceldc the numeric variable z
should be updated.
Any other position can be stated as the last Z drill position by explicitly defining z or prv_z in the
postblock pcanceldc. For example:
pcanceldc # Cancel canned drill cycle
z = 10.
!z
n, "G80", e