FOX2156
Posts: 4
Joined: Wed Apr 29, 2015 7:36 am

How to use script to move up Z at specific layer??

Hello! i am having a issue when printing PETG, it's too sticky and if i don't manually move up the Z at second/third layer, the material will build up on the nozzle and dropped eventually. I couldn't find any script that allows the Z move up at second/third layer during the printing. Tried G1 command but it will move up then back to original position, also tried "REPLACE", but it only changes Z height at specific layer and it doesn't change all Z height relatively. (for example, if i repalced the layer 2 height to 0.7 from 0.4,on the layer 3, the Z height will the 0.6, install of 0.9mm.

Please help, thank you
gwhite
Posts: 249
Joined: Wed Jul 19, 2017 9:37 am

Re: How to use script to move up Z at specific layer??

If you are building up gunk on the nozzle tip, do you have Z-lift enabled? I've found that helps a lot. I prevents the tip from dragging across the print when it's traveling to a new location over existing material.
airscapes
Posts: 403
Joined: Tue Mar 06, 2018 10:35 am
Location: Philadelphia PA Area

Re: How to use script to move up Z at specific layer??

sounds like your nozzle is too close to the build plate to start or you are way over extruded. I only see this on my machine when I am over extruding as my starting height is always calibrated correctly. Could be short coming of your particular machine if the bed is not flat with .02 mm you could have high areas that cause your problem.

Create a 2 walled calibration square that has wall widths the same as your extrusion widths and make it 3 mm tall. Then print it. If extrusion multiplier and starting Z offset is correct the square will measure 3mm hight +- .02 and will be the correct width +.02
Good luck!
peter009
Posts: 1
Joined: Sat Nov 27, 2021 12:16 am
Contact: Website

Re: How to use script to move up Z at specific layer??

GB Whatsapp DownloadCheck this topic..
viewtopic.php?t=4522

Hope it will help you.
Last edited by peter009 on Wed Mar 02, 2022 11:11 pm, edited 1 time in total.
FOX2156
Posts: 4
Joined: Wed Apr 29, 2015 7:36 am

Re: How to use script to move up Z at specific layer??

Thanks guys, the height has been calibrated, i will try the Z-lift see if it fixed the problem.

Thank you
mariahmiley
Posts: 1
Joined: Fri Mar 24, 2023 5:02 am
Contact: Website

Re: How to use script to move up Z at specific layer??

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:

Code: Select all

G1 Z<new Z height> F<feedrate>
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.

Return to “General Discussion and Tips”