Save subroutine file and location

More
01 Jul 2021 19:16 - 01 Jul 2021 19:17 #213446 by smplc
I went to /utilitysubs opened terminal and copied directory. sudo -i . chown -v name cat > program.ngc . Printed texted and ctrl + z . Either /utilitysubs or /subprograms paths not recoverable yet or something else about the pop-up box: Unable to open file <111>.
Last edit: 01 Jul 2021 19:17 by smplc.

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

More
01 Jul 2021 19:25 #213447 by BigJohnT
Maybe this will help.
My directory structure on this PC.
 

I put 123.ngc in the nc_files directory.
This is the file contents.
 

Here is a shot of the Axis simulator where I ran the subroutine file from the MDI.
 

JT
Attachments:

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

More
01 Jul 2021 19:33 #213448 by BigJohnT
In this example I modified the ini file to add a subroutine path in the [RS274NGC] section.
 

I created a new subroutine and placed it in the subroutine directory.
 

Here I ran the new subroutine in the Axis simulator.
 

JT
Attachments:

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

More
01 Jul 2021 19:37 #213449 by BigJohnT
Here you can see the location of the two subroutine files.
 

JT
Attachments:

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

More
01 Jul 2021 20:14 #213451 by smplc
My /linuxcnc/subprograms ls show subprograms.ngc. I just went to the /linuxcnc/configs/sim.axis/axis.ini and texted in SUBROUTINE_PATH = /home/name/linuxcnc/subprograms and save. I would of expected PARAMETER_FILE = sim.var goto /utilitysubs folder before now seeing it in the axis.ini file. Reloaded Axis program is still same error pop-up box. My main program and line syntax is just ' o111 call ' if to retrieve the subprogram.

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

More
01 Jul 2021 20:28 #213452 by BigJohnT
SUBROUTINE_PATH = /home/name/linuxcnc/subprograms

Is your computer user named name? what does whoami report?
 

Open a terminal in your subprograms directory and see what pwd reports back. That is the path you need to use.
 

JT
Attachments:

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

More
01 Jul 2021 20:36 #213453 by smplc
Yes.  Present version AXIS 2.7.0 LinuxCNC-HAL-SIM-LATHE rtai.
Attachments:

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

More
01 Jul 2021 21:06 #213454 by BigJohnT
Your ini file looks correct.

Does the attached subroutine work for you?

JT
Attachments:

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

More
01 Jul 2021 21:18 #213456 by smplc
My use of the subroutine would include passing parameters for a macro and such as a long outer diameter grooving cycle. I wrote the code and tested it with NCPlot v2 program editor and backplotter but it syntax Macro B. Passing parameters with Macro B is G65. LinuxCNC parametric programming nice including more binary operators, looping, conditionals and angle bracket arguments. I possess PathPilot II and use LinuxCNC simulation because it more spontaneous offline.

I'd like a freestyle groove cycle and might require to develop it. It'd require source code and I probably would use C or C++. I'd need to know the path and folder that contains source code. It might be a similar configuration as the path to subroutines but a different directory. However, I'd research the directory, please inform me bye chance if you know the path.

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

More
01 Jul 2021 21:41 #213457 by BigJohnT
Does my simple subroutine work for you now?

JT

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

Time to create page: 0.286 seconds
Powered by Kunena Forum