LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.82k stars 1.17k forks source link

State-tags only considers one spindle #747

Open andypugh opened 4 years ago

andypugh commented 4 years ago

Placeholder to track fixing this.

zultron commented 4 years ago

From an offline conversation:

On 3/31/20 9:15 PM, andy pugh wrote:

On Tue, 31 Mar 2020 at 05:59, John Morris john@dovetail-automata.com wrote:

I merged origin/statetags as it seemed the most recent and was the one that pull request #283 was based on.

That's good. Sounds like I have some more bits laying around somewhere that I never got around to adding into the PR. I'll have to spend time to hunt those down, most likely.

What kinds of state do you need to pass in and out for multispindle?

Possibly not much. At the moment the merged version of statetags just reports spindle 0. https://github.com/LinuxCNC/linuxcnc/blob/andypugh/statetags-200328/src/emc/rs274ngc/interp_write.cc#L295 as an example.

But there are longer-standing issues in the same vein. https://github.com/LinuxCNC/linuxcnc/blob/andypugh/statetags-200328/src/emc/rs274ngc/interp_write.cc#L122

It looks like you won't be able to use settings->active_g_codes[] to represent state of all spindles, since g96 and g97 no longer set a single state value. Instead, look at using settings->active_settings[] instead, which allows free-form state not tied to specific g or m codes.