1

I'm trying to print this pet ID in two colours.While I'm still going around my previous post I tried this code which lead to the results shown in the picture. On your left there are the two initial lines, on your right is the result of the filament change and at the centre what should be the print (name and phone). If I let the print go on it will correctly print the rest of the numbers and the letters (can't show it because of my number). It seems like it is purging at the place and at the time it should be printing. Why is this happening?

The code:

; ...
;LAYER:19
;MESH:/tmp/ap_slicer_s9e9_pzv.stl
; previous autogenerated code

; filament change G1 E-2 F500 ; retract 2mm G0 X200 Y200 Z10 ; move to safe place G1 E-40 F1500 ; retract filament out of Bowden tube M25 ; pause print, change filament ;G1 E2 F900 ; purge filament G1 X180 Y180 Z0.3 F5000.0 ; Move to "start" position G1 X180 Y20.0 Z0.3 F1500.0 E15 ; Draw a line ; filament change end

; following autogenerated code G0 X99.098 Y117.198 Z2.1 M204 S500 ; M204 P500 T500 M205 X20 Y20 ;TYPE:WALL-OUTER G1 F1800 X98.745 Y117.198 E652.74798 G1 X98.745 Y111.752 E652.83855 G1 X99.098 Y111.752 E652.84442 G1 X99.098 Y117.198 E652.92434 M204 S5000 M205 X30 Y30 ;...

The results:

enter image description here

julio
  • 155
  • 7

2 Answers2

1

You're still mixing up absolut and relative movement as could be seen in Complete filament retraction when mid print filament change, know that the filament is close to a value of 652 mm, considering the auto generated code of the outer wall in the bottom part of your example code:

G1 F1800 X98.745 Y117.198 E652.74798

So, while E being at about 652 mm before filament change, you instruct the filament to move 2 mm backwards, while in fact it is an absolute move, as a result, the filament retracts about 654 mm.

Before retraction, you should have put the firmware in relative mode.

The move to position (X, Y) to (200, 200) is an absolute move,

G0 X200 Y200 Z10 ; move to safe place

this is correct, but your Z move should always be a relative move, so omitted in the G-code, the Z move should be a separate G-code. Keep in mind that you maximum filament change height is the max height minus the relative parking increase.

E-40 will further retract the filament, which is now close to 700 mm! Next is priming to E15, so 55 mm is extruded.

Next your print continues, the first extruded move brings the primed hotend to about 652 mm.

Basically, this script does not work!

0scar
  • 37,708
  • 12
  • 68
  • 156
1

Well, I finally managed to print an acceptable piece. After reading and a lot of trial and error I understood what was happening. Besides the absolute and relative axes modes I was mixing I wasn't restoring the extruder position to its previous value.

This was the result:

the result

And this are the commands that got the thing printed:

; Filament change - begin
M107 ; turn off layer fan
M104 S210 ; set extruders temp to 210º (it was at 200º)
M83 ; switch extruder to relative mode
G91 ; set axes to relative mode
G1 E-5 F2100 ; retract a little to avoid oozing
G0 Z+20 F300 ; move up nozzle
G0 X-50 Y-60 F6000 ; move nozzle to a "safe place"
M25 ; pause and change filament
; at this point through the control panel I extrude 10mm of filament to avoid colour mixing
G90 ; switch back axes to absolute mode
M82 ; switch back extruder to absolute mode
; the following five lines prime the nozzle
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X30.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X30.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X30.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X30.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line

G92 E598.88332 ; set extruder back to prior value ; Filament change - end

Explanation:

First it stops the layer fan to guarantee a good adhesion. I was having issues specially with black filament. Then I heat up nozzle over 10º, retract filament, move to safe place, change filament, manually purge and hit continue. Then the nozzle is primed and the last command sets the extruder back to its corresponding value. I do not turn fan layer back on.

My next goal is to fine tune retraction to avoid stringing (I'll post another question about this).However I am really really happy I achieved a filament change without M600 command and learnt a lot on GCODE.

julio
  • 155
  • 7