Books or info on writing an basic not BASIC interpreter
Hi does anybody have any useful links or books on writing a basic (simple)·interpreter. I need to write an interpreter for G-Codes for my little CNC mill i'm starting to build. I've read through the very large post on the forum concerning building a CNC mill and it's not quite what i'm after.
I would like the prop to control the whole system using VGA for the display and input programs directly or save/load programs to an SD card thanks to rockicki.
Any info is appreciated
Damo
I would like the prop to control the whole system using VGA for the display and input programs directly or save/load programs to an SD card thanks to rockicki.
Any info is appreciated
Damo
Comments
Damo
Just for reference. http://en.wikipedia.org/wiki/G-code
g-code is kind of like logo , but instead of moving a turtle your moving a tool bit. :- )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
www.truckwiz.com
·"Imagination is more important than knowledge..." ·· Albert Einstein
Do you have a software that will run the steppers already? Mach3 is a good software to borrow some ideas from for the Prop concept.
You need different headers for different routines: Routing would be one routine, drilling is another.
Post Edited (originator) : 3/6/2007 8:51:02 PM GMT
A circle or arc requires the starting coordinate for XY, and the radius start and end (I,J). Here is a circle with its center at X0 Y0, 1" radius, F = Inches Per Minute
There are variations of how this is done, but here is a simple version of a 1" radius circle with center at 0,0
G2 CW interpolate
G3 CCW interpolate
The software reading this code will move the stepper(or servo) in the correct steps and direction(interpolated)
A 1" x 1" square Gcode: G0 is a rapid move to position the motors for a cut. The Z(Tool) is referenced to 0 by lowering tool to material surface, then Zero out the axis. G1 is a linear move, for any new coordinate, move the tool that direction at the speed. A circle can actually be cut this way, just use many short lines based on some resolution.
Post Edited (originator) : 3/6/2007 10:48:28 PM GMT
-Phil
I would like circular/arc interpolation and line numbers wouldn't be a problem
I'm fairly certain most of the background work as far as the control side is concerned has been achieved by a helpful fellow on these forums called NEWZED.
I believe his positioning info/program is embedded inside his spin program and he must upload a new program to the prop everytime he needs to machine something different, hopefully NEWZED may be nice enough to clarify this.
That just leaves the display, interpreter and SD card to figure out. I realise I may need two props for this.
Thanks for everyones input so far [noparse]:)[/noparse]
Damo
Edit: Sorry it took me so long to reply. I'm in England and have to sleep
Post Edited (Damien Allen) : 3/7/2007 12:34:22 PM GMT
(Links to a search for 'interpreter' in the Computers & Internet category)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...