Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Cura work-around

    Scheduled Pinned Locked Moved
    Third-party software
    7
    66
    3.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dc42undefined
      dc42 administrators @jens55
      last edited by

      @jens55 why not set default temperatures for the tools in start.g using G10 or M568 ? Then use M116 in the tpost.g file to wait for temperature before doing the purge.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      jens55undefined 1 Reply Last reply Reply Quote 1
      • jens55undefined
        jens55 @dc42
        last edited by

        @dc42, I already use M116 in the tpost.g files. The reason I am reluctant to set default temperatures is because those change. PLA and PETG could be covered with 210C but what about higher melting filaments?
        I would have to change the defaults based on what material I am printing.
        I am not saying it wouldn't work ... but I would end up having to mess with the defaults.
        I would also have to set defaults for all 4 extruders even though I might just use one extruder .... and I would have three extruders sitting there cooking filament.
        Unless I can somehow grab the data from the Cura print file about which extruders are used and at what temperatures, it doesn' really look like a good solution.

        dc42undefined fcwiltundefined 2 Replies Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @jens55
          last edited by

          @jens55 the other tools would not heat up if the print never selected them.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          jens55undefined 1 Reply Last reply Reply Quote 0
          • jens55undefined
            jens55 @dc42
            last edited by

            @dc42, hmmmm ....... I will need to try that out - would you just set standby temperatures?

            dc42undefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @jens55
              last edited by

              @jens55 said in Cura work-around:

              @dc42, hmmmm ....... I will need to try that out - would you just set standby temperatures?

              No, just active temperatures, because you are only interested in heating the tool or tools that Cura selects.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              jens55undefined 1 Reply Last reply Reply Quote 0
              • jens55undefined
                jens55 @dc42
                last edited by

                @dc42, ok, I will give that a try. Thanks!

                1 Reply Last reply Reply Quote 0
                • fcwiltundefined
                  fcwilt @jens55
                  last edited by

                  @jens55 said in Cura work-around:

                  The reason I am reluctant to set default temperatures is because those change. PLA and PETG could be covered with 210C but what about higher melting filaments?

                  That issue is one of the reasons for the approach that I use.

                  Frederick

                  Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                  1 Reply Last reply Reply Quote 0
                  • jens55undefined
                    jens55
                    last edited by

                    OK so I am still screwing around with this and trying to find the best solution ..... with questionable luck

                    To recap one of the issues, Cura uses the T(n) command to change tools followed by a separate temperature command. Duet takes the T(n) command and runs the various tool changing routines. I had tried to issue an M116 in the tpost routine followed by a purge to prime the tool. Well since temperature had not been initially specified, the waiting doesn't happen and the purge doesn't happen but it would seem the purge happens at a later, less convenient time) after Cura has specified the temperature and it is reached.
                    Taking some of the earlier suggestions, I decided to try a post-process search and replace. I replaced T(n) with G10 P{extruder_nr} S{material_print_temperature}.
                    Cura uses the variables in curly brackets as place holders and when it generates the gcode file it replaces those values in the place holder with actual values. Alas, post processing happens AFTER Cura has generated the gcode file so even though I had found a way to trick Cura, Cura decided to barf on me instead.
                    I am back to having no clue on how to do this in an intelligent way that does not require me to interact with Cura on the gcode level as a 'user' .... all I want to do is to hit the 'slice' button and get correct code generated.
                    <sigh>

                    Yes I tried setting default temperatures in start.g and that does work but I don't like that I have to change the settings for different filament. This is not a user friendly approach. Further, it would seem (please correct me if I am wrong !!!!) that I can not call a purge routine in tpost.g because the underlying gcode that caused tpost.g to run did not specify an extruder temperature but instead relies on the extruder having been turned on during start.g. Problem with that is that if the extruder is called for the first time, it is still cold causing the purge to fail at the commanded time and inserting a blob at a later time when the tool happens to have finished warming up.

                    I still haven't wrapped my mind around the whole filament system in DWC .... something still to do.

                    I find it odd that other people that are using Cura on tool changers have not run into that issue ...

                    Lastly, I have not yet tried to set up a separate purge station to use for all the tools - I don't like the concept of introducing the extra time and motion required rather than doing the purge as the tool is withdrawn from the parking position. This is something that I might be forced into but it's pretty much my least liked approach at the moment.

                    1 Reply Last reply Reply Quote 0
                    • botundefined
                      bot
                      last edited by bot

                      I figured it out! Using the search and Replace script

                      Use this as the search field:

                      ;Generated with Cura_SteamEngine.*
                      T[0-9]
                      

                      and this as the replace field:

                      ;Generated with Cura_SteamEngine
                      

                      And ensure you have checked the box to use regular expresions.

                      It should work, even after cura updates, as long as the formatting of that generated by message stays the same.

                      (edit: you have to copy and paste the two lines above, so that cura properly recognizes the invisible newline character. Be careful that after you paste it into curea, there is an invisible newline character between .* and T0)

                      The T[0-9] will replace any tool number from 0-9. If you have more than 9, you'll have to make a regex that searches for more than one digit after T.

                      *not actually a robot

                      jens55undefined 1 Reply Last reply Reply Quote 0
                      • jens55undefined
                        jens55 @bot
                        last edited by jens55

                        @bot, can you explain your thinking please? This looks to me like you are just deleting the T(0-9) field
                        Wouldn't that just kill the gfile as no tools are selected?
                        Colour me very confused ...

                        botundefined 1 Reply Last reply Reply Quote 0
                        • botundefined
                          bot @jens55
                          last edited by bot

                          @jens55 you include both lines from the first "search" field that I wrote up there. Copy and paste those two lines and put them in as the search field.

                          Then, it will only replace the one Tn command that comes immediately after the words ;Generated by...

                          *not actually a robot

                          jens55undefined 1 Reply Last reply Reply Quote 0
                          • jens55undefined
                            jens55 @bot
                            last edited by

                            @bot, I understand that .... but you haven't 'replaced' the T0 with anything. How will Cura handle a gcode file that has no tool selection commands ?

                            botundefined 1 Reply Last reply Reply Quote 0
                            • botundefined
                              bot @jens55
                              last edited by bot

                              @jens55 you will put the tool selection commands in your start gcode for that extruder, in your printer settings in cura

                              You might have to get rid of those heating commands at the beginning, too. I don't use cura, so I don't know if those can be disabled or you have to rig up a search and replace for those as well.

                              *not actually a robot

                              jens55undefined 1 Reply Last reply Reply Quote 0
                              • jens55undefined
                                jens55 @bot
                                last edited by

                                @bot, I see two problems here .... 1) you have removed the tool selection command and so Cura doesn't know to run the start gcodes, 2) how do you get the temperatures that Cura wants to use into the replacement command if, against all odds, Cura somehow knows to run the tool start.g command ?

                                Still very confused ....

                                botundefined 1 Reply Last reply Reply Quote 0
                                • botundefined
                                  bot @jens55
                                  last edited by

                                  @jens55 Cura still puts the start gcodes for the extruders.

                                  In the start gcode, you use those placeholders you spoke about. I'm sure there will be some curly bracket thing that gets replaced with the temperature, the tool number, etc. Is there not?

                                  *not actually a robot

                                  jens55undefined 1 Reply Last reply Reply Quote 0
                                  • jens55undefined
                                    jens55 @bot
                                    last edited by

                                    @bot, unfortunately those placeholders don't work in that instance. The placeholders are evaluated as the gcode file is generated but you changed the gcode file after the fact without re-running it through Cura. What you end up with is literally the text of the placeholder in the gcode file and not the value it stands for.

                                    botundefined 1 Reply Last reply Reply Quote 0
                                    • botundefined
                                      bot @jens55
                                      last edited by

                                      @jens55 I don't know where you are putting the placeholders, but surely they are meant to be used in the start gcode. Can you try this and see if it works? Where would the placeholders go? Why would they exist?

                                      *not actually a robot

                                      jens55undefined 1 Reply Last reply Reply Quote 0
                                      • jens55undefined
                                        jens55
                                        last edited by

                                        Any start or finish g codes and what not that are set up in Cura are evaluated when Cura generates the print file and never after. Whatever the gcode is that is in the print file is executed by Duet. The T(n) commands are evaluated by the Duet and replaced with the content of the various tool change macros but those macros have no knowledge of anything from Cura. Since you replaced the T(n) commands with nothingness, Duet never sees a T(n) command and won't run anything related to changing tools.

                                        botundefined 1 Reply Last reply Reply Quote 0
                                        • botundefined
                                          bot @jens55
                                          last edited by bot

                                          @jens55
                                          You just have to put this in your start g-code:

                                          T{extruder_nr} to get a Tn command.

                                          We have only replaced a single Tn command with nothingness. The first one that you don't want.

                                          *not actually a robot

                                          1 Reply Last reply Reply Quote 0
                                          • jens55undefined
                                            jens55 @bot
                                            last edited by

                                            @bot said in Cura work-around:

                                            @jens55 I don't know where you are putting the placeholders, but surely they are meant to be used in the start gcode. Can you try this and see if it works? Where would the placeholders go? Why would they exist?

                                            I tried it in my first post from today where I laid out the whole issue again.
                                            The place holders are inside Cura for Cura's use and have a very narrow focus or scope.. If you set up a startg file for let's say tool1 and in that file you set G10 P{extruder_nr} S(material_print_temperature), the resulting gfile that is the print file will simply have the literal command in there ... like

                                            G10 P{extruder_nr} S(material_print_temperature)

                                            Ok, I am now confusing myself ..... I will have to do some tests .....

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA