Subroutine error

More
22 Oct 2025 20:29 #336890 by Philip Lydin
Subroutine error was created by Philip Lydin
Im setting up my cnc which has a toolchanger but i have some weird issues that if the tool prepared and tool changed iocontrol hal pins goes high i get an error that line 0 would exeed the z axis / joint 2 limit. I have 2 machines running linuxcnc but still cannot seem to figure out the problem. Im very lost so any info would help. 


o<toolchange> sub

M73
G90
G53 G0 Z0
G0 X0 Y0

o100 if [EXISTS[#<_ini[traj]axes>]]
    #<geometry> = #<_ini[traj]axes>
o100 endif

o110 if [#<geometry> EQ 4]
    G0 A0
o110 else if [#<geometry> EQ 5]
    G0 A0 C0
o110 endif

o<toolchange> endsub [1]

M2
this sub is just as a test. 

File Attachment:

File Name: hal_2025-10-22.txt
File Size:12 KB
 

File Attachment:

File Name: ini_2025-10-22.txt
File Size:4 KB
Attachments:

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

Time to create page: 0.079 seconds
Powered by Kunena Forum