Welcome! Log In Create A New Profile

Advanced

Trying to Understand GCode

Posted by Nimo 
Trying to Understand GCode
May 18, 2017 03:42AM
Hello,

I'm new to this forum and hoping this is the right section to post my question.

I'm currently trying to get my head around gcode. And for the most part, I seem to understand it.
Only the 'E' parameter of the G1 command troubles me.
How is it calculated. Is there any formula?
I thought it was the amount of filament (in mm with G21 set) pushed into the nozzle.
So slice myself a simple line in slic3r and calculated it myself, to compare both values. But somehow it doesn't match even close.
I know that M82 is set and absolute distances are used and I took that into account.

Could somebody please explain to me how E works and how it's calculated.
I've searched a while for an answer to my problem, but somehow could not find one.
VDX
Re: Trying to Understand GCode
May 18, 2017 04:58AM
... I'm using it as "steps per mm travel" for pastedispensing with a "pulsed" dispenser - and it gives the correct dots/drops count per vector-line ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Trying to Understand GCode
May 18, 2017 05:03AM
math...

best guess (without actually looking at the maths, so could be quite wrong)

((distance from start to end position in 2d space * desired extrusion width) / input filament diameter ) * multiplier

where distance = abs(x2 - x1) + abs(y2 - y1);


This is more the core of how a slicer works...

the g code is just how far to move the axis in mm, its knows nothing of the above.

Edited 1 time(s). Last edit at 05/18/2017 05:13AM by Dust.
Re: Trying to Understand GCode
May 18, 2017 01:13PM
It's the lenghts of filament pushed into the nozzle. Depending on filament diameter and nozzle diameter, the value changes.
cross-section_nozzle / cross-section_filament * track length.

BTW: track length is not abs(x2 - x1) + abs(y2 - y1), but sqrt((x2 - x1)2 + (y2 - y1)2) winking smiley
Re: Trying to Understand GCode
May 18, 2017 07:23PM
re length, of course it is.., I blame tiredness + senility .. it has been 20+ years since i have done any real math!
Re: Trying to Understand GCode
May 21, 2017 11:19AM
But i think Dust opinion is something that he can try, but not the math :-)
Sorry, only registered users may post in this forum.

Click here to login