How to define custom MAJOR and MINOR words in CAM-POST

There are certain situations when the cutter location data produced by a CAM system includes statements that are not recognized by the post-processor. These custom CL commands (or post-processor instructions) are either inserted “manually” by the programmer, or generated by a customized template (such as a PPTable, in the case of CATIA).

In order to set the post-processor to execute non-standard commands, two steps are required: First, the post must take into account all the non-standard words, so it can read the CL file without generating unknown syntax errors. Second, the post must capture each custom command with a User-Defined Syntax macro and generate the expected output.

The “Tools” pull-down menu on the top menu bar of CAM-POST’s Questionnaire provides a “Words Manager” option. Use this option to access the words customization dialog.

The Words Manager dialog lists all the MAJOR and MINOR words supported by the post. Two radio buttons allow you to switch between Major and Minor words.

To add new words, click the “New” icon and enter the word along with the unique numeric code associated with it. In order to avoid conflicts with existing words, use codes 1901 through 1999 for major words, and codes 900 through 999 for minor words. In the example below, the major word VACUUM was added using the code 1901. When done, VACUUM will appear on the list of available major words.

Upon exiting the Words Manager dialog (by pressing OK), all new words are written to the “words.dat” file in the CAM system interface kit.

Next, write a User-Defined Syntax macro on the word VACUUM to define the output required for two non-standard commands: VACUUM/ON should generate a M144, and VACUUM/OFF should generate a M145.

Here is the User-Defined Syntax macro:

VACUUM/$P1(ON,OFF)
AUXFUN/$FIF($P1.EQ.ON,144,145)

Benefit to User
Accommodate non-standard MAJOR and MINOR words produced by the CAM system.

For more information or comments, please do not hesitate to contact Phil at TechTipTuesday@icam.com