G-Code Explained:
CNC Machine Ki Language Kaise Kaam Karti Hai?
G-code, M-code, work offsets, post processor aur Fusion CAM se NC program generate karne ka workflow — 3-axis se 5-axis aur turn-mill tak, Hinglish mein
Autodesk Fusion mein toolpath ready hai aur simulation mein cutter sahi jagah move kar raha hai. Ab shop floor par CNC machine ko kaise pata chalega ki kaunsa tool use karna hai, part ka zero kahan hai, spindle kis speed par chalana hai aur cutting move kis direction mein lena hai?
Key Concept:
Ye instructions NC program mein aati hain. CNC machining mein is program ko aam taur par G-code program bolte hain. Autodesk Fusion mein CAM toolpath se NC program banane ka kaam post processor karta hai — isi step par aapki machining strategy machine aur controller ki language mein convert hoti hai.
1. G-Code Kya Hai?
G-code CNC controller ko machining motion aur programming modes ki instructions deta hai. Ek line, jise block kehte hain, mein movement command, axis coordinates aur feed rate jaise words ek saath aa sakte hain.
G01 X25.0 F150.0
Ek typical G-code block — teen words ek saath
| Word | Iska Matlab |
|---|---|
| G01 | Programmed feed par straight-line move karein |
| X25.0 | X-axis ka programmed coordinate ya incremental distance |
| F150.0 | Active feed mode ke hisaab se programmed feed value |
Agar controller metric units, absolute positioning aur feed per minute mode mein hai, to is block ka meaning hai: tool active coordinate system mein X25.0 mm tak 150 mm/min ke feed par move karega. Agar incremental positioning active hai, to X25.0 ka matlab current position se X direction mein 25 mm ka move hoga. Isi liye CNC programmer ek line ke saath us waqt active modes bhi check karta hai.
IMG_PROGRAM — Fusion CAM Post Process dialog showing machine-specific post processor selected with NC output preview — G-code lines visible including G54, T01 M06, S2500 M03, G01 feed moves — representing the step where CAM toolpath converts to controller-ready NC code
2. G-Code Aur M-Code Mein Kya Difference Hai?
G-codes motion, work offsets aur programming modes define karte hain. M-codes spindle, coolant, tool change aur program end jaise machine functions control karte hain. NC program mein inke saath X, Y, Z, F, S aur T jaise address words bhi milte hain.
Neeche common Haas-style milling examples hain — apni machine par exact syntax controller manual se verify karein:
| Command | Common Use |
|---|---|
| G00 | Rapid positioning |
| G01 | Straight-line feed move |
| G02 / G03 | Clockwise / counterclockwise arc, active plane ke hisaab se |
| G54 | Work coordinate system select karna |
| G90 / G91 | Absolute / incremental positioning |
| M03 / M05 | Spindle clockwise start / spindle stop |
| M08 / M09 | Coolant on / off |
| M06 | Tool change |
| M30 | Program end aur reset |
S2500 M03 ka common milling meaning hai spindle ko 2,500 RPM par clockwise start karna. Turning mein S ki interpretation active spindle mode par depend kar sakti hai — constant surface speed mode mein S surface speed represent karta hai. Apni machine ka controller manual zaroor dekhiye.
3. Part Zero Aur Machine Zero Ka Difference Shop Floor Par Kyun Matter Karta Hai?
🎯 Machine Zero
Machine coordinate system ka fixed reference point — machine ki apni home position
📐 Part Zero
Programmer ka chosen reference — drawing, fixture aur machining setup ke hisaab se set kiya gaya datum
G54 Ka Role:
G54 jaise work offsets CNC controller ko batate hain ki programmed part coordinates ko kis work coordinate system se interpret karna hai. Fusion setup ka work offset number kis G-code mein output hoga — ye post processor ki mapping par depend karta hai.
⚠️ Common Shop Floor Problem:
Fusion setup mein Z0 stock ki top face par set hai, lekin machine par G54 ka Z reference fixture ki top face se set kar diya gaya. CAM screen par toolpath bilkul expected dikhega, lekin machine par cutting height shift ho jayegi. Isi liye first part se pehle CAM datum, setup sheet aur machine offset ko ek saath match karna zaroori hai.
IMG_5AXIS — Fusion 5-axis machine simulation showing CAM toolpath with work coordinate system (G54) setup highlighted — datum origin visible on part top face, representing the relationship between CAM setup datum and machine work offset entry at the controller
4. Autodesk Fusion Se G-Code Kaise Generate Hota Hai?
| Step | Programmer Kya Karta Hai? |
|---|---|
| 1. CAM Setup | Machine, stock, part orientation aur work coordinate system define karta hai |
| 2. Toolpath Programming | Facing, pocketing, drilling, profiling ya turning operations ke liye tool, feeds, speeds aur cutting parameters select karta hai |
| 3. Simulation | Stock removal aur tool motion review karta hai. Machine simulation available ho to holder, fixture aur machine components ke against clearance check karta hai |
| 4. Post Processing | Machine aur controller ke liye suitable post processor select karke NC file generate karta hai |
| 5. NC Review & Prove-out | Work offset, tool calls, spindle commands, approach, retract aur machine-specific motions review karta hai. First program ko shop ki approved prove-out procedure ke hisaab se verify karta hai |
Autodesk Fusion mein selected operations ya setups ko Post Process karke NC file export ki ja sakti hai. File ka format aur output selected post aur uski settings par depend karte hain.
5. 3-Axis, 4-Axis, 5-Axis Aur Turn-Mill Mein Post Processor Ka Role
Practical Question — Nayi Machine Purchase Karte Waqt Poochhiye:
“Kya aap mere exact machine model aur controller par mere sample part ka posted NC program demonstrate kar sakte hain?”
Machine brand ke saath model, controller version, axis configuration aur installed options post selection ko affect karte hain. Same brand ki do machines ke liye required output alag ho sakta hai.
| Machine / Operation | Posted Output Mein Kya Verify Karein? |
|---|---|
| 3-Axis Milling | Work offset, tool length compensation, drilling cycles aur approach/retract moves |
| 4-Axis Milling | Rotary axis direction, indexing positions aur rotary limits |
| 3+2 Indexed Machining | Rotary positioning sequence, workplane handling aur orientation change ke waqt clearance |
| Simultaneous 5-Axis | Linear aur rotary motion ka coordination, controller-specific tool center point control aur rotary range |
| CNC Turning | X-axis diameter ya radius convention, spindle mode aur tool offsets |
| Turn-Mill | Live tooling, C-axis mode, spindle selection aur sub-spindle sequences, agar machine par available hon |
5-Axis Blade Machining Example:
CAM mein cutter tilted position mein blade surface follow kar sakta hai. Machine par wahi motion execute karne ke liye post processor ko actual rotary configuration ke hisaab se output dena hota hai. Prove-out ke waqt blade surface ke saath holder, fixture aur rotary movement ka clearance bhi review karein.
IMG_TOLLIB — Fusion CAM Tool Library with post processor selection panel open — different machine-specific post processors listed (3-axis VMC, 4-axis rotary, 5-axis trunnion, turn-mill) — representing the post processor selection step that converts the same toolpath to different machine outputs
6. WinFusion G-Code Workflow Mein Kaise Help Karta Hai?
Autodesk Fusion — CAM toolpath generate karta hai
Machine-Specific Post Processor — us toolpath se controller ke liye NC output banata hai
WinFusion / Mechman Solution — CAM setup, post-processor selection ya customization, machine simulation aur programmer training mein implementation support deta hai. Fusion ke saath PowerMill, FeatureCAM aur PartMaker ke liye bhi post-processor services available hain
Validated Post Ka Goal:
Agar operator har program mein wahi tool call, retract ya spindle line manually edit kar raha hai, to us recurring change ko record karke post processor review karwana practical hai. Goal hai ki agreed operations ke liye routine manual edits ki zaroorat kam ho.
IMG_RAWMAT — CNC machine controller screen showing NC program loaded and running — G-code lines scrolling with active block highlighted, spindle running indicator visible — representing the final step where validated posted NC code runs on the actual machine for first-part prove-out
G-Code FAQs
Kya Autodesk Fusion G-code generate karta hai?
Kya ek CNC machine ka G-code doosri machine par chal sakta hai?
Kya machine simulation clear hone ke baad first part ka prove-out zaroori hai?
Agar mere paas already CAM software hai, to kya main post processor alag se request kar sakta hoon?
Apni CNC Machine Ke Liye G-Code Demo Ya Post Processor Chahiye?
3-axis, 4-axis, 5-axis, CNC turning ya turn-mill machine ke liye CAM evaluate kar rahe hain, ya existing NC output mein recurring edits aa rahe hain?
Machine make, exact model, controller aur ek sample component share karein — suitable CAM workflow, post processor aur machine simulation ka scope discuss karenge.
Sagar Brahmbhatt — Mechman Solution / WinFusion
Autodesk Authorized Channel Partner since 2015 | Vadodara, Gujarat | www.mechmansolution.com
Information checked on 18 November 2026. G-code syntax, controller behavior aur post processor requirements actual machine configuration, controller version aur CAM software ke according vary karenge — controller manual aur implementation provider se verify karein.
