Button Move to Position
- christian99x
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
01 Feb 2019 17:19 #125482
by christian99x
Button Move to Position was created by christian99x
I want to create a button, which moves the cnc to a predefined (absolute) position.
Here is what I did in my config (which is in /home/cnc/linuxcnc/configs/my-machine):
ini:
custom_post_gui.hal
pyvcp-panel.xml
In the folder /home/cnc/linuxcnc/subroutines I created a file o100.ngc:
When I run the machine, there is a (new) button, but when I click it, I always receive the following error:
EOF in file:/usr/share/axis/images/axis.ngc
seeking o-word: o<100> from line:0
I'm fiddling around with this issue for a while already and searched the forum but can't find the problem. I think the paths are all correct?! Maybe somebody can point me in the right direction! Thanks in advance!
Here is what I did in my config (which is in /home/cnc/linuxcnc/configs/my-machine):
ini:
[RS274NGC]
SUBROUTINE_PATH = /home/cnc/linuxcnc/subroutines
custom_post_gui.hal
net remote-o100 halui.mdi-command-00 <= pyvcp.o100
pyvcp-panel.xml
<halpin>"o100"</halpin>
In the folder /home/cnc/linuxcnc/subroutines I created a file o100.ngc:
o100 sub
g53 g0 z0
g53 g0 x0 y0
o100 endsub
When I run the machine, there is a (new) button, but when I click it, I always receive the following error:
EOF in file:/usr/share/axis/images/axis.ngc
seeking o-word: o<100> from line:0
I'm fiddling around with this issue for a while already and searched the forum but can't find the problem. I think the paths are all correct?! Maybe somebody can point me in the right direction! Thanks in advance!
Please Log in or Create an account to join the conversation.
01 Feb 2019 20:07 - 01 Feb 2019 20:13 #125489
by Grotius
Replied by Grotius on topic Button Move to Position
In your ini, there is a trap :
[DISPLAY]
PROGRAM_PREFIX = /home/grotius/linuxcnc-grotius/configs/sim/grotius/nc_files/
# the program prefix is also for placing the subroutine's O-files. Beware of the / sign.
So place a / at the end....
in every ngc file you can do : o<subroutine> call
your subroutine file (subroutine.ngc) starts with code : o<subroutine> sub
ends with code :
o<subroutine> endsub
M2
Good luck !!
[DISPLAY]
PROGRAM_PREFIX = /home/grotius/linuxcnc-grotius/configs/sim/grotius/nc_files/
# the program prefix is also for placing the subroutine's O-files. Beware of the / sign.
So place a / at the end....
in every ngc file you can do : o<subroutine> call
your subroutine file (subroutine.ngc) starts with code : o<subroutine> sub
ends with code :
o<subroutine> endsub
M2
Good luck !!
Last edit: 01 Feb 2019 20:13 by Grotius.
Please Log in or Create an account to join the conversation.
- christian99x
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
04 Feb 2019 15:48 - 04 Feb 2019 15:51 #125661
by christian99x
Replied by christian99x on topic Button Move to Position
Thanks! My issue was not the path, but the fact that I named my subroutine files o100.ngc instead of 100.ngc. I set the subroutine_path as a absolute path, so the program_prefix does not affect the subroutine path.
Last edit: 04 Feb 2019 15:51 by christian99x.
Please Log in or Create an account to join the conversation.
Time to create page: 0.067 seconds