[Emc-users] PROGRAM_PREFIX with spaces

2019-10-07 Thread David Berndt
Just wanted to drop a note to the to the group so that other's don't have  
to troubleshoot this maybe as much as I have.


Turns out it might not be a great idea to put spaces in the directories  
that will go in your program path. It prevents custom M Codes from running  
from that directory and they seem to fail silently.  Or if they don't fail  
silently, there doesn't seem to be any warning about it that I could find.


Removed the space from my "NC Files" directory to NCFiles and updated  
PROGRAM_PREFIX and now my custom m-codes work.


Everything else seems to work regarding that program prefix, I could open  
files, etc. Should I have escaped that space in the config file? If so  
what are the escape characters valid for the ini file?


-Dave



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] PROGRAM_PREFIX

2012-02-29 Thread Eric H. Johnson
Erik,

Thanks for the tip, but ultimately that has the same problem. For now I will
just change the file attributes to require a sudo to edit or delete
subroutines. The main purpose was to put them some place where they would
not get accidentally deleted if someone was over zealous in cleaning up the
nc_files folder.

Thanks,
Eric

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.



--
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] PROGRAM_PREFIX

2012-02-29 Thread Lars Andersson
Thanks Erik,
funny thing that the same question popped up from both me and Eric.

Your answer is clear and educational, as always.

// Lars

 
 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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] PROGRAM_PREFIX

2012-02-28 Thread Erik Christiansen
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:
 
 Oheadup 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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] PROGRAM_PREFIX

2012-02-27 Thread Lars Andersson
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?

 

// Lars

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users