& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
Any referenced datasets can be downloaded from "Module downloads" in the module overview.
Transcript
00:02
In this lesson, we're going to output code and review it.
00:06
After completing this lesson, you'll be able to modify post processor options and identify code snippets.
00:14
For this lesson, we want to take a look at two data sets, 3+1 as well as rotary wrap.
00:20
These are data sets that we saw earlier in our course, and we want to take a look at what the code looks like when we output them.
00:27
To get started, we're going to look at 3+1, and we're going to select the entire setup one, go to actions and post process.
00:34
We're going to take a look for a post that is A axis enabled, so we can search for specific vendors and functionality.
00:43
So I'm going to take a look for Haas Automation, and I'm going to focus on just milling.
00:49
When we take a look at our options, we want to make sure that we do have a post in this case Haas A axis,
00:56
that can be used for this type of configuration.
00:60
Also note that rotate A axis the opposite direction is set to No, so this is going to determine the direction in which A rotates.
01:09
As we go through all of these other options in here, I'm going to leave everything as default,
01:14
but in some cases, depending on the post configuration,
01:17
you may need to enable the A axis or even B and C if you have a trunnion.
01:23
Let's go ahead and post this, and I'm going to overwrite the code that's in there and take a look at the results.
01:29
So one thing that we want to notice in here is that the A is going to be the number of degrees that we're rotating.
01:38
As we take a look at this code, what we're doing here is we're first starting up a tool change, getting to tool number six,
01:45
starting the spindle referencing our G54 coordinate system, and then we're moving the part into position.
01:53
We're rotating A30 degrees, and then we're beginning our motions.
01:59
So once A is rotated 30 degrees, you'll notice that we begin our X and Y movements.
02:06
As we go down the line, you can see that we have a lot of XY motions happening and not a lot of As.
02:13
If I do a Control F and I look just for A, you can see that there are 39 instances.
02:20
When I get to the second 2D Pocket, A is rotating 90 degrees.
02:25
If I go down the list, we've got 150, 210, 270, 330 and 390 degrees. 450.
02:35
You notice that it keeps going, it's not reversing and going back to a previous angle.
02:40
It just continues to increment that A because it's always rotating in that same direction to get to the next position.
02:49
So this is what it looks like for us to have that A axis rotation.
02:54
But what about something like this rotary wrap.
02:57
Let's go ahead and take this and let's post this.
03:01
Once again, we're going to use that Haas A axis, and we'll post the code and take a look at it.
03:09
Once again, I'm just going to replace 1001, and now I want to take a look at the code.
03:14
So once again the program starts the same.
03:16
We're starting a tool change, starting the spindle, referencing our coordinate system.
03:20
And then we begin by positioning the A axis.
03:24
In this case, we're at 25.558.
03:29
When we do that, X and y come into position, Z comes down, and then we begin rotating the A axis as well as moving Z.
03:38
Notice the spindle speed changes here and that's because there's likely a change based on the distance from the center of rotation.
03:46
As we go down, you'll notice in this case we've got X, Z motions as well as A and a feed rate.
03:54
Then we have X and Z and again A.
03:57
So much like a simultaneous three axis or simultaneous five axis,
04:03
what we're doing here is we're moving both X and Z as well as rotating our fourth axis at the same time.
04:10
So this motion is slightly different than our three plus one positioning because we are moving X and Z
04:18
as well as rotating our fourth axis at the same time.
04:22
Depending on how your machining apart and how everything is set up, the code that you're looking at might be different.
04:30
Let's go ahead and take a look at our 3+2 example and see what the code looks like for that.
04:36
So we want to navigate back to our 3+2 manufacture example, and then we're going to post out the code just for one of the ops.
04:45
In this case, I'm going to use my G54 but I'm going to make an edit because I only want to use a single WCS.
04:55
I'm then going to post the code, and we can do this by right clicking and selecting post process.
05:01
We want to make sure that we're using an applicable post.
05:04
So in this case, we can't use the A axis.
05:07
We want to use the Haas trunnion.
05:10
We're going to post the code, and once again we'll just overwrite what's there for this example, and now we want to take a look at the code.
05:18
So in this case for the trunnion, what we see is that we have an A and a B.
05:24
Now in most cases, what we're going to see with trunnions is that B and a C.
05:28
So it's going to depend heavily on your setup but as we go down the list and we begin to take a look at the motions that are happening,
05:36
notice that we have X, Y, Z, I and J motions after we have the A and B position.
05:43
When we move into our 2D pocket, notice that we have an A and a B position.
05:50
And then once again, we're doing our X, Y and Z motions.
05:54
When we get to the next operation, the next pocket, you can see once again we have an A and a B rotation and then it's working on that next pocket.
06:02
Once again our A is still at 20 and our B is incrementing as it's moving around the part.
06:09
These are all the different increments that we're going through to get to these different locations.
06:14
Once we get to the drilling operations, it goes back to a 20 B minus 72 B minus 144 minus 216 and so on.
06:24
So when we're dealing with multi-axis positioning, again the orientation, the setup, the post configuration that you're using,
06:32
these are all going to have effects on the code that you see.
06:36
But it's important to make sure that you can identify the direction that it's rotating and the axis that are actually being moved.
06:44
If your machine is expecting a B and a C in the code, but you're outputting an A and a B.
06:50
Then you're going to have problems when you go to run that machine.
06:54
So always make sure that you verify what your machine is looking for and that your post configuration matches what you're expecting to see.
07:01
From here, let's make sure that we save everything before moving on to some of the challenges.
Video transcript
00:02
In this lesson, we're going to output code and review it.
00:06
After completing this lesson, you'll be able to modify post processor options and identify code snippets.
00:14
For this lesson, we want to take a look at two data sets, 3+1 as well as rotary wrap.
00:20
These are data sets that we saw earlier in our course, and we want to take a look at what the code looks like when we output them.
00:27
To get started, we're going to look at 3+1, and we're going to select the entire setup one, go to actions and post process.
00:34
We're going to take a look for a post that is A axis enabled, so we can search for specific vendors and functionality.
00:43
So I'm going to take a look for Haas Automation, and I'm going to focus on just milling.
00:49
When we take a look at our options, we want to make sure that we do have a post in this case Haas A axis,
00:56
that can be used for this type of configuration.
00:60
Also note that rotate A axis the opposite direction is set to No, so this is going to determine the direction in which A rotates.
01:09
As we go through all of these other options in here, I'm going to leave everything as default,
01:14
but in some cases, depending on the post configuration,
01:17
you may need to enable the A axis or even B and C if you have a trunnion.
01:23
Let's go ahead and post this, and I'm going to overwrite the code that's in there and take a look at the results.
01:29
So one thing that we want to notice in here is that the A is going to be the number of degrees that we're rotating.
01:38
As we take a look at this code, what we're doing here is we're first starting up a tool change, getting to tool number six,
01:45
starting the spindle referencing our G54 coordinate system, and then we're moving the part into position.
01:53
We're rotating A30 degrees, and then we're beginning our motions.
01:59
So once A is rotated 30 degrees, you'll notice that we begin our X and Y movements.
02:06
As we go down the line, you can see that we have a lot of XY motions happening and not a lot of As.
02:13
If I do a Control F and I look just for A, you can see that there are 39 instances.
02:20
When I get to the second 2D Pocket, A is rotating 90 degrees.
02:25
If I go down the list, we've got 150, 210, 270, 330 and 390 degrees. 450.
02:35
You notice that it keeps going, it's not reversing and going back to a previous angle.
02:40
It just continues to increment that A because it's always rotating in that same direction to get to the next position.
02:49
So this is what it looks like for us to have that A axis rotation.
02:54
But what about something like this rotary wrap.
02:57
Let's go ahead and take this and let's post this.
03:01
Once again, we're going to use that Haas A axis, and we'll post the code and take a look at it.
03:09
Once again, I'm just going to replace 1001, and now I want to take a look at the code.
03:14
So once again the program starts the same.
03:16
We're starting a tool change, starting the spindle, referencing our coordinate system.
03:20
And then we begin by positioning the A axis.
03:24
In this case, we're at 25.558.
03:29
When we do that, X and y come into position, Z comes down, and then we begin rotating the A axis as well as moving Z.
03:38
Notice the spindle speed changes here and that's because there's likely a change based on the distance from the center of rotation.
03:46
As we go down, you'll notice in this case we've got X, Z motions as well as A and a feed rate.
03:54
Then we have X and Z and again A.
03:57
So much like a simultaneous three axis or simultaneous five axis,
04:03
what we're doing here is we're moving both X and Z as well as rotating our fourth axis at the same time.
04:10
So this motion is slightly different than our three plus one positioning because we are moving X and Z
04:18
as well as rotating our fourth axis at the same time.
04:22
Depending on how your machining apart and how everything is set up, the code that you're looking at might be different.
04:30
Let's go ahead and take a look at our 3+2 example and see what the code looks like for that.
04:36
So we want to navigate back to our 3+2 manufacture example, and then we're going to post out the code just for one of the ops.
04:45
In this case, I'm going to use my G54 but I'm going to make an edit because I only want to use a single WCS.
04:55
I'm then going to post the code, and we can do this by right clicking and selecting post process.
05:01
We want to make sure that we're using an applicable post.
05:04
So in this case, we can't use the A axis.
05:07
We want to use the Haas trunnion.
05:10
We're going to post the code, and once again we'll just overwrite what's there for this example, and now we want to take a look at the code.
05:18
So in this case for the trunnion, what we see is that we have an A and a B.
05:24
Now in most cases, what we're going to see with trunnions is that B and a C.
05:28
So it's going to depend heavily on your setup but as we go down the list and we begin to take a look at the motions that are happening,
05:36
notice that we have X, Y, Z, I and J motions after we have the A and B position.
05:43
When we move into our 2D pocket, notice that we have an A and a B position.
05:50
And then once again, we're doing our X, Y and Z motions.
05:54
When we get to the next operation, the next pocket, you can see once again we have an A and a B rotation and then it's working on that next pocket.
06:02
Once again our A is still at 20 and our B is incrementing as it's moving around the part.
06:09
These are all the different increments that we're going through to get to these different locations.
06:14
Once we get to the drilling operations, it goes back to a 20 B minus 72 B minus 144 minus 216 and so on.
06:24
So when we're dealing with multi-axis positioning, again the orientation, the setup, the post configuration that you're using,
06:32
these are all going to have effects on the code that you see.
06:36
But it's important to make sure that you can identify the direction that it's rotating and the axis that are actually being moved.
06:44
If your machine is expecting a B and a C in the code, but you're outputting an A and a B.
06:50
Then you're going to have problems when you go to run that machine.
06:54
So always make sure that you verify what your machine is looking for and that your post configuration matches what you're expecting to see.
07:01
From here, let's make sure that we save everything before moving on to some of the challenges.
Step-by-step guide
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Sign in to start learning
Sign in for unlimited free access to all learning content.Save your progress
Take assessments
Receive personalized recommendations
May we collect and use your data?
Learn more about the Third Party Services we use and our Privacy Statement.May we collect and use your data to tailor your experience?
Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.