Welcome! Log In Create A New Profile

Advanced

Custom firmware - how to interpret feedrate

Posted by torur.strom 
Custom firmware - how to interpret feedrate
March 09, 2012 05:57PM
Hi

I am making my own firmware from scratch and I have a small problem with the definition of the feedrate. As far as I understand, given an E distance and a feedrate (ignoring acceleration for now) I know how long a move should take, so the other axes should set their speed accordingly, allowing all axes to reach their goal at the same time. However, given a feedrate and X,Y and/or Z distances but no E distance, how should I interpret the feedrate? Should I calculate the straight line distance and then calculate the required time from the feedrate and this?

Thank you for your time
Re: Custom firmware - how to interpret feedrate
March 10, 2012 01:30AM
If you have a move with no E code then the extruder doesn't run, it is a move from the end of one filament run to the start of the next one.


[www.hydraraptor.blogspot.com]
Re: Custom firmware - how to interpret feedrate
March 10, 2012 04:16AM
Right, but what should the speed of the movement be? Should I just "ignore" the feedrate and set the axes to move as fast as the slowest one or should I use the supplied feedrate to calculate the speed, either based on a single axis or based on the straight line distance of all the supplied axes?
Re: Custom firmware - how to interpret feedrate
March 10, 2012 04:42AM
The F keyword refers to all of the four axes, not only E. Distance = sqrt(dX2 + dY2 + dZ2 + dE2)

What's the goal of writing yet another firmware? It isn't like we have a shortage of such approaches. smiling smiley


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Custom firmware - how to interpret feedrate
March 10, 2012 05:23AM
I don't think E is included in the distance calculation. The feed rate should be the speed along the X,Y,Z vector. E then moves the distance in the E code over the same time period.


[www.hydraraptor.blogspot.com]
Re: Custom firmware - how to interpret feedrate
March 10, 2012 09:38AM
Thank you both for your answers. Since your answers differ I will assume that the definition of the feedrate is a bit fuzzy, so I will just pick one.

@Traumflug:
I am making the firmware as a use-case for Safety Critical Java running on top of JOP. Since the framework is Java based I couldn't really reuse any of the existing firmware. Plus I wanted to use a different method for approximating a straight line.
Re: Custom firmware - how to interpret feedrate
March 31, 2012 09:36AM
torur.strom Wrote:
-------------------------------------------------------
> Right, but what should the speed of the movement
> be? Should I just "ignore" the feedrate and set
> the axes to move as fast as the slowest one or
> should I use the supplied feedrate to calculate
> the speed, either based on a single axis or based
> on the straight line distance of all the supplied
> axes?

It depends on whether the command is G0 or G1, and whether you want to retain compatibility with the GCode spec. G1 should always move the tool head (extruder) at the specified feed rate along the path (apart from accel/decel). G0 may move axes independently within speed limits defined by the machine to get to the end point, since it is assumed that the "tool" is not active during the move.

If you are only concerned with printing, then if a G1 command does not specify an E delta, then it is effectively equivalent to G0.
Sorry, only registered users may post in this forum.

Click here to login