The document describes the program logic and order of operations for a flow chart that takes an inlet channel and guides it through a series of arcs and channels in both positive and negative directions before exiting through an outlet channel. The end result of the flow chart is G-code designed to work with a LinuxCNC machine controller to simulate the channel path on an AXIS CNC mill.
14. Final
G-Code
Designed to work with
LinuxCNC machine controller
AXIS CNC Mill Simulator
Editor's Notes
For my project I chose to write a g-code program for a CNC milling operation that uses parameters and subroutines to determine the tool path.
This enables the program to be easily adaptable to design changes by editing a few parameters.
This technique would be useful for prototyping where you might be making a single part and then maybe slightly changing the design,
or for a small run job shop where you might be making many similar parts with different dimensions.
The machine operator does not need to know g-code, CAD/CAM software to edit the design.
The parameters are changed directly from machine controller. Can be made on the fly, saving time, without rewriting g-code.
I came up with an example part to use this program with. The part is just made up.
It is a heat exchange plate.
The plate is bolted to a surface and fluid runs through the channel to either heat or cool something like a motor.
I thought the repeating pattern of the fluid channel makes it a good example to use for my project.
The part has four different milling operations to create it.
They could all be milled with parameter driven programs,
but I chose just to focus on the fluid channel operation for this project.
I started out planning for the project just by putting some thoughts and sketches on paper
trying to figure out what parameters I need to use and how to use those values to calculate the tool path.
Six Parameters: read from slide
Then I broke the operation up into different subroutine
Explain inlet channel:
This is a flow chart showing the logic and organization of how the program should work
Go through flow chart: point out While and If statements
Here is the final g-code. It might be hard to see. but I will go through it in a minute.
Point out different sections:
I had a pretty good idea of how I would write the program. It works very similarly to any other programming language like C.
Since every machine controller might use its own version of commands like calling subroutines, I had a hard time finding a simulator to run my program correctly. I ended up installing linux and running LinuxCNC which is what we used in the ATC lab. I intended on actually milling a part, but I did not have enough time so I tested it by simulating it on LinuxCNC.