On 27.02.12 20:54, Lars Andersson wrote:
> In EMC.ini I have PROGRAM_PREFIX =  /home/la/emc2/scripts.
> 
> This seems to affect defaults for both script and gcode files.
> 
> I would like to have different paths for script and gcode files.
> 
> Can I have that?

On 28.02.12 16:19, Eric H. Johnson wrote:
> Hi all,
> 
> I am trying to put o-word subroutines in a different folder from nc_files.
> In the ini file (I tried testing on sim/axis.ini and sim/tkemc.ini) I have:
> 
> PROGRAM_PREFIX = /home/emcuser/emc2/nc_files
> 
> So under [RS274NGC] I entered:
> SUBROUTINE_PATH = /home/emcuser/emc2/subroutines
> 
> And call it with:
> 
> O<headup> CALL
> 
> For example.
> 
> If the subroutines (headup.ngc and headdown.ngc) are in "nc_files", it works
> fine, but if I move them to "subroutines", I get a file not found error
> either immediately under axis or when trying to run under tkemc.
> 
> It is probably just a silly mistake on my part, but I sure don't see it.

Until LinuxCNC supports separate directories directly, there is
a workaround for both these use cases. Simply put the subroutine or other
files in any desired directory, then place a link to each file in the
$PROGRAM_PREFIX directory. e.g. for the latter use case:

$ ln /home/emcuser/emc2/subroutines/mysub001.ngc /home/emcuser/emc2/nc_files

(That's one line, but your mail client has probably wrapped it.)

That hard link makes the file appear equally in both directories, though
only one copy exists on disk. If one link is deleted, the one copy will
still be in the other.

If the two directories are on separate devices, you'll need a symlink
instead, i.e. add "-s" after the "ln". That link will remain afterwards,
if the file it points to is deleted, and so is a little more work to
maintain in that case.

Hopefully there's something new in the above, for Lars or Eric. At least
it is a way to do what they want, for now. The $PROGRAM_PREFIX directory
is now only a funnel connecting to a thousand file directories, if
desired.

Erik

-- 
A computer is like an air conditioner, it works poorly when you open Windows.


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to