I have wished for a long time for a general mechanism for defining a path (profile) once, then using that path multiple times in functions. This reinvention of G71/G70 looks like a good opportunity to create such a mechanism. I use G71/G70 often in code for our Mori Seiki lathe (Fanuc 0i control). I see no particular reason to slavishly implement the Fanuc syntax though, as it is very peculiar. I have to study the manual carefully every time I write a new program using it. Something more general and intuitive for LinuxCNC would be great.
-- Ralph ________________________________________ From: Michael Haberler [mai...@mah.priv.at] Sent: Monday, August 27, 2012 2:37 AM To: Enhanced Machine Controller (EMC) Subject: Re: [Emc-users] G71 lathe roughing cycle Ben, it's a creative idea, I like it. The semantics of the 'profile block' is a bit shaky wrt normal execution logic of rs274ngc, but let's see if we can mutate this into common ground so it can be easily done with a remap. what you have is a cycle which in essence refers to a datastructure, namely a list of lines and arcs. assume for a moment you wont specify that datastructure not with aliasing the meaning of existing G-code means, but define new G-codes which dont move the machine but define part of a profile; otherwise have identical parameters. So for instance you use G0, G1, G3 in http://www.bpuk.org/linuxcnc/test2.ngc, its profile block being: N1 G0 X25 N2 G1 Z-10 N3 G3 X20 Z-15 R5.5 N4 G1 Z-20 N5 G2 X15 Z-25 R5.5 N6 G1 X12 N7 G1 X10 Z-28 N8 G1 X5 Now lets introduce profile-defining Gcodes G200,G201, and G203 which mirror G0,G1, and G3 except they dont move the machine but rather record profile segments; also I would assume we need a word to specify a profile id, and to clear a profile. Assume we have numbered profiles, so we create a 'M200 P<profile id>' remapped code to clear out the given profile. Also assume G200,G201,G203 will require a word defining which profile that actually is appended to. I'd need to check for conflicts but for now assume it's 'P<profile id>' as well. So with the new scheme we would define the above profile as follows: M200 P47 (clear profile 47) G200 X25 P47 G201 Z-10 P47 G203 X20 Z-15 R5.5 P47 G201 Z-20 P47 G202 X15 Z-25 R5.5 P47 G201 X12 P47 G201 X10 Z-28 P47 G201 X5 P47 what we would have behind the scenes is say G200 causing a python method "g200" to be executed which takes the words from the current block and appends a 'rapid' instruction to the profile 47 command list, and the Python method "m200" would clear that list. now when that profile is executed in your example, all we do is the following: G18 G21 G91.1 T02 M06 G43 S2000 M03 (Bottom to top, right to left) (G1 X30 Z5 F1000) G0 X5 Z1.0 (Start Position before commanding the cycle) G71 D0.5 F900 J1 L1 I0.5 K0.5 P47 (execute profile 47) so we're not referring to the profile by block number, but by profile id. Same effect, but we havent messed up rs274ngc execution semantics, and along the way we have created a command list in the Python context which can be taken as the basis for cycle execution. See what I mean? if you go that route you can entirely stay with Python, NGC and remap config statements in the ini file. - Michael ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users