How to run file from another file in?

More
04 Jun 2017 19:07 #94054 by aleksamc
aleksamc created the topic: How to run file from another file in?
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?
More
04 Jun 2017 19:42 #94055 by Todd Zuercher
Todd Zuercher replied the topic: How to run file from another file in?
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: aleksamc
More
05 Jun 2017 09:53 #94079 by aleksamc
aleksamc replied the topic: How to run file from another file in?
It's work good! Thanks a loot!
Moderators: Rick G
Time to create page: 0.064 seconds
Powered by Kunena Forum