- Posts: 14
- Thank you received: 0
Button Move to Position
- christian99x
- Topic Author
- Offline
- New Member
-
Less
More
7 years 8 months ago #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:
Code:
[RS274NGC]
SUBROUTINE_PATH = /home/cnc/linuxcnc/subroutines
custom_post_gui.hal
Code:
net remote-o100 halui.mdi-command-00 <= pyvcp.o100
pyvcp-panel.xml
Code:
<halpin>"o100"</halpin>
In the folder /home/cnc/linuxcnc/subroutines I created a file o100.ngc:
Code:
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 to join the conversation.
7 years 8 months ago #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 !!
Please Log in to join the conversation.
- christian99x
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
7 years 8 months ago #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.
Please Log in to join the conversation.
Time to create page: 0.320 seconds
