System hangs repeatedly with certain combinations of operations

More
31 Jul 2025 23:48 #332613 by Jonathan_H
I raised this issue a couple of years ago, but then the hackspace closed for a while to move location, so looking into it had to be put on hold. I was hoping that updating linuxcnc would fix it, but if anything it got worse.

Denford 2600 Pro, linuxcnc conversion using Mesa board

So, I have two scripts which are linked to UI buttons.
The first does a spindle warmup. This consists of moving the spindle to the middle of the bed (location is arbitrary) and then running the spindle for a few minutes at an increasing speed.
The second is a tool change script, it moves the spindle front and centre, prompts the operator to change the tool and then click "continue", then moves to the front left and probes the length of the tool with a switch fixed to the bed, then moves carriage back to front centre.

So on a freshly started linuxcnc, I can run the tool change repeatedly, does exactly what is expected.

Now I run the spindle warmup, does what is expected.

But now I run a tool change again... it hangs

Toggle power off and on again from the UI, and try tool change again. It moves front and centre, prompts and waits for tool change, then moves to the front left to probe the tool length... and hangs

Also if I run a job with tool changes when it gets to the tool change the carriage moves front and centre, tool change prompt, moves front left... and hangs. Now this is actually worse than pre update, I used to be able to get through a full multi tool job without it hanging.

Configuration and script files are in this repository

github.com/londonhackspace/Denford-2600-Pro

I'm really rather stuck as to what to do next. I'm a software engineer so debugging software and systems is something I am used to, but linuxcnc is currently a bit of a black box to me. It seems that running the spindle warmup script must leave linuxcnc in a different state to when it is started, one that is somehow incompatible with the tool change script (whether this is correct functionality and the issue is my script or it is a bug in linuxcnc I don't know), but I don't know how to ascertain what is changing. How can I get useful diagnostic information?

Any pointers to how to proceed would be greatly appreciated

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

More
01 Aug 2025 00:20 #332614 by PCW
Running (in a terminal window when LinuxCNC is running)

halcmd show all > good.txt

(when running OK) and:

halcmd show all > bad.txt

when hung

( and posting good.txt and bad.txt here )

_May_  help find the reason it's hung.

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

More
01 Aug 2025 05:09 #332619 by Hakan
I noticed the ENDSUB doesn't match the SUB in tool-length-reset.

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

More
01 Aug 2025 12:02 #332624 by Jonathan_H
Thanks, I'll do this later today

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

More
01 Aug 2025 12:06 #332625 by Jonathan_H
Good spot,

I need to refresh my g-code understanding, but I am scratching my head as to what I was trying to achieve when I made that mistake. And also why much of the time it actually works fine (more so with an earlier version of linuxcnc).

I will do as PCW suggested first, then see if cleaning up that bit of code makes a difference.

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

More
01 Aug 2025 15:39 #332630 by Jonathan_H
Ok, so here is a sequence of halcmd show all outputs, stages reflectiing my original description of operations.

I tried fixing my endsub as pointed out by hakan, it made no difference

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

Time to create page: 0.058 seconds
Powered by Kunena Forum