|
From: andy p. <bod...@gm...> - 2013-10-30 12:42:09
|
On 30 October 2013 11:47, Bertho Stultiens <be...@va...> wrote: > Every time I had to write a CNC-mill program using G-codes I got annoyed > by the archaic format and syntax. Especially when needing to convert > positional data from mil to mm, having recurring patterns and then also > trying to keep track of everything. Whist not wanting to defend G-code, which is, as you say, horrible as a programming language, it does already contain G-codes to switch between units and (At least with the LinuxCNC variant) repeating patterns are reasonably manageable with the use of subroutines, loops and conditionals. > I looked for a meta compiler or generic pre-processor, but could not > find anything that satisfied me. Being able to program should be "easy". There is an alternative (and possibly more interesting) approach, you could develop your meta-language into an alternative interpreter for LinuxCNC. The interpreter doesn't _have _ to read G-code. It is just that the only one we have does so. Pluggable interpreters have been an option for a while. -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto |