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 50 forks source link

added test showing which kind of configuration breaks the target spee… #19

Closed lromor closed 8 years ago

lromor commented 8 years ago

…d > 0 assert.

Probably this test can be extend with also other axes combinations.

lromor commented 8 years ago

I guess, the main reason of this behavior is here: https://github.com/hzeller/beagleg/blob/3b6c66b82d5ff89dfba6b30e70bc3aa2e8dc3f3a/src/gcode-machine-control.cc#L198

I would have prepared a patch, but since the I don't know the standard behavior or what do you expect as default feedrate (it has to take which value? a default one in mm/s? the slowest axis? the maximum euclidean speed? what if all the euclidean axes are 0 and only the A axis is not? Is it enough to put a "if the max_feedrate is 0, pick up the next"?

hzeller commented 8 years ago

Well, some reasonable default that does not make the machine explode. In the case of Euclid, it could take all axes into account and do 10%. If it is still zero afterwards, then make it 1mm/s or something non-zero.

Note, the place you are pointing out is just for the case when someone starts using the machine and forgot to give a feedrate. The machine should actually complain probably instead of jugging along with 10% of the speed of some arbitrary axis.

hzeller commented 8 years ago

So we should rather report a problem if some gcode file relies on a default feedrate. On the first move, someone has to give a feedrate.

lromor commented 8 years ago

Perfect :) So I will return an error and wait for a feedrate to be set in order to start any movement.

hzeller commented 8 years ago

Submitted in b4641be0caf80a56207b7abd6334a04cbc99daad