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.78k stars 1.15k forks source link

python interface, settings returns read ahead values and shouldn't #203

Open gmoccapy opened 7 years ago

gmoccapy commented 7 years ago

tested with 2.6, 2.7 and master

if we ask for self.stat.settings we get a tuple as documented, but ...

self.stat.settings[1] returns the read ahead feed value, while self.stat.settings[2] returns the actual running speed value

shouldn't settings return the actual values for both?

Is there a way to have some attributes like

self.stat.current_feed self.stat.current_speed

behaving as the self.stat.current_vel?

At the moment there is no way to get the actual feed value from python, at least non I know.

Norbert

P.S. I just updated machinekit to the 2.7.7. release of gmoccapy and found that in machinekit, it is working much better, not perfekt, but it takes only one step in advance (about two lines). May be that is a point to start at.

MZot commented 7 years ago

The same issue is also with active G-Codes, it shows read-ahead values instead of current values and current program line doesn't return any useful value when there is non-linear program flow, for instance when using subroutines and loops.

cradek commented 7 years ago

Please help us test the statetags branch, which is meant to fix these problems.

gmoccapy commented 7 years ago

Hallo Cradek,

What help do you need exactly? Just getting the branch and do testing?

Norbert

MZot commented 7 years ago

anything new on this issue?