Bird
Raised Fist0
CNC Programmingscripting~20 mins

Lathe coordinate system (X, Z) in CNC Programming - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Lathe Coordinate Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Understanding Lathe Coordinate Movements
In a lathe machine using the X, Z coordinate system, what will be the tool's final position after executing the following commands starting from the origin (X0, Z0)?

G01 X10 Z-5 F100
CNC Programming
Initial position: X0 Z0
Command: G01 X10 Z-5 F100
AX-10 Z5
BX10 Z-5
CX5 Z10
DX0 Z0
Attempts:
2 left
💡 Hint
G01 moves the tool in a straight line to the specified coordinates.
🧠 Conceptual
intermediate
1:30remaining
Direction of Axes in Lathe Coordinate System
Which statement correctly describes the directions of the X and Z axes in a typical lathe coordinate system?
AX axis is radial (diameter), Z axis is axial (length)
BX axis is axial (length), Z axis is radial (diameter)
CBoth X and Z axes are radial
DBoth X and Z axes are axial
Attempts:
2 left
💡 Hint
Think about which axis controls diameter and which controls length.
📝 Syntax
advanced
2:00remaining
Identify the Error in Lathe G-code Movement
What error will occur when running this lathe G-code snippet?

G01 X-5 Z10 F150
CNC Programming
Starting at X0 Z0
Command: G01 X-5 Z10 F150
ARuntime error: tool moves outside safe limits
BNo error, valid movement
CSyntax error due to negative X value
DSyntax error due to missing G-code command
Attempts:
2 left
💡 Hint
Negative X values may be invalid depending on machine setup.
🚀 Application
advanced
2:30remaining
Calculate Final Position After Multiple Moves
Starting at X20 Z0, what is the final position after these commands?

G01 X15 F100
G01 Z-10 F100
G01 X10 Z-5 F100
CNC Programming
Initial: X20 Z0
Commands:
G01 X15 F100
G01 Z-10 F100
G01 X10 Z-5 F100
AX10 Z-10
BX15 Z-10
CX10 Z-5
DX20 Z0
Attempts:
2 left
💡 Hint
Each G01 command moves the tool to the specified coordinates.
🔧 Debug
expert
3:00remaining
Diagnose Unexpected Tool Path in Lathe Program
A lathe program starts at X0 Z0 and runs:

G01 X10 Z-5 F100
G01 X5 Z-10 F100
G01 X15 Z0 F100

The tool unexpectedly moves outside the workpiece boundary. Which command is causing this and why?
CNC Programming
Start: X0 Z0
Commands:
G01 X10 Z-5 F100
G01 X5 Z-10 F100
G01 X15 Z0 F100
AG01 X5 Z-10 F100 because Z-10 is beyond the length limit
BNone, all commands are within safe limits
CG01 X10 Z-5 F100 because Z-5 is negative
DG01 X15 Z0 F100 because X15 exceeds the maximum diameter
Attempts:
2 left
💡 Hint
Check which coordinate might exceed the physical size of the workpiece.

Practice

(1/5)
1. In the lathe coordinate system, which axis controls the tool movement side to side (diameter)?
easy
A. Y axis
B. Z axis
C. X axis
D. W axis

Solution

  1. Step 1: Understand lathe axis directions

    The lathe coordinate system uses X and Z axes for tool movement.
  2. Step 2: Identify axis for side to side movement

    X axis controls side to side movement, which affects diameter.
  3. Final Answer:

    X axis -> Option C
  4. Quick Check:

    X = side to side (diameter) [OK]
Hint: Remember X moves side to side, Z moves front to back [OK]
Common Mistakes:
  • Confusing X with Z axis
  • Thinking Y axis controls diameter
  • Assuming Z controls side to side
2. Which of the following is the correct syntax to move the lathe tool to X=10 and Z=5 in a CNC program?
easy
A. G01 X10 Z5
B. G01 Y10 Z5
C. G00 X5 Z10
D. G02 X10 Y5

Solution

  1. Step 1: Identify correct G-code for linear move

    G01 is the standard command for linear interpolation (controlled move).
  2. Step 2: Check axis and values

    X10 and Z5 correctly specify the tool position in X and Z axes.
  3. Final Answer:

    G01 X10 Z5 -> Option A
  4. Quick Check:

    G01 + X and Z correct values = D [OK]
Hint: Use G01 for linear moves with X and Z axes [OK]
Common Mistakes:
  • Using Y axis instead of Z
  • Using G00 for cutting moves
  • Swapping X and Z values
3. What will be the tool position after executing the following commands?
G01 X20 Z0
G01 X20 Z-10
G01 X10 Z-10
medium
A. X=20, Z=0
B. X=20, Z=-10
C. X=10, Z=0
D. X=10, Z=-10

Solution

  1. Step 1: Trace each command's effect on position

    First command moves tool to X=20, Z=0. Second moves to X=20, Z=-10. Third moves to X=10, Z=-10.
  2. Step 2: Identify final position after last command

    After last command, tool is at X=10, Z=-10.
  3. Final Answer:

    X=10, Z=-10 -> Option D
  4. Quick Check:

    Last command sets X=10, Z=-10 [OK]
Hint: Last move command sets final position [OK]
Common Mistakes:
  • Ignoring last command
  • Mixing up X and Z values
  • Assuming position resets between commands
4. Identify the error in this lathe program snippet:
G01 X15 Z-5
G01 X-10 Z-5
G01 X15 Z0
medium
A. Z values cannot be negative
B. Negative X value is invalid in lathe coordinate system
C. G01 command cannot be repeated consecutively
D. No error, program is correct

Solution

  1. Step 1: Review coordinate system limits

    In lathe programming, X values represent diameter and cannot be negative.
  2. Step 2: Check commands for invalid values

    Second command uses X=-10 which is invalid; Z can be negative for length direction.
  3. Final Answer:

    Negative X value is invalid in lathe coordinate system -> Option B
  4. Quick Check:

    X must be positive or zero [OK]
Hint: X axis values represent diameter, so no negatives [OK]
Common Mistakes:
  • Thinking Z can't be negative
  • Believing repeated G01 is wrong
  • Ignoring axis value rules
5. You want to program a lathe to cut a cylindrical part 50 mm long and 20 mm diameter. Which sequence of moves correctly uses the lathe coordinate system to start at the front face and move to the back end while reducing diameter from 20 mm to 10 mm?
hard
A. G01 X20 Z0 G01 X10 Z50
B. G01 X10 Z0 G01 X20 Z50
C. G01 X20 Z50 G01 X10 Z0
D. G01 X10 Z50 G01 X20 Z0

Solution

  1. Step 1: Understand lathe coordinate directions

    X controls diameter (side to side), Z controls length (front to back). Front face is Z=0, back end is Z=50.
  2. Step 2: Choose moves to start at front with diameter 20 and move to back with diameter 10

    First move sets X=20 (diameter) at Z=0 (front). Second move moves tool to Z=50 (back) while reducing diameter to X=10.
  3. Final Answer:

    G01 X20 Z0 G01 X10 Z50 -> Option A
  4. Quick Check:

    Start front (Z0) big diameter, move back (Z50) smaller diameter [OK]
Hint: Start at Z0 with big X, move to Z50 with smaller X [OK]
Common Mistakes:
  • Swapping X and Z values
  • Starting at back end instead of front
  • Increasing diameter instead of reducing
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard