Alarm 312 occurs when the Haas NGC control encounters an M98 subprogram call but cannot locate the specified O-number program in active memory. The most common cause is the subprogram was never loaded into memory or was accidentally deleted. The typical fix is loading the missing subprogram into memory via the Program menu.
HaasProgram/G-codeBasic10-20 minutes
312
Haas 312 - PROGRAM END | Haas CNC Alarm
PROGRAM END
This alarm indicates the control has reached an M30, M02, or percent sign program terminator but has detected an error condition that prevents normal program end procedures from completing. The control expects certain machine states or completed actions before allowing program end, such as all axes stopped, spindle off, and coolant off. If these conditions are not met or the program structure is malformed, the alarm fires instead of executing the reset and rewind functions.
Root Cause Summary
Alarm 312 occurs when the Haas NGC control encounters an M98 subprogram call but cannot locate the specified O-number program in active memory. The most common cause is the subprogram was never loaded into memory or was accidentally deleted. The typical fix is loading the missing subprogram into memory via the Program menu.
Safety
Main program will stop
Causes and Fixes
1
Identify the missing subprogram number
Press ALARM to view the alarm details. Note the line number where execution stopped, then press PROGRAM and use the cursor to find the M98 line that caused the alarm. Record the O-number being called (e.g., M98 P1001 calls subprogram O1001).
2
Check if subprogram exists in memory
Press PROGRAM, then LIST PROG soft key. Scroll through the program list to verify if the O-number from step 1 exists in memory. If not found, the subprogram needs to be loaded.
3
Load the missing subprogram
Use DNC, USB, or network transfer to load the missing subprogram. Press PROGRAM, then appropriate transfer method (USB/DNC). Navigate to the subprogram file and transfer it to memory.
Always verify subprogram dependencies before running a main program to avoid mid-cycle stops.
4
Reset alarm and resume
Press RESET to clear alarm 312. Press CYCLE START to resume program execution from the M98 call.
1
Verify subprogram was deleted
Press PROGRAM, then LIST PROG. Search for the O-number referenced in the M98 call. If recently deleted, check if it appears in any backup locations or recent file transfers.
2
Restore from backup source
Reload the subprogram from your backup source (USB drive, network folder, or DNC system). Press PROGRAM, select appropriate input method, and transfer the missing subprogram back to memory.
3
Verify program integrity
After reloading, press PROGRAM and cursor through the restored subprogram to ensure it loaded completely and contains proper M99 return statement.
Enable memory protect (Setting 7) for critical subprograms to prevent accidental deletion.
1
Locate the M98 call line
Press PROGRAM and cursor to the line that caused alarm 312. Examine the M98 P-value to identify the O-number being called.
2
Cross-reference available subprograms
Press LIST PROG soft key to see all programs in memory. Compare the M98 P-value with actual O-numbers available. Look for similar numbers that might be the intended target.
3
Correct the M98 call
Press EDIT soft key to enable program editing. Cursor to the incorrect M98 line and modify the P-value to match the correct subprogram O-number. Press INSERT/ALTER to save the change.
4
Test the correction
Press RESET to clear the alarm, then CYCLE START to resume execution and verify the M98 now calls the correct subprogram.
Always verify the called subprogram contains the expected machining operations before resuming cycle.
1
Check available memory
Press PROGRAM, then LIST PROG soft key. Look at the bottom of the screen for memory usage display showing available vs. used program memory.
2
Delete unused programs
If memory is full, cursor to unused programs in the list and press DELETE PROG soft key to free up space. Focus on large programs or old setup programs no longer needed.
3
Load the required subprogram
With sufficient memory available, transfer the missing subprogram using your preferred method (USB, DNC, etc.). Verify successful transfer in the program list.
4
Implement memory management
Consider using program storage solutions like network drives or USB for less frequently used programs to prevent future memory issues.
Monitor memory usage regularly and maintain a library of active vs. archived programs.
DIY Feasiblehigh confidence
Call a technician if:
·Memory hardware errors preventing program storage
·Persistent alarm after confirming subprogram exists and M98 syntax is correct
Prevention
Always verify all subprograms are loaded before running main programs
Use program templates with consistent O-number schemes
Enable memory protect for critical subprograms
Maintain organized backup system for all programs and subprograms
Common Mistakes
Assuming subprograms transfer automatically with main programs
Not checking O-number syntax when copying M98 calls between programs
Deleting subprograms without checking if other programs call them
Running programs without verifying all dependencies are in memory