An alternative way of using gcode

In the past I have generated gcode instructions on a line by line basis so you get lines such as
g1 x10 b10 f40 etc

It struck me recently that I could use the numbered and named parameters in emc to simulate an array and thus hold tables of values for rosette radii etc and use this data to write a kind of universal g-code program that used emc to replace the mechanical linkage between rosette and rubber by a digital one.

I thought that I could attach a pdf to this post but cannot find a way to do that. So please look at if you are interested in the details.

I only view this as an alternative way of doing things that would be ameniable to be replicated on a small processor such as the Netduino or Fez panda 2 without having to include the whole emc application. I would be interested in any views anyone may have about this approach.

This is a very clever approach. I downloaded your pdf file and read through most of it (although I'll admit that I'm not that well versed in programing in g-code). I think that the table-lookup approach is a very flexible approach to defining an arbitrary shape on a rosette.

For smooth cuts on a rose engine, my experience is that you need a resolution of about 2500 to 3000 micro-steps per revolution of the spindle for cutting work up to about 2" diameter. Any coarser than that and you'll see the striations from the cutter (this is assuming a 7 mil radius cutter such as the triangular carbide inserts that most people use). So you'll probably need some interpolation code in the software to get finer resolution than 1 degree.

For table-lookup, one could also have the basic pattern for a single repeat with the amplitude normalized. Then you could program the amplitude as a simple multiplier to any table value. The number of repeats would be easy to change. Also, the phase is just an offset to the look-up for the table value. Storing a single repeat of the pattern would allow you a greater resolution. However, I think you would still need some interpolation between table values to get down to the resolution of the stepper motor driving your spindle.