Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to check if the spindle speed is greater than 1000.
CNC Programming
IF SPINDLE_SPEED [1] 1000 THEN M03 ; Start spindle ENDIF
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' causes the spindle to start at lower speeds.
Using '=' checks for exact speed, not greater than.
✗ Incorrect
The condition checks if SPINDLE_SPEED is greater than 1000, so the correct operator is '>'.
2fill in blank
mediumComplete the code to stop the coolant if the temperature is less than 50.
CNC Programming
IF TEMPERATURE [1] 50 THEN M09 ; Stop coolant ENDIF
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' would stop coolant at higher temperatures.
Using '<=' includes 50, but the instruction says less than 50.
✗ Incorrect
The coolant stops when temperature is less than 50, so the operator is '<'.
3fill in blank
hardFix the error in the code to check if tool number equals 5.
CNC Programming
IF TOOL_NUMBER [1] 5 THEN M06 ; Change tool ENDIF
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' causes syntax errors in CNC IF statements.
Using '!=' checks for inequality, which is not the goal here.
✗ Incorrect
In CNC programming, '=' is used for equality check in IF statements, not '=='.
4fill in blank
hardFill both blanks to check if feed rate is less than or equal to 200 and stop feed if true.
CNC Programming
IF FEED_RATE [1] 200 [2] THEN M05 ; Stop feed ENDIF
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' instead of '<=' reverses the condition.
Forgetting 'THEN' causes syntax errors.
✗ Incorrect
The condition uses '<=' to check if feed rate is less or equal to 200, followed by THEN to start the block.
5fill in blank
hardFill all three blanks to create a condition that checks if the axis position is greater than 100 and stops the machine.
CNC Programming
IF AXIS_POSITION [1] 100 [2] [3] ; Stop machine ENDIF
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' reverses the condition.
Omitting 'THEN' causes syntax errors.
Using wrong stop command causes unexpected behavior.
✗ Incorrect
The condition uses '>' to check if position is greater than 100, 'THEN' to start the block, and 'M00' to stop the machine.
