Save subroutine file and location

More
5 years 3 months ago #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>.

Please Log in to join the conversation.

More
5 years 3 months ago #213447 by BigJohnT
Maybe this will help.
My directory structure on this PC.
 

Attachment not found



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

Attachment not found



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

Attachment not found



JT

Please Log in to join the conversation.

More
5 years 3 months ago #213448 by BigJohnT
In this example I modified the ini file to add a subroutine path in the [RS274NGC] section.
 

Attachment not found



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

Attachment not found



Here I ran the new subroutine in the Axis simulator.
 

Attachment not found



JT

Please Log in to join the conversation.

More
5 years 3 months ago #213449 by BigJohnT
Here you can see the location of the two subroutine files.
 

Attachment not found



JT

Please Log in to join the conversation.

More
5 years 3 months ago #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 to join the conversation.

More
5 years 3 months ago #213452 by BigJohnT
SUBROUTINE_PATH = /home/name/linuxcnc/subprograms

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

Attachment not found



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

Attachment not found



JT

Please Log in to join the conversation.

More
5 years 3 months ago #213453 by smplc
Yes.  Present version AXIS 2.7.0 LinuxCNC-HAL-SIM-LATHE rtai.

Please Log in to join the conversation.

More
5 years 3 months ago #213454 by BigJohnT
Your ini file looks correct.

Does the attached subroutine work for you?

JT

Please Log in to join the conversation.

More
5 years 3 months ago #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 to join the conversation.

More
5 years 3 months ago #213457 by BigJohnT
Does my simple subroutine work for you now?

JT

Please Log in to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum