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 dep
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 thi
This works with ngcgui (requires linuxcnc2.5):
(The files tst.ngc, part1.ngc,part2.ngc must be in
a directory specified by [RS274NGC]SUBROUTINE_PATH)
$ cat tst.ngc
o sub
# = #1 (=1 partno)
#= #2 (=123)
o if [# eq 1]
o call [#]
o endif
o if [# eq 2]
o call [#]
o endif
o
And another way that works with ngcgui
(files tst2.ngc,1.ngc,2.ngc must be in [RS274NGC]SUBROUTINE_PATH)
$ cat tst2.ngc
o sub
# = #1 (=1 partno)
#= #2 (=123)
o# call [#]
oendsub
$ cat 1.ngc
o1 sub
# = #1
(debug, this is part1 value=#)
o1 endsub
$ cat 2.ngc
o2 sub
On Wed, 2012-02-01 at 10:01 -0500, BRIAN GLACKIN wrote:
... snip
> 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 s
THanks Michael and Dwey,
I think I failed to properly code the individual part files and that is the
probable error. I will pluck away at it this evening and try again.
Kurt,
While that is one option, I am usually cutting out of a sheet of wood. I
have a higher level routine that I pass the up
On 02/01/2012 10:01 AM, BRIAN GLACKIN wrote:
> 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
> Valu
> You can pass a numeric argument. Then:
> O#4 call ...
>
Here is where I made a grammar error - I typed
o<#4> call [var1][var2] instead
Got rid of the <> and it passed this point of the code. The second error
is I failed to put o1 sub and o1 endsub around my code.
BTW: That's anoth
On 2 February 2012 03:51, Kenneth Lerman wrote:
> BTW: That's another place where it would be nice to have variables with
> string values.
Considering that C doesn't really do strings, adding them to G-code
might be nontrivial.
--
atp
The idea that there is no such thing as objective truth is,
On Thursday, February 02, 2012 02:13:53 AM andy pugh did opine:
> On 2 February 2012 03:51, Kenneth Lerman
wrote:
> > BTW: That's another place where it would be nice to have variables
> > with string values.
>
> Considering that C doesn't really do strings, adding them to G-code
> might be non
> On 2 February 2012 03:51, Kenneth Lerman wrote:
>
>> BTW: That's another place where it would be nice to have variables with
>> string values.
>
andy pugh wrote:
> Considering that C doesn't really do strings, adding them to G-code
> might be nontrivial.
>
> --
> atp
Gee, I bet that news w
On 2 February 2012 17:09, Alan Condit wrote:
> Gee, I bet that news would surprise Kernigan and Ritchie. I've been using
> strings in 'C' since 1977.
No, you have been using arrays of chars, and an external library to do
even simple things like compare two strings to see if they match.
I am no
On Thu, 2 Feb 2012 17:33:10 +0200
andy pugh wrote:
> On 2 February 2012 17:09, Alan Condit wrote:
>
> > Gee, I bet that news would surprise Kernigan and Ritchie. I've been
> > using strings in 'C' since 1977.
So much of K&R C was almost a 1:1 correspondence with PDP-11 machine
instructions. :-
13 matches
Mail list logo