seuch...@yahoo.de wrote: >Dear Jan > > >>Check this chapter in the manual: >>http://linuxcnc.org/docs/2.3/html/gcode_main.html#r3_7 >>Regards, Jan >> >> > >======================================================================= >3.7 Calling Files > >To call a file name the file the same as your call and include a sub and >endsub. The file must be in the directory pointed to by PROGRAM_PREFIX > > o<myfile> call (a named file) > >or > > o123 call (a number file) > >In the called file include the oxxx sub and endsub and the file must be a >valid file > > myfile.ngc > o<myfile> sub > ... > o<myfile> endsub > M2 >================================================ > >If I interprete that correctly, I shoud be able to do this: > >Let's assume I have these files: >engrave.ngc, bevel.ngc, inner.ngc, outer. ngc, home.ngc > >I so, I woul generate another file, let's call it master.ngc with about te >following content: > > >omaster.ngc call engrave.ngc >omaster.ngc call home.ngc >omaster.ngc call bevel.ngc >omaster.ngc call home.ngc >omaster.ngc call inner.ngc >omaster.ngc call home.ngc >omaster.ngc call outer. ngc >omaster.ngc call home.ngc > >However that fails, why? > > I haven't tried it, but one thing to note is that the <> are necessary around a named O-word or parameter.
Also, the manual might be a little unclear since it looks like the text in parentheses is part of the command. I think what the instructions are trying to say is that the master file should do a call with the name of the subroutine file: O<engrave> call O<home> call ... And the subroutine files should be like this: engrave.ngc: O<engrave> sub (your engraving G-code goes here) ... O<engrave> endsub M2 home.ngc: O<home> sub (your homing g-code goes here) ... O<home> endsub M2 Etc. Try it and let us know if it works this way. - Steve ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users