Bird
Raised Fist0
CNC Programmingscripting~10 mins

Lathe coordinate system (X, Z) in CNC Programming - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to move the tool to X=10 on the lathe.

CNC Programming
G01 X[1] F100
Drag options to blanks, or click blank then click option'
A10
B5
C15
D20
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong coordinate value.
Forgetting to specify the feed rate.
2fill in blank
medium

Complete the code to move the tool to Z=5 on the lathe.

CNC Programming
G01 Z[1] F150
Drag options to blanks, or click blank then click option'
A0
B5
C10
D-5
Attempts:
3 left
💡 Hint
Common Mistakes
Using a negative value when positive is needed.
Confusing X and Z coordinates.
3fill in blank
hard

Fix the error in the code to move the tool to X=8 and Z=0.

CNC Programming
G01 X[1] Z0 F120
Drag options to blanks, or click blank then click option'
A8
B5
C0
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 or 5 instead of 8 for X.
Omitting the Z coordinate.
4fill in blank
hard

Fill both blanks to move the tool to X=12 and Z=-3.

CNC Programming
G01 X[1] Z[2] F100
Drag options to blanks, or click blank then click option'
A12
B-3
C3
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using positive 3 for Z instead of negative.
Swapping X and Z values.
5fill in blank
hard

Fill all three blanks to create a dictionary mapping axis names to their coordinates: X=7, Z=0, feed rate=80.

CNC Programming
position = {'X': [1], 'Z': [2], 'F': [3]
Drag options to blanks, or click blank then click option'
A7
B0
C80
D100
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up coordinate values.
Using wrong feed rate value.

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