I did some more playing with this in MDI and manual:

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.

As you said if you don't set the s code with $ then only spindle 0 will start 
and stop.
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.

Should I add issues to linxcnc to record the discussion?

Chris




________________________________
From: andy pugh <bodge...@gmail.com>
Sent: April 6, 2020 3:47 PM
To: EMC developers <emc-developers@lists.sourceforge.net>
Subject: Re: [Emc-developers] multi spindle design choice question

On Mon, 6 Apr 2020 at 15:24, Chris Morley <chrisinnana...@hotmail.com> wrote:

> I wonder if using $-1 to select all spindles would be a better idea.

Possibly. I am certainly open to persuasion. My initial idea was a
bitmask, but I concluded that the average G-code programmer might look
askance at that.

> Then a program for a single spindle machine runs the same on a multi spindle 
> machine.

This is already the case, as long as the G-code does not specify an
S-word with a $ sign.

> I actually would not expect M5 to stop all spindles, though I certainly can 
> see the argument for it to.
> Though again M5 %-1 I think would be better, as again explicit is better.

I was largely working on a principle of "least surprise" but, of
course, can only say what would surprise me.

One criterion was that existing G-code on existing single-spindle
machines would look and work exactly the same.
There are two ways to do that, to make all spindle commands assume
spindle zero, or to make all spindle commands assume all spindles.

The latter can't really work for G33, G76 etc. And I decided not to do
it that way for S. So it is fair to say that I settled on an
inconsistent set of rules.

--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to