How to set up a 4/5 axis machine configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Updated August 2023:
In recent versions of Fusion, we now support machine configurations in most of our milling post processors, which means that the machine kinematics and options can be easily defined using the Machine Definition dialog.
It is no longer required to add the machine kinematics to the post processor script.
Moving forward, using machine configurations in Fusion is the preferred method to specify your machine configuration, kinematics and options like home positions, axes limits and more.
We made significant changes to most of our library milling posts so that they fully support machine configurations as well as machine simulation. We have also added a lot of predefined machines to our machine library, many of them also have full simulation models associated with them.
All available machines can be found in our online Machine Library and/or directly from within the Fusion machine library.
The Fusion 360 Machine Configuration video explains how to create or edit a machine configuration on your own.
Of course, you can still define your kinematics in the postprocessor itself.
In earlier versions of the post processors this was possible within the onOpen function.
This has been moved to the defineMachine function in the latest posts which have multi-axis machine support where you can now make your desired adjustments.
Please refer to chapter 7.1.3 Creating a Hardcoded Multi-Axis Machine Configuration in the Post Processor Training Guide for instructions on how to do this.
Note that you can only EITHER use a machine configuration in Fusion OR define the machine within your postprocessor.
When a postprocessor with a hardcoded machine configuration is used together with a machine configuration in Fusion a warning/error will be generated, and the hardcoded configuration will take precedence.
Note that you cannot import latest machine configurations into Inventor CAM and HSMWorks directly.
For post processing purposes you can still make use of these machine configurations by downloading a packaged post from the online Machine Library.
When you click download, the following download dialog will show up. Select For Inventor/HSMWorks.
You can then select the post processor you want to use with that machine configuration.
By clicking download, a *.CPSZ file will get downloaded.
This is a package that contains both the post processor you specified as well as the machine configuration file. This file can be selected directly in the post processing dialog.
If you need assistance, you can ask for help here:
1) Contact your local reseller/ service provider: HSM post adjustments needed? Find your right contact here
2) Ask the community: HSM Post Processor forum
Previous content:
Most of the generic posts have 5 axis capabilities already implemented but disabled by default since it is required to set the right machine configuration for the ABC axis for the specific machine you want to use.
The machine configuration can be found into the onOpen() function:
Step 1:
The very first step is to change (for this example, line 173):
- if (false) to this: if (true)
to activate the machine configuration code below.
Step 2:
Now you can go ahead and start to customize the ABC axis to your needs with the options as described below:
- actuator: Specifies that the actuator type (ie. either "linear" or "rotational").
The default is "rotational". - table: Specifies that the axis is located in the table or the head. The default is true for table.
- axis: Specifies the axis vector as a 3-element array (e.g. "[0, 0, 1]").
[Axis rotates around X, Axis rotates around Y, Axis rotates around Z]
Example: A-axis rotating around the X-axis would be this: [1, 0, 0] - offset: Specifies the axis offset as a 3-element array (e.g. "[0, 0, 25]").
The default is [0, 0, 0]. - coordinate: Specifies the coordinate used in the ABC vectors (ie. "X", "Y", or "Z"). The given number will define the letter for the axis:
0 = “A”
1 = “B”
2 = “C”
Note: This is the only way to influence the axis letter for the output. - cyclic: Specifies that the axis is cyclic. Only supported for rotational axes.
Only used when a range is specified. The default is false. - range: Specifies the angular range for the axis in degrees as a 2-element array (e.g. "[-120, 120]"). You can also specify a single number to create an axis for an aggregate.
The default is unbound. - preference: Specifies the preferred angles (-1:negative angles, 0:don't care, and 1:positive angles). The default is don't care.
- resolution: Specifies the resolution. In degrees for rotational actuator. The default is 0.
Please note:
If you only need a 4 axis setup, you can either delete the other axis beginning with
"var bAxis” and “var cAxis” or you can just disable them by typing two slashes “//” in front of the line which you want to disable.
Don´t forget to remove the disabled axis variable out of the code as explained in Step 3.
Step 3:
machineConfiguration = new MachineConfiguration(aAxis, cAxis);
- This line creates a new machine configuration as defined above by using the given variables for each axis (in that case: aAxis, cAxis).
- You can only use the variables inside the brackets which are defined above.
Examples:
4 axis setup, A rotates around X, direction is positive:
var aAxis = createAxis({coordinate:0, table:true, axis:[1, 0, 0], range:[-360,360], preference:1});
machineConfiguration = new MachineConfiguration(aAxis);
4 axis setup, A rotates around X, direction is negative:
var aAxis = createAxis({coordinate:0, table:true, axis:[-1, 0, 0], range:[-360,360], preference:1});
machineConfiguration = new MachineConfiguration(aAxis);
5 axis, B rotates around Y, C rotates around Z, directions both positive:
var bAxis = createAxis({coordinate:0, table:true, axis:[0, 1, 0], range:[-360,360], preference:1});
var cAxis = createAxis({coordinate:0, table:true, axis:[0, 0, 1], range:[-360,360], preference:1});
machineConfiguration = new MachineConfiguration(bAxis, cAxis);
Step 4:
setMachineConfiguration(machineConfiguration);
- This line enables the machine configuration, no need to change something here.
Step 5:
optimizeMachineAngles2(0); // TCP enabled (eg. M128, TRAORI, G43.4, G243)
optimizeMachineAngles2(1); // TCP disabled (eg. M128, TRAORI, G43.4, G243)
- With this option you can decide if your machine has TCP capabilities for 5 axis simultaneous machining or not.

Achim.N
Principal Technology Consultant