On 08.02.12 14:12, andy pugh wrote: > On 8 February 2012 14:02, Viesturs Lācis <viesturs.la...@gmail.com> wrote: > > Erik proposed this line: > > Arc CW X0 Y1 Centre X1 Y0.5 Feedrate 25 > > > > Is "centre x1 y0,5" are incremental distance from current point or > > absolute coordinates of center point?
Well, the example is the second from "1.5.2 Examples" at http://www.linuxcnc.org/docs/html/gcode_main.html > I think that it means absolute X and Y, and that an alternative syntax > might be used for relative centre arcs. > Arc CW X0 Y1 Offset X1 Y-0.5 for example, or possibly > Arc CW X0 Y1 Centre I1 J-0.5 There are several reasons for greatly preferring your first line, I think: 1) An explicit keyword, rather than encoding meaning in cryptic non-axis parameters, better communicates what the command does. 2) Maintaining consistent use of explicit machine axis identifiers across all commands eases interpretation of which arc-centre ordinate is what on the machine. (i.e. Is I really Y, or is J really X?) 3) Each keyword is unavailable to the user as a variable name, just as in the C language, for example. It is probably worse to steal the common loop counter names I and J, than to monopolise "Offset". (If we demand the capital initial, then the user can still have "offset", if that doesn't confuse him.) Well, OK, the user would still have i and j, even if we keep I and J, but minimising the keyword pool is good language practice, and less for the user to learn. A significantly more explicit alternative syntax, with 5 variations, may be: Arc CW X0 Y1 Centre X1 Y-0.5 ; Rely on current modality. Arc CW X0 Y1 Centre Abs X1 Y-0.5 ; Arc & change to absolute. Arc CW X0 Y1 Centre Rel X1 Y-0.5 ; Arc & change to relative. Here, the compiler could attach a comment to the output, noting that the change is modal, for the benefit of noobs like me. The comment could be just mimic the command: " ; Arc Mode Abs ", so we're always looking for one thing. Just a thought. Arc Mode Abs ; Change to absolute. Arc Mode Rel ; Change to relative. As in the Spindle syntax, this would use two gcodes to achieve the second and third axamples, above. And in the first case, a comment could be output, showing the modality state for the case of a program which is simple fall-through, at least up to this point. If the offset difference isn't big enough to be obvious when cutting air, that could save a workpiece. > > When compared to "normal" g-code, it becomes clear: > > G2 X0 Y1 I1 J0.5 F25 > > Well, it is clear if you can unravel the code to see whether G90.1 or > G91.1 is active at the point of execution, otherwise you can't tell. If I'm looking through 3000 lines of CNC program, maybe I'd prefer to be scanning for "Arc Mode Abs". Erik -- Foreign purchase of even a one-bedroom unit in an Australian city undergoes government assessment, but farming land up to $244 million per farm, may be bought without government scrutiny. - Summarised from the "Weekly Times", 8th February, 2012. ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users