What signals can cause a move instruction to stall indefinitely?

More
01 Sep 2022 04:27 #250910 by cmorley
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

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

More
01 Sep 2022 13:08 #250922 by Jonathan_H
@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.

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

More
02 Sep 2022 21:37 #251061 by Jonathan_H
@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

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

More
02 Sep 2022 22:01 #251064 by cmorley
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.

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

More
02 Sep 2022 23:45 #251066 by cmorley
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
The following user(s) said Thank You: tommylight

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

More
03 Sep 2022 00:31 #251067 by PCW
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)

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

More
03 Sep 2022 00:34 #251068 by cmorley
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.

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

More
03 Sep 2022 01:20 #251069 by Jonathan_H
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

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

More
03 Sep 2022 01:25 #251070 by Jonathan_H
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).

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

More
06 Sep 2022 23:09 #251365 by andypugh
G0 moves do not wait for spindle-at-speed anyway. (or, shouldn't)

However in post #251061 you are using G1, whereas in #250771 (start of thread) it was all G0. 

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

Time to create page: 0.449 seconds
Powered by Kunena Forum