How to run file from another file in?

More
04 Jun 2017 19:07 #94054 by aleksamc
Hi all.

I want to mill big relief that takes much memory.

That's why I want at the end of file open another file to run.

I've found in G-code quick reference "6. Calling Files"

I've make small test program
------main.ngc----
g0 X100
oprog1.ngc call
-------------------------------------------
------prog1.ngc-----------
oprog1.ngc sub
   X200 
   X100
oprog1.ngc endsub
-----------------------------

When I load main.ng in linuxcnc, I have a messege: "Unknown word where unary operation could be"
What I make wrong?
What means "The file must be in the directory pointed to by PROGRAM_PREFIX or SUBROUTINE_PATH in the ini file." in guick reference? Where it should be pointed?

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

More
04 Jun 2017 19:42 #94055 by Todd Zuercher
First some minor syntax corrections.
------main.ngc----
g0 X100
o<prog1> call
-------------------------------------------
------prog1.ngc-----------
o<prog1> sub
   X200 
   X100
o<prog1> endsub
-----------------------------

The directory(s) your sub program(s) should be saved in is defined in your ini file. The default location is ~/linuxcnc/nc_files. But you can add other directories to the path by adding the line SUBROUTINE_PATH = to the [RS274NGC] section of your ini file and listing up to 10 different directories.
linuxcnc.org/docs/2.6/html/config/ini_co...sub:RS274NGC-section
The following user(s) said Thank You: cuagn, aleksamc

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

More
05 Jun 2017 09:53 #94079 by aleksamc
It's work good! Thanks a loot!

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

More
18 Mar 2019 17:10 #128908 by cuagn
Coming back after many years I was missing this important info:
"...The default location is ~/linuxcnc/nc_files. "
Now my subroutines work!
Tnks

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

More
21 Mar 2019 07:08 #129144 by pl7i92
you can run up to 100k lines to the memory
without reloading g-code
The following user(s) said Thank You: aleksamc

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

Time to create page: 0.108 seconds
Powered by Kunena Forum