M98 calls or starts a subprogram from the main program. It allows the machine to run a separate set of instructions stored in another program file or block.
Click to reveal answer
beginner
What is the purpose of the M99 command in CNC programming?
M99 returns control from a subprogram back to the main program. It signals the end of the subprogram and resumes the main program where it left off.
Click to reveal answer
intermediate
How do M98 and M99 work together in CNC programs?
M98 calls a subprogram to run a set of instructions, and M99 ends that subprogram and returns control to the main program. Together, they let you reuse code and organize programs better.
Click to reveal answer
intermediate
Can M98 call a subprogram multiple times in a CNC program?
Yes, M98 can call the same subprogram multiple times, allowing repeated execution of the same instructions without rewriting code.
Click to reveal answer
advanced
What happens if M99 is missing at the end of a subprogram?
If M99 is missing, the CNC machine may not return to the main program correctly, causing errors or unexpected behavior because the subprogram never signals it is finished.
Click to reveal answer
What command do you use to start a subprogram in CNC programming?
AG00
BM99
CM03
DM98
✗ Incorrect
M98 is the command used to call or start a subprogram.
Which command returns control from a subprogram to the main program?
AM98
BG01
CM99
DM05
✗ Incorrect
M99 signals the end of a subprogram and returns control to the main program.
What happens if you call M98 without a matching M99 in the subprogram?
AThe subprogram loops infinitely
BThe machine may not return to the main program properly
CThe machine stops immediately
DThe subprogram runs twice automatically
✗ Incorrect
Without M99, the machine does not know when to return to the main program, causing errors.
Can M98 be used to call the same subprogram multiple times?
AYes, multiple times
BNo, only once per program
COnly if the subprogram is short
DOnly if M99 is omitted
✗ Incorrect
M98 can call the same subprogram as many times as needed.
Which of these is true about M98 and M99?
AM98 calls a subprogram, M99 returns from it
BBoth commands end subprograms
CBoth commands start subprograms
DM98 ends a subprogram, M99 starts it
✗ Incorrect
M98 calls a subprogram, and M99 returns control back to the main program.
Explain how M98 and M99 commands help organize CNC programs.
Think about how calling and returning from subprograms saves rewriting code.
You got /4 concepts.
Describe what could go wrong if M99 is missing at the end of a subprogram.
Consider the flow of program control between main and subprogram.
You got /4 concepts.
Practice
(1/5)
1. What does the M98 command do in CNC programming?
easy
A. Stops the machine immediately
B. Ends the current subprogram and returns to the main program
C. Starts the spindle rotation
D. Calls a subprogram by its number, optionally repeating it
Solution
Step 1: Understand the role of M98
The M98 command is used to call a subprogram by its number and can repeat it multiple times if specified.
Step 2: Differentiate from M99
M99 is used to end a subprogram and return to the main program, not to call it.
Final Answer:
Calls a subprogram by its number, optionally repeating it -> Option D
Quick Check:
M98 calls subprogram [OK]
Hint: M98 calls subprogram; M99 returns from it [OK]
Common Mistakes:
Confusing M98 with M99
Thinking M98 stops the machine
Assuming M98 starts spindle
2. Which of the following is the correct syntax to call subprogram number 100 with 3 repetitions?
easy
A. M100 P98 L3
B. M98 P100 L3
C. M98 L3 P100
D. M99 P100 L3
Solution
Step 1: Identify correct M98 syntax
The correct syntax to call a subprogram is M98 followed by P (program number) and optionally L (repeat count), so M98 P100 L3 is correct.
Step 2: Check other options for errors
M99 is for return, not call; order matters; M100 is not a command.