[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
G code interpreters
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /diy/ - Do It yourself

Thread replies: 6
Thread images: 1
File: Cnc.jpg (8 KB, 246x205) Image search: [Google]
Cnc.jpg
8 KB, 246x205
Is there a book/guide that can teach me how to program my own G-code interpreter? (hopefully on arduino). I'd like to learn that programming by my own instead going for some pre made programs online.
>>
>>948045
I can't help much with a direct answer, but there is at least one CNC router platform that uses an Arduino mega.

In the past when I asked on machinist forums about details of how various CNC software actually worked (how the software itself was written) amateur and pro machinists alike generally didn't know anything about that aspect. They knew "machinist math" (tool feed rates and such) and they knew how to program 3-axis G-code, but they didn't know anything about writing computer software.
>>
>>948045
Turing Completeness states that it's a language just like any other, so just work your way through Modern Compiler Implementation in [Java/C++/ml], and when you've finished you'll be able to write a compiler or interpreter for any language, including G-Code.
>>
>>948045

Look at existing gcode interpreters, and learn how to write gcode by hand, that makes those do what you want to do first. Then, when you've got both a better idea of how it works, and what you want, you can use that gcode you wrote as a test case for your interpreter.

Marlin is a very popular gcode interpreter for 3d printing, but iirc does come with many features you'd use in subtractive manufacture (CNC router, laser cutter, etc) as well. It runs in arduino megas, and I think there are ports to due and other 32bit arm platforms as well. It supports all kinds of extra sensors, lcds, leds, buttons, pins, servos, etc, and Cartesian coordinate and delta machines. I don't know what else, but it's a kitchen sink type project, so it probably supports more than that.

GRBL is much simpler, and targeted at smaller atmea processor based arduinos. It includes Cartesian machine support, basic manual input, end stops, coolant enable, and pwm control for a spindle, and that's about it.

Both projects basiclly use arduino only as a bootloader and hardware platform, and everything else is just in vanilla c out c++.
>>
>>948045
there's not much to interpret, should be easy to program. just listen to the musical styling of the Geto Boys, particularly their 2005 Album: "The Foundation." You'll have all you'll need to get started.
>>
>>948045
Why the fuck would you want to do this?


I'de start by drawing a circle, square & triangle in a dxf, converting it to tap/g-code whatever and try reading that, if you can work out the interpretations of the start, burn-ins, burn in angle, angles, corners, end, jog and all the other shit like 16 point quarter arc then good look.
Thread replies: 6
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.