- LinuxCNC
- General LinuxCNC Questions
- What signals can cause a move instruction to stall indefinitely?
What signals can cause a move instruction to stall indefinitely?
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7777
- Thank you received: 2073
01 Sep 2022 04:27 #250910
by cmorley
Replied by cmorley on topic What signals can cause a move instruction to stall indefinitely?
M5 sets spindle state to off, but leaves spindle speed at whatever it was previously set at.
if the internal wait-for-spindle logic code looks at spindle speed rather then spindle state it could becomes confused by waiting for a spindle to get up to speed (because it sees the spindle speed setting) but not realizing the spindle is actual set off.
setting pin 'spindle.0.at-speed' to true should cause a difference if I'm right.
I thought this code change was done only in master so I could be totally wrong.
Chris
if the internal wait-for-spindle logic code looks at spindle speed rather then spindle state it could becomes confused by waiting for a spindle to get up to speed (because it sees the spindle speed setting) but not realizing the spindle is actual set off.
setting pin 'spindle.0.at-speed' to true should cause a difference if I'm right.
I thought this code change was done only in master so I could be totally wrong.
Chris
Please Log in or Create an account to join the conversation.
- Jonathan_H
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
01 Sep 2022 13:08 #250922
by Jonathan_H
Replied by Jonathan_H on topic What signals can cause a move instruction to stall indefinitely?
@cmorley
I thought I tried setting that pin, but maybe I made a mistake.
I'll be going into the space tomorrow so I'll give it a go.
Thanks for your help on this.
If anyone else has any suggestions of things to try in order to get a little more data on the situation, please let me know so I can do them tomorrow.
I thought I tried setting that pin, but maybe I made a mistake.
I'll be going into the space tomorrow so I'll give it a go.
Thanks for your help on this.
If anyone else has any suggestions of things to try in order to get a little more data on the situation, please let me know so I can do them tomorrow.
Please Log in or Create an account to join the conversation.
- Jonathan_H
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
02 Sep 2022 21:37 #251061
by Jonathan_H
Replied by Jonathan_H on topic What signals can cause a move instruction to stall indefinitely?
@cmorley, it looks like you are on the right track.
In the axis MDI command bar…
S1000 M3
M5
G1 X200 F3000
… carriage doesn’t move, interpreter stalled…
.. on the command line…
halcmd unlink spindle.0.at-speed
halcmd setp spindle.0.at-speed TRUE
… carriage moves, interpreter completed instruction!!!
However I don’t see how issueing move instructions while the spindle is spinning would stop it from stalling on a move instruction after the M5. There seems to be more to it than just the status of spindle-at-speed
In the axis MDI command bar…
S1000 M3
M5
G1 X200 F3000
… carriage doesn’t move, interpreter stalled…
.. on the command line…
halcmd unlink spindle.0.at-speed
halcmd setp spindle.0.at-speed TRUE
… carriage moves, interpreter completed instruction!!!
However I don’t see how issueing move instructions while the spindle is spinning would stop it from stalling on a move instruction after the M5. There seems to be more to it than just the status of spindle-at-speed
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7777
- Thank you received: 2073
02 Sep 2022 22:01 #251064
by cmorley
Replied by cmorley on topic What signals can cause a move instruction to stall indefinitely?
If the spindle is spinning, then the spindle-at-speed will be set true, letting everything move.
If the spindle isn't turned on at all, then you won't ever get the spindle-at-speed set true.
The problem (it seems anyways) is, motion isn't supposed to check for spindle-at-speed when the spindle is off.
I'll see what I can find in the code. thanks for testing.
If the spindle isn't turned on at all, then you won't ever get the spindle-at-speed set true.
The problem (it seems anyways) is, motion isn't supposed to check for spindle-at-speed when the spindle is off.
I'll see what I can find in the code. thanks for testing.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7777
- Thank you received: 2073
02 Sep 2022 23:45 #251066
by cmorley
Replied by cmorley on topic What signals can cause a move instruction to stall indefinitely?
I may have gone down the wrong rabbit hole.
I can't cause the error you described in a simulation.
Are the commands you are using put into MDI or as a program?
If a program, is there other code? if you could make the smallest program that shows the problem, that would help.
also what is physically connected to this:
hm2_7i76e.0.7i76.0.0.input-12
I can't cause the error you described in a simulation.
Are the commands you are using put into MDI or as a program?
If a program, is there other code? if you could make the smallest program that shows the problem, that would help.
also what is physically connected to this:
hm2_7i76e.0.7i76.0.0.input-12
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17950
- Thank you received: 4817
03 Sep 2022 00:31 #251067
by PCW
Replied by PCW on topic What signals can cause a move instruction to stall indefinitely?
I was thinking maybe the pin doesn't show true when the requested
speed is 0 and the spindle is off (like encoder RPM --> near commanded
RPM would do)
speed is 0 and the spindle is off (like encoder RPM --> near commanded
RPM would do)
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7777
- Thank you received: 2073
03 Sep 2022 00:34 #251068
by cmorley
Replied by cmorley on topic What signals can cause a move instruction to stall indefinitely?
I set spindle-at-speed false and tried the commands as MDI and as a program.
It never failed to move.
But spindle-at-speed is only check at specifc times, so I think there is more gcode to make it fail.
It never failed to move.
But spindle-at-speed is only check at specifc times, so I think there is more gcode to make it fail.
Please Log in or Create an account to join the conversation.
- Jonathan_H
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
03 Sep 2022 01:20 #251069
by Jonathan_H
Replied by Jonathan_H on topic What signals can cause a move instruction to stall indefinitely?
MDI or gcode program give the same result. There's no other gcode required for success or failure than what I've already posted
Also I can start and stop the spindle using either the axis gui or the python interface to linuxcnc, then type the gcode into the MDI and the results are identical
Also I can start and stop the spindle using either the axis gui or the python interface to linuxcnc, then type the gcode into the MDI and the results are identical
Please Log in or Create an account to join the conversation.
- Jonathan_H
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
03 Sep 2022 01:25 #251070
by Jonathan_H
Replied by Jonathan_H on topic What signals can cause a move instruction to stall indefinitely?
Oh, and hm2_7i76e.0.7i76.0.0.input-12 is connected to the output of a relay on the VFD which is set to switch when it reaches the target frequency. The relay is connected to power from the board (as per Andy Pugh's instructions).
That seems to work correctly, I also have it going to an "LED" on the gui and it lights up when the spndle reaches speed (though not when the spindle is off, not surprisingly).
That seems to work correctly, I also have it going to an "LED" on the gui and it lights up when the spndle reaches speed (though not when the spindle is off, not surprisingly).
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
06 Sep 2022 23:09 #251365
by andypugh
Replied by andypugh on topic What signals can cause a move instruction to stall indefinitely?
Please Log in or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- What signals can cause a move instruction to stall indefinitely?
Time to create page: 0.069 seconds