Share this

Mastercam software post-processing files and their configuration methods

2026-04-06 08:24:31 · · #1
I. Introduction Mastercam is a widely used CAD/CAM/CAE software package that uses a graphical interactive automatic programming method to generate NC programs. Interactive programming is a human-computer dialogue programming method. Programmers repeatedly interact with the computer based on on-screen prompts, selecting menu items or answering computer questions. After answering all questions, the NC program is generated. The automatic generation of the NC program is controlled by the software's post-processing function. Different machining modules (such as turning, milling, wire cutting, etc.) and different CNC systems correspond to different post-processing files. Which post-processing file the software currently uses is set during software installation. However, before programming in the specific application software, it is generally necessary to modify and set the current post-processing file to conform to system requirements and the user's programming habits. Some users, due to a lack of understanding, fail to modify the post-processing file, resulting in redundant content or missing phrases in certain fixed places in the generated NC program. Therefore, manual modification of the program is necessary before transferring it to the CNC machine tool. Failure to correct all errors may lead to accidents. For example, a machine tool's control system uses G54 workpiece coordinate system positioning and G90 absolute coordinate programming. The generated NC program must have G54/G90 settings. If the post-processor file is set to G55/G91, each generated program will contain G55/G91, but not necessarily G54/G90. If this isn't manually corrected during machining, it will inevitably cause machining errors. II. Mastercam Software Post-Processing Files A post-processing file, or simply post-processor file, is a file that users can modify by answering questions. Its extension is .pst. Before using Mastercam software's automatic programming function, this file must be edited to generate an NC program that conforms to the needs of a specific controller and the user's habits when the post-processor is executed. In other words, the post-processor can define the NC program of a controller in the format used by that controller. Taking the FANUC series post-processor as an example, it can be defined in the format commonly used by FANUC 3M controllers or FANUC 6M controllers, but it cannot be used to define other series of controllers. While the content of post-processor files varies slightly across different series, their format and main body are similar, generally including the following sections: 1. Annotation: Provides a general introduction to the post-processor file and its configuration methods. 2. Questions: This is the main part of the post-processor file. FANUC series post-processor files contain 200 questions, and the answers to these questions will determine the format of the output NV program. 3. Commands: Commands affect the variables that follow them. For example, the `oldvars` and `newvars` commands, when answered in question 3, if written before the tool number variable `t`, will call the previous tool number when using `oldvars`, and the currently used tool number when using `newvars`. 4. Variables: Provides the definitions of the various variables used in the "Questions". FANUC series post-processor files define 26 variables, such as `prog-n` = program number, `f` = feed rate, `s` = spindle speed, `t` = tool number, etc. III. Post-processing file setup method 1. General rules for post-processing file editing Editing and setting the post-processing file only requires answering the questions in part (4). Each question in the PST file has a number before it and a decimal point after the number. If there is no number before the question, then the question will be ignored when performing post-processing. When answering questions before number 20, the answer text needs to be entered on the next line after the question. Moreover, the answer content can include multiple lines. Questions after number 20 all have a question mark and the answer is written directly after the question mark without a line break. These types of questions are often answered with "Y" or "N". When answering questions, variables cannot be enclosed in quotation marks, while strings must be enclosed in quotation marks (such as "G91 G28 Z0 M05"). The text in the quotation marks will be written into the program as is. Variables and characters must be separated by commas. 2. Use of variables The definitions of variables are explained at the beginning of the post-processing file; their meanings can be found by referring to this section. Once a variable is used when answering a question, it will have a definite meaning in the generated NC program. For example, the variable `spindle-on` is defined as M03 when the spindle speed is positive or 0, and M04 when it is negative. If this variable is used when answering a question, M03 or M04 will be written in the corresponding part of the NC program. The variable `prog_n`, if written in question 1 or 2, will take effect in the program given during NC program planning. The variable `First-tool` is used to call the number of the first tool used in the program; this variable is typically used... When the program ends, the tool in use is changed to the number of the first tool, which will then be used in the next program execution. `next-tool` is used for tool numbers without a "T" prefix; this variable allows you to select another tool for tool changing before the tool is called. The variables `xr`, `yr`, and `zr` define the X, Y, and Z coordinates for rapid positioning in the program. `Xh`, `yh`, and `zh` specify the position of the machine origin, typically used for tool changing and returning the tool to the machine origin at program end. `prey-X`, `prey-Y`, and `prey-z` define the previous X, Y, and Z coordinates of the tool. See the description at the beginning of the document for the definitions of other variables. 5. Post-processing file setting method Most of the problems in the post-processing file generally do not need to be modified. When using it, usually only a few fixed problems need to be edited. The following uses the FANUC series .PST file as an example to illustrate the setting method. (1) The answer to problem 0 should be a string. For the FANUC control system, it must be set to "%". (2) The answer to problems 2, 4 and 5 is illustrated using the answer to problem 2 as an example. Assuming that the program name given when setting NC parameters is testl, the program number is l234, the sequence number starts at 100 and the increment value is 2, the tool number is 0l, and the spindle speed is l 500r/min, then the .PST file format and the generated NC program are compared as follows. (3) Problem 6 is used to set the variables used when the milling state number does not change. The variables used are the same as those used in problems 2, 4 and 5. (4) Problems 7, 8 and 9 are the text set in Text1, 2 and 3 on the NC parameter screen. (5) Question 36 requires specifying the number of decimal places allowed after the feed rate value. If -1 is written, it will be an integer. (6) The scaling factor set in Question 37 can make the feed rate written in the NC program change according to this factor. (7) Question 38 requires setting the magnitude of the fixed feed rate. (8) If Question 42 is set to e (meaning that R is used in the circular interpolation instruction), Question 43 must be answered as "y", then the system will automatically be greater than 180 in post-processing. The circular arc will be broken into two segments. (9) Questions 50 to 55 are to make the Cannedcycles instruction (G81 to G89) in the controller used in the NC program. (10) Question 70 is used to set the accuracy when lines connect to lines or lines to arcs in the geometry. Its value should ensure that the connecting shape can be automatically connected. (11) Questions 81 to 89 are parameter settings used for the transmission and reception of NC programs and CNC machine tools. (12) When the user uses the next-tool variable during tool change, question 120 should be answered "y". When the post-processing system executes, the computer must first create a tool table; otherwise, the computer cannot know which tool should be moved to the next tool position when the next tool is needed for tool change. (13) Questions 190-196 are default values ​​used to set the toolpath display. (14) The miscellaneous variables in questions 201-510 are used in the online cutting post-processing system. IV. Conclusion Editing and setting post-processing files are necessary for CAD/CAM software. However, general users often overlook this and modify the program after each NC program is generated, which not only wastes time but also easily leads to errors and accidents. This article analyzes and discusses the post-processing files of Mastercanl software and introduces its editing and setting methods.
Read next

CATDOLL 136CM Vivian (Customer Photos)

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22