Error in tool_offsetview.py

More
21 Aug 2026 19:49 #348906 by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
If no one else is having this problem, then it's clearly just me. There's no point in pursuing this further.

That's strange, though, because I downloaded the entire program from Git, compiled it, and the same problem persists. Older master builds don't have this problem.
With a freshly compiled program, I open one of the default qtdragon configurations, open some gcode, run it, press stop, and the program stops, but the spindle doesn't turn off. I have to press stop again to turn the spindle off.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
21 Aug 2026 23:44 #348907 by tommylight
Replied by tommylight on topic Error in tool_offsetview.py
Just did a test on 2.10 sim that was probably compiled a year ago, besides not letting me run any gcode complaining ... ne, SCREAMING at me "abort something or another 3" , but it did turn the spindle on once and did require stop twice to turn off.
-
P.S.
No idea who thought adding sound/voice to cnc machine controller was smart, although it would be hilarious if it did scream some profanities when making mistakes, but since i always have music playing in the shops (loudly), it might give a heart attack to anyone else in the shop. :)

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

More
22 Aug 2026 04:55 #348908 by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
The voice can be helpful with testing HAL stuff. Qtvcp has a test_led component that can speak on hal pin state changes.

Maybe the problem is a race condition that doesn't effect me. I'll get looking.
I wonder if adding a m5 to the abort script would help?
The following user(s) said Thank You: tommylight

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

More
22 Aug 2026 12:30 #348910 by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
I did a few more tests, and with a short Gcode file of ~1500 lines, it works fine, disabling the spindle on the first try. If the file is already ~2000 lines long, there's a problem. This value may vary on different machines, but you can try shortening or extending the number of lines. The beginning and end of the file remain the same. Try test.ngc.
 
Attachments:

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

More
24 Aug 2026 18:16 #348965 by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
I did finally get this problem to show in a sim, with your test program.
It didn't show with 3d_chips.ngc though.

I actually can see the spindle (by the spindle speed display) stops then starts again.

If I put an m5 in the on_abort.ngc file I could get it to always kill the spindle.
That is masking the problem, but would help in the mean time.

I am testing master, which I think you are using too.

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

More
24 Aug 2026 21:09 #348974 by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
Made an issue:
github.com/LinuxCNC/linuxcnc/issues/4465

Found some things in testing:

-I can see the spindle speed display go to 0 on first abort then immediately return to previous speed.

-The sim uses on_abort.ngc but removing it doesn't make a difference, but adding an m5 to the script will stop the spindle reliably. I think this is just masking the problem.

-I also note in the test program the initial line that starts the spindle is silently ignored.
I am not sure this is related.

-If I abort close to the beginning of the program - always restarts the spindle.
If I abort near line 500, 1000, or 1500 spindle stops.


Do you see the same?
The following user(s) said Thank You: tommylight

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

More
24 Aug 2026 22:35 #348978 by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
Yes, I'm seeing exactly the same issues you're describing.

Adding M5 to on_abort.ngc does indeed work well in this case, although, as you say, it only masks the problem.

Nevertheless, it won't hurt to leave M5 in permanently.
The following user(s) said Thank You: tommylight

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

More
26 Aug 2026 00:12 #349018 by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
This should be fixed in master now.
Another Dev figured it out quick!

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

More
26 Aug 2026 08:39 #349023 by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
Yes, I tested it and it works fine.
Thanks for reporting the issue.

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

More
05 Sep 2026 17:16 #349355 by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
Hi Cmorley

I've done some more work on 3pcenter.
If you're interested, I have either a very minor fix for one function:

   def goCenter(self):
            c.mode(linuxcnc.MODE_MDI)
            c.wait_complete()
            c.mdi('g53 g0 z0')
            c.mdi('g54 g0 x'+self.dataX+'y'+self.dataY)
            c.wait_complete()
            self.w.pushButton_5.show()

or a fix for the entire file. It's more resilient to user errors.
X0Y0 can be executed at any time and from any position.
Test it if you like.
Attachments:

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

Moderators: cmorley
Time to create page: 0.523 seconds
Powered by Kunena Forum