G58: Work offset 5
What G58 does
G58 selects the fifth stored work offset. Shops use G55 to G59 for a second vise, a second part, or a fixture with several stations. The values come from the offset page, so the program is only right if that page is right.
| Type | G-code |
|---|---|
| Machine | Mill and lathe |
| Group | Work offset |
| Modal | Yes: stays active until replaced by another code from the same group |
G58 example
G58 G00 X0. Y0. Move to program zero of work offset G58.
| Word | What it means here |
|---|---|
G58 | Work offset 5 |
G00 | Rapid positioning |
X0. | X axis target (on a lathe, the diameter) |
Y0. | Y axis target |
Codes people confuse with G58
| Code | What it does instead |
|---|---|
G54 | Work offset 1. Selects the first work coordinate system, where program zero is on the part. |
G59 | Work offset 6. Selects work coordinate system 6. |
Other codes in the work offset group
Only one code from a modal group is active at a time. Programming any of these replaces G58.
Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.
Quick check: G58
-
What does
G58do? (Mill and lathe) -
Which code: Selects work coordinate system 5.(Mill and lathe)
-
What does
G54do? (Mill and lathe)
Show the answers
- Selects work coordinate system 5.
- G58
- Selects the first work coordinate system, where program zero is on the part.
Frequently asked questions
- What does G58 mean in CNC programming?
- Work offset 5. Selects work coordinate system 5.
- Is G58 modal?
- Yes. G58 belongs to the work offset group and stays active until another code from that group is programmed.
- What is the difference between G58 and G54?
- G58 (work offset 5): selects work coordinate system 5. G54 (work offset 1): selects the first work coordinate system, where program zero is on the part.
- What is the difference between G58 and G59?
- G58 (work offset 5): selects work coordinate system 5. G59 (work offset 6): selects work coordinate system 6.
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.