this works:

---- 1234.ngc ---
O1234 sub
(debug,in 1234.ngc, p1=#1 p2=#2 p3=#3)
O1234 endsub
m2
-------------

in MDI/code do this:

#1 = 1234  ; 'filename' - must be a number though
O#1 call [47] [11] [15]

- Michael

Am 01.02.2012 um 16:01 schrieb BRIAN GLACKIN:

> Hi all.
> 
> I tried to ask this question on IRC last eve and had trouble staying in
> channel.
> 
> equipment - 25" X 49" X 4" gantry router  for wookwork - all cutting is 2.5D
> 
> I have a subroutine o100 that at present, I pass three values too
> Value 1 is the total depth of cut
> Value 2 is the incremental depth of cut
> Value 3 is the feed rate
> 
> My past practice has been to cut and paste the gcode of a part into this
> subroutine.  This has been fine for multiples of a single part.  I recently
> started calling a gcode file directly from inside the subroutine which
> worked fine.
> 
> What I would like avoid constantly cutting and pasting code (or
> filenames) into my "parts program" subroutine. I thought I could send via
> the subroutine a fourth value with the file name.  The thought being that I
> can have a series of calls for different parts that I can cut out from the
> same sheet without having to mash up a massive gcode file.
> 
> So I modified the O100 to add that fourth value.
> 
> In the subroutine, I tried calling the file with O<#4> call.
> 
> ON loading the code into Linuxcnc, I get the error "Near Line XXX urnary
> operation expected ....."  Or something to that effect.  I typed the exact
> error in IRC channel last eve if anyone saw that.
> 
> 
> Can I pass a filename through a subroutine call??
> 
> I did try renaming the file to a numer (10000.ngc)  and tried passing both
> 10000 and 10000.ngc.
> 
> 
> Brian
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to