Setup a 4th Axis by Modifying Fusion 360 and Inventor CAM Post Processors

Need to customize a post processor to include an additional axis? Post Processors for Fusion 360 and Inventor CAM platforms are Javascript text files with a CPS extension. They can be opened and modified with any text editor (e.g. Notepad, TextEdit, etc). 

An extensive list of all the available post processors can be found here: https://cam.autodesk.com/hsmposts

Before making modifications, I recommend download and installing Microsoft Visual Studio Code using this link:  https://code.visualstudio.com/. It makes the editing process more efficient. You can also download the Fusion 360 Post Processor Utility here: https://marketplace.visualstudio.com/items?itemName=Autodesk.hsm-post-processor. The utility allows you to post directly from VS Code and quickly search for variables and functions.

In this example, I'll be modifying the Haas (pre-NGC) Post Processor to include an additional 4th axis configuration. The same process can be used on posts for other common controllers.

1. Open the CPS file with Visual Studio Code.

2. Using Ctrl-F, search for the function "onOpen"

3. Find the line with the comment "setup your machine here"

4. Activate the axis by changing the if statement from "if (false)" to if (true)"

You'll notice there are several parameters that can be changed. Here's some explanation:

- Coordinate: Specifies the coordinate used in the ABC vectors (e.g. X, Y, or Z). The number will define the letter for the axis. 0=A, 1=B, 2=C.

- Table: Specifies whether the axis is attached to the table or the head of the machine. 

- Axis: Specifies the axis as a 3-element array. This defines which axis the new axis rotates about (e.g. A-axis rotating around the X-axis would be [1,0,0].

- Range: Specifies the angular range for the axis in degrees. (e.g. [-360, 360])

- Preference: Specifies the preferred angle (-1: negative angles, 0: don't care, 1: positive angles).

5. Adjust the machine configuration to include the axis you require. 

The new axis can be activated by modifying the "machineConfiguration" line:

Use two forward slashes "//" to comment out any axis that won't be used. (e.g. remove the b-axis if the machine doesn't have one):

6. Adjust the coordinate, table, axis, range, and preference values to match the desired machine configuration.

4th Axis Setup, A rotates around X, table mounted, direction is negative:

4th Axis Setup, A rotates around X, table mounted, direction is positive:

7. Test the Post Processor using a sample CAM program.

As expected, the post processor translates the 4th axis motion to index the A-axis to 0 degrees.

If you'd like help customizing your post processor, reach out to IMAGINiT Technologies and our CAM posts team can assist you.

https://www.imaginit.com/contact-us

 

 

About the Author

Ed Gillman

Manufacturing Applications Expert<br><br>Ed assesses clients' current business processes to recommend and implement software solutions to meet their needs. His software expertise includes Inventor, Inventor FEA, Nastran, Inventor HSM (CAM), Fusion 360, Fusion 360 Simulation, Fusion 360 CAM, and Generative Design.

Follow on Linkedin More Content by Ed Gillman
Previous PDF
RRT Simplifies Machine Programming by Switching to Inventor CAM
RRT Simplifies Machine Programming by Switching to Inventor CAM

Radio Reconnaissance Technologies chose to move from Mastercam to Inventor CAM for a streamlined process. H...

Next Article
Inventor 2022 crashes with error report creating or opening an assembly after installing updates
Inventor 2022 crashes with error report creating or opening an assembly after installing updates

This happens after installing any Inventor 2022 update, currently 2022.1 or 2022.1.1.

Inventor Classes Now Available

Check Schedule