Eines de l'usuari

Eines del lloc


Barra lateral

ControlOnLine.net

controlonline.net@gmail.com

public:projectes:cnc:3d_print:2_colors

marlin_gcodes7.pdf

Cal afegir el següent codi:

versió 1:

M83 ; turn on relative movement for extruder 
G1 E-5.000000 F6000 ; retract filament 5mm 
G1 X0.000000 Y0.000000 F9000 ; home X and Y axis leave Z at current height 
G91 ; note: For Marlin this make E and XYZ relative; for some it just makes XYZ
G1 Z10.0 ; obviously, this limits your print height by this amount!
; Note Marlin treats relative different from others

M84 E ; release extruder stepper motor from 'holding' position 
@pause Change Filament for [next_extruder] and set [temperature_[next_extruder]] degrees ; pause print!
G90  ; back to absolute
G1 X0.000000 Y0.000000 F9000 ; upon resume, rehome X/Y in case position was bumped out 
G91  ; bring Z back
G1 Z-10.0
G90  ; and back to absolute
G1 E0 F6000 ; reset extruder, ready to push out plastic again 
G1 F9000 
M82 ; set extruder movement back to absolute ready for next layer

versió 2:

M83 ; turn on relative movement for extruder  
G1 E-5.000000 F6000 ; retract filament 5mm  
G1 X0.000000 Y0.000000 Z4.000000 F9000 ; home X and Y axis leave Z at current height  
M84 E ; release extruder stepper motor from 'holding' position  
@pause ; pause print!
G1 X0.000000 Y0.000000 F9000 ; upon resume, rehome X/Y in case position was bumped out  
G1 X69.080000 Y58.560000 F9000 ; move back to next layer starting position  
G1 E0 F6000 ; reset extruder, ready to push out plastic again  
G1 F9000  
M82 ; set extruder movement back to absolute ready for next layer

Veig que no fan en cap dels dos un rehome, i si he mogut els els exios xy?? Caldria afegir:

G28 X0 Y0  ;move X/Y to min endstops

Jo vaig a fer un meu:

M83 ; turn on relative movement for extruder 
G1 X0.000000 Y0.000000 F9000 ; home X and Y axis leave Z at current height
G91 ; note: For Marlin this make E and XYZ relative; for some it just makes XYZ
G1 Z10.0 ; obviously, this limits your print height by this amount!
M84 E ; release extruder stepper motor from 'holding' position  
M0 ; pause print!
G1 X10 Y10 ; abans de fer el rehome que no estiguin polsats el finals de cursa(cordenades relatives)
G28 X0 Y0  ;move X/Y to min endstops
G90  ; back to absolute
G1 X0.000000 Y0.000000 F9000 ; upon resume, rehome X/Y in case position was bumped out 
G91  ; bring Z back
G1 Z-10.0
G90  ; and back to absolute
G1 E0 F6000 ; reset extruder, ready to push out plastic again 
G1 F9000 
M82 ; set extruder movement back to absolute ready for next layer
Ni @pause, ni M0, ni M1, ni M0 S250 funcionen amb targeta-LCD, pot ser des de un software des de el USB(pronterface), deixe d'enviar codis i pari, mentre que amb la tageta-LCD no para. TAMPOC FUNCIONA
Results so far: Neither M25, M226 nor M600 pauses my printer so I could change the filament. M25 does only work if you print from SD-Cards (what I don't use), M226 is not implemented in my firmware and M600 works only if there's an lcd display attached to the printer.
  • M25 pausa des de el SD
  • M226 pausa des de un pin de la placa
  • M600 pausa per canviar el fil
{{ :public:projectes:cnc:3d_print:marlin_gcodes7.pdf |}}
Example: M600

Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal].

In smoothieware:

The variable "after_suspend_gcode" is run after M600.

For example:

after_suspend_gcode G91_G0E-5_G0Z10_G90_G0X-50Y-50 # gcode to run after suspend, retract then get head out of way
Example
M25
The machine pauses printing at the current position within the file. To resume printing, use M24. Do not use this code to pause the print in a G-code file, use M226 instead.

Prior to pausing, RepRapFirmware runs macro file pause.g. This allows the head to be moved away from the print, filament to be retracted, etc.

Amb el M25 he trobat el següent codi:

M85 S0; Disable Timeout
G90 ; Absolute
M400 ; Wait Buffer
G91 ; Relative
G1 E-30.000000 F6000
G1 Z10 F300
G90 ; ABSOLUTE
G1 X20 Y20
M117 "Change Filament" ;
M400 ; Wait Buffer
M25 ; Pause SD Print
G91 ; RELATIVE
G1 Z-10
M400
G90 ; ABSOLUTE

Eltre exemple;

Instructions

1- Slice your .STL and save .gcode in SD card
2- Find, in your host, (I’m using Repetier) exactly at which layer the color needs to change. Let it be N.
( In my example, layer 8 is first layer with letters instead of being the rectangle base, thus N=8)
3- Find the height of that layer with this formula : (N-1) layer thickness + 1first layer thickness = answer
(My first layer thickness is 0.3 mm, subsequents are 0.15 mm. 7.15+1.3 = 1.35 mm)
4- Find the exact height in .gcode file. I suggest to open it with Notepad and press Ctrl+F, then enter G1 Z… where … is your height
(My line reads : G1 Z1.350 F7800.000)
5- Right after G1 Z… F…, paste this:

G91 ; use relative coordinates
G1 Z15 ; extruder up 15 mm
M25 ; pause sd card reading, now is the time to change filament!
G91 ; use relative coordinates
G1 Z-15 ; extruder down 15 mm
G90 ; use absolute coordinates
G92 X… Y… Z… E0 ; set all axes in right position

Replace all … with right value. After X and Y, write last coordinates that were sent before G1 Z… (step 4). Generally, you’ll find them 3 lines before G1 Z… . After Z, write your height calculated at step 3.

(For me, I had these lines of code. In bold are lines I added)
…
G1 X76.794 Y15.456 E62.94156
G1 X33.206 Y15.456 E64.22251
G1 F1800.000 E63.22251
G92 E0
G1 Z1.350 F7800.000
G91 ; use relative coordinates
G1 Z15 ; extruder up 15 mm
M25 ; pause sd card reading, now is the time to change filament
G91 ; use realative coordinates
G1 Z-15 ; extruder down 15 mm
G90 ; use absolute coordinates
G92 X33.206 Y15.456 Z1.350 E0 ; set all axes in right position
G1 X56.345 Y24.970 F7800.000
G1 E1.00000 F1800.000
G1 X55.764 Y25.861 E1.01990 F1890.000
…

Note where I found X33.206 and Y15.456 that a wrote on command G92

6- Save and print with SD card
7- Wait for the printer to stop and the change the filament by retracting (manual control). Purge the remaining plastic of the wrong color by extruding (manual control). When color coming out of nozzle is the right one, clean up the nozzle.
8- Enter M24 (resume SD printing) in your host. It should go down 15 mm and then resume printing.
9- You're done!
10- There is no step 10, you’re already done I told you.

It may seem complicated at first, but I assure you, once you know what you’re doing it’s very simple. Hope you like it!

More from 3D Printing
view more

JA FUNCIONA M25

Aquest codi ja funciona, només crec que caldria afegir la deshabilitació dels motors mentre canvie el fil.

M17 ; Enable/Power all stepper motors
M18 ; Disable all stepper motors

ok ha funcionat, al canviar el cable crec que la també podria fer-se un home traure el + - 10 Z i home

G28 X0 Y0 
G28 Z0
Pot ser perillos que vagi des de Z0 fins la nova ubicació, millor ho deixare així a sortit be, podem afegir la nova posició amb coordenades absolutes
G28 X0 Y0 
G28 Z0
G01 X0 Y0 Z anterior

bustia2colors.gcode.zip

M400 ; Finish all moves
M83 ; turn on relative movement for extruder 
G1 X5.000000 Y5.000000 F9000 ; home X and Y axis leave Z at current height
G91 ; relative
G1 Z10.0 ; obviously, this limits your print height by this amount!
M84 E ; release extruder stepper motor from 'holding' position
M18  
M25 ; pause SD print
M17
G91  ; bring Z back
G1 Z-10.0 
G28 X0 Y0 ;move X/Y to min endstops
G90  ; back to absolute
M400 ; Finish all moves
G90  ; and back to absolute
G1 E0 F6000 ; reset extruder, ready to push out plastic again 
G1 F9000 
M82 ; set extruder movement back to absolute ready for next layer

Versió millorada

El cura comença per la capa 1, el gcode comença per la capa 0 cal restar una capa
1 2 3 4 ...26.... 40  cura
0 1 2 3 ...25.... 39  gcode

Aquesta nova versió faig que el Z faci home i despres el axeque fins l'altura on s'havia quedat, perque no toqui cap peça ja impresa.

Veurem si va millor, si el error acumulat capa per capa es gran aquesta forma de fer home i despres imprimir serà pitjor que si no canvie l'altura i nomes puje i baixe

;LAYER:25
;DosColors
M400 ; Finish all moves
M83 ; turn on relative movement for extruder 
G1 X5.000000 Y5.000000 F9000 ; aparca
G91 ; relative
G1 Z10.0 ; obviously, this limits your print height by this amount!
M84 E ; release extruder stepper motor from 'holding' position
M18  ; desactiva motors
M25 ; pause SD print PAUSA
M117 Canvia el fil...
M17 ; activa els motors
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0
G91 ; relative
G1 Z5.0 ; on s'havia quedat
G90  ; back to absolute
M400 ; Finish all moves
G90  ; and back to absolute
G1 E0 F6000 ; reset extruder, ready to push out plastic again 
G1 F9000 
M82 ; set extruder movement back to absolute ready for next layer
M109 S180.000000 ; temp extrusor toronga i lletres mes definicio.
;DosColors
public/projectes/cnc/3d_print/2_colors.txt · Darrera modificació: 2017/06/18 18:17 (edició externa)