Newbie - Can I call one ngc file in another?

More
11 Oct 2009 21:43 #958 by bqgray
So,

I am developing a series of processes, and it would be very useful to me to be able to call one ngc file from within another ngc file.

This way I could have the machine repeat a figure at anyplace I chose and with any number of iterations.

This programatic ability would be extreemly useful, but I don't seem to see it in the documentation. Something like "#include" in C?

Thanks,

Bill

Please Log in or Create an account to join the conversation.

More
11 Oct 2009 23:57 #960 by BigJohnT
Well it is not an include but a call to another file.

www.linuxcnc.org/docview/html//gcode_main.html#r3_7

John

Please Log in or Create an account to join the conversation.

More
12 Oct 2009 21:41 #963 by bqgray
Thanks Big John.

I'm very glad to have found that document in general... lots of good stuff in there.

But the portion on file including is not very clear it would seem... or at least it is not very clear to me.

I have been working with two files otest.ngc and square.ngc... just trying to get and file include to work here.

Here are the files...

otest.ngc
g0 x3 z2

o<square.ngc> call square.ngc

g0 x2 z2

m2

square.ngc
o<square> sub
g0 x1 y1 z3
g0 x2 y1
g0 x2 y2
g0 x1 y2
o<square> endsub
m2


I have attempted a good number of permutations of this format, but I have not found anything that successfully runs that code in square.ngc yet.

Any suggestions?

Thanks,

B

Please Log in or Create an account to join the conversation.

More
12 Oct 2009 21:47 #964 by BigJohnT
Bill,

Your real close but to call the file you use this syntax

o<square> call

and that is the letter O not the number zero.

John

Please Log in or Create an account to join the conversation.

More
13 Oct 2009 20:47 - 13 Oct 2009 20:49 #973 by bqgray
Hmmm...

I made the correction, but still no love. The execution just skips over the o command. No error, no complaint. Just completely ignored (as usual).

I have the file square.ngc both in the same directory as the otest.ngc file, and also in the directory that is listed in the ini file which step config allways resets to "/home/bgray/emc2/nc_files"

Simply doesn't seem to take?

B
Last edit: 13 Oct 2009 20:49 by bqgray.

Please Log in or Create an account to join the conversation.

More
13 Oct 2009 23:41 - 13 Oct 2009 23:42 #974 by BigJohnT
Bill,

Both files must be in "/home/bgray/emc2/nc_files" to work AFAIK and if you change the directory pointed to by PROGRAM_PREFIX then both files must be in that directory.
.

Regards
John
Last edit: 13 Oct 2009 23:42 by BigJohnT.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum