Difference between revisions of "Flow Rate"
Line 20: | Line 20: | ||
|+ I just had to type this out again for another customer, so I will save that text here: | |+ I just had to type this out again for another customer, so I will save that text here: | ||
|To determine flow we consider:<br> | |To determine flow we consider:<br> | ||
<span style="color:red">'''1. Path Width''', as specified in the nozzle diameter paramenter on the data for that print head (NOT path width in the slicer) [unless you manually hard code a value in your gcode];</span><br> | <span style="color:red">'''1. Path Width''', as specified in the nozzle diameter paramenter <b>on the data for that print head</b> (NOT path width in the slicer) [unless you manually hard code a value in your gcode];</span><br> | ||
<span style="color:blue">'''2. Path Height (or Layer Thickness)''', as specified in your gcode (NOT on the print head);</span><br> | <span style="color:blue">'''2. Path Height (or Layer Thickness)''', <b>as specified in your gcode by M756</b> (NOT on the print head);</span><br> | ||
<span style="color:green">'''3. X/Y/Z Path Length''', as determined by the distance from the end of the last more to the end of this move;</span><br> | <span style="color:green">'''3. X/Y/Z Path Length''', as determined by the distance from the end of the last more to the end of this move;</span><br> | ||
- '''<span style="color:red">1</span> x <span style="color:green">2</span> x <span style="color:blue">3</span>''' - these three define the a '''volume (in nl)''' to fill during this move.<br> | - '''<span style="color:red">1</span> x <span style="color:green">2</span> x <span style="color:blue">3</span>''' - these three define the a '''volume (in nl)''' to fill during this move.<br> |
Revision as of 15:36, 16 February 2016
Overview
We often get asked how we calculate our flow rate.
The flow rate is calculated based on the following parameters:
- Nozzle (extrusion) width, as specified on the head (or, optionally, in gcode); should match the extrusion width in your recipe and gcode.
- Layer thickness (height), as specified in your gcode. Width times Height tells us the Cross Section of your print path.
- X/Y/Z distance to move from current position, as specified in your gcode. Cross Section times Distance tells us the Volume to be printed this move.
- Print speed, as specified in your gcode. Volume divided by print speed tells us how many nl per second to dispense.
- Pulses/nl, as specified on the head (or, optionally, in gcode). Pulses/nl times nl/second tells us how many pulses per second to dispense.
- Feed Rate %, as specified on the head (or, optionally, in gcode). Feed Rate % is a direct modifier of your other calculations; 1.00 = no modification; 0.90 means 10% less flow, etc.
To determine flow we consider: 1. Path Width, as specified in the nozzle diameter paramenter on the data for that print head (NOT path width in the slicer) [unless you manually hard code a value in your gcode]; |
GCode
So, how can you specify this in GCode?
One of the things that a slicer does is generate extrusion values along with the moves, so that printers know how much material to deploy (or not to deploy any) during a move. For example:
G1 X107.310 Y122.630 E1.45876
This line tells the printer to do a normal speed move from the present location to position X=107.310 and Y=122.630 while extruding a certain amount E1.45876 of material. However, on Hyrel machines, the material feed rate is calculated from the data stored on the print head, and is not taken directly from the gcode.
We do a simple boolean check on the G1 move to determine if it is a printing move or not (if it has an E value or not), and we calculate our own flow based on path width, layer height, pulses per nanoliter and the FR Scale which are stored in the head data. We also calculate our own prime/unprime settings based on the data displayed and stored on the print head.
The default setting for the EMO-25 is 1.76 pulses/nl and 1.0 feed rate. In gcode, this is:
M221 S1 P1.76 T12
This tells the printer to do a Set tool values of Feed Rate Adjustment (fudge factor) S1 times Pulses per nanoliter P1.76 for the Tool at Yoke 1, Position 2 T12.
This is sourced in as a default when you start the job, but can be changed programmatically in the gcode as follows:
G1 F1200 ; set print speed to 1200 mm/min (20 mm/sec) G1 X10 Y10 Z0.25 ; move to start of line 1 M221 S1 P1.76 T12 ; set extrusion rate to 1*1.76 on yoke 1, tool 2 (base value) G1 X60 Y10 E1 ; 1st printing move G1 X10 Y20 ; move to start of line 2 M221 S1.1 P1.76 T12 ; set extrusion rate to 1.1*1.76 on yoke 1, too 2 (10% greater than line 1) G1 X60 Y20 E1 ; 2nd printing move G1 X10 Y30 ; move to start of line 3 M221 S1.2 P1.76 T12 ; set extrusion rate to 1.2*1.76 on yoke 1, too 2 (20% greater than line 1) G1 X60 Y30 E1 ; 3rd printing move
To give this more depth, here is exactly how we calculate the flow rate.
At the start of a job (when you click "Run Job"), Repetrel transmits settings via gcode commands to the STM407 Motion Controller, based on the data you have displayed for that print head. For our example, I have a MK1 head loaded in slot 2:
M6 T12 O2 X0 Y0 Z0 M721 S10000 E300 P80 T12 M722 S10000 E300 P105 T12 M221 S1.0 T12 P0.80 W0.5 Z0.3
Let's break this down:
M6 T12 O2 X0 Y0 Z0 - sets the offsets for tool 2 (normally zero unless you have heads cooperating on a print, but you could program them for their distance from center; T2 is centered on newer printers, and 35mm off center in the +X direction on older printers. On all printers, T3 35mm off center in the -X, T1 is 70mm +X, T4 is 70mm -X.
M721 S10000 E300 P80 T12 - sets the PRIME values, in rate (S), min dwell time (E), and pulses (P) for slot 2 (T)
M722 S10000 E300 P105 T12 - sets the UNPRIME values as above;
M221 S1.0 T12 P0.80 W0.5 Z0.3 - sets up your flow data: S1.0 = adjustment value of 1.0 (100% of the pulses per nanoliter) T12 = tool at yoke 1, slot 2 P0.80 = pulses per nanoliter W0.5 = extrusion width Z0.3 = Z layer thickness
Now, any or all of these variables may be updated with a new value by a subsequent M221 command; all values are persistent unless/until updated to a new (possibly 0) value later on in the code - or by adjusting the S or P values live on the print head.
Immediate Commands
While M722 S10000 E300 P105 T12 will set up the prime values for the print head, it will not cause these values to be executed.
M722 E1 will cause that print head last addressed (or M722 T12 E1 if you want to specify) to perform the prime at this point in the code, with the values previously stored for that head.
Likewise, M721 E1 will cause the print head to do an unprime.
Tool Changes
For tool changes, we may want to hard code in some unprimes, primes, and pauses. Here is the code I use for tool changes with MK1-250 heads:
G0 Y0 ; home Y to drag print head across brush, into purge area ; ; unprime previous_extruder five times: M722 I1 T[previous_extruder] G4 S500 ; pause 1/2 second M722 I1 T[previous_extruder] G4 S500 ; pause 1/2 second M722 I1 T[previous_extruder] G4 S500 ; pause 1/2 second M722 I1 T[previous_extruder] G4 S500 ; pause 1/2 second M722 I1 T[previous_extruder] G4 S500 ; pause 1/2 second ; ; prime next_extruder five times: M721 I1 T[next_extruder] G4 S500 ; pause 1/2 second M721 I1 T[next_extruder] G4 S500 ; pause 1/2 second M721 I1 T[next_extruder] G4 S500 ; pause 1/2 second M721 I1 T[next_extruder] G4 S500 ; pause 1/2 second M721 I1 T[next_extruder] G4 S500 ; pause 1/2 second
Please note that G4 takes SXXX in miliseconds on Repetrel 2.484 and earlier; G4 takes PXXX in miliseconds on Repetrel 2.841 and later.