Save subroutine file and location

More
28 Jun 2021 21:32 #213175 by smplc
Are subroutine files only saved at /linuxcnc/nc_files/ngcgui_lib/utilitysubs ?  I'm the superuser and tried to save a ~Documents subroutine .ngc file to /utilitysubs via command line prompt and denied.  Here's the syntax used.  sudo cp o123.ngc /utilitysub .  mv was used instead of cp and that didn't work either.  Where is a subroutine saved and convention syntax?

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

More
28 Jun 2021 21:41 #213177 by tommylight
/linuxcnc/nc_files/ngcgui_lib/utilitysubs needs /home/user_name in front, so

sudo cp o123.ngc /utilitysub
becomes
sudo cp o123.ngc /home/user_name/linuxcnc/nc_files/ngcgui_lib/utilitysubs/
Granted the file o123.ngc is located in your home folder, or in /home/user_name/

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

More
28 Jun 2021 22:40 #213186 by BigJohnT
You should create a subroutine directory under linuxcnc and add that location to your ini file, the samples are hidden with symlinks and other crazy stuff lol. I would resist copying files to the symlink locations.

JT

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

More
29 Jun 2021 17:56 #213253 by smplc
Yes, that'd of been the expected but it seems that Debian /utilitysubs isn't being accepted as a file or directory but /utilitysubs icon is clearly a folder, opens, reveals .ngc subprogram files and they open. Could unable to copy an .ngc file to /utilitysubs have something to do with /utiilitysubs root or a permission setting? I thought in the past a subroutine was call able without altering it path, thus, default /utilitysubs.

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

More
29 Jun 2021 18:05 #213254 by smplc
My primary operating system is Ubuntu and Debian boot able via SD micro. Debian doesn't seem to have an extensive search and Ubuntu Nautilus search would probably need to get used to find an RS-274, PATH and subroutine file to modify it directory.

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

More
29 Jun 2021 22:50 #213286 by BigJohnT
Copy any subroutines you plan on using from the examples to linuxcnc/subroutines and add that path to your ini file.

linuxcnc.org/docs/2.8/html/config/ini-co...l#gcode:ini-features

JT

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

More
30 Jun 2021 19:56 #213361 by smplc
Thanks for the link.  I did find rs274ngc.inc at the Ubuntu /media and name search.  I'll try to name a new subroutine folder at /linuxcnc or /nc_files  and update the path with permission setting in the Terminal.  3.Library Locations looks like file rs274ngc.inc .  www.linuxcnc.org/docs/html/gui/ngcgui.html

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

More
01 Jul 2021 18:43 - 01 Jul 2021 18:51 #213441 by smplc
I went to rs274ngc.inc and opened terminal and copied directory sudo -i to root. Pasted rs274ngc.inc directory. chown -v username rs274.inc . Opened rs274ngc.inc and at SUBROUTINE PATH = added text home/username/linuxcnc/subprogram and saved. Pasted subroutine 111.ngc at /subprogram. Axis lathe screen and opened main program including o111 call and pop-up box G-Code error in main program: Unable to open file <111>. I tried changing the subroutine parameter name with angle brackets and receive the same pop-up box error. Could the subroutine path still be incorrect? Could file rs274ngc.inc chown need to go back to read only? Can subroutines be ran when Axis a simulation and is a setting to enable subroutine?
Last edit: 01 Jul 2021 18:51 by smplc.

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

More
01 Jul 2021 19:08 - 01 Jul 2021 19:11 #213444 by BigJohnT
Looks like your doing a lot of guessing...
linuxcnc.org/docs/2.8/html/gcode/o-code....#ocode:calling-files

I have no idea what your doing with rs274.inc or what that file is. You never need to do anything as root or change owner of a subroutine file.

You can if you want create a directory under linuxcnc called what ever you like, I like to call it subroutines. So the directory structure would look like the following:
user home directory
  linuxcnc
    configs
    nc_files
    subroutines

Next you need to edit your ini file and add the subroutine path.
linuxcnc.org/docs/2.8/html/config/ini-co...l#gcode:ini-features

Or you can simply place the subroutine file in the nc_files directory.

JT
Last edit: 01 Jul 2021 19:11 by BigJohnT.

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

More
01 Jul 2021 19:12 #213445 by BigJohnT
Can you attach your ini file?

JT

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

Time to create page: 0.108 seconds
Powered by Kunena Forum