Sabtu, 25 Juni 2011

G-code, M-code Programing CNC (1)

Dalam programing mesin CNC ( Computer Numerically Controlled ) kita mengenal G-code, M-code, dan T-code. Berikut ini sedikit ulasan tentang G-code dan M-code pada mesin cnc.

Kode G :menyatakan gerakan
Kode M :menyatakan fungsi mesin



G-CODE
jenis-jenis G-code di kelompokan menjadi 2 kelompok.

1.jenis basic/dasar meliputi:

-G00: gerakan cepat tanpa pemakanan benda kerja -->bergerak lurus
-G01: gerakan memotong/pemakanan benda kerja -->bergerak lurus
-G02: gerakan memotong melingkar searah jarum jam
-G03: gerakan memotong melingkar berlawanan arah jarum jam

2. jenis lanjut/siklus meliputi:

-gabungan langkah G00 dan G01 yang disedehanakan
-G90: sistem kordinat absolut
-G91: sistem kordinat incrimental

Berikut ini daftar G-code:


G00 - Rapid Positioning
G01 - Feedrate Positioning
G02 - Arc Clockwise
G03 - Arc Counterclockwise
G04 - Dwell
G05 - High Speed Machining
G07 - Imanaginary Axis Designation
G09 - Exact Stop Check
G10 - Program Parameter Input
G11 - Program Peramater Input Cancel
G12 - Circle Cutting CW
G13 - Circle Cutting CCW
G17 - X - Y Plane
G18 - X - Z Plane
G19 - Y - Z Plane
G20 - Input in Inch Units
G21 - Input in Metric
G22 - Stored Stroke Limit ON
G23 - stored Stroke Limit OFF
G27 - Reference Point Return Check
G28 - Automatic Return to Reference Point
G29 - Automatic Return from Reference Point
G30 - Return to 2nd, 3rd or 4th Reference Point
G31 - Skip Function
G33 - Thread Cutting
G34 - Bolt Hole Circle (Canned Cycle)
G35 - Line at Angle (Canned Cycle)
G36 - Arc (Canned Cycle)
G40 - Cutter Compensation Cancel
G41 - Cutter Compensation Left
G42 - Cutter Compensation Right
G43 - Tool Length Compensation (Plus)
G44 - Tool Length Compensation (Minus)
G45 - Tool Offset Increase
G46 - Tool Offset Decrease
G49 - Tool Length Compensation Cancel
G50 - Scaling OFF
G51 - Scaling ON
G52 - Local Coordinate Setting
G53 - Machine Coordinate Setting
G54 - Workpiece Coordinate Setting #1
G55 - Workpiece Coordinate Setting #2
G56 - Workpiece Coordinate Setting #3
G57 - Workpiece Coordinate Setting #4
G58 - Workpiece Coordinate Setting #5
G59 - Workpiece Coordinate Setting #6
G60 - Single Direction Positioning
G62 - Automatic Corner Override
G63 - Tapping Mode
G64 - Cutting Mode
G65 - Custom Macro Call (Simple)
G66 - Custom Macro Call (Modal)
G67 - Custom Macro Call Cancel (Modal)
G68 - Coordinate System Rotation ON
G69 - Coordinate System Rotation OFF
G70 - Input in Inch Units
G71 - Input in Metric Units
G73 - High Speed Peck Drilling Cycle
G74 - Left Hand Tapping Cycle
G76 - Fine Boring Cycle
G80 - Canned Cycle Cancel
G81 - Drilling Cycle (Canned)
G82 - Counter Boring Cycle (Canned)
G83 - Peck Drilling Cycle (Canned)
G84 - Right Hand Tapping Cycle (Canned)
G85 - Boring Cycle (Canned)
G87 - Back Boring Cycle (Canned)
G90 - Absolute Positioning
G91 - Incremental Positioning
G92 - Reposition Origin Point
G94 - Feed Per Minute
G95 - Feed Per Revolution
G96 - Constant Surface Speed Contrpl
G97 - Constant Surface Speed Control Cancel
G98 - Set Initial Plane (Default)
G99 - Return to Rapid Plane

sumber: http://www.4hiretek.com/gmcodes.html




M-CODE
Seperti halnya G-code, M-code juga memiliki 2 kelompok, dasar dan lanjutan:

M-code Dasar meliputi:
M02 - menghidupkan poros mesin (spindel on) berputar searah jarum jam (CW).
M03 - menghidupkan poros mesin (spindel on) berputar berlawanan arah jarum jam (CCW).
M05 - mematikan poros mesin (spindel off)
M30 - langkah terakhir (program end)

M-code Lanjutan meliputi:
M08 : Menghidupkan pendingin/coolant
M09 : Mematikan pendingin/coolant
Dll.

Berikut ini daftar M-code:

Untuk cnc Mill:

M00 - Program Stop
M01 - Optional Stop
M02 - Program End
M03 - Spindle Clockwise
M04 - Spindle Counter Clockwise
M05 - Spindle Stop
M06 - Tool Change
M07 - Thru Spindle Coolant ON
M08 - Flood Coolant ON
M09 - Coolant Off (all coolant)
M10 - Table Pallet Clamp
M11 - Table Pallet Unclamp
M12 - Shower Coolant On
M14 - Spindle Air Blow On
M15 - Spindle Air Blow Off
M16 - Air Blast / Tool Changer
M18 - Air Blast Off
M19 - Spindle Orientation
M29 - Rigid Tapping
M30 - End Program
M60 - Pallet Change
M61 - Load Pallet #1
M62 - Load Pallet #2
M98 - Sub Program Call
M99 - Sub Program Cancel


Untuk cnc Lathe/bubut:

M00 - Program Stop
M01 - Optional Program Stop
M02 - Program End
M03 - Spindle Clockwise
M04 - Spindle Counter Clockwise
M05 - Spindle Stop
M07 - Flood Coolant #1 On
M08 - Flood Coolant #2 On
M09 - Coolant Off
M30 - End Progarm
M98 - Sub Program Call
M99 - Sub Program Cancel


Sumber:http://www.4hiretek.com/gmcodes.html

Karena M-code merupakan code untuk fungsi mesin maka ada beberapa perbedaan M-code pada beberapa jenis mesin sesuai maker mesin.

Sekian..jika ada kekurangan mohon di koreksi... ditunggu komentarnya.
Terima kasih.

16 komentar:

  1. pke bhsa indo ja om G kode sma M codenya biar gmpang

    BalasHapus
  2. gpp bhsa inggris.. biar tau juga istilahnya. lagian di controllernya pada bhasa inggris semua

    BalasHapus
  3. cara menggunakan kode G04 pada cnc bubut tipe fanuc gimana ya ? agar program tetap bisa berjalan...mohon bantuannya...

    BalasHapus
    Balasan
    1. G04 diikuti nilai x
      X=nilai waktu delay.
      Co: G04 X1.0;

      Hapus
    2. oke pak..terima kasih infonya,...
      akhirnya bisa juga...

      Hapus
  4. mohon infonya , untuk membuat perintah agar program otomatis berhenti di menit berapa , pake M98 ya ?
    susunan nya seperti apa ya ?

    misal di menit ke 10 atau di pcs ke 5 otomatis berhenti...

    BalasHapus
  5. Kode M bisa memangil no program yang ada di memory card gak buat mesin turret puch model muratec 2048UT?

    BalasHapus
    Balasan
    1. wah kalo saya belum tahu mas, soalnya saya baru pake mesin bubut merk doosan lynx doang.... maaf ya

      mungkin agan2 yang lain bisa kasih masukan

      Hapus
  6. pa... dtempatku ada masalah g01 tidak berfungsi saat auto running.. gmana cara ngesetnya..

    BalasHapus
  7. pa... dtempatku ada masalah g01 tidak berfungsi saat auto running.. gmana cara ngesetnya..

    BalasHapus
  8. pa... dtempatku ada masalah g01 tidak berfungsi saat auto running.. gmana cara ngesetnya..

    BalasHapus
  9. Kalau pada alarm muncul G31 skip OT alarm, bagaimana mengatasinya

    BalasHapus
  10. Maaf kak mau tanya tentang G18 itu maksudnya gimana ya, tolong penjelasannya dan juga contoh nya,

    BalasHapus