Gcode generation XY position before Z altitude
 
Notifiche
Cancella tutti

Gcode generation XY position before Z altitude  

  RSS
Msystem
(@msystem)
Active Member
Gcode generation XY position before Z altitude

Hi to everyone , From some month I to use PrusaSlicer and I'm pretty enthusiastic, a lot of settings and possibility we will do a lot together thanks. I would try to solve a little problem in the beginning of the Gcode generation.
Afther the custom gcode where perfom the warmup do the homing and purge the nozle a rise it at a safe atitude the programa generate the gcode and the first code is the Z altitude and afhter the XY position. there is a settings or trick to swap this two line of code??

G0 Y4 F400
G0 Z5 F2000

G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G92 E0
; Filament gcode
;LAYER_CHANGE
;Z:0.3
;HEIGHT:0.3
G1 Z0.300 F7800.000 < than bring the extruder in the righit eight
G1 E-2.00000 F2100.000 < First position of extruder
G92 E0
G1 X70.675 Y80.756 F7800.000
M73 P1 R16

I use PrusaSlicer 2.3.0+linux-x64

Postato : 18/03/2021 7:33 am
Msystem
(@msystem)
Active Member
Topic starter answered:
RE: Gcode generation XY position before Z altitude

Here the program  Settings

Postato : 18/03/2021 7:40 am
Neophyl
(@neophyl)
Illustrious Member
RE: Gcode generation XY position before Z altitude

The normal way to debug things is to save the project from Prusa Slicer.  File>Save Project As.  This generates a .3mf file.  The 3mf file will contain your model(s), any modifiers and their positions and a copy of all 3 profiles (Print, filament and Printer).  This allows someone loading the project to slice with exactly the same settings you are using in an easy and compact manner.

However you do need to zip into an archive and file such as a 3mf or stl etc for the forum to accept them.  

Postato : 18/03/2021 12:48 pm
bobstro
(@bobstro)
Illustrious Member
RE: Gcode generation XY position before Z altitude

@Msystem -- I can't understand what it is you're trying to do. Can you explain it more clearly?

You can easily edit the start gcode under Printer Settings and save a custom printer preset.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Postato : 18/03/2021 2:21 pm
Msystem
(@msystem)
Active Member
Topic starter answered:
RE: Gcode generation XY position before Z altitude

" Neophyl" In attachment there is the file request zipped I hope can help.

"bobstro" I've just modified the start end Gcode the coordinate come from the slicer and I'm asking if there is some settings or trick to solve instead modify by hand

 

CalibrationCube

; Filament gcode
;LAYER_CHANGE
;Z:0.3
;HEIGHT:0.3
M73 P0 R28
G1 Z0.300 F7800.000        This have to be after the XY position
G1 E-2.00000 F2100.000
G92 E0
G1 X94.752 Y92.210 F7800.000  This have to be before Z altitude
G1 E2.00000 F2100.000
;TYPE:Skirt
;WIDTH:0.42
G1 F1800.000

Postato : 18/03/2021 3:51 pm
Msystem
(@msystem)
Active Member
Topic starter answered:
RE: Gcode generation XY position before Z altitude
Posted by: @msystem

Hi to everyone , From some month I to use PrusaSlicer and I'm pretty enthusiastic, a lot of settings and possibility we will do a lot together thanks. I would try to solve a little problem in the beginning of the Gcode generation.
Afther the custom gcode where perfom the warmup do the homing and purge the nozle a rise it at a safe atitude the programa generate the gcode and the first code is the Z altitude and afhter the XY position. there is a settings or trick to swap this two line of code??

G0 Y4 F400
G0 Z5 F2000

G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G92 E0
; Filament gcode
;LAYER_CHANGE
;Z:0.3
;HEIGHT:0.3
G1 Z0.300 F7800.000 < than bring the extruder in the righit eight
G1 E-2.00000 F2100.000 < First position of extruder
G92 E0
G1 X70.675 Y80.756 F7800.000
M73 P1 R16

I use PrusaSlicer 2.3.0+linux-x64

This post is not correct follow the right one 

G0 Y4 F400
G0 Z5 F2000

G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G92 E0
; Filament gcode
;LAYER_CHANGE
;Z:0.3
;HEIGHT:0.3
G1 Z0.300 F7800.000 < than bring the extruder in the righit eight
G1 E-2.00000 F2100.000
G92 E0
G1 X70.675 Y80.756 F7800.000 < First position of extruder
M73 P1 R16

Postato : 18/03/2021 3:54 pm
bobstro
(@bobstro)
Illustrious Member
RE: Gcode generation XY position before Z altitude

I think what you are trying to do is modify the sequence that PrusaSlicer uses on layer changes. You want the Z adjustment to occur after the XY positioning. I don't think you can do this:

G1 Z0.300 F7800.000 This have to be after the XY position

This is when the nozzle is move UP after finishing the previous layer. If you don't do this first, the nozzle will still be at the previous layer height.

G1 E-2.00000 F2100.000
G92 E0

This retracts filament 0.2mm.

G1 X94.752 Y92.210 F7800.000 This have to be before Z altitude

This moves the nozzle to the XY position. This is a new layer, so the nozzle SHOULD be moved up before making this move or it will be scraping the layer just printed.

G1 E2.00000 F2100.000

I'm not sure about this. It looks like it's just extruding 2mm of filament without moving. I'd expect to see E included in a G1 XY move for printing.

If you enable Z-lift, the nozzle will be raised ABOVE the next layer height, then moved, then the nozzle lowered. I think that will do what you're trying to do. Here's why my gcode looks like on a layer change with wipe disabled, 0.8mm retraction, and 0.4mm z-lift enabled. I've added some comments:

; stop printing object Shape-Box id:0 copy 0
M106 S84.15 ; fan speed
;LAYER_CHANGE
;Z:0.35 - layer to be printed
;HEIGHT:0.15 - layer height
;BEFORE_LAYER_CHANGE
G92 E0.0
;0.35


G1 E-0.80000 F2100.000 ;retraction
G1 Z0.600 F10800.000 ; z-lift + normal lift
;AFTER_LAYER_CHANGE
;0.35
G1 X111.476 Y120.057 ; reposition nozzle
G1 Z0.350 ; lower nozzle to next layer height
G1 E0.80000 F2100.000 ; re-retract
[... rest of print ...]
My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Postato : 18/03/2021 5:31 pm
Msystem
(@msystem)
Active Member
Topic starter answered:
RE: Gcode generation XY position before Z altitude

 

Ok I try to explain better.
The problem is only the first movement after the custom Gcode.
At the end of custom Gcode I rise the nozzle at line 41 at 5mm
after this command start the slicer Gcode, now the nozle Z position is set on 0.300mm line 52 and after move to the first position "G1 X94.752 Y92.210 F7800.000 " line 55 you can follow in the file I3_CalibrationCube.
I would like invert the line 55 with 52 only in the beginning not in all the code. this swap allow to move the nozzle in the safe position of 5mm from the purge position to the work position and after bring the nozzle in the fist layer position and start the job.
Is possible with some trick do this swap only on line 55 with 52 maybe runing some macro or script triggered at the end of the Gcode generation ??

 

Postato : 18/03/2021 9:26 pm
Msystem
(@msystem)
Active Member
Topic starter answered:
RE: Gcode generation XY position before Z altitude

No one idea???

 

Postato : 23/03/2021 3:59 pm
Condividi: