New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi spindle discussion #713
Comments
Making S modal was deliberate, but on balance I think it was a mistake. It is probably also true that if someone really needed to set up a group of spindles and start / stop them together then they could be expected to read the manual to find out how. statetags and various Python interfaces do not, at the moment, report on more than the default spindle. The overlap between those using these interfaces and those using multiple spindles is probably small. |
M19 stops all spindles regardless of $ number. Should it? |
m19 - I wouldn't think so. Qtvcp now has support for multiple spindles if some one wants to add them. I just think it's important to iron out the details before releasing so we don;t have to break behavior on the next release. |
Without a $ M3, M4 & M5 now act on spindle zero. To act on all spindles use $-1 Signed-off-by: andypugh <andy@bodgesoc.org>
See 3139328 |
oh great I'll test that out. |
That is a great improvement. One other question. |
I suppose that wanting all spindles at the same speed is quite likely on multi-spindle (copy) routers and dual-spindle lathes.
Probably not, but that is built-in error behaviour. |
Well It means if you set all your spindles speeds up and then go to adjust one but get it wrong it turns them all off and you need to set them again. you don;t deserve that :) |
So it looks like there is a NML message send for each spindle to control ie there is no message to control all of the spindles at once. Does that sound right to you? |
But, short of not doing the check, I don't see a way to change that. |
Yes, it's a message-per-spindle. |
ok thanks for confirming. I'll work on the python code |
Hit a snag - python doesn't know how many spindles are available. If I send a command for the max amount of spindles, motion gives error on the ones not available. I guess we could silently ignore the unavailable spindle commands? |
Or maybe I should forget it and document that in python there is no 'all spindles' command |
Does Python have a way of finding it out? It seems like it might be a useful thing to know. |
status reports the number of spindles and the python module can reads that. |
Just document that Python can't do it, and move on then. |
https://github.com/LinuxCNC/linuxcnc/commits/motion-all-spindles-command |
Is this compatible with the existing stuff? (including da3c1c1 )
edit: I kept considering doing this with the other changes for -1, but thought that in that case clarity of code just won out. |
yes I didn't like it either, but it was clear. I can add a comment to describe the somewhat strange code. |
meaning I'll use your changes with a comment |
I am not clear if this replaces the changes I made? I think it does? |
It doesn't replace your code. But probably you could change the code to send one NML message using -1 as the spindle number rather then several. |
I did S several minutes ago: da3c1c1 |
ok I redid it as you asked and tested with my system a bit. please take a look. |
ha hard to keep up :) i'll pull it in and test. |
all seems to work fine ! |
I tried to pass a -1 for all spindles deeper in to the depths: emccanon uses the spindle number as an index into the spindles array: |
fair enough - so far having multiple motion messages is not anything anyone is complaining about. Are you happy with the motion code, so I can commit ? |
Already committed. Next question: CSS with more than one spindle? I reckon you could. |
Ya I guess that could be possible. |
CSS is explicitly slaved to X. |
yes on a mill with a sub spindle on the bed, it might be desirable to slave the sub spindle speed.to Z position |
I modified my second spindle (which is table mounted spindle) from velocity to positional mode. |
I can't help feeling that using S to control position is a bit eccentric when LinuxCNC supports 3 rotary axes. S = 0 has always turned off the spindle in LinuxCNC. It seems a bit of a big step to change that. |
I'm using it as an indexer not a rotary axis - motion does not manage the indexer. I know S0 has always done this, but I'm suggesting maybe people relying on this behavior is much rarer (I can't think why you would) and this is a major release so changing is an option. |
To put this another way; I've never seen a gcode program like: It's another case for being explicit - S code is for adjustment, M is for state |
I am inclined to leave this as it is now. Maybe think about changing for 2.9, but it might make sense to leave the current slightly odd behaviour consistent. |
yes I agree - I have a patch for master that needs a little more testing but so far works fine. |
Current behavior AFAIKT with a bit of testing.
M3/M4 will start all spindles as long as their respective S codes are already set, adding a $ with a number will start a specific spindle.
M5 stops all spindles - adding a $ with a number specifies which spindle to stop
After an s code has used a $ to specify a spindle, plain s codes after that will only control that specified spindle.
You cannot put a $ with a number with out another spindle control code -ie you can't preset a specific spindle to be modal in this way.
My thoughts - Mostly copied from dev email list...
Setting the s code to a particular spindle (with %) will from then on always controls that spindle with a plain s code. Not sure if that is on purpose but i wouldn't think so.
If you don't set the s code with $ then only spindle 0 will start and stop with m3 m4 m5.
meaning a program running on a single spindle machine runs the same on a dual spindle machine.
But that relying on not setting the $ code seems a bit risky considering linuxcnc can be remapped and use subroutines (that could set it) or maybe left over from a manual setting (I didn't try that)
I did find that using the python module to control the spindle (like all the python screens do) the stop command seems to assume spindle 0 so pressing stop button only stops spindle 0. Which may or may not be whats expected but there is no python command to stop all spindles, unless you added one I didn't check.
I still feel that with mcode and python module, specifying all spindles with say -1 is a better practice.
We should fix the python module to be able to specify all spindles for stopping.
I feel that with s code, it's probably a bug that it remembers the last specified spindle and continues to adjust it with a plain s code.
It would be good practice and consistent if specifying $-1 would set the spindle speed for all spindles.
The text was updated successfully, but these errors were encountered: