Okuma G-code practice
What carries over from any control
G00, G01, G02 and G03, the plane and units codes, absolute and incremental programming, F and S, and the spindle and coolant M-codes are read the same way on an Okuma. The reading method on the common G-codes page works for an OSP program too: set-up lines first, then each tool's moves.
Where OSP is its own
Areas to check in Okuma's programming manual rather than assume from Fanuc habits. Details differ between mills and lathes and between OSP generations.
| Code or word | What it does |
|---|---|
Work offsets | Okuma mills commonly select the work coordinate system with G15 H… rather than G54 to G59; check how your machine is set up. |
Variables | OSP uses named common and local variables (such as VC1) instead of Fanuc's numbered # variables. |
Subprograms | Called with CALL O… and a name or number, with arguments; not M98 P. |
Lathe cycles | OSP lathes have their own roughing, finishing and threading cycles (LAP). They do the job of G70 to G76 with different codes and words. |
EIA/ISO mode | Okuma controls can also run standard EIA/ISO G-code programs. Know which format a program uses. |
Habits that need a check on an Okuma
- Assuming G54. Offsets set the Fanuc way may not be the ones the program selects. Confirm the active work coordinate system on the screen.
- Reading # macros. Fanuc macro programs do not run as written; OSP variable names and syntax differ.
- Lathe cycle numbers. A Fanuc G71 roughing cycle and an Okuma roughing cycle are not the same code with the same words.
Habits that help
- Use Okuma's simulation and check screens. The control shows the active coordinate system and modal state; check it before the first cycle start.
- Prove out with single block and slow rapids. As on any control, run a new program a block at a time for the first part.
- Keep a page of your machine's OSP codes. A short list of the work offset, subprogram and cycle words your shop uses saves looking them up at the machine.
Quiz: the core codes every Okuma program uses
Mill and lathe: what does this code do?
M05
Codes and options vary by control version and machine builder. Check the manual for your machine before running a program.
Frequently asked questions
- Are Okuma G-codes the same as Fanuc?
- The core codes (G00 to G03, planes, units, absolute and incremental, F, S and the common M-codes) are. Work offsets, variables, subprogram calls and lathe cycles follow Okuma's own OSP conventions, so check those in the manual for your machine.
- Can an Okuma run Fanuc-style programs?
- OSP controls offer an EIA/ISO mode for standard G-code programs. Programs that rely on Fanuc macros or Fanuc lathe cycles still need checking or rewriting.
- How do I learn Okuma programming?
- Learn the core codes first, until you can read a program without a code list. Then learn the OSP layer from Okuma's manuals and your shop's programs, which is a short list once the core is automatic.
G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.