slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.32k stars 1.29k forks source link

Firmware Retract G10 S1 BEFORE TOOL CHANGE PLEASE #4106

Closed ghost closed 6 years ago

ghost commented 7 years ago

πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅ Works now ! Read the end of topic Dual Y Single nozzle direct drive works on MARLIN with FW enabled '0.6mm height πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅

No G10 S1 before ToolChange

Firmware Retractation not ready for Multi Extrusion printing

Firmware retraction when ' selected ' , forget to make ' tool change retractation in multi extruder printing , but works fine when only one extruder because no need of tool change long retract. Please implement G10 S1 just before a toolchange , to make the long retractation , if a dual nozzle the print is still possible but dirty with missing perimeters because of not primed extruder , but if SINGLENOZZLE ' Y ' , with 50mm load/unload the print crashes !

Firmware retraction activated Multi extruder print is impossible

G1 X176.483 Y221.677 F7800.000
G1 X178.271 Y223.465 E924.73334 F1800.000
G10 ; retract    ************* NO SWAPPING RETRACTION AND NEED A G10 S1πŸ‘Ž 
G92 E0
T1 ******* NOT RECOVERED OR LOADED OR PRIMED πŸ‘Ž 
G92 E0
G1 X200.222 Y222.931 F7800.000
G1 X200.154 Y223.286 E0.09169 F1800.000
G1 X199.990 Y223.777 E0.22301
G1 X199.819 Y224.121 E0.32070

Using TOOLCHANGE TAB ToolChange Tab unusable because of REPEATING of the G10 than can confuse the machine

G1 X214.271 Y160.965 E973.40355 F1800.000
G10 ; retract    ******************************* FIRST NORMAL RETRACT πŸ‘Ž 
G92 E0
G10 S1 ; Added by the SLIC3R tab *************** SECOND  RETRACT   BIG PROBLEM πŸ‘Ž 
T1
G92 E0
G10 ; retract ****************************** THIRD RETRACT  !!!!!!    it's too much  πŸ‘Ž 
G92 E0
G1 X238.974 Y138.811 F7800.000
G11 ; unretract
G92 E0
G1 X238.783 Y139.181 E0.11126 F1800.000

Slic3r Request PR πŸ₯‡

Easy to code , just REPLACE the G10 by a G10 S1 only before a TOOLCHANGE appears and a G11 just after the tool change to recover and print continue

G10 S1               ;Swap retractationπŸ‘ 
T1                      ;Tool changeπŸ‘ 
G11                   ;Swap recoverπŸ‘
G10              ; Print can continueπŸ‘ 

I have made a topic about ' Firmware retractation ' here Understanding FIRMWARE RETRACTATION G10 / G11 / G10 S1 #7597

No Firmware retract All is perfect

G1 X170.444 Y159.479 E70.04478
G1 E20.04478 F2400.00000 ************ LONG RETRACT 50MM TO UNLOAD "G10 S1" πŸ‘ 
G92 E0
T1
G92 E0
G1 E-2.00000 F2400.00000 **************** PREHEATING FILAMENT PARTIAL RECOVER πŸ‘
G92 E0
G1 X207.662 Y194.961 F7800.000
G1 E2.00000 F2400.00000  *********************** RECOVER πŸ‘ 
G1 X206.827 Y195.686 E2.28076 F1800.000

:fr:

lordofhyphens commented 7 years ago

There's a pre-toolchange custom gcode (as well as a post-toolchange custom gcode). If you don't see it, use 1.3.0-dev. If you still don't see it because you're using RepetierHost, stop using repetierhost and give Slic3r's integrated host a spin ;), although you might be able to configure it as part of the profile and get rephost to use it (I don't use rephost and we generally don't do things to just support closed-source sw).

ghost commented 7 years ago

If i use your β€˜ script tab’ , and place a G10 S1 on the tab , on the produced Gcode i will have

G10 ; retract    ******************************* FIRST NORMAL RETRACT *************
G92 E0
G10 S1 ; Added by the SLIC3R tab *************** SECOND  RETRACT   BIG PROBLEM **********
T1
G92 E0
G10 ; retract ****************************** THIRD RETRACT  !!!!!!    it's too much  ******

It’s not serious , to confuse the machine with 2 instructions , and tweaking marlin just for a bad gcode production is not serious too For the moment , SLIC3R not ready and not scriptable for Multi extruder and Firmware retractation

But it's possible to make this , and after production of gcode , to open it , in a text editor and replace by only this

G10 S1               ;Swap retractation
T1                      ;Tool change
G11                   ;Swap recover
G10              ; Print can continue

@lordofhyphens I talk about this script problem in the marlin page stated here . all is possible with slicer , but we are forced to go outside the firmware to use a text editor ... it's why i have made a request on slicer team

lordofhyphens commented 7 years ago

Okay, let's go back to the beginning here so I can better understand the problem.

@studiodyne, I need you to provide the version of Slic3r you are using (if it's not 1.3.0-dev from https://dl.slic3r.org/dev then you need to confirm that it is still a problem there) as well as an exported configuration (use Ctrl-E). This information was originally requested in the text you deleted to make your post.

You can zip the config and drop it here.

ghost commented 7 years ago

@lordofhyphens Where are the tabs you stated ' pre tool change ' and ' post tool change , i just have ' tool change only '

I use 1.3 Dev , and it's the same problem TOOLCHANGE FIRMWARE RETRACTION not implemented πŸ‘Ž

Hope devs will make a fix in the 1.3 release All explanation the more clear as possible is given here

Steeve

lordofhyphens commented 7 years ago

Hint: I am one of the devs. Please do what I asked you to do.

ghost commented 7 years ago

Ok i will explain ... With no firmware retraction activated , all works ...
But with firmware retract enabled , in only one extruder , all works But in multi extruders , printing is impossible with firmware retractation activated Why .? Because SLIC3R forget to make the ' swap retractation ' that is a long retraction , and just make a G10 ' a short retractation ' The process must be like this

T0 is used to print all i ok G10 S1 ' long retractation 50mm for SINGLE NOZZLE SYSTEM 10mm for dual nozzle system ' T1 tool change ' that is already retracted at 50mm or 10mm G11 recovery and loading ' 50mm of loading or 10mm of loading

and print continue

But with slicer in multi extruder mode we have T0 printing G10 short retract and no G11 to recover , all is buggy

READ slowly my first comment on the top of the page and you will understand all


For the moment , during the time you make a fix , i think i can use the script processor , to make a good gcode file I'm working on it

Please can you send me a link of the SCRIPT functionnality , to help me to write my script

Thks πŸ‘

ghost commented 7 years ago

You told me to send you , the configuration , but i have no config ,for the moment , i make 2 extruder machine setting , and i make a dual printing , and i see the gcode Settings of nozlle and others , will not interest me if the engine don't produce correct gcode

ghost commented 7 years ago

I don't have ' before tool change ' and ' after tool change ' tab Please explain me how i can have it Thks

lordofhyphens commented 7 years ago

image

Use that option to export a copy of your Slic3r config that is showing the problem. Then add it to a zip file and in the Github issue interface, attach the zip file (email attachments DO NOT WORK).

image

ghost commented 7 years ago

@lordofhyphens config.zip

ghost commented 7 years ago

@lordofhyphens


Please make me a script , because I don't know Perl language

You must ' REPLACE' this block of code

G10 ; retract
G92 E0
DELETE

By This

G10 S1 ; Swapping Retract
G92 E0

And exactly the same with ' T1 '

' DELETE ' is a word added in the toolchange TAB to detect the block that must be scripted

lordofhyphens commented 7 years ago

4108 Hopefully it doesn't break anything else.

ghost commented 7 years ago

No firmware retract ---> right gcode production Activated firmware retract ----> Not perfect cloning of the ' no firmware retract gcode production' and forgotten instructions

You can trust , because , you make what already works fine without it The job is to simply make a perfect cloning with the firmware retract instructions

Thks for the PR πŸ‘ Inform me about the release that will be pushed , i will immediatly download this

lordofhyphens commented 7 years ago

The PR issues G10 S1 (instead of G10) if and only if FW retract is enabled and your gcode flavor is RepRap or Repetier. Other gcode flavors (such as Smoothie) maintain the old behavior.

That's all it does. It's building now on Appveyor for Windows.

ghost commented 7 years ago

For Marlin code it's perfect , we have rewritten the firmware retract a few days ago For information , i think marlin have the better retractation system , and may be in a few days if pull request of my suggestion accepted , marlin will have the better system with full option as possible Zlift feedrate by lcd and gcode indepently of print feedrate Long retract lengh and recover by gcode ' already implemented' Long retract and recover feedrate by gcode too and waiting an soon PR to have zlift feedrate by lcd and gcode M207 and M208 overloaded of arguments !

Thk you very much Retract indepently of the extrusion multiplier Gcode total tweaking , with zlift feedrate ' soon ' , long recover feedrate ' implemented ' and all is possible

lordofhyphens commented 7 years ago

We mostly just deal with/react to the things that the firmware authors do. I don't use Marlin at all on any of my printers, so these syntax changes are news to me.

ghost commented 7 years ago

@lordofhyphens Please can you add a new correction in this PR

A G10 after a tool change is uneeded , because ALREADY RETRACTED , and corrupt ' the swap status of the machine for this extruder

Look

G1 X78.792 Y64.434 E84.08525
G10 S1   πŸ‘  ********* ok ************
G92 E0  πŸ‘Ž    ********* uneeded but not dramatic ************
T1           πŸ‘   ********* ok ************
G92 E0   πŸ‘Ž   ********* uneeded but not dramatic ************
G10         ⛔️ ⛔️ ⛔️   uneeded and DANGEROUS FOR THE MARLIN  ⛔️ ⛔️ ⛔️ 
G92 E0   πŸ‘Ž********* uneeded but not dramatic ************
G1 X102.896 Y111.253 F7800.000
G11 ; unretract
G92 E0
G1 F1800
G1 X102.856 Y111.848 E0.01842

No G10 after a tool Change is perfect and some G92 E0 disappear πŸ˜ƒ

lordofhyphens commented 7 years ago

Two of my printers were made by me and use smoothieboards. So no marlin. I had AVR-based electronics at one point but did not care for it.

The order of operation should be:

Retract
Tool Change
Unretract. 
ghost commented 7 years ago

Yes Perfect !

:fr::fr::fr:Smoothie and Arthur Wolf :fr::fr::fr: I'm french πŸ˜ƒ

lordofhyphens commented 7 years ago

See Gcode.cpp line 720 and then GCodeWriter.cpp lines 455, 466-503 if you want to see the order of operations.

As a note: Tool Change custom gcode (there's only one) occurs prior to the toolchange command, but after the retract.

ghost commented 7 years ago

Yes , you have a beautifull source code , but , you know this code is not a code i work every day and if will work on it a few hour , i will have a better reading loll but for the moment , it's hyeroglyph , and i understand nothing , and impossible to see an ' order ' in this jungle lollll I know marlin code it's enough πŸ˜…

lordofhyphens commented 7 years ago

https://ci.appveyor.com/project/lordofhyphens/slic3r/build/job/c73c3xbwxnpgwkq9 Wait for that to finish.

lordofhyphens commented 7 years ago

https://github.com/alexrj/Slic3r/pull/4108/files#diff-ab51cc0eabff6301965ef4ed1f6357d5 Those are the tests that get executed on build, and they're passing now.

The G92 E0 is always going to happen, that's part and parcel of how Slic3r maths out the next section.

ghost commented 7 years ago

@lordofhyphens A little issue again The first tool change of each extruder have a ' G10 ' after Only the first T1, the rest of the file seems to be perfect

If you solve it , job is perfect !!!!!!!!!!!! πŸ˜ƒ

lordofhyphens commented 7 years ago

Also remember to set "Retraction when tool is disabled" to 0.

ghost commented 7 years ago
M109 S200 T0 ; set temperature and wait for it to be reached
M109 S200 T1 ; set temperature and wait for it to be reached
G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G92 E0
T0
G92 E0
G1 Z0.350 F7800.000
G10
G92 E0
G1 X69.551 Y61.320 F7800.000
G11 ; unretract
G92 E0
G1 F1800
G1 X70.986 Y59.736 E0.06612

G1 X78.792 Y64.434 E84.08525
G10 S1
G92 E0
******************************************************************************************************************************************************************
T1
G92 E0
G10    ⛔️⛔️⛔️⛔️⛔️⛔️
G92 E0
G1 X102.896 Y111.253 F7800.000
G11 ; unretract
G92 E0
G1 F1800
G1 X102.856 Y111.848 E0.01842
G1 X102.757 Y112.347 E0.03419
G1 X95.986 Y114.239 E7.74257
G10 S1
G92 E0
******************************************************************************************************************************************************************
T0
G92 E0
G1 X102.645 Y96.113 F7800.000
G11 ; unretract
G92 E0
G1 F3600
G1 X101.501 Y96.204 E0.03189

G10 S1
G92 E0
******************************************************************************************************************************************************************
T1
G92 E0
G1 X101.274 Y114.853 F7800.000
G11 ; unretract
G92 E0
G1 F900
G1 X100.751 Y115.201 E0.01745
G1 X100.217 Y115.461 E0.03392
G1 X99.674 Y115.644 E0.04985
ghost commented 7 years ago

ok i try it

ghost commented 7 years ago

setted to 0 , and always the ' G10 ' after the first tool change

I think this ' G10 ' is an initialisation and appears only one time and appears on the T0 but the first T0 is not a tool change and it's not a problem

Can you solve this ? If solved , job is finished πŸ‘

ghost commented 7 years ago

note , when we will have finished this PR , you can ' if you have time to waste ' , apply ' desactivation' on the ' retract setting tab ' , of the retract lengh and feedrate of the ' tool change retract edit box ' only when firmware retract is activated ' of course '

lordofhyphens commented 7 years ago

You're conflating two different retracts, I think.

Load this config.ini and take a look; I've marked each toolchange with some custom gcode. Note the retract before and after it. multi-extruder-test.zip

lordofhyphens commented 7 years ago

There, GUI should disallow you from setting troublesome options now.

ghost commented 7 years ago

i have a problem , if i load your config , G10 appears before tool change

lordofhyphens commented 7 years ago

When the new build is done, use that.

ghost commented 7 years ago

Another problem ZLIFT , is not deactivated when Firmware Retractation enabled and in the gcode we have zlifting mixed with g10 and g11

First , zlift must be disabled , to clean the gcode and may be some intermediate G10

lordofhyphens commented 7 years ago

Set it to 0 in your configuration then. There's some use cases for keeping it available during FW retract.

ghost commented 7 years ago

For the next PR , you must disabled ' ZLIFTING ' to avoid mixing of zlift and firmware retract The marlin FW , have zlift included

ghost commented 7 years ago

ok

lordofhyphens commented 7 years ago

There's also no particularly bad side effects to having additional z lift from the slicer. Having the extra retract/restore was completely unnecessary and caused some bad side effects (which is why I put the guards in against it).

ghost commented 7 years ago

You're conflating two different retracts, I think.

Load this config.ini and take a look; I've marked each toolchange with some custom gcode. Note the retract before and after it. multi-extruder-test.zip

i didn't see some ' custom label or anything that labellize your gcode anywhere ' look

1 X127.172 Y130.370 E16.83404 ; skirt
G1 X127.370 Y130.099 E16.88800 ; skirt
G1 X127.605 Y129.844 E16.94374 ; skirt
G10 ; retract⛔️
G92 E0 ; reset extrusion distance
G1 Z0.800 F7800.000 ; lift Z
G1 X141.613 Y133.330 F7800.000 ; move to first perimeter point
G1 Z0.300 F7800.000 ; restore layer Z
G11 ; unretract
G92 E0 ; reset extrusion distance
G1 F1800
G1 X140.974 Y133.758 E0.12351 ; perimeter
G1 X140.202 Y133.914 E0.25007 ; perimeter
G1 X139.426 Y133.755 E0.37737 ; perimeter
ghost commented 7 years ago

Can you explain me why , if i use your config printer , i have the G10 before tool change , and if use my own quick setting , G10 is not before the tool change How it's possible ?

lordofhyphens commented 7 years ago

Your own settings are likely incorrect in some way. I couldn't begin to tell you why.

ghost commented 7 years ago

my setting make a good gcode , your setting make a bug and it's my settings are wrong lol I will try to find what is the reason of this g10 appears

lordofhyphens commented 7 years ago

As a reminder, https://github.com/alexrj/Slic3r/pull/4108 has the current commit status of the branch.

ghost commented 7 years ago

The last release work with my settings Marlin + 2 extruders + firmware and nothing else But YOUR CONFIG generate a G10 before tool change I'm searching what make this

ghost commented 7 years ago

IF volumetric is enabled G10 APPEARS Include ' volumetric mode ' in the same flavor ' if possible '

and disabled all zlift setting when firmware retraction is enabled For many reason of confusion with many hop can appears

But now , you have made a serious release , works fine , i will use it every day , and i will inform you about this

ghost commented 7 years ago

no it's wrong , it's not the volumetric , please wait i'm trying again

ghost commented 7 years ago

I've found the issue It's ' FORCE RETRACTION LAYER CHANGE' the tool change appears just after the layer change and , of course , A G10 appears , and after a G10S1 I'm ok to leave this functionnality , but , is it possible to disable it if just after a layer change appears a tool change Possible to make this conditionnal ?

lordofhyphens commented 7 years ago

It already is conditional. Uncheck it to turn it off.

lordofhyphens commented 7 years ago

G10 can and will appear for non-toolchange related retracts. This is normal and part of the spec I saw on marlinfw.org (S1 for a "long" aka toolchange retract).

ghost commented 7 years ago

yes but for many reason of corruption of the MarlinFW , i'm afraid to loose the status 'swap or simple retract ' if G10 and G10 appears together

If i leave this option ' off ' , you can be sure many user will come here and cry , because retract after layer change not works It's why i need the functionnality continue to be enabled , but , must never appear before a G10 S1 iF possible 'of course '