Macros
Macros are snippets of saved code which can be called with the click of a button instead of having to be typed repeatedly.
The Macros of the Controls pane section is where the user creates and stores these macros.
To learn more about G-Code and its utility in 3D printing, check out this resource: http://reprap.org/wiki/G-code
Macros Pane
Once macros have been created, they will appear under the Macros title.The screenshot to the right shows an example of several macro buttons for the Rostock MAX V2.
Macro Editor
To access the Macro Editor, click the pencil icon () next to the word Macros. This will open the Macro Presets window.
Macro Presets Window
Add
To add a new Macro, click the Add button. This will open the Edit Macro window.
Close
Click the Close button to close the window and return to the main screen.
Edit Macro Window
Macro Name
Enter a unique name for the macro.
Macro Commands
Enter G-Code command(s) in this field.
Can be multiple lines long.
Save
Click the Save button to add the button to the Macros section.
Cancel
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:
; Command:
Then add a command and any applicable parameters.
; Command:[command] "[parameters]"
The result should look something like this:
; Command:Message "Waiting for extruder to heat to [temperature]."
Commands
Message
Shows the specified message.
Optional parameter variables:
- ExpectedSeconds: [time]
- ExpectedTemperature: [temp]
ChooseMaterial
Shows the choose material window.
WaitOK
Show the specified message and waits for user to click OK to continue sending code.
Example Script
The following box shows an example of a script used for loading filament:
; 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