How to control Left or Right 3D cutter compensation from Mastercam
Most CNC controls do not support regular Cutter Diameter Compensation (G41/G42) for 3D toolpaths. The only way to compensate for a worn 3D finishing tool is to use 3D Cutter Compensation. On FANUC controls, this feature is supported with the following codes: G41.2 (3D COMP LEFT) and respectively G42.2 (3D COMP RIGHT). The subsequent motion blocks will include the I, J and K components of a unitized vector normal to the 3D surface being cut.
CAM-POST supports 3D tool compensation using the following commands:
These codes are dynamically generated by CAM-POST when converting the NCI format produced by Mastercam.
In order to output the G41.2 or G42.2 codes based on the direction of compensation set in Mastercam, three settings are required when configuring the post. First, the G-code register must be defined to support a decimal point. Second, the “3D Tool Comp” section of the Questionnaire must be defined a certain way. Finally, a User Defined Syntax macro has to be added in the “Customization” section of the Questionnaire.
1. Register definition:
The register used for G-codes must be defined with up to 2 integer places and 1 decimal place. The decimal point must be set as optional, so that it will be output only if necessary. The resulting format of the G-code register will be: ‘Gs2f1’.
2. The “3D Tool Comp” section:
The Control Description / Tool and Fixture Compensation / 3D Tool Comp section must be defined as illustrated below. Note the answer to question #271.
3. User Defined Syntax Macro:
Write the following User-Defined Syntax macro on the major word #1001:1016 (Additional Miscellaneous Parameters):
Benefit to User
Control the direction (left / right) for applying 3D compensation using codes G41.2 / G42.2 on FANUC controls.