Okuma LC-10 CNC: Resolving END of Program Error 2 Guide

Jason IP2 min read
Other ManufacturerOther TopicTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

An Okuma LC-10 program needs two different endings: M2 ends executable CNC code, while % frames an offline transfer. Mixing the transfer delimiter into a program edited at the control can produce END of Program error 2.

Separate the program end from transfer framing

Use M2 as the final executable command. When sending a program from a computer, place % after M2 on its own line so the receiving control can detect completion of the transfer. The control may remove this delimiter during the download.

Programming method Program ending Purpose of %
Editing at the CNC control M2 Do not add it as an end marker.
Transferring from a computer M2, followed by % on a separate line Signals the end of transmitted input.

Format an offline LC-10 file

The supplied evidence shows an offline naming line in the form $GOOD-TEST.MIN%. Here, $ introduces the filename and the attached % indicates that program blocks begin on the next line. The transfer-ending % remains a separate final line.

$GOOD-TEST.MIN%
N1 ...
...
N29M2
%

A second reported format uses % alone at both the beginning and end. That recommendation is conditional on the machine having an OSP 3000 control. Because the machine is described only as a 1982 LC-10, confirm the control model before changing the header format.

Clear END of Program error 2

  1. Remove the trailing % if the program was entered directly at the control.
  2. Confirm that the last executable block contains M2.
  3. For a computer transfer, restore % after M2 on its own line and retain the supported offline header format.
  4. Convert all program text to uppercase before transferring it; the reported control behavior includes failure to recognize lowercase characters.
  5. Transfer the file again and verify that the complete program arrives, the final executable block is M2, and no error appears when the program is selected or checked.

Confirm the control and communication format

G-code syntax is not fully interchangeable among CNC manufacturers, and the start/end characters used for serial transfer are communication framing rather than motion commands. Preserve the postprocessor output only when it matches the installed control and the chosen offline-transfer method.

If the control is confirmed as an OSP 3000, the evidence recommends ISO input/output with parameter #19 set to 1. Do not apply that setting solely from the machine's age; first identify the control and record the existing parameter value. The evidence does not establish the correct parameter for another control model.

FAQ

What ends a program on an Okuma LC-10?

Use M2 as the executable end-of-program command. A following % is an offline transfer delimiter, not a replacement for M2.

Should an Okuma LC-10 program end with a percent sign?

Use % on a separate line after M2 when transferring from a computer. Do not enter the trailing % when editing the program directly at the CNC control.

Why does an Okuma LC-10 reject lowercase code?

Some reported control versions do not recognize lowercase characters reliably. Convert addresses and program text to uppercase before transfer, then verify that the complete file was received.

Back to blog