MCAMX5 NCI Parameter Ref
-
Upload
absalonjarv -
Category
Documents
-
view
539 -
download
39
Transcript of MCAMX5 NCI Parameter Ref
-
8/10/2019 MCAMX5 NCI Parameter Ref
1/459
Whats changed in X5?? NCI changes
Supporting new 1031/1032 lines
New & changed parameters
TECH libraries interface reference
Reference tables NCI Gcodes
Tool information (20000s parameters) Operation & toolpath parameters
Machine definition parameters
Control definition parameters
Machine group parameters
Quick StartNCI & Parameter Reference
How do I?Click on each link to see step-by-step instructions plus sample code.
Capturing a string from a 10000s parameter
Capturing the value of a single 10000s parameter
Building a table of parameter values
Capturing a string from a 20000s line
Capturing all the parameters in a 20000s line and storing them in an array
Capturing a single parameter from a 20000s line
Capturing a range of parameters from a 20000s line
Implementing tool inspection for lathe grooves
Capturing machine definition parameters
Getting the entity ID
Capturing control definition parameters
Capturing machine group parameters Doing a parameter dump: outputting all the parameters
Reading operation parameters from any postblock
Setting options for transform operation parameters
Reading parameters during the NCI pre-read routine
-
8/10/2019 MCAMX5 NCI Parameter Ref
2/459
-
8/10/2019 MCAMX5 NCI Parameter Ref
3/459
-
8/10/2019 MCAMX5 NCI Parameter Ref
4/459
-
8/10/2019 MCAMX5 NCI Parameter Ref
5/459
Mastercam X5NCI & ParameterReference
October, 2010
-
8/10/2019 MCAMX5 NCI Parameter Ref
6/459
Mastercam X5 NCI & Parameter Reference
Date: October, 2010Copyright 2010 CNC Software, Inc. All rights reserved.First Printing: October, 2010
Software: Mastercam X5Part number: X5-PDF-NC
TERMS OF USE Use of this document is subject to the Mastercam End User LicenseAgreement. A copy of the Mastercam End User License Agreement is
included with the Mastercam product package of which this docu-ment is part. The Mastercam End User License Agreement can also befound at:www.mastercam.com/legal/licenseagreement/
http://www.mastercam.com/legal/licenseagreement/http://www.mastercam.com/legal/licenseagreement/ -
8/10/2019 MCAMX5 NCI Parameter Ref
7/459
vii
Contents
1. Introduction......................................................................................................... 1Contacting CNC Software .......................................................................1
Changes for X5 .................................................................................................3Corrections.........................................................................................................3
Changes to NCI Reference .................................................................................3
New NCI lines for Transform Custom Parameters .................................... 4
New and changed operation parameters ..........................................................6
Mill / General parameters .......................................................................... 6
Lathe parameters ..................................................................................... 14
Wire parameters ....................................................................................... 22
2. Working with Parametersand Toolpath Data.......................................................................................... 25
Working with NCI toolpath data ...................................................................26
Working with operation (10000s) parameters ...........................................27Capturing values for 10000s parameters .........................................................28
Capturing a string from a 10000s parameter ........................................... 29
Capturing numeric values from 10000s parameters ................................ 30
Validating parameters with UpdatePost .........................................................33
Working with 20000s lines ...........................................................................34Capturing parameters from 20000s lines ........................................................35
Capturing a string from a 20000s line ...................................................... 36
Capturing numeric values from a 20000s line ......................................... 37
Lathe tool inspection comments ............................................................. 41
Working with machine definition, control definition,and machine group parameters ....................................................................44Capturing machine definition parameters......................................................45
Getting the entity ID ................................................................................. 46
Capturing control definition parameters ........................................................48
Capturing machine group parameters ............................................................49
Advanced techniques for working with operation parameters .................51
Reading parameters during the NCI pre-read routine....................................51Doing a parameter dump: outputting all the parameters ...............................52
Reading operation parameters from any postblock........................................54
Setting options for transform operation parameters ......................................55
-
8/10/2019 MCAMX5 NCI Parameter Ref
8/459
viii MASTERCAM X5 / NCI & Parameter Reference
3. NCI Reference ................................................................................................. 57
NCI Gcodes .....................................................................................................58tool_op$ codes ....................................................................................... 126
Control Flags Parameters...............................................................................146
Tool information (20000s parameters).......................................................150Mill/Router/Generic......................................................................................151
Lathe...............................................................................................................158Wire ................................................................................................................164
Parameters for custom interfaces ..................................................................165
Common parameters ............................................................................. 166
Agievision parameters ............................................................................ 170
TECH library parameters ....................................................................... 190
Validating the post for custom interfaces .............................................. 193
4. Parameter Reference ................................................................................. 195
Operation & toolpath parameters................................................................196Common parameters.....................................................................................196
Mill & Router parameters...............................................................................214
Lathe parameters ...........................................................................................281
Wire parameters.............................................................................................309
Machine definition parameters ...................................................................319Machine definition: visual reference .............................................................319
Machine Definition Manager ................................................................. 320
General machine parameters ................................................................. 321
Op. feed rate limits /axis motion/orientation tab............................. 321
Axis feed rate limits tab .......................................................................322
CPlane, WCS, HTC/VTL tab................................................................323
Coolant/Flushing/Options tab...........................................................324
Tool/material libraries tab..................................................................325
Machine dynamics tab ........................................................................326
Component geometry (common) .......................................................... 327
Solid geometry .....................................................................................327
Block geometry ....................................................................................328
Cylinder geometry ...............................................................................329
Extruded geometry ..............................................................................330
Revolved geometry ..............................................................................331
Position/Orientation tab.....................................................................332
Component properties (individual) ....................................................... 333
Automatic tool changer parameters ..................................................333
Chuck parameters................................................................................334
Chuck geometry (parametric) dialog box ..........................................335
Chuck jaws parameters .......................................................................336
Bar stock parameters...........................................................................337
Turret parameters................................................................................338
Turret geometry (parametric) dialog box ..........................................339
Gang tool parameters..........................................................................340
Tailstock parameters ...........................................................................341
Tailstock geometry ..............................................................................342
Tailstock center parameters ...............................................................343
Steady rest parameters........................................................................344
-
8/10/2019 MCAMX5 NCI Parameter Ref
9/459
ix
Linear axis parameters ........................................................................345
Linear axis parameters (programmed motion).................................346
Rotary axis parameters........................................................................347
Tool spindle parameters .....................................................................348
Tool component parameters ..............................................................349
Router spindle parameters .................................................................350
Router spindle position.......................................................................351
Router piggyback spindle parameters ...............................................352
Router piggyback spindle position.....................................................353
Wire guide parameters........................................................................354
Machine definition: list of parameters ..........................................................354
Control definition parameters ......................................................................382Control definition: visual reference...............................................................382
Overall parameters ................................................................................. 382
Tolerance page ....................................................................................... 383
Communications page ........................................................................... 384
Files page ................................................................................................ 385
NC Dialog page (MillLatheRouter) ..................................................... 386
NC Output page ...................................................................................... 387
Misc. Int/Real Values page ..................................................................... 388
Work System page .................................................................................. 389
Tool page (MillRouter) ......................................................................... 390
Tool page (Lathe) ................................................................................... 391
Linear page (MillRouter) ...................................................................... 392
Linear page (LatheMill/TurnWire) ..................................................... 393
Arc page (MillRouter) ........................................................................... 394
Arc page (LatheWire) ............................................................................ 395
Rotary page (MillRouterLathe) ........................................................... 396
Feed page (MillRouter) ......................................................................... 397
Feed page (Lathe) ................................................................................... 398
Feed page (Wire) .................................................................................... 399Cutter Compensation page .................................................................... 400
Machine Cycles page (MillRouterLathe) ............................................ 401
Drill Cycles page (MillRouterLathe) ................................................... 402
Lathe Canned Cycles page (Lathe) ......................................................... 403
Subprograms page ................................................................................. 404
Start/Leads page (Wire) .......................................................................... 405
Cuts page (Wire) ..................................................................................... 406
Corner page (Wire) ................................................................................. 407
Corner page (Wire) ................................................................................. 408
Reverse Cuts Contour page (Wire) ......................................................... 409
Reverse Cuts Auxiliary page (Wire) ........................................................ 4104-Axis Paths page (Wire) ......................................................................... 411
Nocore page (Wire) ................................................................................ 412
Control definition: list of parameters ............................................................412
Machine group parameters .........................................................................429Machine group properties: visual reference..................................................429
Files tab (Machine Group Properties) .................................................... 430
Tool Settings tab (Machine Group Properties) ...................................... 431
Stock Setup tabMill/Router (Machine Group Properties) ................. 432
-
8/10/2019 MCAMX5 NCI Parameter Ref
10/459
x MASTERCAM X5 / NCI & Parameter Reference
Stock Setup tabLathe (Machine Group Properties) ........................... 433
Safety Zone tab (Machine Group Properties) ........................................ 434
Machine group properties: list of parameters ...............................................434
-
8/10/2019 MCAMX5 NCI Parameter Ref
11/459
Quick
chapter 1
Introduction
Welcome to theMastercam X5 NCI & Parameter Reference. This guidedocuments the NCI Gcodes and operation parameters that together
encapsulate Mastercam operations and toolpaths. It serves two mainpurposes:
A reference to all the parameters and NCI Gcodes.
Guidelines and Example:s for reading operation parameters,
including parameters for machine definitions, control
definitions, and machine groups.
This edition incorporates new features for Mastercam X5, introduced in
October, 2010. It includes the additional parameters used by newtoolpaths, as well as new parameter read functions.
Contacting CNC Software
Use the following websites to find information on Mastercam:
For assistance with installing Mastercam, its HASP or NetHASP, or toobtain more information on using Mastercam, contact your local
Mastercam Reseller. If your Reseller is unavailable, you can call CNCTechnical Support Services Monday through Friday, 8:00 a.m.5:30 p.m.,
USA Eastern Standard Time.
When calling CNC Software for technical support, please follow these
guidelines:
Be sure you have already tried to contact your Mastercam
Reseller.
Provide the serial number of your HASP or NetHASP.
Be ready to describe the problem in detail. Write down what
happened, particularly if you cannot call immediately after theproblem occurs.
Be in front of your computer when you call.
If possible, try to duplicate the problem before calling. Our
Support Services technician may require you to duplicate theproblem while you are on the phone.
When you call, have ready a complete description of your
hardware, including your operating system (OS), centralprocessing unit (CPU), graphics card and settings, and
memory.
www.emastercam.com Mastercam global user forum
www.mastercam.com CNC Software, Inc. corporate website
www.mastercamedu.com CNC Software, Inc. Educational
Division website
http://www.emastercam.com/http://www.mastercam.com/http://www.mastercamedu.com/http://www.mastercamedu.com/http://www.mastercam.com/http://www.emastercam.com/ -
8/10/2019 MCAMX5 NCI Parameter Ref
12/459
2 MASTERCAM X5 /NCI & Parameter Reference
Quick
You can also leave a message for CNC Support Services twenty-four hours a day, sevendays a week via our email or website addresses. When sending email, please include:
The serial number of your HASP or NetHASP
Telephone number and contact information where you can be reached
Files required to reproduce an issue, such as .MCX and post files
TIP: Use Mastercams Zip2Go utility to gather Mastercam part data into a
compressed .Z2G file. This utility makes it easy to provide your Reseller or CNCSupport Services with a file attachment that contains the information they need.
Zip2Go scans the machine groups in your current part file and captures informa-
tion such as your Mastercam configuration, machine definition, and post files. For
more information on using Zip2Go, please refer to the Mastercam Help.
Important Contact Information
Address CNC Software, Inc.671 Old Post Road
Tolland, Connecticut, 06084-9970USA
Phone (860) 875-5006
Fax (860) 872-1565
FTP Address ftp://ftp.mastercam.com
Internet Address http://www.mastercam.com
email [email protected]
ftp://ftp.mastercam.com/http://www.mastercam.com/mailto:[email protected]:[email protected]://www.mastercam.com/ftp://ftp.mastercam.com/ -
8/10/2019 MCAMX5 NCI Parameter Ref
13/459
INTRO / Changes for X5 3
Quick
Changes for X5
The following sections summarize the changes that have been made to this documentfor Mastercam X5.
Corrections M L R 81 : Start Drill Cyclechanged U-V-W
M R L 1016 : Additional Miscellaneous Parameters, W 1016 : Additional
Miscellaneous Parameterscorrected parameters 1 & 17
L M R 1018 : Subprogram Start Definition, L M R 1019 : Subprogram End
Definitioncorrected parameters 1 & 3
Corrections to the following parameter numbers: 1502615031; 10214; 13143/
13144; 15240; 12673
Changes to NCI ReferenceSee NCI Referencestarting on page 57.
The following NCI changes were made for Mastercam X5:
New predefined variables have been introduced for NCI 999 line: M R L W 999 :
Start of operationon page 101.
New NCI 20800 line: 20800 : Tool diameter for multiaxis comp in control on page
157.
Parameter added to NCI 1016 line: M R L 1016 : Additional Miscellaneous
Parameterson page 124.
New clmp_op$value : L 903 : Chuck Misc Ops functionon page 95.
Parameter 15 added to Wire NCI 1010 line: W 1010 : Wire Condition Changeon
page 116
New NCI 1031 line: L M R W 1031 Custom reals for transform operationson page
143.
New NCI 1032 line: L M R W 1032 Custom ints for transform operationson page
144.
See New NCI lines for Transform Custom Parameterson page 4for a detailedarticle about implementing this feature and supporting the 1031/1032 lines.
Quick
Quick S
Quick S
Intro
-
8/10/2019 MCAMX5 NCI Parameter Ref
14/459
4 MASTERCAM X5 /NCI & Parameter Reference
Quick
New NCI lines for Transform Custom ParametersOne of the new features in Mastercam X5 is the ability to define custom parameters for
transform operations. You can define up to 4 integer parameters and 4 real (decimal)parameters:
These work in much the same way as other custom parameters for drill operations and
misc operations. The following sections describe how to take advantage of this feature.
-
8/10/2019 MCAMX5 NCI Parameter Ref
15/459
INTRO / Changes for X5 5
Quick
Defining the field labelsThe Control Definition Managerincludes a new Textpage, called Transform Operation.Use it to enter the desired labels for the fields:
Supporting the new parameters in your postTwo new NCI lines have been created to make the values available to your post:
1031 for the custom reals. This calls a new entry postblock, ptransreal$.
1032 for the custom integers. This calls a new entry postblock, ptransint$.
Each line has 10 parameters, even though in X5 only the first four are supported;
parameters 510 are for future use.
See L M R W 1031 Custom reals for transform operationson page 143and L M R W 1032
Custom ints for transform operationson page 144.
-
8/10/2019 MCAMX5 NCI Parameter Ref
16/459
6 MASTERCAM X5 /NCI & Parameter Reference
Quick
New predefined variables have been created to store the values:
trans_mr1$trans_mr10$ for the custom reals
trans_mi1$trans_mi10$ for the custom integers
The new lines will be output following the 1020 lines. The new predefined variables willretain their values until the next 1031/1032 is output. This means that the post writer
needs to reset them between transform operations, if desired.
Note that our generic posts will not contain any default implementation of the newpostblocks. Post writers need who want to use this feature in X5 will need to declare andinitialize the new postblocks from scratch.
New and changed operation parametersSee ParameterReferencestarting onpage 195.
This section lists the new and changed parameters for Mastercam X5. Each table in thissection shows only the new/changed parameters; please go to the Parameter Referencechapter to see the complete tables.
Mill / General parametersSTL_COMPONENT
STL_COMPONENT_01
STL_COMPONENT_02
NC_DIALOG_MILL_CTRL
GROUP_PG2
OP_FEEDRATE_OPTIMIZATION
17952 Entity ID of Mastercam STL entity (new for X5)
17953 Entity ID of Mastercam STL entity (new for X5)
17954 Entity ID of Mastercam STL entity (new for X5)
18255 Not Used (removed for X5)
19122 Send tool to clear position to go home (lathe only)(removed for X5)
15712 Is feed rate optimization on ? (new for X5)15713 Use STL stock model ? (new for X5)
15714 Filename of STL stock model (new for X5)
15715 Draw STLoption is selected (new for X5)
15716 Stock color (new for X5)
15717 STL color (new for X5)
PRM_HF_STOCK (new for X5)
15719 Z clearance (incremental) (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
17/459
INTRO / Changes for X5 7
Quick
PRM_HF_STOCK
PRM_VOL_INFO
15720 Stock (bitmap) tolerance (new for X5)
15721 Draw stockoption is selected (new for X5)
15722 RAM (new for X5)
15723 Check for collisionsoption is selected (new for X5)
15724 Minimum collision volume (new for X5)
15725 Allow tool to cut outside the stock boundaryoption
is selected (new for X5)PRM_VOL_INFO (new for X5)
15726 Minimum feed rate (new for X5)
15727 Maximum feed rate (new for X5)
15728 Maximum air cutting feed rate (new for X5)
15729 Up feed rate scale factor (new for X5)
15730 Down feed rate scale factor (new for X5)
15731 Calculated volume (new for X5)
15740 Highfeed stock model : minimum X coord (new forX5)
15741 Minimum Y coord (new for X5)
15742 Minimum Z coord (new for X5)
15743 Highfeed stock model : maximum X coord (new forX5)
15744 Maximum Y coord (new for X5)
15745 Maximum Z coord (new for X5)
15732 Highfeed reference tool : diameter (new for X5)
15733 Shape: FLAT_TL, SPH_TL, BULL_TL (new for X5)
15734 Corner radius (new for X5)
15735 Depth of cut (new for X5)
15736 Feedrate at depth (new for X5)
15737 Cross-section area of tool (derived value) (new for X5)
15738 Plunge rate (new for X5)
15739 Volume removal rate (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
18/459
8 MASTERCAM X5 /NCI & Parameter Reference
Quick
OP_SMOOTHING_5D
OP_COMMON
PRM_CIRCMILL
15702 lower toolpath smoothing tolerancesame in alldirections (sphere) (new for X5)
15703 reserved for future use (new for X5)
15704 reserved for future use (new for X5)
15705 reserved for future use (new for X5)
15706 reserved for future use (new for X5)15707 Overall smoothing on/off (new for X5)
15708 0 = advanced smoothing, 1 = simplified (new for X5)
15709 filtering level : 0 = no filtering, 1 = low, 2 = medium, 3 =high (new for X5)
15710 Filtering on/off (new for X5)
15711 reserved for future use (new for X5)
15783Indicates whether the tool uses the alternate indexposition: (new for X5)
40282 Enable Semi-Finishpasses option (new for X5)
40283 Enable Finishpasses option (new for X5)
40284 Semi-finish override feed rate (new for X5)
40285 Semi-finish override spindle speed (new for X5)
40286 Use semi-finish override feed rate ? (new for X5)
40287 Use semi-finish override spindle speed ? (new for X5)
40288 Finish override feed rate (new for X5)
40289 Finish override spindle speed (new for X5)
40290 Use finish override feed rate ? (new for X5)
40291 Use finish override spindle speed ? (new for X5)
40292 Entry pass override feed rate (new for X5)
40293 Use entry pass override feed rate ? (new for X5)
40294 Exit pass override feed rate (new for X5)
40295 Use exit pass override feed rate ? (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
19/459
INTRO / Changes for X5 9
Quick PRM_XFORM
PRM_XFORM_MIRROR
PRM_XFORM_ROTATE
40296 High speed entry angle, in radians (new for X5)
40297 Enable High speed entryoption? (new for X5)
PRM_XFORM_MISC_OPS (new for X5)
15772 Remove commentsoption : 1 = strip outcomments from source operations (new for X5)
15746 SourceGeometryor SourceNCI.1 = transform source ops geometry, 0 = transformsource ops NCI (new for X5)
15747 1 = create named views for transformedtoolplanes (new for X5)
15002 Look for pre-defined work offset #s whenxforming the Tplane (True/False) (removed for
X5)
15750 Reference point for X-axis/Y-axis/angle (new for X5)
15751 Reference point for X-axis/Y-axis/angle (new for X5)
15752 Reference point for X-axis/Y-axis/angle (new for X5)
15753 Angle (in degrees) (new for X5)
15782 Maintain start point : 1 = move the start point, 0 = usethe first entity (new for X5)
15059 Method generated (endpoint, midpoint, etc.) (Removedfor X5)
15060 Method generated (endpoint, midpoint, etc.) (Removedfor X5)
15061 T values (Removed for X5)
15062 T values (Removed for X5)
15063 T values (Removed for X5)
15064 T values (Removed for X5)
15065 Selected entities ID numbers (Removed for X5)
15066 Selected entities ID numbers (Removed for X5)
15754 Distance mode : 0 = Angle betweenoption; 1 = Total
sweepoption (new for X5)15755 Type mode : 0 = rotate; 1 = translate-and-rotate (new
for X5)
15047 Method generated: endpoint, midpoint, etc. (removedfor X5)
15048 T values (removed for X5)
15049 T values (removed for X5)
15050 Selected entities ID number (removed for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
20/459
10 MASTERCAM X5 /NCI & Parameter Reference
Quick
PRM_XFORM_TRANSLATE
PRM_XFORM_MISC_OPS
PRM_XFORM_VIEW002
PRM_NESTING
15754 Distance mode: 0 = Distance betweenoption, 1 = Totaldistanceoption(new for X5)
15755 Delta distance: X (new for X5)
15756 Delta distance: Y (new for X5)
15757 Delta distance: Z (new for X5)
15034 Method generated: endpoint, midpoint, etc. (removedfor X5)
15035 Method generated: endpoint, midpoint, etc. (removedfor X5)
15036 T values (removed for X5)
15037 T values (removed for X5)
15038 T values (removed for X5)
15039 T values (removed for X5)
15040 Selected entities ID number (removed for X5)
15041 Selected entities ID number (removed for X5)
15774 Transform operation custom parameters : integer #1(new for X5)
15775 Transform operation custom parameters : integer #2(new for X5)
15776 Transform operation custom parameters : integer #3(new for X5)
15777 Transform operation custom parameters : integer #4(new for X5)
15778 Transform operation custom parameters : real #1 (new
for X5)
15779 Transform operation custom parameters : real #2 (newfor X5)
15780 Transform operation custom parameters : real #3 (newfor X5)
15781 Transform operation custom parameters : real #4 (newfor X5)
15403 View origin (changed to 15749)
15749 View number at time of creation (changed for X5used to be 15403)
15748 Check for duplicates...option is selected when savingscrap (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
21/459
INTRO / Changes for X5 11
Quick
PRM_SRF_RGH_PROJECT
PRM_SRF_RGH_RESTMILL
PRM_SRF_FIN_PROJECT
PRM_2D_HMM
12111 NCI filename (removed for X5)
40241 When All previous operationsare selected : 0 =All groups, 1 = Machine group only, 2 = Toolpathgroup only(new for X5)
12111 NCI filename (removed for X5)
40219 Dynamic pocket Ramp feed rate(new for X5)
40220 Dynamic pocket Dwell before cut spindle speed(newfor X5)
40221 Dynamic pocket entry ramp angle, in radians (new for
X5)40222 Dynamic pocket entry pitch (new for X5)
40223 Gap size above top of stock ( Z clearance) (new for X5)
40224 Additional slot widthfor medial entry ramp (new forX5)
40225 Dynamic pocket Ramp spindle speed(new for X5)
40226 Dynamic pocket Entry method(new for X5)
40227 Use Entry feeds/speeds? (new for X5)
40228 Select Plunge angleor Entry pitch: 0 - use entry pitch,1 - use plunge angle (new for X5)
40229 Select Center helix on pointoption : 1 - option isselected (new for X5)
40230 Optimize cut order within pocket: 1 = optimize cutorder, 0 = use nearest cut (new for X5)
40231 Dynamic pocket Helix radius(new for X5)
40232 Dynamic pocket Trochoidal loop radius(new for X5)
40233 Dynamic pocket Micro lift distance(new for X5)
40234 Rest material : reference cutter Diameter (new for X5)
40235 Rest material : reference cutter Corner radius (newfor X5)
40236 Rest material : Stock resolution(3D bitmap spacing)(new for X5)
40237 Remaining stock Adjustment distance (new for X5)
40238 Previous operation selected for rest material (new forX5)
40239 Rest material defined as : 0-All previous operations, 1-One other operation, 2-Roughing Tool, 3-CAD file, 4-future use (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
22/459
12 MASTERCAM X5 /NCI & Parameter Reference
Quick
PRM_SRF_HMM (X)
40240 Adjustment to remaining stock: 0-none, 1-decrease(to ignore cusps), 2-increase machine cusps, 3-futureuse (new for X5)
40241 When All previous operationsare selected : 0 = Allgroups, 1 = Machine group only, 2 = Toolpath grouponly(new for X5)
40242 Is high efficiency machining available ?? (new for X5)
40243 1 = High Efficiency Machiningoption is selected (newfor X5)
40244 1 = High Radial Chip Thinning Onlyoption is selected(new for X5)
40245 HEM factorvalue (new for X5)
40246 Chip thicknessvalue (new for X5)
40247 SFMvalue (new for X5)
40248 HEM feed rate (new for X5)
40249 HEM spindle speed (new for X5)
40250 HEM Stepover % (new for X5)
40251 Island taper anglevalue (new for X5)40252 1 = Island facingoption is selected (new for X5)
40253 Dynamic contour : Stock thickness(new for X5)
40254 Dynamic contour : Toolpath radius that shaped thestock(new for X5)
40255 Dynamic contour : Stock thickness(new for X5)
40256 Island facing : Overlap % (new for X5)
40257 Island facing : Overlap amount (new for X5)
40258 Island facing : approach distance (new for X5)
40259 Island facing : Stock above islands amount (new for
X5)40260 Number of contour finish passes (new for X5)
40261 Contour finish pass spacing (new for X5)
40299 0 = do not sort machining boundaries; 1 = do sortmachining boundaries (new for X5)
40300 0 = do not sort avoidance boundaries; 1 = do sortavoidance boundaries (new for X5)
40301 1 = use islands to expand machining regions (new forX5)
40302 Dynamic pocket bit flags (new for X5)
40303 0 = single region; 1 = multiple regions (new for X5)
12680 Sets the stock adjustment method (removed for X5)
40241 When All previous operationsare selected : 0 = All groups,1 = Machine group only, 2 = Toolpath group only(new forX5)
40262 OptiRough : Trochoidal loop radius(new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
23/459
INTRO / Changes for X5 13
Quick
PRM_STOCK_MODEL
40263 OptiRough : Additional slot widthfor medial entry ramp(new for X5)
40264 Helix ramp depth (new for X5)
40265 OptiRough : Ramp feed rate(new for X5)
40266 OptiRough : Dwell before cut spindle speed(new for X5)
40267 Enable Stepupoption (new for X5)
40268 Toolpath radius amount (new for X5)40269 OptiRough : Micro lift distance(new for X5)
40270 OptiRough : Back feedrate(new for X5)
40271 Hybrid WS : limiting angle (slope transition) (new for X5)
40272 OptiRough : Ramp spindle speed(new for X5)
40273 Rough cut Cutting method: 0 = Climb, 1 = Conventional(new for X5)
40274 1 = Add holder clearance to bottom of holder (new for X5)
40275 1 = Use core mill as raw passes, 0 = Use area mill as rawpasses (new for X5)
40276 Select Plunge angleor Entry pitch: 0 - use Entry pitch, 1 -use Plunge angle (new for X5)
40277 Use Entry feeds/speeds? (new for X5)
40278 Retract style, as follows: (new for X5)
40279 1 = Stepupoption is selected (new for X5)
40280 Stepup rest boundary calculation method: 0 = Use pocketbitmap subtraction algorithm, 1 = Use pocket boundarysubtraction algorithm (new for X5)
40298 Sliver thickness (stock thinner than this value will vanish);applied when Mill vertical wallsoption is selected (newfor X5)
15758 reserved for stock model operation (new for X5)
15759 reserved for stock model operation (new for X5)
15760 reserved for stock model operation (new for X5)
15761 reserved for stock model operation (new for X5)
15762 reserved for stock model operation (new for X5)
15763 reserved for stock model operation (new for X5)
15764 reserved for stock model operation (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
24/459
14 MASTERCAM X5 /NCI & Parameter Reference
Quick
PRM_SRF_FLOW5AX
PRM_SRF_4AX
PRM_SWARF_5AX
PRM_MSURF_5AX
PRM_SLICE_5AX
PRM_PORT_5AX
PRM_CIRCLE_5AX
PRM_MINTILT
Lathe parametersOP_COMMON_LATHE
15765 reserved for stock model operation (new for X5)
15766 reserved for stock model operation (new for X5)
15767 reserved for stock model operation (new for X5)
15768 reserved for stock model operation (new for X5)
15769 reserved for stock model operation (new for X5)
15770 reserved for stock model operation (new for X5)
15771 reserved for stock model operation (new for X5)
40281 5-axis comp in control value (newfor X5)
40281 5-axis comp in control value (new for X5)
40281 5-axis comp in control value (new for X5)
40281 5-axis comp in control value (new for X5)
40281 5-axis comp in control value (new for X5)
40281 5-axis comp in control value (new for X5)
40281 5-axis comp in control value (new for X5)
40217 Shank and holder clearancestock to leaveseparation from part(new for X5)
40218 Number of tool vectors which cant find a satisfactorytilt, if any(new for X5)
13458 Retract clearance for lathe canned toolpaths (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
25/459
INTRO / Changes for X5 15
Quick
PRM_LROUGH
PRM_LCUTOFF_FS
PRM_LFINISH
PRM_LATHE_EE
PRM_LATHE_EE_VEC003
PRM_LTOOL_INSPECT (new for X5)
13566 Exit distance (new for X5)
13438 Front clearance angle for plunging (note: this is inradians, not degrees) (new for X5)
13565 0 = use Front clearance angleoption for plunging(new for X5)
13458 0= retract at feed rate, 1= rapid retract (not currentlyused)(new for X5)
13460 Retract feed rate (not currently used)(new for X5)
13461 Retract feed rate typeR= per revolution, M= perminute (not currently used)(new for X5)
13582 Rapid retract? True = rapid, false = feed rate. (newfor X5)
13506 Use variable depth?(not currently used)(new forX5)
13507 Variable depth angle (not currently used)(new forX5)
13568 Radius at which to apply the secondary feed rate (new for X5)
13569 Change feed rate at selected radius ?? (new for X5)
13570 Change spindle speed at selected radius ?? (new for X5)
13571 New feed rate to apply (new for X5)
13572 New spindle speed to apply (new for X5)
13573 Is new spindle speed CSS ? (new for X5)
13438 Front clearance angle for plunging (note: this isin radians, not degrees) (new for X5)
13565 0 = use Front clearance angleoption forplunging (new for X5)
PRM_LATHE_EE_VEC003 Entry vector, plunge finish (new for X5)PRM_LATHE_EE_VEC004 Exit vector, plunge finish (new for X5)
13519 Lead-out vector angle (cosine)(new for X5)
13520 Lead-out vector angle (sine)(new for X5)
13521 Arc(new for X5)
13522 Arc(new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
26/459
16 MASTERCAM X5 /NCI & Parameter Reference
Quick
PRM_LATHE_EE_VEC004
13523 Lead-out arc radius(new for X5)
13524 Arc(new for X5)
13525 Lead-out arc sweep (radians)(new for X5)
13526 Use entry/exit vector (True/False)(new for X5)
13527 Use entry/exit arc (True/False)(new for X5)
13528 Amount to extend/shorten the first/last move in
toolpath(new for X5)13529 Extend/shorten first/last move in toolpath enabled
(True/False)(new for X5)
13530 Retraction vector: 1 = rapid, 0 = feed(new for X5)
13531 Exit vector direction mode: 0 = user, 1 = tangent, 2 =perpendicular(new for X5)
13532 Retraction vector: feed rate(new for X5)
13533 Retraction vector feed rate type: R = feed/rev, M =feed/minute, S = same as toolpath(new for X5)
13534 Use auto entry/exit (True/False)(new for X5)
13535 Minimum auto entry length(new for X5)
13536 Adjust contour first/last entities (True/False)(new forX5)
13537 Amount to lengthen/shorten contour first/last entity(new for X5)
13538 Use amount to lengthen/shorten contour first/lastentity (True/False)(new for X5)
13539 Length of line added to contour first/last entity(newfor X5)
13540 Angle of line added to contour first/last entity(new forX5)
13541 Add a line perpendicular to contour first/last entity(True/False)(new for X5)
13542 Lead-out vector angle (cosine)(new for X5)
13543 Lead-out vector angle (sine)(new for X5)
13544 Arc(new for X5)
13545 Arc(new for X5)
13546 Lead-out arc radius(new for X5)
13547 Arc(new for X5)
13548 Lead-out arc sweep (radians)(new for X5)
13549 Use entry/exit vector (True/False)(new for X5)
13550 Use entry/exit arc (True/False)(new for X5)
13551 Amount to extend/shorten the first/last move intoolpath(new for X5)
13552 Extend/shorten first/last move in toolpath enabled(True/False)(new for X5)
13553 Retraction vector: 1 = rapid, 0 = feed(new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
27/459
INTRO / Changes for X5 17
Quick
PRM_LGROOVE
PRM_GROOVE_SHAPE
PRM_LTOOL_INSPECT
13554 Exit vector direction mode: 0 = user, 1 = tangent, 2 =perpendicular(new for X5)
13555 Retraction vector: feed rate(new for X5)
13556 Retraction vector feed rate type: R = feed/rev, M =feed/minute, S = same as toolpath(new for X5)
13557 Use auto entry/exit (True/False)(new for X5)
13558Minimum auto entry length(new for X5)
13559 Adjust contour first/last entities (True/False)(new forX5)
13560 Amount to lengthen/shorten contour first/last entity(new for X5)
13561 Use amount to lengthen/shorten contour first/lastentity (True/False)(new for X5)
13562 Length of line added to contour first/last entity(newfor X5)
13563 Angle of line added to contour first/last entity(new forX5)
13564 Add a line perpendicular to contour first/last entity(True/False)(new for X5)
13458 (not currently used)(new for X5)
13581 (not currently used)(new for X5)
13137 Groove defintion type: 0 = 1 point, 1 = 2 point,
2 = 3 line, 3 = 2 boundary method (chain) (moved forX5)
13363 Spline linearization tolerance (was 10305) (movedfor X5)
13138 Groove cut direction: 0 = OD, 1 = ID, 2 = face,3 = back, 4 = angle (moved for X5)
10307 Groove angle (moved for X5)
13415 1 = Implement Tool Inspectionstop (moved for X5)
13416 Tool inspection position: 0 = Home position, 1 = Userdefined (moved for X5)
13417 1 = Enable stop after Each groove(moved for X5)
13418 1 = Enable stop after Eachdepth cut(moved for X5)
13419 1 = Enable stop after specified Number of plunges(moved for X5)
13420 1 = Enable stop after specified Length of time in cut(see 13457) (moved for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
28/459
18 MASTERCAM X5 /NCI & Parameter Reference
Quick
PRM_GROOVE_ROUGH
13421 1 = Enable stop after specified Length of cut(see13459) (moved for X5)
13422 Number of passesor cuts between stops (moved forX5)
13427 1 = Enable tool inspection comment (moved for X5)
13428 Text string for tool inspection comment (moved forX5)
13429 1 = Enable the Use reference pointsoption on toolinspection retract and approach moves (moved forX5)
13430 Type of retract position for tool inspection: 1 =absolute, 0 = incremental (moved for X5)
13431 1 = Enable retract move in world X axis (typically thisappears in the dialog box as Z) (moved for X5)
13432 1 = Enable retract move in world Y axis (typically thisappears in the dialog box as X or D). (moved for X5)
13433 1 = Enable retract move in world Z axis. (moved forX5)
13434 World X coordinate of tool inspection coordinates(typically this appears in the dialog box as Z). Thiscould be absolute or incremental (see 13430). (movedfor X5)
13435 World Y coordinate of tool inspection coordinates(typically this appears in the dialog box as X or D). Thisis always output as a radius value. This could beabsolute or incremental. (see 13430) (moved for X5)
13436 (not currently used)(moved for X5)(moved for X5)
13437 1 = Enable stop after First plunge(moved for X5)
13457 Length of time (in seconds) between stops, when 13420
= 1 (new for X5)13459 Distance between stops, when 13421 = 1 (new for X5)
13462 Stop between cuts : 1= Only between passesoption,0= Exact length and timeoption (stop between cuts)(new for X5)
13463 Lead-in/out distance for mid-cut tool inspection(when 13462=0) (new for X5)
13464 min distance from end of pass to do tool inspection inmid cut (when 13462=0) (new for X5)
13406 1 = Enable First Plunge Feed Rateoption (moved forX5)
13407 Feed rate of first cut to depth (moved for X5)
13408 Feed rate type of first cut to depth: R = feed/rev, M =feed/minute (note: output is the ASCII code for R or M)(moved for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
29/459
INTRO / Changes for X5 19
Quick
PRM_GROOVPRM_GROOVE_FINISH
PRM_LPLUNGE
PRM_PLUNGE_ROUGH
13240 Finish backoff (moved for X5)
13241 Backoff type: 0 = invalid (pre v9.1), 1 = percent of toolwidth, 2 = distance (moved for X5)
13403 Finish dwell type: 0 = none, 1 = seconds, 2 = revolutions(moved for X5)
13404 Finish dwell time (seconds) (moved for X5)
13405 Finish dwell (revolutions) (moved for X5)
13409 1 = Enable Finish feed rateoption (moved for X5)
13410 Finish feed rate (moved for X5)
13411 Finish feed type: R = feed/rev, M = feed/minute,S=surface finish (micro-in or micron) (note: output isthe ASCII code for R/M/S) (moved for X5)
13412 1 = Enable Finish spindle speedoption (moved forX5)
13413 Finish spindle speed (moved for X5)
13414 Finish spindle speed mode: 1 = CSS, 0 = RPM (moved
for X5)13425 Finish groove overlap position: 0 = User-selected
position, 1 = middle of groove (moved for X5)
13426 Overlap distance: used when overlap is in the middle ofthe groove (moved for X5)
PRM_GROOVE_SHAPE (new for X5)
PRM_PLUNGE_ROUGH (new for X5)
PRM_PLUNGE_FINISH (new for X5)
PRM_LTOOL_INSPECT (new for X5)
13475 Retract type : 1= rapid, 2= at feed rate(new for X5)
13476 Feed rate for retract(new for X5)
13477 Type of retract feed rate : R= per rev, M= per minute(new for X5)
13465 1 = Rough the grooveoption selected (new for X5)
13466 1 = Finish each groove before roughing nextoptionselected (new for X5)
13467 First pass cut direction: 0 = positive, 1 = negative, 2 =center start (not used), 3 = chain direction (new forX5)
13468 Depth of cut (amount) (new for X5)
13469 Depth of cut (% of tool) (new for X5)
13470 Min cut depth (amount) (new for X5)
13471 Min cut depth (% of tool) (new for X5)
13472 Stock to leave in X (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
30/459
20 MASTERCAM X5 /NCI & Parameter Reference
Quick
PRM_PLUNGE_FINISH
13473 Stock to leave in Z (new for X5)
13474 1= Zig-zag cut (new for X5)
13478 Spindle transition dwelltype : 0 = none, 1 = seconds, 2= revolutions (new for X5)
13479 Dwell time (seconds) (new for X5)
13480 Dwell (revolutions) (new for X5)
13481 1 = Cleanup stepsoption selected (new for X5)13482 Maximum step size before cleanup is neededpercent
of tool width (new for X5)
13483 Prevent hanging ringselection :0 = do nothing, 1 =remove in both directions, 2 = remove positive, 3 =remove negative (new for X5)
13484 Step size as % of tool width (new for X5)
PRM_LATHE_EE (new for X5)
13485 Plunge feed rate (new for X5)
13486 Plunge feed rate type : R= per rev, M= per minute(new for X5)
13487 Plunge spindle speed (new for X5)
13488 Plunge spindle speed type : 0 = RPM, 1 = CSS (new forX5)
13489 Turn feed rate (new for X5)
13490 Turn feed rate type : R= per rev, M= per minute (newfor X5)
13491 Turn spindle speed (new for X5)
13492 Turn spindle speed type : 0 = RPM, 1 = CSS (new forX5)
13493 Approach clearancedistance (new for X5)
13494 Stock clearancedistance (new for X5)
13495 Enable Finish grooveoption (new for X5)
13496 Enable back offset number option (new for X5)
13497 Back offset number to use (new for X5)
13498 Stock to leave in X (new for X5)
13499 Stock to leave in Z (new for X5)
13500 Tool deflection backoff distance (new for X5)
13501 Approach clearancedistance (new for X5)13502 Cut direction: 0 = positive, 1 = negative (new for X5)
13503 Plunge dwelltype : 0 = none, 1 = seconds, 2 =revolutions (new for X5)
13504 Dwell time (seconds) (new for X5)
13505 Dwell (revolutions) (new for X5)
PRM_LATHE_EE (new for X5)
13509 Plunge feed rate (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
31/459
INTRO / Changes for X5 21
Quick
PRM_LCUTOFF
PRM_LCAN_ROUGH
PRM_LSTOCK_XFER
PRM_LSTOCK_FLIP
13510 Plunge feed rate type : R= per rev, M= per minute(new for X5)
13511 Plunge spindle speed (new for X5)
13512 Plunge spindle speed type : 0 = RPM, 1 = CSS (new forX5)
13513 Turn feed rate (new for X5)
13514 Turn feed rate type : R= per rev, M= per minute (newfor X5)
13515 Turn spindle speed (new for X5)
13516 Turn spindle speed type : 0 = RPM, 1 = CSS (new forX5)
13517 Prevent hanging ringselection :0 = do nothing, 1 =remove in both directions, 2 = remove positive, 3 =remove negative (new for X5)
13518 Stock clearancedistance (new for X5)
13574 1= get Entry amountFrom stockoption(new for X5)
13575 1= get Retract radiusFrom stockoption(new for X5)
13576 1= get Clearance Cut > Entry amountFrom stockoption (new for X5)
13577 Back Face Stockamount (new for X5)
PRM_LCUTOFF_FS (new for X5)
13438 Front clearance angle for plunging (note: this is inradians, not degrees) (new for X5)
13565 0 = use Front clearance angleoption for plunging(new for X5)
13579 Clearance distance: X (new for X5)
13580 Clearance distance: Z (new for X5)
13219 Move Cplane origin to new stock position (True/False)(removed for X5)
13220 Move Tplane origin to new stock position (True/False)(removed for X5)
13219 Move Cplane origin to new stock position (True/False)(removed for X5)
13220 Move Tplane origin to new stock position (True/False)(removed for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
32/459
22 MASTERCAM X5 /NCI & Parameter Reference
Quick
PRM_LBARFEED
PRM_LPARKTURRET
PRM_LCHUCK_CLAMP
Wire parametersPRM_WIRE_COMMON
13219 Move Cplane origin to new stock position (True/False)(removed for X5)
13220 Move Tplane origin to new stock position (True/False)(removed for X5)
13439 Create X-axis move? (new for X5)
13440 Type of X-axis motion: disabled, move to coordinateposition, move to minimum limit, move to maximumlimit (new for X5)
13441 X-axis coordinate position (new for X5)
13442 Create Y-axis move? (new for X5)
13443 Type of Y-axis motion: disabled, move to coordinateposition, move to minimum limit, move to maximumlimit (new for X5)
13444 Y-axis coordinate position (new for X5)
13445 Create Z-axis move? (new for X5)
13446 Type of Z-axis motion: disabled, move to coordinateposition, move to minimum limit, move to maximumlimit (new for X5)
13447 Z-axis coordinate position (new for X5)
13448 Wait code #1 (new for X5)
13449 Wait code #2 (new for X5)
13450 Wait code #3 (new for X5)
13451 Wait code #4 (new for X5)
13452 Wait code #5 (new for X5)
13453 Wait code #6 (new for X5)
13454 Wait code #7 (new for X5)
13455 Wait code #8 (new for X5)
13456 Tool call type : mill or lathe (new for X5)
13508 For operations created by the cutoff/pickoff C-Hook,this is the index number of the operation (new for X5)
13567 For pickoff operations created by the cutoff/pickoff C-
Hook, this is the stock clearance value (new for X5)
14186 Agie Wire Diameterused to get value to temp pocketop (new for X5)
14187 Agie Wire Diameterused to get finish value to temppocket op (new for X5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
33/459
INTRO / Changes for X5 23
Quick
PRM_WIRE_EE
PRM_WIRE_EE002
PRM_WIRE_EE003
PRM_WIRE_CONTOUR
14188 Stop on tab cut?? (new for X5)
14189 Distance from end of tab to stop (new for X5)
14190 Stop on tab cut?? (new for X5)14191 Distance from end of tab to stop (new for X5)
19192 Stop on tab cut?? (new for X5)
14193 Distance from end of tab to stop (new for X5)
14194 Reset trimmed leads (new for X5)
14195 Reset power pass when taper applied/canceled (new forX5)
-
8/10/2019 MCAMX5 NCI Parameter Ref
34/459
24 MASTERCAM X5 /NCI & Parameter Reference
Quick
-
8/10/2019 MCAMX5 NCI Parameter Ref
35/459
Quick
chapter 2
Working with Parameters
and Toolpath DataMP posts get information about your part in two ways:
Toolpath data. This consists of calculated tool motions, feeds
and speeds, and commands such as spindle on/off and coolant
on/off.
Operation parameters. These are the raw values entered in your
Mastercam dialog boxes when you create toolpaths.
Toolpath data is by far the most important. This information is stored ina generic machine-neutral format called NCI (NC Intermediate). When
you post your operations, Mastercam writes this data to a separateASCII file with a .NCI extension. It is read from here by your post. Every
line in the NCI file is processed automatically.
Operation parameters contain all the data in the actual operation
structures associated with each toolpath operation in Mastercam, plus acomplete record of machine definition, control definition, and machine
group properties. They are used to supplement the information fromthe NCI file. Operation parameters are only available if you explicitly tell
your post to go get them and provide storage for them.
Each piece of NCI data or operation parameter has a unique numbered
code. The following table summarizes the types of information that areavailable and how each is accessed:
Table 1: Where your post gets its data from
Type of data Codes How is it processed? Source of data
Toolpath data
(individual tool
movements, tool
change, planes/
orientation)
01999 Multiple parameters for each code,
automatically saved to predefined
variables.
Each code processed by associated
entry postblock.NCI file
Tool parameters,
material info,comments, other
information about
your operation.
2000029999 All 20000s codes automatically
processed by pparameter$ postblock. Desired parameters must be
individually trapped and saved to user-
defined variables.
Operation
parameters
1000016999; 40000 With pwrttparam$ when pre-read is
enabled; otherwise, with pparameter$.
MCX fileMD/CD/machine
group settings
MD: 1700017999
CD: 1800018999
Machine grp: 1900019999
Use individual commands to call
pmachineinfo$.
-
8/10/2019 MCAMX5 NCI Parameter Ref
36/459
26 MASTERCAM X4 /NCI & Parameter Reference
Quick
Working with NCI toolpath data
The NCI file is organized in two-line groups.
See NCI Gcodesstarting on page 58to see
a complete list of all theNCI Gcodes.
The first line contains a single value. This is theNCI Gcode. It tells Mastercam
what type of command this is and how to interpret the second line. NCI Gcodes
on page 58lists all of the possible NCI Gcodes. The second line contains parameters for the NCI Gcode. For Example:, if the first
line is the NCI Gcode for a linear motion command, the second line wouldcontain the X, Y, and Z coordinates, feed rate, and other information that MP
needs to successfully process the command.
This Example: shows an actual NCI line set for a rapid move (G0):
0
0 2.375 2.375 2.5 2. 0
Definition:
g (NCI Gcode)
1 2 3 4 5 6 (six parameters)
Where:g 0: Linear Move at Rapid Feed Rate (NCI Gcode)
1 Cutter Compensation
2 Final X position
3 Final Y position
4 Final Z position
5 Feed rate settings
6 Contour flag
The post executable stores these parameter values in the appropriate predefined MP
variables, performs additional calculations to generate values for other predefinedvariables that are commonly used for the NCI Gcode type being processed, and performs
any routines enabled by the post customization file for the NCI Gcode typefor
Example:, breaking an arc at its quadrants.
NCI Gcodes are automatically processed by your post. MP automatically selects theproper postblock for you. All the parameters are automatically stored in predefinedvariables, where they can be accessed by any postblock.
Customizing these postblocks is outside the scope of this manual. However, this book
includes a complete reference of all the NCI Gcodes and their parameters in NCI Gcodesstarting on page 58.
-
8/10/2019 MCAMX5 NCI Parameter Ref
37/459
WORKING WITH PARAMETERS AND TOOLPATH DATA / Working with operation (10000s) parameters 27
Quick
Working with operation (10000s)parameters
Operation parameters are numbered from 1000016999, and above 30000. Operation
parameters:See Operation &toolpath parametersstarting on page 196forlists of all the possibleparameters.
contain all the data in the actual operation structures associated with each
toolpath operation in Mastercam.
constitute an operation-by-operation record of the NC parameters as they are
entered in the toolpath dialog boxes, plus a complete record of machinedefinition, control definition, and machine group properties.
values can be integers, real values, or strings.
Beginning with Mastercam X3, operation parameters are directly available to MP. This isa change from earlier versions of Mastercam, in which parameters needed to be written
to an .OPS file before they could be read by the post. MP includes a number of functionsthat you can use to query the value of the parameters that you are interested in.
Beginning with Mastercam X4, operation parameters can also be numbered in the40000s range. This is necessary to accomodate new parameters as new toolpaths and
other functionality is added to Mastercam. In addition, the 30000 series has beenreserved for parameters that might be defined and used by C-Hook developers. At
present, though, there are still very few such parameters, and the term 10000sparameters should be understood as including 30000 and 40000 parameters also.
Continue reading Capturing values for 10000s parametersto learn how to extract theseparameters.
NOTE: The following sections describe how to access parameter values using
thepparameter$postblock. These sections apply to operation parameters in
the 1000016999 range, and above 30000s tool parameters. See Working with
machine definition, control definition, and machine group parameterson page 44tolearn about accessing the 1700019990 parameters.
-
8/10/2019 MCAMX5 NCI Parameter Ref
38/459
28 MASTERCAM X4 /NCI & Parameter Reference
Quick
Capturing values for 10000s parametersSince most parameters do not have predefined variables associated with them, your postneeds to have a routine to extract the parameter values before you can use them.Mastercam provides the following building blocks that you can use to construct these
routines:
See Reading
parameters duringthe NCI pre-readroutineon page 51tolearn about usingpwrttparam$ instead ofpparameter$.
a single common postblockpparameter$, that cycles through all the
parameters and reads their values a numeric variableprmcode$whose value is automatically set to the current
parameter number as it is being read
a string variable sparameter$that holds the parameter value as a single string
For Example:, if you are create a feature-based pocket toolpath, parameter 12780 is thenumber of tools that are used. Soprmcode$would equal 12780, while sparameter$might equal 3, if the FBM operation used three tools.
The postblockpparameter$is called repeatedly for each set ofprmcode$andsparameter$that is read from the MCX file.
To capture a specific parameter value, then, follow this general outline:
Use the reference section of this manual to identify the number of the parameter
you need to capture.
Create a user-defined variable to store the value of each parameter. This should
be either a numeric variable or string to match the parameter.
Modify thepparameter$postblock to trap each desiredprmcode$value, and
store each value in the proper variable.
The following sections give you step-by-step procedures and Example:s for accessingeach type of parameter:
Capturing a string from a 10000s parameter
Capturing the value of a single 10000s parameter
Building a table of parameter values
-
8/10/2019 MCAMX5 NCI Parameter Ref
39/459
WORKING WITH PARAMETERS AND TOOLPATH DATA / Working with operation (10000s) parameters 29
Quick
Capturing a string from a 10000s parameterThe vast majority of operation parameters are numeric values. Common strings such as
CW or CCW are typically encoded as sets of numeric values, such as 0 or 1. However,a few parameters, such as file names, are true string values.
How do I...?How do I...?
Capturing a string from a 10000s parameterSee Operation &toolpath parametersstarting on page 196for acomplete list.
1 Find the number of the 10000s parameter with the desired string.
2 Define a string variable to store the value.
s_my_string : # Stores the string
3 Find thepparameter$postblock and add a line of the following form:
if prmcode$ = 1xxxx, s_my_string = sparameter$
where 1xxxxis the actual number of the parameter.
4 Create a separate line like this for each individual parameter that you wish tocapture.
ExampleExample 1: Getting a string from a 10000s parameter
This Example: shows how to get the name of the NCI file, which is available asparameter 15107.
snci_file # Define a string
pparameter$ # Predefined parameter postblock
if prmcode$ = 15107, snci_file = sparameter$
-
8/10/2019 MCAMX5 NCI Parameter Ref
40/459
30 MASTERCAM X4 /NCI & Parameter Reference
Quick
Capturing numeric values from 10000s parametersTo extract a numeric value from the parameter, first get the string from sparameter$,
then use the rparfunction to convert it to a number. The target of rparis the numericvariable that will store the parameter value. This can be either a user-defined variable or
a predefined variable.
You can also use the fprmfunction to build tables of parameters and efficiently populate
them. For Example:, you can define tables of parameters for different operation types,
and then only populate the tables for operations that are actually posted.
How do I...?How do I...?Capturing the value of a single 10000s parameter
Use the rparfunction to retrieve all the parameters from a 20000s line. It will store
them in an array of user-defined variables.
See Operation &toolpath parametersstarting on page 196for acomplete list.
1 Find the number of the desired 10000s parameter.
2 Create a user-defined numeric variables to store the value.
# Define a numeric variable to store the parameter value
var1 : 0
If you wish, you can also use a pre-defined variable.
3 Go to yourpparameter$postblock and use the rparfunction to retrieve the
values, pointing it to the variable:
if prmcode$ = 1xxxx, var1 = rpar(sparameter$, 1)
ExampleExample 2: Getting the value of a single 10000s parameter
This Example: uses rpartoto get the value of parameter 10042, which is theprogram number.
# Define a numeric variable to store the parameter value
my_prog_num : 0
pparameter$ # Predefined parameter postblock
if prmcode$ = 10042, my_prog_num = rpar(sparameter$, 1)
# Capture the 1st numeric value in the parameter string
How do I...?How do I...?Building a table of parameter values
MP includes a parameter table function that lets you efficiently extract several
parameters and store them in a table. You can then use the fprmfunction to
retrieve values for all of the parameters in a single statement. The parameternumbers do not need to be in consecutive order.
In addition to operation parameters, you can also use this technique to build tables
of machine definition, control definition, or machine group parameters. The onlydifference is:
To get operation parameters, place the fprmstatement in thepparameter$
postblock.
To get MD/CD/group parameters, place the fprmstatement in the
pmachineinfo$postblock.
Quick
-
8/10/2019 MCAMX5 NCI Parameter Ref
41/459
WORKING WITH PARAMETERS AND TOOLPATH DATA / Working with operation (10000s) parameters 31
Quick
Follow these steps:
1 Define a set of variables to hold the desired parameter values. These can be
either strings or numeric variables, or any combination.
2 Define an additional numeric variable to hold the result of the fprmfunction
(this is only a success or fail value, not the value of any specific parameter)
Your set of variables should look something like this:
string1 : 0 # User-defined string variables
string2 : 0
var1 : 0 # User-defined numeric variables
var2 : 0
var3 : 0
result : 0 # Variable to hold fprm return value
3 Use the fprmtblfunction to build the table.
a On the first line, place the fprmtblstatement followed by a number that
identifies the table, and another number that indicates how manyparameters are in the table.
b On the next lines, list the parameter numbers you want to capture, followed
by the name of the variable where the value will be stored. Indent each line.For Example::
fprmtbl 2 5 # Table Number, Size
10000 string1 # Toolpath ID (string)
10001 string2 # Tool String
10002 var1 # Tool Number
10003 var2 # Tool Dia. Offset Number
10004 var3 # Tool Length Number
4 In thepparameter$postblock (orpmachineinfo$, for MD/CD/groupparameters), place the fprmfunction.
The fprmfunction needs to refer to the number of the table, as defined in the
fprmtblstatement:pparameter$ # Predefined parameter postblock
result = fprm(2)
The function returns 1if the table is found, and 0if the table is not found.
Storing parameters by opcode$ valueA common technique is to define tables ofparameters for different operation types, numbering each table with the opcode$of the
operation it refers to. You can then use a statement like this:
pparameter$ # Predefined parameter postblock
result = fprm(opcode$)
to automatically load parameters in the proper table that corresponds to the current
operation.
ExampleExample 3: Building a table of parameter values (fprmtabl & fprm)
The following Example: uses thepmachineinfo$postblock to build a table ofmachine definition parameters.
axis_label : 0 # Axis label - 1=X,2=Y,3=Z
rot_zero : 0 # Rotary zero degree position
rot_dir : 0 # Rotary direction
-
8/10/2019 MCAMX5 NCI Parameter Ref
42/459
32 MASTERCAM X4 /NCI & Parameter Reference
Quick
rot_index : 0 # Index or continuous
rot_angle : 0 # Index step
rot_type : 0 # Rotary type
min_speed : 0 # Minimum spindle speed
maxfrinv : 0 # Maximum feedrate - inverse time - inch
maxfrinv_m : 0 # Maximum feedrate - inverse time - metric
maxfrdeg : 0 # Maximum feedrate deg/min
maxfeedpm : 0 # Limit for feed in inch/min
maxfeedpm_m : 0 # Limit for feed in mm/min
all_cool_off : 0 # First coolant off command shuts off
# ALL coolant options
result : 0 # return value for fprm function
# Machine Definition Parameters
fprmtbl 17000 14 # Table Number, Size
# Param Variable to load value into
17391 axis_label # Axis label - 1=X,2=Y,3=Z
17401 rot_zero # Rotary zero degree position
17402 rot_dir # Rotary direction
17408 rot_index # Index or continuous
17409 rot_angle # Index step
17410 rot_type # Rotary type
17605 min_speed # Minimum spindle speed
17662 maxfrinv # Maximum feedrate - inverse time - inch
17670 maxfrinv_m # Maximum feedrate - inverse time - metric
17665 maxfrdeg # Maximum feedrate deg/min
17643 maxfeedpm # Limit for feed in inch/min
17651 maxfeedpm_m # Limit for feed in mm/min
17101 all_cool_off # First coolant off command shuts off
# ALL coolant options
pmachineinfo$ #Machine information parameters postblock
if prmcode$ >= 17000 & prmcode$ < 18000, result = fprm(17000)
-
8/10/2019 MCAMX5 NCI Parameter Ref
43/459
WORKING WITH PARAMETERS AND TOOLPATH DATA / Working with operation (10000s) parameters 33
Quick
Validating parameters with UpdatePostThe UpdatePost C-Hook included with Mastercam X4 includes routines that search forreferences to specific parameter numbers and validates them against known changes. If
your original post tries to read a parameter with a number that has changed, the
following line will be written to the updatepost.logfile:
PARAMETER DATA - - Possibly incorrect parameter number detected:
17665. Please check the parameter number.
When you see this message, look up the parameter number in the tables in Parameter
Referencestarting on page 195and make sure that your post is actually referencing theparameter that you want.
IMPORTANT: UpdatePost only looks at parameter numbers in fprmtables.
Postlines that are inside postblocksfor Example::
pparameter$
if prmcode$ = 10068, z_stock = rpar(sparameter$, 1)
are not validated. If eitherpparameter$orpwrttparam$is used, you will be
alerted so that you can manually check these postblocks.
-
8/10/2019 MCAMX5 NCI Parameter Ref
44/459
34 MASTERCAM X4 /NCI & Parameter Reference
Quick
Working with 20000s lines
The 20000s parameters are similar to the 10000-series parameters, except that they arewritten directly to the NCI file. The information is written just prior to the actual toolchange NCI Gcodes (1000, 1001 and 1002) as a two line sets of NCI lines. The first line
gives the parameter number, and the second line gives the value of the parameter. ForExample::
See Tool information(20000s parameters)starting on page 150for alist of each 20000-seriesparameter as well as thetype of value(s) it contains.
20001
1/4 FLAT ENDMILL
20002
20003
20004
1 10 1 0 0.25 0. 0. 180. 1 1 6.4176 6.4176 6.4176 2139 1 4
20006
0 50. 50. 25. 25. 0. 0. 0.
20007
0. 2. 3. 2.5 0.25 2. 1. 0 100. 25. 0
20008
0. 0. 1. 0 0. 0. 0 0. 0.
Traditionally, these are called tool information parameters because that was their sole
original purpose, but in more recent versions of Mastercam their use has been expandedto include other types of data. In general, they are now used for any information about an
operation that MP needs to read from the NCI file, instead of retrieved from the MCX filelike other operation parameters.
The 20000 lines include integers, real values, or strings. In the Example: above, the 20001parameter contains only a single value, a string that is the tool name. However, the 20004parameter, which encodes the tool definition, contains a series of 16 values. Each value
represents a different tool definition parameter.
Continue reading Capturing parameters from 20000s linesto learn how to extract these
parameters.
NOTE: Beginning with Mastercam X, 20000s lines are also written for null tool
changes; in previous versions, these were only written for actual tool changes.
-
8/10/2019 MCAMX5 NCI Parameter Ref
45/459
WORKING WITH PARAMETERS AND TOOLPATH DATA / Working with 20000s lines 35
Quick
Capturing parameters from 20000s linesUnlike the 01999 NCI Gcodes, parameters written out with a 20000s line do not havepredefined variables associated with them. This means that your post needs to have aroutine to extract the parameter values before you can use them. You can use many of
the same building blocks that are available for extracting 10000s parameters to extract200000s parameters:
a single common postblockpparameter$, is automatically called as each20000s line is read from the NCI file.
a numeric variableprmcode$whose value is automatically set to the 20000s
NCI Gcode as it is being read.
a string variable sparameter$that holds the parameter value(s) as a single
string.
To capture a specific parameter value, then, follow this general outline:
Use the reference section of this manual to identify the specific number of the
20000s line you need to capture.
Create a user-defined variable to store the value of each parameter. This should
be either a numeric variable or string to match the parameter.
Modify thepparameter$postblock to trap each desired NCI value, and storeeach parameter value in the proper variable.
Some 20000s lines are accompanied by only a single string value, while others haveseveral numeric variables. The following sections give you step-by-step procedures and
Example:s for capturing each type of parameter:
Capturing a string from a 20000s line
Capturing numeric values from a 20000s line
-
8/10/2019 MCAMX5 NCI Parameter Ref
46/459
36 MASTERCAM X4 /NCI & Parameter Reference
Quick
Capturing a string from a 20000s lineUse thepparameter$postblock to capture strings that are written out to the NCI file on
20000s lines. Follow these steps:
How do I...?How do I...?Capturing a string from a 20000s line
1 Find the number of the 20000s line with the desired string.
See Tool information (20000s parameters)starting on page 150for a complete
list.
2 Define a string variable to store the value.
s_my_string : # Stores the string
3 Find thepparameter$postblock and add a line of the following form:
if prmcode$ = 2xxxx, s_my_string = sparameter$
where 2xxxxis the actual number of the 20000s line.
4 Create a separate line like this for each individual parameter that you wish to
capture.
ExampleExample 4: Getting a string from a 20000s line
This Example: shows how to get the name of the tool plane, which is output on line
20012.
stool_plane # Define a string
pparameter$ # Predefined parameter postblock
if prmcode$ = 20012, stool_plane = sparameter$
# Capture the parameter string
-
8/10/2019 MCAMX5 NCI Parameter Ref
47/459
WORKING WITH PARAMETERS AND TOOLPATH DATA / Working with 20000s lines 37
Quick
Capturing numeric values from a 20000s lineRecall that 20000s lines can contain a series of values, which can be either integer or real
values. In this case, the value of sparameter$will be a string that contains a series ofvalues separated by spaces. For Example:, this is what is written to the NCI file for a 20004
line (20004 contains tool definition parameters):
20004
1 10 0 0 0.2 0. 0. 45. 1 1 0. 0. 0. 0 8 4
To use these values, you must capture the string and pull out the desired values. There
are separate functions for each of the following tasks:
capturing all of the values from the string
capturing a single value from the string (X3 or later)
capturing a range of values from the string (X3 or later)
Each is described in the following Example:s.
NOTE: The functions to capture a single parameter and a range of parameters
were introduced in Mastercam X3. If you are using Mastercam X2 or earlier, you
need to capture all of the parameters. Follow the steps in Capturing all the param-
eters in a 20000s line and storing them in an array.
How do I...?How do I...?Capturing all the parameters in a 20000s line and storing them in an array
Use the rparfunction to retrieve all the parameters from a 20000s line. It will storethem in an array of user-defined variables.
1 Go to Tool information (20000s parameters)starting on page 150.
a Look up the desired 20000s line number.
b See how many values are included in the output string.
2 Create a series of unique, user-defined numeric variables to store the resultsone variable for each value in the string.
# User-defined numeric variables
# (This creates an implied array)
var1 : 0
var2 : 0
var3 : 0
var4 : 0
var5 : 0
3 Go to yourpparameter$postblock and use the rparfunction to retrieve the
values, pointing it to the first variable in the list:
if prmcode$ = 2xxxx, var1 = rpar(sparameter$, 5)where:
2xxxxis the actual number of the 20000s line
var1is the first variable in your array
5is the actual number of variables in your array
Quick
-
8/10/2019 MCAMX5 NCI Parameter Ref
48/459
38 MASTERCAM X4 /NCI & Parameter Reference
Quick
ExampleExample 5: Capturing all the values from a 20000s line (rpar)
This Example: uses rparto get the aggregate head parameters from the 20008 line.There are 8 values output with this particular line.
# Numeric variables to hold '20008' agg head parameters
# Do NOT change the order of these (9) variable definitions !
hd_ax_x : 0 # Head axis in X
hd_ax_y : 0 # Head axis in Y
hd_ax_z : 0 # Head axis in Z
hd_body_typ : 0 # Head body type
hd_body_dia : 0 # Head body diameter
hd_body_len : 0 # Head body length
stat_body_typ : 0 # Station body type
stat_body_dia : 0 # Station body diameter
stat_body_len : 0 # Station body length
pparameter$ #Read operation parameters
if prmcode$ = 20008, hd_ax_x = rpar(sparameter$, 8)
How do I...?How do I...?Capturing a single parameter from a 20000s line
Use the rparsnglfunction to retrieve a single parameter from a 20000s line. It will
be stored in a user-defined variable.
NOTE: This procedure is used for retrieving a single numeric value from a line
with several values. To capture a single string, see Capturing a string from a 20000s
lineon page 36.
1 Go to Tool information (20000s parameters)starting on page 150.
a Look up the desired 20000s line number.
b Identify which parameter in the string contains the desired value.
2 Create a numeric variables to store the value.
# User-defined numeric variables
var1 : 0 # parameter value
3 Go to yourpparameter$postblock and use the rparsnglfunction to retrieve
the values, pointing it to the first variable in the list:
if prmcode$ = 2xxxx, var1 = rparsngl(sparameter$, 9)
where:
2xxxxis the actual number of the 20000s line
var1is the variable where you want to store the value
9is the location of the value in the parameter string
Quick
http://-/?-http://-/?-http://-/?-http://-/?-http://-/?- -
8/10/2019 MCAMX5 NCI Parameter Ref
49/459
WORKING WITH PARAMETERS AND TOOLPATH DATA / Working with 20000s lines 39
Quick
ExampleExample 6: Getting a single number from a 20000s line (rparsngl)
This Example: uses the rparsnglto get the station body length from the 20008 lineof aggregate head parameters. Since it gets the desired value directly, there is noneed for the predefined array. You only need to define a single variable for the value
you are retrieving.
gauge_length : 0 #Station body length
pparameter$ #Read operation parameters
if prmcode$ = 20008, gauge_length = rparsngl(sparameter$, 9)
How do I...?How do I...?Capturing a range of parameters from a 20000s line
Use the rparsprmfunction to retrieve a range of parameters from a 20000s linefor Example:, if there are 9 parameters output on a 20000s line, you can use this
function to capture parameters 37. The values will be stored in an array of user-defined variables. Follow these steps:
1 Go to Tool information (20000s parameters)starting on page 150.
a Look up the desired 20000s line number.
b Identify which parameters in the string contain the desired values. Theseshould be a continuous block of values.
2 Create a series of unique, user-defined numeric variables to store the resultsone variable for each value in the range that you are capturing.
# User-defined numeric variables
# (This creates an implied array)
var1 : 0
var2 : 0
var3 : 0
var4 : 0
var5 : 0
3 Go to yourpparameter$postblock and use the rparsprmfunction to retrieve
the values, pointing it to the first variable in the list:
if prmcode$ = 2xxxx, var1 = rparsprm(x, y)
where:
2xxxxis the actual number of the 20000s line.
var1is the variable where you want to store the value.
xis the index position of the first parameter in sparameter$ that you want
to retrieve. yis the total number of parameters to retrieve. This should equal the
number of variables that defined in your array.
ExampleExample 7: Getting a range of numbers from a 20000s line (rparsprm)
This Example: uses rparsprmto get the fourth through seventh values from the20007 line. Using rpar, you would have needed to define seven variables to store all
-
8/10/2019 MCAMX5 NCI Parameter Ref
50/459
40 MASTERCAM X4 /NCI & Parameter Reference
Quick
seven values. Using rparsprm, you only need to define variables for just the fourvalues that you want to retrieve.
# User-defined numeric variables
# (This creates an implied array)
tl_shoulder_length : #Shoulder length
tl_arbor_diam : #Arbor diameter
tl_holder_diam : #Holder diameter
tl_holder_length : #Holder length
pparameter$ #Read operation parameters
if prmcode$ = 20007, tl_shoulder_length = rparsprm(4, 4)
-
8/10/2019 MCAMX5 NCI Parameter Ref
51/459
WORKING WITH PARAMETERS AND TOOLPATH DATA / Working with 20000s lines 41
Quick
Lathe tool inspection commentsMastercam X4 introduced a tool inspection feature for lathe grooves. This lets you retract
the tool between depth cuts or between grooves to inspect or change the tool. ForExample:, in this toolpath, the tool inspection has been programmed between grooves:
The NCI output for this feature has two components.
The retract move to the inspection position. This is indicated by the same 70000
cur_cflag$(rpd_typ$ = 7) used for the Mill tool inspection feature in thesurface high-speed toolpaths.
A comment that is written to the NCI just before the 70000 move. A new 29999
NCI code has been created for this comment.
To implement this feature in your post, therefore, you need to process both elements.
Unlike other 20000s lines, which are are written to the NCI before the tool change line,the 29999 is written in the middle of the toolpath, at the point where the tool inspection
is to take place.The following picture shows the NCI for a lathe groove toolpath, with and without the
tool inspection. You can see how the retract move and new codes are implemented.
The first step in processing the tool inspection move is to trap the 70000 value. This
needs to be done in the entry postblocks for both linear and rapid moves. For posts based
-
8/10/2019 MCAMX5 NCI Parameter Ref
52/459
42 MASTERCAM X4 /NCI & Parameter Reference
Quick
on Mastercams generic posts, these are typicallyprapidoutandplinout. Thefollowing Example: shows how this can be done.
ExampleExample 8: Modifying plinout/prapidout to trap a tool inspection move
The highlighted lines show the new lines that were added to process the flag for a
tool inspection. These lines will trap both mill and lathe tool inspection codes. Thetool inspection code triggers a call to a new postblock,ptool_insp, that willactually process the move.
prapidout #Output to NC, linear movement - rapid
pcan1, pbld, n$, psgplane, pexct, psgcode, psccomp, pwcs,
pxout, pyout, pzout, pcout, pscool, strcantext, e$
if rpd_typ$ = 7, ptool_insp #Tool inspection point
plinout #Output to NC, linear movement - feed
pcan1, pbld, n$, psgplane, sgfeed, pexct, psgcode, psccomp,
pwcs, pxout, pyout, pzout, pcout, pfr, pscool, strcantext, e$
if rpd_typ$ = 7, ptool_insp #Tool inspection point
It is a good practice to create a new postblock to hold the processing logic for thetool inspection. In this Example:, the new postblock isptool_insp.
The tool inspection postblock needs to do the following:
Since the lathe tool inspection uses the same 70000 flag as the mill/HST tool
inspection, mill-turn posts need to be able to distinguish between a mill and
lathe tool inspection.
Handle the 29999 comment.
When the tool returns to the part, restore the machine operation mode that was
in effect before the inspection. At a minimum, this will include the motion mode
and feed rate; coolant state; and work offset.
Example 9shows how this postblock was implemented in the MPLFAN.PST generic
post.
ExampleExample 9: Tool inspection postblock
This Example: outputs an M00 at the inspection point. This should be customizedto the proper code for your machine.
It also outputs an additional default comment in addition to the one entered withthe tool inspection toolpath. This is only a place holder indicating that this is ageneric solution that has not been