MasterCAM Post Processor Reference Guide

An MP (Mastercam Post) post processor is a combination of three (or four) files:
‹ the post processor customization file (.PST)
‹ the post processor customization text file (.TXT)
‹ the post processor executable file (.DLL)
‹ the post processor ‘binned file (.PSB) this is usually only with some “high end” post
The MP post processor customization file (*.PST) is written in CNC Software, Inc.’s proprietary scripting language, the MP language, which is a programming language designed to enable someone with limited programming experience to customize a post processor for use with Mastercam. The MP post processor executable (*.DLL) is a program that interprets the MP post customization files (*.PST and *.PSB), processes the Mastercam intermediate file (*.NCI) and produces the NC output file
(*.NC)
The MP post processor is a combination of a configuration-type post, where all output is controlled in the post executable by a series of questions the user answers to control output, and a language-based post. Although a language-based is more difficult to use than configuration-type post , it is also more powerful because there are no restrictions placed on the post writer by the capability of the post executable. Using the MP language, the post writer can accomplish practically any task in the post processor.

Changes to the MP Post
This chapter describes new post writing techniques appropriate for use with modern posts, and also lists changes made to recent releases.

Post Debugging Techniques
Pre-defined post debugging switches
The post processor contains several pre-defined switch variables that can be used to display a listing of the NC code and/or append useful information to the NC output file. The variable bug1 provides the option of listing the NC file after post processing. The variables bug2, bug3 and bug4 will help you debug the post processor by adding extra information into the NC output file. This output is essential for tracing the code execution if debugging the post becomes necessary.

Using Numbered Questions
Numbered questions make it easy for a post writer to customize Mastercam to work with a particular machine/control combination. They can establish default values and control various aspects of how Mastercam operates.
Numbered questions are a list of questions that appear at the end of the .PST file. Each question takes a “y” or “n” answer, a value, or a string response. For example, the default communications parameters (data rate, parity, etc.) to be used with a specific machine can be stored in the post and loaded into Mastercam when the post is loaded. Numbered questions can also enable and disable certain features in Mastercam. For example, question #3023 (“Enable canned threading?”) is a Lathe question that enables or disables canned threading in lathe. If the answer is “n” (for no), the user will not be able to access the canned threading option in the lathe threading toolpath when this post is loaded. This would be desirable for a situation where canned threading cycles are not supported by the lathe or the post processor.
When you run Mastercam, Mastercam reads the predefined numbered questions for the post selected at startup and makes the changes indicated by the answers. Mastercam also reads the predefined numbered questions whenever a different post processor is selected from a change post option in Mastercam.
The post can also read numbered questions, which makes it possible to set or modify specific values or strings used by the post. It will not read them automatically, but the post writer can use a string (sq1234, where sq is the prefix and 1234 is the number of the question to be read) to store the response to a question as a string. See Using the post to access the response to a numbered question in this chapter for more information.
Numbered questions may be predefined or user-defined. The post can read predefined numbered questions as well user-defined numbered questions. User-defined questions can only be read by the post customization (PST) file.

Using the Post Text File
The post text file allows the post to customize the text prompts on dialog boxes and the menus in Mastercam. The main use of the post text file is to customize the Miscellaneous Values parameter page, the Drill Cycle parameter pages and the Canned Text dialog for the specific options the post customization file offers the user.
Each post customization file (.PST file) has an associated post text file (.TXT file). When a post customization file is loaded, Mastercam automatically searches for a file with the same name as the .PST, but with the .TXT filename extension. The post text file must reside in the same directory as the post customization file.

Postblocks
A postblock is a labeled block, or series of lines, of MP language code in the post customization file (.PST file). The post executable file (the .DLL file) interprets the code in the postblocks to create a list of instructions that produce the NC output, perform calculations and call other postblocks. These blocks of MP language code produce the NC output.

Preparatory postblocks are postblocks that are called during a preparatory reading (processing) of the NCI file. This preparatory processing allows information about the tool changes and toolpaths contained in the NCI file to be captured prior to the normal processing of the NCI file. Although this is commonly used to create a tool table that is then written to the head of the NC output, preparatory processing is much more powerful than simply creating tool tables.

Preparatory.Postblocks
Numeric.Variables
String.Variables
Functions
Formulas
NCI.File
Getting.the.Next.Move
Drill.Cycles
Cantext
File.Manipulation
Prompt.Questions
Comments
Intro.to.the.MP.Post.Guide
Subprograms
Buffer.Files
Parameter.Information
Intersection.Function.Rotary.Processing
Breakup.of.motion
Mill_Turn.Applications
Lathe.Canned.Cycles
Lathe.Threading.Cycles
4.Axis.Wire.Output.Processing
Wire.axis.to.axis.Processing
Graphics.Functions
Intro.to.the.MP.Post.Guide
Postblocks
Formulas
Numeric.Variables
String.Variables
NCI.File
Parameter.Information
head-block-station

DOWNLOAD

Hidden content: ******, you can view after buying!

Price:  CADCoin

You need first!

If you have any questions, please feel free to EMail me: admin@cadfamily.com

You Might Also Like
Leave a Reply