User Parameters in PP Instructions

task target This task shows how to define a PP instruction that references user parameters created in the design part, and output the result in the APT source during the PP instruction processing.
scenario 1. Create PP instruction 

The PP instruction created in the NC program will contain the name of the parameters to be processed. To be able to identify these parameters, there is a syntax rule.

For example, it is not easy to identify the parameters to process if the PP instruction contains: 

INSERT GLengthZHeight

To be consistent with the other NC parameters, the %( characters are used to identify the beginning of the parameter and the ) character is used to identify the end of the parameter.

Refer to PP Tables and Word Syntaxes for more information.

Select PP Instruction . Enter the syntax in the Post-Processor Instruction dialog box that appears.

Click OK to create the PP instruction in the program.

2. Generate APT source

During APT code generation, when the PP instruction is processed, the batch program will retrieve the parameters to process. 

Then a search is done in the design parts related to the Part Operation being processed to find the user parameters and corresponding values. These values will be output in the APT source code.

The APT source file generated corresponding to this example (if Length is 80.5mm and Height 75.8mm) will be the following:

PPRINT OPERATION NAME : Post-Processor Instruction.1
$$ Start generation of : Post-Processor Instruction.1
INSERT G80.5 Z75.8
$$ End of generation of : Post-Processor Instruction.1

The name of the parameter to be retrieved during the processing is the name of the parameter that is created or displayed with the f(x) function. In the case of a Product referencing several parts, the parameter Length of Part1 is identified by Part1\Length. This name will have to be used in the PP instruction definition.

The main advantage of this is that the user parameters can be added in the PP table in order to reuse them later, or in other NC commands.

end of task