hzeller / beagleg

G-code interpreter and stepmotor controller for crazy fast coordinated moves of up to 8 steppers. Uses the Programmable Realtime Unit (PRU) of the Beaglebone.
http://beagleg.org/
GNU General Public License v3.0
122 stars 51 forks source link

Small feed-rate: M114 shows zero and eventually hangs #32

Closed hzeller closed 6 years ago

hzeller commented 6 years ago

So with a small feed-rate, the new M114 dynamic update of the current position does not seem to work: With the configuration file below, let's do some move and watch the position update. Here we use some moderately fast feedrate:

G1 X100 F500
ok
M114
X:31.200 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:31.200 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok
M114
X:40.744 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:40.744 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok
M114
X:48.919 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:48.919 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok
M114
X:99.994 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:99.994 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok

Looks beautiful. Now let's move with a slow feedrate. Now, if we request M114, suddenly all values are shown to zero. Eventually, the M114 , when the motor stops and we ask again, it now has the final position.

G1 X50 F100
ok
M114
X:0.000 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:0.000 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok
M114
X:0.000 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:0.000 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok
M114
X:0.000 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:0.000 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok
M114
X:0.000 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:0.000 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok
M114
X:0.000 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:0.000 Y:0.000 Z:0.000] (Unsure: machine never homed!)
ok
M114
X:50.006 Y:0.000 Z:0.000 E:0.000 [ABS. MACHINE CUBE X:50.006 Y:0.000 Z:0.000] (Unsure: machine never homed!)

Here is the minimal configuration:

[ General ]
require-homing    = no
range-check       = no

[ X-Axis ]
steps-per-mm     = 16 * 200 / 60
max-feedrate     = 400 
max-acceleration = 2000
range            = 300 
home-pos         = min

[ Motor-Mapping ]
motor_1 = axis:x

[ Switch-Mapping ]
switch_1 = active:high min_x max_x

Program started with:

sudo ./machine-control --port 8888 -c minimal.config
hzeller commented 6 years ago

@lromor This is for you :)