M4 doesn't work
- AlexMagToast
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 86
- Thank you received: 67
14 Sep 2023 19:04 #280764
by AlexMagToast
M4 doesn't work was created by AlexMagToast
Hi,
I am running out of ideas, so i decidet to ask here for help. The issue is, that LinuxCNC is not running M4 commands.
My setup is a 7i95 and a Servo Motor for the Spindle, which is controlled by a quadrature signal.
The motor works, i can send M3 S... commands and they are executed, Speed is correct.
However, when i send M4 S... commands, the spindle stops and nothing happens.
I know, the motor works. Flipping the direction also works by inverting the step_scale in ini and exchanging the A B signals of the quadrature signal.
Looking in the HAL i can see with M3 halui.spindle.0.is-on, halui.spindle.0.runs-forward, spindle.0.forward, spindle.0.on is all turned on.
with M4 only halui.spindle.0.runs-backward is turned on.
In the Forum i found this thread, which experiences pretty much the same behavior, however i am running on AXIS and i don't think i have the same issue.
Here is my complete Setup: github.com/AlexmagToast/WeilerPrimusCNC_LinuxCNC_config
Thanks in Advance,
Alex
I am running out of ideas, so i decidet to ask here for help. The issue is, that LinuxCNC is not running M4 commands.
My setup is a 7i95 and a Servo Motor for the Spindle, which is controlled by a quadrature signal.
The motor works, i can send M3 S... commands and they are executed, Speed is correct.
However, when i send M4 S... commands, the spindle stops and nothing happens.
I know, the motor works. Flipping the direction also works by inverting the step_scale in ini and exchanging the A B signals of the quadrature signal.
Looking in the HAL i can see with M3 halui.spindle.0.is-on, halui.spindle.0.runs-forward, spindle.0.forward, spindle.0.on is all turned on.
with M4 only halui.spindle.0.runs-backward is turned on.
In the Forum i found this thread, which experiences pretty much the same behavior, however i am running on AXIS and i don't think i have the same issue.
Here is my complete Setup: github.com/AlexmagToast/WeilerPrimusCNC_LinuxCNC_config
Thanks in Advance,
Alex
Please Log in or Create an account to join the conversation.
- AlexMagToast
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 86
- Thank you received: 67
14 Sep 2023 19:06 #280765
by AlexMagToast
Replied by AlexMagToast on topic M4 doesn't work
Forgot to paste the link to the Thread:
forum.linuxcnc.org/gmoccapy/36200-spindle-ccw-hanging
forum.linuxcnc.org/gmoccapy/36200-spindle-ccw-hanging
Please Log in or Create an account to join the conversation.
14 Sep 2023 21:17 #280785
by chris@cnc
Replied by chris@cnc on topic M4 doesn't work
What happens in these lines?
net spindle-manual-cw halui.spindle.0.forward <= arduino.din.46
net spindle-cw => arduino.dled.2
net spindle-manual-ccw halui.spindle.0.reverse <= arduino.din.42
net spindle-ccw => arduino.dled.0
net spindle-manual-stop halui.spindle.0.stop <= arduino.din.44
Usually should pin spindle.0.on go high in case of M3 and M4.
net spindle-manual-cw halui.spindle.0.forward <= arduino.din.46
net spindle-cw => arduino.dled.2
net spindle-manual-ccw halui.spindle.0.reverse <= arduino.din.42
net spindle-ccw => arduino.dled.0
net spindle-manual-stop halui.spindle.0.stop <= arduino.din.44
Usually should pin spindle.0.on go high in case of M3 and M4.
Please Log in or Create an account to join the conversation.
- AlexMagToast
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 86
- Thank you received: 67
14 Sep 2023 21:52 #280790
by AlexMagToast
Replied by AlexMagToast on topic M4 doesn't work
these are Hardware Buttons to start and stop the Spindle with an LED inside that lights up depending on the State.
Usually should pin spindle.0.on go high in case of M3 and M4.
Yes, thats what i am thinking too. Maybe i stubled on a Bug. Im currently running a 1.9pre Version.
Usually should pin spindle.0.on go high in case of M3 and M4.
Yes, thats what i am thinking too. Maybe i stubled on a Bug. Im currently running a 1.9pre Version.
Please Log in or Create an account to join the conversation.
15 Sep 2023 00:08 #280796
by PCW
Replied by PCW on topic M4 doesn't work
As chris@cnc suggested, maybe something in halui or the user
interface is preventing M4 from working properly.
I would run LinuxCNC, issue a mdi m4 s100 and post the results of
halcmd show pin spindle*
interface is preventing M4 from working properly.
I would run LinuxCNC, issue a mdi m4 s100 and post the results of
halcmd show pin spindle*
The following user(s) said Thank You: AlexMagToast
Please Log in or Create an account to join the conversation.
- AlexMagToast
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 86
- Thank you received: 67
15 Sep 2023 11:12 #280827
by AlexMagToast
Replied by AlexMagToast on topic M4 doesn't work
Here are the results in the attachment:
Please Log in or Create an account to join the conversation.
15 Sep 2023 15:10 - 15 Sep 2023 15:24 #280855
by Aciera
Replied by Aciera on topic M4 doesn't work
Maybe have a look at these pins in halscope when issuing M4 S...:
halui.spindle.0.forward
halui.spindle.0.reverse
halui.spindle.0.stop
Also commenting the lines that use the above pins and try MDI command M4 S... may give you some clue as to what is going on.
[edit]
Just to be on the same page, if you comment out these lines in your hal, does MDI m4 S... work or not?
net spindle-manual-cw halui.spindle.0.forward <= arduino.din.46
net spindle-cw => arduino.dled.2
net spindle-manual-ccw halui.spindle.0.reverse <= arduino.din.42
net spindle-ccw => arduino.dled.0
net spindle-manual-stop halui.spindle.0.stop <= arduino.din.44
halui.spindle.0.forward
halui.spindle.0.reverse
halui.spindle.0.stop
Also commenting the lines that use the above pins and try MDI command M4 S... may give you some clue as to what is going on.
[edit]
Just to be on the same page, if you comment out these lines in your hal, does MDI m4 S... work or not?
net spindle-manual-cw halui.spindle.0.forward <= arduino.din.46
net spindle-cw => arduino.dled.2
net spindle-manual-ccw halui.spindle.0.reverse <= arduino.din.42
net spindle-ccw => arduino.dled.0
net spindle-manual-stop halui.spindle.0.stop <= arduino.din.44
Last edit: 15 Sep 2023 15:24 by Aciera.
The following user(s) said Thank You: AlexMagToast
Please Log in or Create an account to join the conversation.
15 Sep 2023 15:15 #280856
by PCW
Replied by PCW on topic M4 doesn't work
Look like something is preventing M4 from working, maybe need to look at all spindle related pins/signals
halcmd show all | grep spindle > spindle.txt
and post spindle.txt here
halcmd show all | grep spindle > spindle.txt
and post spindle.txt here
The following user(s) said Thank You: AlexMagToast
Please Log in or Create an account to join the conversation.
- AlexMagToast
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 86
- Thank you received: 67
15 Sep 2023 15:43 #280858
by AlexMagToast
Replied by AlexMagToast on topic M4 doesn't work
Thanks for your suggestions.
@Aciera even with the lines fully commented out, nothing changes in the behaviour. so : no work.
@PCW how do i run this command?
i selected every spindle pin in halshow and append a screenshot here, this is after M4 S100 was issued.
now i have also upgraded to Linuxcnc 2.10.0. pre0, but the issue remains.
Again thanks for your help, guys!
-Alex
@Aciera even with the lines fully commented out, nothing changes in the behaviour. so : no work.
@PCW how do i run this command?
i selected every spindle pin in halshow and append a screenshot here, this is after M4 S100 was issued.
now i have also upgraded to Linuxcnc 2.10.0. pre0, but the issue remains.
Again thanks for your help, guys!
-Alex
Please Log in or Create an account to join the conversation.
15 Sep 2023 15:48 #280859
by PCW
Replied by PCW on topic M4 doesn't work
Run / start linuxcnc and issue a m4 s100
then in a terminal window, type
halcmd show all | grep spindle > spindle.txt
and post spindle.txt here
then in a terminal window, type
halcmd show all | grep spindle > spindle.txt
and post spindle.txt here
Please Log in or Create an account to join the conversation.
Time to create page: 0.140 seconds