Gmoccapy - spindle restarts at program stop

More
27 Mar 2025 23:01 #325123 by HansU

Looks like this might be limited to spindle speed and direction pins not consistently reacting to a program stop as 'spindle.0.on' seems to always clear.


 


Good catch. I will look at these pins in case it happens again. I had it only a few times when milling PCBs. Other than that it never occurred...

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

More
29 May 2025 13:02 #329364 by HalaszAttila
Replied by HalaszAttila on topic Gmoccapy - spindle restarts at program stop
Hello,

I ran a test again—maybe it will help someone solve the problem.
The system configuration is as follows:

Debian 12
LinuxCNC 2.10.0-pre0
Gmoccapy 3.5
Configuration generated with Stepgen (basic 3-axis mill).

Because I use a control panel with all my machines, I utilize many halui signals for program start/stop, spindle start/stop, overrides, etc.
As you can see in the video, the spindle signals (halui.spindle.0.is-on, spindle.0.forward/reverse) work correctly when the program is started by clicking the Start/Stop buttons in the Gmoccapy interface, and the number of lines in ngc file is fewer than ~1100.

However, when I load longer files than 1100 lines (attached a test file) and use halui.program.start/stop signals, the spindle signals behave differently and cause the spindle motor to restart from the HAL program.
I believe the issue is related to halui.program.stop. For example, if I start the program using the Gmoccapy button and then stop it using halui.program.stop, the problem still occurs.
But if I start the program using halui.program.start and stop it using the Gmoccapy Stop button, the problem does not occur.

Interestingly, the issue disappears when I reduce the number of lines in the program to below approximately 1100 lines (the test .ngc file originally had around 12,000 lines).

As shown in the video, the spindle signals reset at program stop and—though not every time, in about 8 out of 10 cases—they are set again shortly afterward and remain true.
When using only Gmoccapy buttons, the signals reset, generate a short pulse a bit later, and then reset again.
If the .ngc file contains fewer than ~1100 lines, the spindle signals reset at program stop and do not set again—no pulse is generated either.

Files and video:
drive.google.com/drive/folders/1MjqY3XpM...5T-rd4Og?usp=sharing


 

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

  • Aciera
  • Aciera's Avatar
  • Away
  • Administrator
  • Administrator
More
29 May 2025 13:41 #329365 by Aciera
Replied by Aciera on topic Gmoccapy - spindle restarts at program stop

Because I use a control panel with all my machines, I utilize many halui signals for program start/stop, spindle start/stop, overrides, etc.


I would try to avoid using halui and use the pins created by gmoccapy and use a hal structure to only enable them when auto mode is on.

 

www.linuxcnc.org/docs/html//gui/gmoccapy.html#_hal_pins

 
Attachments:
The following user(s) said Thank You: HalaszAttila

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

More
29 May 2025 15:38 - 29 May 2025 15:38 #329368 by langdons
Replied by langdons on topic Gmoccapy - spindle restarts at program stop
My e-stop switch has 2 actual switches:
One sends E-stop signal to LinuxCNC, the other one mechanically prevents any signal power from reaching the SSR that controls the router.
Last edit: 29 May 2025 15:38 by langdons. Reason: Fixed typo

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

Moderators: newbynobiHansU
Time to create page: 0.123 seconds
Powered by Kunena Forum