You will need to have access to the G-code instructions that direct the motions of your 3D printer in order to advance up the Z-axis at a certain layer in a script. To shift up the Z-axis at a particular layer while using a typical G-code script for your printer, use the following command:
In this case, "new Z height" refers to the new height you want to move the nozzle to, and "feedrate" denotes how quickly it will ascend. You must first determine the layer number in your G-code file in order to shift the Z-axis up at a certain layer. Keep an eye out for the G-code instruction that specifies the layer height, which is commonly denoted by the letter "Z" followed by a number. For instance:
Code: Select all
;LAYER:23
G0 F9000 X74.724 Y62.63 Z0.4
This command indicates that layer 23 is being started and that its Z-height is 0.4 mm. You can immediately follow the layer-setting command with the G1 command to shift up the Z-axis at this particular layer, as in the following example:
Code: Select all
;LAYER:23
G0 F9000 X74.724 Y62.63 Z0.4
G1 Z0.5 F300
With a feedrate of 300mm/min, the G1 instruction in this example raises the nozzle by 0.1mm to a new Z-height of 0.5mm. Use the amended G-code file to print your item after saving it. The G-code instructions will be carried out by the printer, which will then raise the nozzle to the new Z-height at the designated layer.