How to support multiple machines with the same post-processor

It is common for many manufacturers to acquire multiple similar machine tools from the same CNC machine vendor. Essentially, if multiple machines have the same kinematics and are equipped with the same control model, NC programs become 100% interchangeable, which increases considerably the shop floor’s programming flexibility.

There is, however, one detail which significantly differentiates machine models that are otherwise identical: the axes travel envelopes.

Programmers’ expectations of a good post-processor include the ability to check for overtravel situations (either linear or rotary) and automatically correct them by choosing the alternate kinematic solution, if one exists. As a result, many shop floors resort to purchasing or configuring a separate post-processor for each machine, ending up with several posts which are virtually identical, except for travel limits settings. This solution is not only costly, but also makes the post maintenance and occasional edits redundant and repetitive.

If needed, CAM-POST lets you configure a unique post-processor to support any number of almost identical machines, by setting the travel limits at run time, based on a user selection. The selection is made in a dialog box featuring a pull-down list of all the available options.

The example below customizes an existing post-processor to support three different Haas 5-axes milling centers with different X-axis travel limits. It outlines the steps for configuring a custom dialog box and a Machine Startup macro.

1. In the CAM-POST Questionnaire module, expand the Post-processor Customization node and select the Dialog Editor option.

2. Create a new dialog by clicking the Add button at the top of the dialog editor.

 

3. Enter MACHINE SELECTION for the dialog name.

4. The default outline of the dialog box will appear as illustrated below. You can resize it or move the default OK and Cancel buttons if desired.

5. Right-click inside the dialog box and select Controls -> Text from the pull-down menu.

6. In the Label field of the Properties dialog, enter the following text without quotes: “Select machine” and press OK when done.

7. Right-click again inside the dialog box and select Controls -> List from the pull-down menu.

8. Change the box size by entering 100 in the X field and type the following three options in the Entries field. These are the models of the three Haas mills to be supported.

VF-2TR
VF-5/40TR
VF-6/50TR

9. In the Variable field of the same dialog, enter MACHSEL. This will be the name of the macro variable that will store the machine selection string. When done, press OK. You can preview your custom dialog box by clicking the Test button at the bottom of the dialog editor. It should look like this:

10. Press the OK button to end the dialog setup and click the Close button to exit the dialog editor.

11. Back in the Questionnaire, expand the Startup/Shutdown Procedures node and select Machine Startup Macro.

12. Select Custom Macro and type the following in the macro editor:

$$ Machine Selection
DECLAR/GLOBAL,STRING,MACHSEL
IF/$FDIALOG(‘MACHINESELECTION’).EQ.’OK’
CASE/MACHSEL
WHEN/’VF-2TR’
LIMIT/ON,XAXIS,-15,15
WHEN/’VF-5/40TR’
LIMIT/ON,XAXIS,-25,25
WHEN/’VF-6/50TR’
LIMIT/ON,XAXIS,-32,32
ENDOF/CASE
ENDOF/IF

This macro will run automatically at the beginning of each program. It will call the custom dialog editor and store the option selected from the list in the MACHSEL variable. Subsequently, it will issue a specific LIMIT/ON command based on the MACHSEL option. This command changes the boundaries used by the post internally to detect X-axis overtravels.

13. Click Compile to validate and compile the macro, then click OK to exit the macro editor.

14. Compile the post-processor by clicking File -> Generate on the top toolbar menu of CAM-POST.

Benefit to User
Accommodate multiple similar machines with different travel limits within a single post-processor.

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