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.81k stars 1.16k forks source link

linuxcnc.stat 'mcodes' attribute is broken #3186

Open Sigma1912 opened 1 day ago

Sigma1912 commented 1 day ago

Tested on RIP installs of current 2.9 and master and a package install of 2.9.3.

Here are the steps I follow to reproduce the issue:

  1. Start sim config eg 'axis' and home the machine
  2. Open 'LinuxCNC Status' window and scroll to 'mcodes' attribute OR whatch the 'Active Gcodes panel in the AxisGui'
  3. Start the preloaded Gcode

This is what I expected to happen:

I would not expect 'M0' to be shown as active I would expect 'M5' to change to 'M3' as the gcode executes

This is what happened instead:

'M0' is shown as active 'M5' quickly changes to 'M4' (!) and then back to 'M5' as the gcode executes

Recording

It worked properly before this:

Not sure if this worked before current version 2.9

Sigma1912 commented 1 day ago

Testing MDI commands

Which makes me think that the 'M0' at the end (for one thing) should really not be there at all.

Sigma1912 commented 3 hours ago

stat.mcodes array for the above situation is: (0, -1, 3, -1, 9, -1, 48, -1, 53, 0)

Looking at this code I'm having trouble figuring out where the '0' at the end of the above array comes from:

preccmcodes