Códigos de tornos CNC

códigos de torno cnc

Contenido

What are CNC lathe codes?

CNC lathe codes consist primarily of G-codes y M-codes, along with address codes y canned cycles. These codes form a programming language that controls the operations of a Torno CNC, including tool movement, spindle control, coolant management, and various machining functions.

The codes can range from simple movement commands to complex parametric programming, allowing for precise control and automation of the machining process.

Common G-codes and M-codes in CNC Lathe Programming

This table covers the most commonly used G-codes and M-codes in CNC lathe programming.

Note that some codes may vary slightly depending on the specific CNC control system being used. Always refer to your machine’s programming manual for the exact implementation of these codes.

CodeCategoríaFunciónNotas
G00MotionRapid positioning
Moves at maximum speed to specified position
G01MotionLinear interpolation
Moves in a straight line at specified feed rate
G02MotionCircular interpolation CW
Creates clockwise circular arc
G03MotionCircular interpolation CCW
Creates counterclockwise circular arc
G20UnitInch system
Sets programming to inch system
G21UnitMetric system
Sets programming to metric system
G28MotionReturn to home positionMoves to machine zero point
G96EjeConstant surface speed
Maintains constant cutting speed
G97EjeConstant spindle speedMaintains constant RPM
M03MiscellaneousSpindle on clockwise
Starts spindle rotation clockwise
M04MiscellaneousSpindle on counterclockwise
Starts spindle rotation counterclockwise
M05MiscellaneousSpindle stopStops spindle rotation
M30MiscellaneousProgram endEnds program and resets
G00MotionRapid positioning
Moves at maximum speed to specified position
G01MotionLinear interpolation
Moves in a straight line at specified feed rate
G02MotionCircular interpolation CWCreates clockwise circular arc
G03MotionCircular interpolation CCW
Creates counterclockwise circular arc
G04DwellDwell
Pause program for specified time
G20UnitInch system
Sets programming to inch system
G21UnitMetric system
Sets programming to metric system
G28MotionReturn to home positionMoves to machine zero point
G40CompensationTool nose compensation cancel
Cancels tool nose radius compensation
G41CompensationTool nose compensation left
Applies left tool nose radius compensation
G42CompensationTool nose compensation right
Applies right tool nose radius compensation
G50SettingSet coordinate systemEstablishes a coordinate system
G54CoordinateWork coordinate system 1
Selects work coordinate system 1
G55CoordinateWork coordinate system 2
Selects work coordinate system 2
G56CoordinateWork coordinate system 3
Selects work coordinate system 3
G57CoordinateWork coordinate system 4
Selects work coordinate system 4
G58CoordinateWork coordinate system 5
Selects work coordinate system 5
G59CoordinateWork coordinate system 6
Selects work coordinate system 6
G70CycleFinishing cyclePerforms finishing cycle
G71CycleStock removal in turningPerforms rough turning cycle
G72CycleStock removal in facingPerforms rough facing cycle
G73CyclePattern repeating
Performs pattern repeating cycle
G74CycleFace groovingPerforms face grooving cycle
G75CycleOuter/Inner diameter groovingPerforms OD/ID grooving cycle
G76CycleThreading cycle
Performs multi-pass threading cycle
G90ModeAbsolute programming
Sets absolute coordinate programming
G91ModeIncremental programming
Sets incremental coordinate programming
G94FeedFeed per minute
Sets feed rate in units per minute
G95FeedFeed per revolution
Sets feed rate in units per revolution
G96EjeConstant surface speed
Maintains constant cutting speed
G97EjeConstant spindle speedMaintains constant RPM
G98ReturnReturn to initial level
Returns to initial Z-axis level in canned cycles
G99ReturnReturn to R level
Returns to R-axis level in canned cycles
M00MiscellaneousProgram stopStops program execution
M01MiscellaneousOptional stop
Stops program if optional stop switch is on
M03MiscellaneousSpindle on clockwise
Starts spindle rotation clockwise
M04MiscellaneousSpindle on counterclockwise
Starts spindle rotation counterclockwise
M05MiscellaneousSpindle stopStops spindle rotation
M06MiscellaneousTool change
Performs automatic tool change
M08MiscellaneousCoolant onTurns on flood coolant
M09MiscellaneousCoolant offTurns off all coolant
M10MiscellaneousChuck clampClamps the chuck
M11MiscellaneousChuck unclampUnclamps the chuck
M19MiscellaneousOriented spindle stop
Stops spindle at a specific orientation
M30MiscellaneousProgram endEnds program and resets
M41MiscellaneousGear select 1Selects spindle gear range 1
M42MiscellaneousGear select 2Selects spindle gear range 2
M43MiscellaneousGear select 3Selects spindle gear range 3
M44MiscellaneousGear select 4Selects spindle gear range 4
M98MiscellaneousSubprogram callCalls a subprogram
M99MiscellaneousSubprogram endEnds a subprogram and returns

Example of a simple CNC lathe program:

O1000 (SIMPLE TURNING PROGRAM)
G21 G40 G95 G97
G28 U0 W0
T0101 (TURNING TOOL)
G50 S2000
G96 S180 M03
G00 X50.0 Z0.1
G01 X-1.6 F0.15
G00 X50.0 Z2.0
G28 U0 W0
M30

This program does the following:

  1. Sets up the machine (metric, tool comp off, feed per rev, constant RPM)
  2. Returns to home position
  3. Selects tool 1
  4. Sets max spindle speed and turns on constant surface speed
  5. Moves to starting position
  6. Performs a facing cut
  7. Retracts
  8. Returns home
  9. Finaliza el programa

While these codes are standardized to some extent, there can be variations between different machine manufacturers and controllers.

Volver arriba: Códigos de tornos CNC

gavinyyi
Director General y Director de Proyectos
Shenzhen Yijin Hardware Co., Ltd.

Gavin Yi

Gavin Yi es un destacado líder en fabricación de precisión y tecnología CNC. Como colaborador habitual de las revistas Modern Machine Shop y American Machinist, comparte sus conocimientos sobre procesos de mecanizado avanzados e integración de Industria 4.0. Sus investigaciones sobre optimización de procesos se han publicado en Journal of Manufacturing Science and Engineering e International Journal of Machine Tools and Manufacture.

Gavin forma parte de la junta de la National Tooling & Machining Association (NTMA) y con frecuencia realiza presentaciones en la International Manufacturing Technology Show (IMTS). Cuenta con certificaciones de las principales instituciones de formación en CNC, incluido el programa de fabricación avanzada de la Goodwin University. Bajo su dirección, Shenzhen Yijin Hardware colabora con DMG Mori y Haas Automation para impulsar la innovación en la fabricación de precisión.

gavinyyi

yijin hardware logo w

Pida presupuesto al #1 de China
Servicios de mecanizado CNC.

¿Listo para empezar?
Póngase en contacto con nosotros

Categorías
  • Casos prácticos
  • Mecanizado CNC
  • Fijaciones a medida
  • Materiales
  • Noticias y blog
  • Chapa metálica
  • Deportes
  • Acabado superficial

Más por explorar

top 10 fabricantes de tornos cnc
Mecanizado CNC
Los 10 mejores fabricantes de tornos CNC

Elegir entre los mejores fabricantes de tornos CNC del mundo se reduce a comprender los aspectos fundamentales: estabilidad de la máquina, precisión del husillo, arquitectura de control y precisión de las piezas a largo plazo bajo

servicios de mecanizado cnc de 4 ejes
Mecanizado CNC
Servicios de mecanizado CNC de 4 ejes

Las piezas con características angulares, detalles en varias caras o patrones radiales son un engorro para el mecanizado tradicional en 3 ejes. Se ve obligado a realizar varias operaciones manuales

Empiece hoy mismo. Consiga piezas rápidamente.

Diseño gratuito de piezas mecanizadas para sus proyectos con plazos de entrega rápidos.
es_ESES

Adjunte sus dibujos CAD 2D y modelos CAD 3D en cualquier formato, incluidos STEP, IGES, DWG, PDF, STL, etc. Si tiene varios archivos, comprímalos en un archivo ZIP o RAR. También puede enviar su solicitud de oferta por correo electrónico a [email protected].

Haz clic o arrastra archivos a esta área para subirlos.Puedes subir hasta 15 archivos.
Casillas de verificación

Adjunte sus dibujos CAD 2D y modelos CAD 3D en cualquier formato, incluidos STEP, IGES, DWG, PDF, STL, etc. Si tiene varios archivos, comprímalos en un archivo ZIP o RAR. También puede enviar su solicitud de oferta por correo electrónico a [email protected].

Formatos de dibujo 3D: .step/.stp, .dwg, .m3d, .x_t, .sldprt, .stl, .CATPart, .CATProduct, .iges/.igs
Formatos de dibujo 2D: .dwg, .cdw, .SLDDRW, .scr

Formatos comprimidos: .zip, .rar, .7z

Formatos de imagen: .pdf, .jpg/.jpeg, .gif, .png, .webp, .tif/.tiff

Formato de vídeo: .mp4

Formatos de oficina: .txt, .docx, .xlsx, .ppt, .ods