Originally Posted by
mpack
I would point out that all the hard stuff can be done on a PC and stored on the SDcard as a data file - a kind of script to follow. All the RPi would have to do is read and write a few PIOs. I would have thought the application should be relatively trivial, doable in a few hundred bytes! Of course we'll need bootstrap and sdcard code on top of that - so call it a few thousand bytes. 512MB? And you think that won't be enough? Sheesh!
mpack,
I think that you might not understand fully what the process is. The problem with your idea is that as far as I know, there are no PC apps that would create the "script to follow" today. It would probably be possible to do so using a plug in to Mach 3 (or EMC but I have no experience with that) that could export a script but the file size could be quite ginormous - at least in CNC file size terms.
Normally, CAM apps spit out G-code. The controller app then interprets the G-code, plans the coordinated motion using a trajectory planner and then spits out the pulse trains to control the motors. Implementation of a trajectory planner and other machine controls is non-trivial and it would certainly take more than a few hundred bytes!
Something like the "Smooth Stepper" grabs the pulse data using a plug in to Mach 3 and then sends it to the smooth stepper via USB or Ethernet. The smooth stepper then generates the pulse streams with very accurate timing - this I think is what you've got in mind.
It also stands to reason that a similar plug in could be made to "record" the pulse stream data to a file for "playback" on a stand alone controller as well but, the file size will be in the GB size for longer jobs as opposed to kB to MB range with G-code.
If one truly wants to ditch the PC in the shop for machine control, I think that the best bet would be to make an embedded G-code interpreter with direct hardware control over I/O...a non trivial task that will probably take a bit more than a few hundred bytes!
-Andy B.
http://www.birkonium.com CNC for Luthiers and Industry http://banduramaker.blogspot.com