Changes

Jump to: navigation, search

CONTROLS/Macros

2,183 bytes added, 18:14, 23 December 2016
no edit summary
Click the '''Cancel''' button to discard changes.
 
== Macro Scripting ==
 
Macro Scripting allows for the use of advanced functions in macros. These functions are called by using commands.
 
=== Syntax ===
 
To use a macro scripting command, begin the line with the following function:
 
<code>; Command:</code>
 
Then add a command and any applicable parameters.
 
<code>; Command:[command] "[parameters]"</code>
 
The result should look something like this:
 
<code>; Command:Message "Waiting for extruder to heat to [temperature]."</code>
 
=== Commands ===
 
<code>Message</code>
 
Shows the given message (look at example). Optionall parameters; ExpectedSeconds:[time] ExpectedTemperature:[temp]
 
<code>ChooseMaterial</code>
 
Shows the choose material window
 
<code>WaitOK</code>
 
Show the message (look at example) and wait for user to click ok to continue sending code.
 
=== Example Script ===
 
The following box shows an example of a script used for loading filament:
 
<pre>; Command:ChooseMaterial "Choose the material that you are loading."
 
; Command:Message "Waiting for extruder to heat to [temperature]."
M104 S[temperature] ; start heating up the extruder
 
M302 S0 ; Allow extrusion at any temperature
; Command:WaitOK "Put filament into extruder and click Continue."
; Command:Message "Loading filament..." ExpectedSeconds:28
G92 E0 ; reset the extruder position to 0
G91 ; Relative positioning
G1 E100 F1200 ; extrude the filament
G1 E100 F1200 ; extrude the filament
G1 E100 F1200 ; extrude the filament
G1 E100 F1200 ; extrude the filament
G1 E100 F1200 ; extrude the filament
G4 S1 ; wait for move to finish
 
M302 S150 ; Set cold extrude temp back to reasonable
; Command:Message "Waiting for extruder to heat to [temperature]."
M109 S[temperature] ; heat up the extruder
 
; Command:Message "Extruding filament..." ExpectedSeconds:19
; extrude slowly so that we can prime the extruder
G1 E100 F300 ; extrude the filament slowly
 
G4 S1 ; wait for move to finish
G90 ; Absolute positioning
G92 E0 ; reset the extruder position to 0
 
M104 S0 ; turn the extruder temperatuer off</pre>
[[Category:Controls]]
[[Category:Features]]

Navigation menu