forked from RealDeuce/realdeuce.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpressure_advance.html
304 lines (304 loc) · 17.4 KB
/
pressure_advance.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<html>
<head>
<title>Pressure Advance Calibration Pattern</title>
<meta charset="UTF-8">
<meta name="description" content="Create G-code to calibrate Pressure Advance setting">
<link rel="stylesheet" href="stylesheets/main.css"/>
<link rel="stylesheet" href="stylesheets/font-awesome.min.css"/>
</head>
<body>
<script language="JavaScript" type="text/javascript" src="javascript/jquery-2.2.1.min.js"></script>
<script language="JavaScript" type="text/javascript" src="javascript/jquery-ui.min.js"></script>
<script language="JavaScript" type="text/javascript" src="./FileSaver.min.js"></script>
<script language="JavaScript" type="text/javascript" src="./pressure_advance.js"></script>
<div class="container" role="main">
<div class="row">
<div class="calibpat" id="calibpat">
<h1>Pressure Advance Calibration Pattern</h1>
<div class="row alert alert-info custom-alert">
<div class="col-lg-1 col-md-2 visible-lg-block visible-md-block custom-alert-icon"> <i class="fa fa-info-circle fa-4x" aria-hidden="true"></i> </div>
<div class="col-lg-11 col-md-10 custom-alert-text">
<p><em>Caution!</em><br/>
If Start G-code is incorrect, it could damage your printer. Anything which could damage your printer could cause other damage. Be <em>absolutely sure</em> your Start G-code is correct before printing the generated G-code.</p>
</div>
</div>
<p>Use this form to generate G-code that you can use to calibrate your Pressure Advance. Default values apply to standard ABS with a 0.4mm nozzle.</p>
<p>Press the <code class="highlighter-rouge">Generate G-code</code> button followed by <code class="highlighter-rouge">Download as file</code> to save the result.</p>
<table id="padv">
<tbody>
<tr>
<td colspan="3" class="tdHead"><h3>Settings</h3></td>
<td class="tdHead"><h3>G-code</h3></td>
</tr>
<tr>
<td colspan="3" class="tdSection"><h4>Printer:</h4></td>
<td rowspan="40" class="txtareatd"><textarea name="textarea" id="gcodetextarea"></textarea></td>
</tr>
<tr>
<td><label for="PRINTER">Printer:</label></td>
<td><input name="PRINTER" id="PRINTER" value="printer name" /></td>
</tr>
<tr>
<td><label for="FILAMENT">Filament:</label></td>
<td><input name="FILAMENT" id="FILAMENT" value="filament name" /></td>
</tr>
<tr>
<td><label for="FIL_DIA">Filament Diameter:</label></td>
<td><input name="FIL_DIA" id="FIL_DIA" step="any" value="1.75" onblur="validateInput()" /></td>
<td>Diameter of the used filament (mm)</td>
</tr>
<tr>
<td><label for="NOZ_DIA">Nozzle Diameter:</label></td>
<td><input name="NOZ_DIA" id="NOZ_DIA" step="any" value="0.4" onblur="validateInput()" /></td>
<td>Diameter of the nozzle (mm)</td>
</tr>
<tr>
<td><label for="START_GCODE">Start G-code:</label></td>
<td colspan=2><textarea name="START_GCODE" id="START_GCODE" rows="12" cols="100">
M112 ; Refer to https://bit.ly/3q1dChR
M190 S110 ; <-- SET BED TEMPERATURE HERE - Wait to heat bed
M109 S240 ; <-- SET NOZZLE TEMPERATURE HERE - Wait to heat extruder for homing accuracy
G28 ; Home all axis
G32 ; Home all axis, tram gantry
G90 ; Use absolute positioning
G1 Z5 F100 ; Move to safe Z
BED_MESH_CALIBRATE ; Create mesh
PRINT_START
; PRINT_START EXTRUDER=240 BED=110 ; If using parameter-ized PRINT_START
</textarea><p>Copy the start G-code from your slicer and set the appropriate parameters. Be sure to check over the <em>entire</em> Start G-code every time before generating.</td>
</tr>
<tr>
<td><label for="END_GCODE">End G-code:</label></td>
<td colspan=2><textarea name="END_GCODE" id="END_GCODE" rows="3" cols="100">
PRINT_END
</textarea><p>Copy the end G-code from your slicer and set any appropriate parameters.</td>
</tr>
<tr>
<td><label for="RETRACTION">Retraction Distance:</label></td>
<td><input name="RETRACTION" id="RETRACTION" step="any" value="0.75" onblur="validateInput()" /></td>
<td>Retraction distance (mm)</td>
</tr>
<tr>
<td><label for="LAYER_HEIGHT">Layer Height:</label></td>
<td><input name="LAYER_HEIGHT" id="LAYER_HEIGHT" step="0.1" value="0.25" onblur="validateInput()" /></td>
<td>Layer Height (mm)</td>
</tr>
<tr>
<td><label for="FAN_SPEED">Fan Speed:</label></td>
<td><input name="FAN_SPEED" id="FAN_SPEED" step="1" value="0" onblur="validateInput()" /></td>
<td>Fan Speed (%)</td>
</tr>
<tr>
<td colspan="3" class="tdSection"><h4>Print Bed:</h4></td>
</tr>
<tr>
<td><label for="BEDSIZE_X">Bed Size X:</label></td>
<td><input name="BEDSIZE_X" id="BEDSIZE_X" step="any" value="250" onblur="validateInput()" /></td>
<td id="shape">Size (mm) of the bed in X</td>
</tr>
<tr>
<td><label for="BEDSIZE_Y">Bed Size Y:</label></td>
<td><input name="BEDSIZE_Y" id="BEDSIZE_Y" step="any" value="250" onblur="validateInput()" /></td>
<td>Size (mm) of the bed in Y</td>
</tr>
<tr>
<td colspan="3" class="tdSection"><h4>Speed:</h4></td>
</tr>
<tr>
<td><label for="MM_S">Use mm/s:</label></td>
<td><input name="MM_S" type="checkbox" id="MM_S" checked="checked" /></td>
<td>Use mm/s instead of mm/min</td>
</tr>
<tr>
<td><label for="SLOW_SPEED">Slow Printing Speed:</label></td>
<td><input name="SLOW_SPEED" id="SLOW_SPEED" step="any" value="5" onblur="validateInput()" /></td>
<td>Use square_corner_velocity value</td>
</tr>
<tr>
<td><label for="FAST_SPEED">Fast Printing Speed:</label></td>
<td><input name="FAST_SPEED" id="FAST_SPEED" step="any" value="120" onblur="validateInput()" /></td>
<td>Fast printing speed. This should differ noticeably from Slow Speed</td>
</tr>
<tr>
<td><label for="MOVE_SPEED">Movement Speed:</label></td>
<td><input name="MOVE_SPEED" id="MOVE_SPEED" step="any" value="500" onblur="validateInput()" /></td>
<td>Movement speed</td>
</tr>
<tr>
<td><label for="RETRACT_SPEED">Retract Speed:</label></td>
<td><input name="RETRACT_SPEED" id="RETRACT_SPEED" step="any" value="30" onblur="validateInput()" /></td>
<td>Retract Speed of the extruder</td>
</tr>
<tr>
<td><label for="UNRETRACT_SPEED">Unretract Speed:</label></td>
<td><input name="UNRETRACT_SPEED" id="UNRETRACT_SPEED" step="any" value="30" onblur="validateInput()" /></td>
<td>Unretract Speed of the extruder</td>
</tr>
<tr>
<td><label for="PRINT_ACCL">Acceleration:</label></td>
<td><input name="PRINT_ACCL" id="PRINT_ACCL" step="any" value="3000" onblur="validateInput()" /></td>
<td>Set printing acceleration (mm/s^2)</td>
</tr>
<tr>
<td colspan="3" class="tdSection"><h4>Pattern:</h4></td>
</tr>
<tr>
<td><label for="TYPE_PATTERN">Pattern Type:</label></td>
<td><select name="TYPE_PATTERN" id="TYPE_PATTERN">
<option value="std">Standard</option>
<option value="alt">Alternate</option>
</select></td>
<td>Select standard or alternate pattern</td>
</tr>
<tr>
<td><label for="K_START">Starting Value for PA:</label></td>
<td><input name="K_START" id="K_START" step="any" value="0" onblur="validateInput()" /></td>
<td id="start_factor">Starting value for the Pressure Advance-factor</td>
</tr>
<tr>
<td><label for="K_END">Ending Value for PA:</label></td>
<td><input name="K_END" id="K_END" step="any" value="0.1" onblur="validateInput()" /></td>
<td id="end_factor">Ending value of the PA</td>
</tr>
<tr>
<td><label for="K_STEP">PA Stepping:</label></td>
<td><input name="K_STEP" id="K_STEP" step="any" value="0.005" onblur="validateInput()" /></td>
<td id="step_factor">Stepping of the Pressure Advance in the test pattern. Needs to be an exact divisor of the PA Range (End - Start)</td>
</tr>
<tr>
<td><label for="SLOW_LENGTH">Slow Speed Length:</label></td>
<td><input name="SLOW_LENGTH" id="SLOW_LENGTH" step="1" value="20" onblur="validateInput()" /></td>
<td>Length of the Slow Speed test-line (mm)</td>
</tr>
<tr>
<td><label for="FAST_LENGTH">Fast Speed Length:</label></td>
<td><input name="FAST_LENGTH" id="FAST_LENGTH" step="1" value="40" onblur="validateInput()" /></td>
<td>Length of the Fast Speed test-line (mm)</td>
</tr>
<tr>
<td><label for="SPACE_LINE">Test Line Spacing:</label></td>
<td><input name="SPACE_LINE" id="SPACE_LINE" step="0.1" value="5" onblur="validateInput()" /></td>
<td>Distance between the test lines. This will impact print size</td>
</tr>
<tr>
<td><label for="FRAME">Print Anchor Frame:</label></td>
<td><input name="FRAME" type="checkbox" id="FRAME" checked="checked" /></td>
<td>Adds a frame around the start and end points of the test lines. May improve adhesion</td>
</tr>
<tr>
<td><label for="DIR_PRINT">Printing Direction:</label></td>
<td><select name="DIR_PRINT" id="DIR_PRINT" onchange="validateInput()">
<option value="0" selected="selected">Left to Right (0°)</option>
<option value="45">45°</option>
<option value="90">Front to Back (90°)</option>
<option value="135">135°</option>
<option value="180">Right to Left (180°)</option>
<option value="225">225°</option>
<option value="270">Back to Front (270°)</option>
<option value="315">315°</option>
</select></td>
<td>Rotates the print in 45° steps</td>
</tr>
<tr>
<td><label for="LINE_NO">Line Numbering:</label></td>
<td><input name="LINE_NO" type="checkbox" id="LINE_NO" checked="checked" /></td>
<td>Prints the K-value besides every second test line</td>
</tr>
<tr>
<td colspan="3" class="tdSection"><h4>Advanced:</h4></td>
</tr>
<tr>
<td><label for="NOZ_LIN_R">Nozzle Line Ratio:</label></td>
<td><input name="NOZ_LIN_R" id="NOZ_LIN_R" step="0.1" value="1.2" onblur="validateInput()" /></td>
<td>Ratio between extruded line width and nozzle diameter. Should be between 1.05 and 1.2</td>
</tr>
<tr>
<td><label for="OFFSET_Z">Z-Offset:</label></td>
<td><input name="OFFSET_Z" id="OFFSET_Z" step="any" value="0" onblur="validateInput()" /></td>
<td>Offset the Z-axis for manual Layer adjustment</td>
</tr>
<tr>
<td><label for="USE_FWR">Use FW Retract</label></td>
<td><input type="checkbox" name="USE_FWR" id="USE_FWR" /></td>
<td>Use Firmware Retract. Needs to be activated in Klipper</td>
</tr>
<tr>
<td><label for="EXTRUSION_MULT">Extrusion Multiplier:</label></td>
<td><input name="EXTRUSION_MULT" id="EXTRUSION_MULT" step="0.1" value="0.92" onblur="validateInput()" /></td>
<td>Usually around 0.92 for ABS</td>
</tr>
<tr>
<td><label for="PRIME">Prime Nozzle:</label></td>
<td><input name="PRIME" type="checkbox" id="PRIME" checked="checked" /></td>
<td>Prime the nozzle before starting the test pattern (Disable if your PRINT_START performs a prime already)</td>
</tr>
<tr>
<td><label for="PRIME_EXT">Prime Extrusion Multiplier:</label></td>
<td><input name="PRIME_EXT" id="PRIME_EXT" step="0.1" value="2.5" onblur="validateInput()" /></td>
<td>The default of 2.5 results in roughly 1mm of filament for 10mm line length</td>
</tr>
<tr>
<td height="24"><label for="PRIME_SPEED">Prime Printing Speed:</label></td>
<td><input name="PRIME_SPEED" id="PRIME_SPEED" step="any" value="30" onblur="validateInput()" /></td>
<td>Speed of the prime move</td>
</tr>
<tr>
<td><label for="DWELL_PRIME">Dwell Time:</label></td>
<td><input name="DWELL_PRIME" id="DWELL_PRIME" step="0.1" value="0" onblur="validateInput()" /></td>
<td>Inserts a pause of x seconds before starting the test pattern to bleed off any residual nozzle pressure</td>
</tr>
<tr class="calibpat2">
<td><label for="FILENAME">Filename:</label></td>
<td colspan="2"><input name="FILENAME" id="FILENAME" value="filename" />
<input name="button" type="button" id="button" onclick="genGcode()" value="Generate G-code" />
<input name="button3" type="button" id="button3" onclick="setLocalStorage()" value="Save as default" title="Save settings in a cookie." />
<p id="warning1" style="display: none;">warning</p>
<p id="warning2" style="display: none;">warning</p>
<p id="warning3" style="display: none;">warning</p></td>
<td><p>
<input name="button2" type="button" id="button2" onclick="saveTextAsFile()" value="Download as file" />
</p></td>
</tr>
</tbody>
</table>
<h3>Notes on the settings:</h3>
<ul>
<li><code class="highlighter-rouge">Prime Nozzle</code> should only be enabled if your <code class="highlighter-rouge">PRINT_START</code> macro does not prime the nozzle already.</li>
<li><code class="highlighter-rouge">Fast Printing Speed</code> and <code class="highlighter-rouge">Slow Printing Speed</code> should be significantly different or the Pressure Advance effect will barely be visible.</li>
<li>The overall width (X-direction) of the print depends on the <code class="highlighter-rouge">Fast Speed Length</code> and <code class="highlighter-rouge">Slow Speed Length</code> settings plus 5mm for the priming line. The length (Y-direction) depends on the Pressure Advance Settings and <code class="highlighter-rouge">Line Spacing</code>.</li>
<li>The script checks to make sure the print fits on the bed. Verify it using a host software like <a href="//www.pronterface.com/" target="new">Printrun</a> or <a href="//www.repetier.com/" target="new">Repetier Host</a>.</li>
<li><code class="highlighter-rouge">Start</code> and <code class="highlighter-rouge">End Value</code> for the Pressure Advance determines the range that the test pattern will cover. For example a <code class="highlighter-rouge">Start Value</code> of 50 and an <code class="highlighter-rouge">End Value</code> of 150 will test a range of 100.</li>
<li>The <code class="highlighter-rouge">Pressure Advance Stepping</code> determines how many test lines are printed for the above range. For example, a Stepping of 10 and a range of 100 results in 10 test lines. A stepping of 3 would not work in this example as 100 cannot be exactly divided by 3. The script will throw an error message if an exact division is not possible. In this case either the range or the stepping needs to be adjusted.</li>
<li>The <code class="highlighter-rouge">Alternate Pattern</code> has a second line of <code class="highlighter-rouge">Fast Printing Speed</code> to test 0 to <code class="highlighter-rouge">Fast Printing Speed</code> and back to 0 conditions. Best used with an increased <code class="highlighter-rouge">Test Line Spacing</code> and reduced Pressure Advance range.</li>
<li>The proper Pressure Advance depends on the filament, nozzle size, nozzle geometry and printing temperature. If any of these values change, the calibration might need to be repeated.</li>
</ul>
<h2>Screen-shots</h2>
<p>The following screen-shots show some examples of the test patterns</p>
<ul>
<li>Blue Lines are Slow Printing Speeds</li>
<li>Red Lines are Fast Printing Speed</li>
<li>Light blue lines are movements</li>
</ul>
<div class="row">
<div class="col-sm-6">
<h3>Standard Pattern</h3>
<img src="images/features/lin_advance/std_pattern.png" alt="StandardPattern" />
</div>
<div class="col-sm-6">
<h3>Standard Pattern with Frame</h3>
<img src="images/features/lin_advance/frame_pattern.png" alt="FramePattern" />
</div>
</div>
<div class="row">
<div class="col-sm-6">
<h3>Alternate Pattern with increased Test Line Spacing</h3>
<img src="images/features/lin_advance/alt_pattern.png" alt="AlternatePattern" />
</div>
<div class="col-sm-6">
<h3>45° rotated Alternate Pattern</h3>
<img src="images/features/lin_advance/rot_pattern.png" alt="RotatedPattern" />
</div>
</div>
</div>
</div>
</body></html>