You are on page 1of 4

Lab 7

Linear/Circular interpolation in CNC Lathe

Objective:
Objective of Linear/Circular Interpolation using CNC Lathe:
1. Move the cutting tool in a straight or circular path around the work piece.
2. Achieve precise cuts and shapes on the work piece.
3. Create complex parts with high accuracy and repeatability.
4. Increase productivity by reducing manual labor and setup time.
5. Reduce waste by minimizing errors and scrap.
6. Improve safety by avoiding collisions between the tool and the work piece.
7. Create smooth and consistent finishes on the work piece.
8. Increase the versatility of the CNC lathe by performing a wide range of operations,
including turning, drilling, and threading.

Introduction:
Swansoft CNC is a simulation software that enables users to simulate various CNC
machines, such as CNC lathes, milling machines, and machining centers. CNC lathes
are machines used for shaping and cutting materials, such as metal, wood, or plastic.
CNC (Computer Numerical Control) is the technology used to control these machines,
and it is essential for accurate and precise machining.. One of the features offered by
Swansoft CNC is the ability to simulate linear and circular interpolation in CNC lathe
operations.
Linear interpolation involves moving the tool in a straight line from one point to another
on the work piece. This is often used in turning operations where the tool needs to move
in a straight line along the length of the work piece to produce a cylindrical shape.
Circular interpolation, on the other hand, involves moving the tool in a circular arc
around the work piece. This is often used in turning operations where the tool needs to
create a curved shape on the work piece, such as a fillet or radius.
The Swansoft CNC simulation software allows users to program linear and circular
interpolation using the G-code language. The software will then simulate the tool path
and show users how the tool will move and interact with the work piece.
This feature is particularly useful in CNC lathe operations as it enables users to
visualize and optimize their machining processes before actually running the machine.

Page 1 of 4
Lab 7

By simulating the operation beforehand, users can identify potential issues, refine their
tool paths, and improve their overall machining efficiency.

Procedure:
1. Launch the Swansoft CNC Simulator software on your computer.
2. Create a new CNC lathe simulation project or open an existing project that is
compatible with the Swansoft CNC Simulator.
3. Access the programming interface or editor within the SwanSoft CNC Simulator
to write the G-code program for linear and circular interpolation. Alternatively, you
can import a pre-existing G-code program.
4. Start by defining the necessary setup and initialization codes at the beginning of
the program. These codes may include:
 G90: Set the machine to operate in absolute coordinates.
 G54: Select the coordinate system.
 G17: Specify the XY plane for machining.
 G40: Disable cutter compensation.
 G49: Cancel tool length compensation.
 G80: Cancel any active canned cycles.

5. Specify the tool change command (e.g., T0101 M06) to change to the desired
tool for the operation.
6. Set the spindle speed and direction using the appropriate command (e.g., G96
S1200 M03). Adjust the spindle speed to match your desired cutting conditions.
7. Define the starting position of the tool using a rapid move command (e.g., G00
X50.0 Z10.0) to position the tool at a safe initial position.
8. Use a linear interpolation command (G01) to move the tool in a straight line to
the desired position. For example:
 G01 Z-10.0 F200.0: Move the tool to the cutting depth at a feedrate of 200
mm/min.
 G01 X80.0 F200.0: Move the tool to the right at a feedrate of 200 mm/min.
9. Implement circular interpolation commands (G02/G03) to create arcs or curves in
the tool path. For example:
 G02 X100.0 Z-30.0 R10.0 F150.0: Create a clockwise arc to the specified point
with a radius of 10.0 mm at a feedrate of 150 mm/min.
 G03 X50.0 Z-50.0 R10.0 F150.0: Create a counterclockwise arc to the specified
point with a radius of 10.0 mm at a feedrate of 150 mm/min.

10. Utilize additional linear or circular interpolation commands as needed to


complete the desired tool path and machining operations. End the program with

Page 2 of 4
Lab 7

appropriate commands, such as a rapid move to a safe position (e.g., G00


Z10.0) and spindle stop (M05).
11. Verify the correctness of the G-code program for linear and circular interpolation
by checking for syntax errors and logical consistency.
12. Run the CNC lathe simulation in the SwanSoft CNC Simulator to visualize the
tool path and verify the accuracy of the programmed operations.
13. Analyze the simulation results to assess the effectiveness of linear and circular
interpolation in generating the desired tool path and achieving the expected
machining outcomes.
14. Make any necessary adjustments to the G-code program or simulation
parameters based on the simulation results and repeat the simulation as needed.
15. Save the CNC lathe program and simulation results for future reference or
further analysis.

Programming:
O0001 (Program for Linear/Circular Interpolation)
N10 G90 G54 G17 G40 G49 G80 (Absolute, Coordinate System 1, XY Plane, No
Cutter Comp, No Cancel Motion, Cancel Canned Cycle)
N20 T0101 M06 (Tool Change to Tool 1)
N30 G96 S1200 M03 (Constant Surface Speed at 1200 RPM, Spindle On Clockwise)
N40 G00 X50.0 Z10.0 (Rapid Move to Initial Position)
N50 G01 Z-10.0 F200.0 (Linear Interpolation - Move to Cutting Depth at Feedrate of
200 mm/min)
N60 G01 X80.0 F200.0 (Linear Interpolation - Move to the Right at Feedrate of 200
mm/min)
N70 G02 X100.0 Z-30.0 R10.0 F150.0 (Circular Interpolation - Clockwise Arc from
Current Position to X100.0 Z-30.0 with Radius of 10.0 mm at Feedrate of 150 mm/min)
N80 G01 Z-40.0 F200.0 (Linear Interpolation - Move to Lower Position at Feedrate of
200 mm/min)
N90 G03 X50.0 Z-50.0 R10.0 F150.0 (Circular Interpolation - Counterclockwise Arc
from Current Position to X50.0 Z-50.0 with Radius of 10.0 mm at Feedrate of 150
mm/min)
N100 G00 Z10.0 (Rapid Move to Safe Position)
N110 M05 (Spindle Stop)
N120 M30 (Program End)

Page 3 of 4
Lab 7

Explanation:
N40: Rapid move (G00) to the initial position (X50.0 Z10.0).
N50: Linear interpolation (G01) to move to the cutting depth (Z-10.0) at a feedrate of
200 mm/min.
N60: Linear interpolation (G01) to move to the right (X80.0) at a feedrate of 200
mm/min.
N70: Circular interpolation (G02) to create a clockwise arc to the point X100.0 Z-30.0
with a radius of 10.0 mm, at a feedrate of 150 mm/min.
N80: Linear interpolation (G01) to move to a lower position (Z-40.0) at a feedrate of 200
mm/min.
N90: Circular interpolation (G03) to create a counterclockwise arc to the point X50.0 Z-
50.0 with a radius of 10.0 mm, at a feedrate of 150 mm/min.
N100: Rapid move (G00) to a safe position (Z10.0).
N110: Spindle stop (M05).
N120: End of program (M30).
Note: This is just a simplified example to illustrate the use of linear and circular
interpolation commands. The actual values for feed rates, spindle speeds, tool changes,
and positions should be adjusted according to the specific requirements of your CNC
machine and work piece.

Conclusion:
In conclusion, linear and circular interpolation are essential processes in CNC lathe
simulation using Swansoft CNC. These processes enable the creation of accurate and
efficient tool paths for cutting operations, reduce machining time, and improve
productivity. The procedure for linear interpolation involves defining the starting and
ending points of the tool path, choosing the appropriate tool, inputting the G-code
command, defining the feed rate and spindle speed, running the simulation, and
adjusting the parameters as needed.

Page 4 of 4

You might also like