The Scripts tab looks like the following:

For advanced control of your 3D printer, Simplify3D gives the option of writing custom G-Code scripts to be inserted into the main code at specific points. A reference guide for G-Code can be found at the RepRap Wiki. AON-M runs on a modified version of Marlin, so G-Code commands available to Marlin will be valid for use here. On top of regular G-Code commands, Simplify3D provides certain variables and macros for conditional programming. These include: 

[previous_Z_position] - a variable that holds the previous layer's Z position value.
[current_Z_position] - a variable that holds the current (new) layer's Z position value. 
[old_tool] - the old toolhead, replaced by T0 or T1 during code execution.
[new_tool] - the current (new) toolhead, replaced by T0 or T1 during code execution. 
[fan_speed_pwm] - Fan speed on a PWM scale of 0 to 255, where 255 equals 100%.
[fan_speed_percentage] - Fan speed on a 0 to 100 numerical scale. 
[extruderX_temperature] - Used for custom heating procedures. Replace X with 0 or 1, corresponding to T0 or T1. 
[bed0_temperature] - Used for custom heating procedures. AON-M only has one bed, so bed0 is always used.
{IF NEWTOOL=X} - Conditional logic - the G-Code immediately proceeding this (on the same line) will only be executed if the conditional holds true, otherwise it will go to the next line. Replace X with 0 or 1, corresponding to T0/T1.
{IF OLDTOOL=X} - Conditional logic - same as above except a conditional for the last toolhead activated instead of the new.

In G-Code programming, a line break signifies the start of the next command, and a semicolon provides space for comments. Everything after a semicolon will be ignored until the next line break. 

Starting Script
What is this?
The Starting Script runs before the print begins but after heating. By default, Simplify3D automatically appends the heating (M104/140) and homing (G28) commands before every print, but you can customize the heating and homing behaviour if you would like. This is a good place to apply things like custom PID values, toolhead offsets, or other configuration values without modifying the firmware's hard-coded values. 

Layer Change Script
What is this?
The Layer Change Script runs between the end of layer and the beginning of the next. Potential uses for this include a nozzle wipe when using sticky/viscous materials. 

Retraction Script
What is this?
Overrides the G-Code automatically generated by the retraction-related process settings. 

Tool Change Script
What is this?
Overrides the G-Code automatically generated by the tool change-related process settings. With the AON-M, tool change movements are handled by the firmware, so this section can be used to modify the tool change retraction values. The default script is given below:

{IF OLDTOOL=0} G91 ;relative mode
{IF OLDTOOL=0} G1 E10 F300 ;purge 10
{IF OLDTOOL=0} G92 E0 ;reset extruder
{IF OLDTOOL=0} G90 ;absolute mode
{IF OLDTOOL=1} G91 ;relative mode
{IF OLDTOOL=1} G1 E10 F300 T0 ;purge 10
{IF OLDTOOL=1} G92 E0 ;reset extruder
{IF OLDTOOL=1} G90 ;absolute mode

Ending Script
What is this?
This script runs after the last printing move. The default script for AON-M is given below:

M104 S0 T0 ;turn off heaters
M104 S0 T1
M104 S0 T2
M140 S0 ;turn off bed
M106 P0 S0 ;turn off T0 part cooling fan
M106 P1 S0 ;turn off T1 part cooling fan
M106 P2 S0 ;turn off chamber heater fan
G28 X ;home X
M84 ;disable motors

Post Processing

Post Processing
What is this?
Used for Makerbot-type printers which requires the resulting G-Code to be modified before sending to the printer. 

How do I use it?
Not used with the AON-M.

We're always looking to improve our knowledge base. If you'd like to add your experience or would like clarification on a topic, please let us know at!


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Article is closed for comments.