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

    Error in Gcode file? Operation failed (Reason:err 1)

    Scheduled Pinned Locked Moved
    General Discussion
    4
    14
    529
    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.
    • JUNKundefined
      JUNK
      last edited by JUNK

      Hi,

      "Failed to get file info for ...gcode" Operation failed (Reason:err 1)

      When I upload a gcode file I get the above error. (see Error Code.PNG) However the file successfully uploads. When I simulate printing the file, the web interface intermittently looses connection with the board and I have to emergency stop the board to reconnect. Unfortunately the gcode file is too large to upload here (4,612KB)

      Board: Duet WiFi 1.02 or later + DueX5
      Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 2.05.1 (2020-02-09b1)
      Duet WiFi Server Version: 1.23
      PrusaSlicer 2.2.0
      Kossel Delta with Diamond Hotend

      I edit the gcode in notepad++ prior to upload as I am simulating colour changes in the slicer using different tools but I am using a single mixing head tool on the printer; I search and replace T14, T15, T16 etc with T0. I have done this previously without error. (see Model.PNG). I have repeated this carefully and he error still occurs.

      I have tried uploading files that I have previously printed and they print ok.
      I have re-sliced the model and the error still occurs. The start and end of the file looks ok; I don't think that it has been truncated.
      When I download the file from the web interface the file size is the same and it doesn't appear to be corrupted.
      I have tried slicing a different model (with PrusaSlicer), that I have previously printed and it starts the print ok.
      Main difference is that I haven't tried this many tools in the slicer before. I have previously used 13 but this time 22, but I rename all the tools to T0 anyway. I have checked the mixing ratio (M567) code for typos and can't see any. This a test print.
      The file name is long "Colours 14 to 22 - Cylinder - Real Filament CYM 22 Colour Idealised.gcode" so I tried shortening it to "shortfilename.gcode" but the same errors occur.
      I have printed larger file sizes.

      config.g and M122 output attached.

      What else should I try?

      Best regards James

      1 Reply Last reply Reply Quote 0
      • JUNKundefined
        JUNK
        last edited by

        Model.PNG M122.txt Jobs Screen.PNG Error Code.PNG config.g

        1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator
          last edited by

          I'm curious what version of DWC you're using, and can you upload the gcode file somewhere and link it? Or compress it, change the extension to txt, and try uploading it here. It may compress down enough to upload it.

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • JUNKundefined
            JUNK
            last edited by

            Hi @Phaedrux Thanks for your attention.

            I am using DWC 2.0.7.
            The forum software will not allow me to upload a .zip file so I have changed the extension to .txt. You will need to change it back.

            Colours 14 to 22 - Cylinder - Real Filament CYM 22 Colour Idealised.txt

            Otherwise, I have shared the uncompressed file on google drive.
            I am happy to put it somewhere else if it is easier.

            https://drive.google.com/file/d/1zkOpH-vyU0qr0ptCABs9MZBd2GLNo8oo/view?usp=sharing

            I think the next thing to try would be to have a fresh install and upgrade to the latest version (3.1.1) and do all the required config.g updates.

            Thanks
            James

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

              Thanks for the file. I have reproduced the problem and I am investigating it.

              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

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

                This line in the GCode file is triggering the error:

                ; filament used [mm] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1685.8, 1264.3, 1264.2, 1264.1, 1264.0, 1263.9, 1263.8, 893.5, 1029.2
                

                At the same time as renumbering the tools, you should delete the 13 leading zeros from that line to get:

                ; filament used [mm] = 1685.8, 1264.3, 1264.2, 1264.1, 1264.0, 1263.9, 1263.8, 893.5, 1029.2
                

                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

                JUNKundefined 1 Reply Last reply Reply Quote 0
                • JUNKundefined
                  JUNK @dc42
                  last edited by

                  @dc42 and @Phaedrux

                  I have made the modification to the gcode file and I am now printing. Thank you.

                  Out of interest was it the number of items in the list that was causing the problem or the fact that the entries were zero?

                  Will this issue still exist when I upgrade to 3.1.1. ?

                  Thanks again

                  James

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

                    The number of items in the list was too large. It will be fixed in release 3.2, also in 3.1.2 if there is one. However, even with that fix the computed filament requirement would be wrong because of the tool renumbering, and that would caused the percent complete and print end time estimations to go wrong.

                    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

                    JUNKundefined 1 Reply Last reply Reply Quote 0
                    • JUNKundefined
                      JUNK @dc42
                      last edited by

                      @dc42 Ok, does that mean that it would be better to define multiple tools in the config.g but have them refer to the same hardware?

                      M563 P0 S"Diamond 1" D2:3:4 H3 F0
                      M567 P0 E0.33:0.33:0.34
                      M563 P1 S"Diamond 2" D2:3:4 H3 F0
                      M567 P1 E0.98:0.01:0.01
                      M563 P2 S"Diamond 3" D2:3:4 H3 F0
                      M567 P2 E0.01:0.98:0.01
                      M563 P3 S"Diamond 4" D2:3:4 H3 F0
                      M567 P3 E0.01:0.01:0.98
                      etc

                      deckingmanundefined 1 Reply Last reply Reply Quote 0
                      • deckingmanundefined
                        deckingman @JUNK
                        last edited by

                        @JUNK said in Error in Gcode file? Operation failed (Reason:err 1):

                        @dc42 Ok, does that mean that it would be better to define multiple tools in the config.g but have them refer to the same hardware?

                        M563 P0 S"Diamond 1" D2:3:4 H3 F0
                        M567 P0 E0.33:0.33:0.34
                        M563 P1 S"Diamond 2" D2:3:4 H3 F0
                        M567 P1 E0.98:0.01:0.01
                        M563 P2 S"Diamond 3" D2:3:4 H3 F0
                        M567 P2 E0.01:0.98:0.01
                        M563 P3 S"Diamond 4" D2:3:4 H3 F0
                        M567 P3 E0.01:0.01:0.98
                        etc

                        That's pretty much what I do. Here is the relevant part of my current config.g

                        M563 P0 S"Black" D0:1:2:4:5 H1 ; Define tool 0 (drive 3 not used)
                        G10 P0 X0 Y0 ; Set tool 0 axis offsets
                        G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C
                        M567 P0 E1.00:0.00:0.00:0.00:0.00 ; Set mixing ratios for tool 0
                        M563 P1 S"Red" D0:1:2:4:5 H1 ; Define tool 1
                        G10 P1 X0 Y0 ; Set tool 1 axis offsets
                        G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C
                        M567 P1 E0.00:1.00:0.00:0.00:0.00 ; Set mixing ratios for tool 1
                        M563 P2 S"Yellow" D0:1:2:4:5 H1 ; Define tool 2
                        G10 P2 X0 Y0 ; Set tool 2 axis offsets
                        G10 P2 R0 S0 ; Set initial tool 2 active and standby temperatures to 0C
                        M567 P2 E0.00:0.00:1.00:0.00:0.00 ; Set mixing ratios for tool 2
                        M563 P3 S"Blue" D0:1:2:4:5 H1 ; Define tool 3
                        G10 P3 X0 Y0 ; Set tool 3 axis offsets
                        G10 P3 R0 S0 ; Set initial tool 3 active and standby temperatures to 0C
                        M567 P3 E0.00:0.00:0.00:1.00:0.00 ; Set mixing ratios for tool 3
                        M563 P4 S"White" D0:1:2:4:5 H1 ; Define tool 4
                        G10 P4 X0 Y0 ; Set tool 4 axis offsets
                        G10 P4 R0 S0 ; Set initial tool 4 active and standby temperatures to 0C
                        M567 P4 E0.00:0.00:0.00:0.00:1.00 ; Set mixing ratios for tool 4
                        M563 P5 S"Orange" D0:1:2:4:5 H1 ; Define tool 5
                        G10 P5 X0 Y0 ; Set tool 5 axis offsets
                        G10 P5 R0 S0 ; Set initial tool 5 active and standby temperatures to 0C
                        M567 P5 E0.00:0.50:0.50:0.00:0.00 ; Set mixing ratios for tool 5
                        M563 P6 S"Purple" D0:1:2:4:5 H1 ; Define tool 6
                        G10 P6 X0 Y0 ; Set tool 6 axis offsets
                        G10 P6 R0 S0 ; Set initial tool 6 active and standby temperatures to 0C
                        M567 P6 E0.00:0.50:0.00:0.50:0.00 ; Set mixing ratios for tool 6
                        M563 P7 S"Green" D0:1:2:4:5 H1 ; Define tool 7
                        G10 P7 X0 Y0 ; Set tool 7 axis offsets
                        G10 P7 R0 S0 ; Set initial tool 7 active and standby temperatures to 0C
                        M567 P7 E0.00:0.00:0.50:0.50:0.00 ; Set mixing ratios for tool 7
                        M563 P8 S"Pink" D0:1:2:4:5 H1 ; Define tool 8
                        G10 P8 X0 Y0 ; Set tool 8 axis offsets
                        G10 P8 R0 S0 ; Set initial tool 8 active and standby temperatures to 0C
                        M567 P8 E0.00:0.50:0.00:0.00:0.50 ; Set mixing ratios for tool 8

                        Ian
                        https://somei3deas.wordpress.com/
                        https://www.youtube.com/@deckingman

                        JUNKundefined 1 Reply Last reply Reply Quote 0
                        • JUNKundefined
                          JUNK @deckingman
                          last edited by JUNK

                          @deckingman

                          Thanks, I think it was your blog post that I followed when I first set my printer up. Thank you for that.
                          It looks like I made a mistake when I drifted from your recommendations.
                          I was trying to simplify my config.g and have all the colour selections dealt with by the slicer. I would still like to do that, but I think that I will override the mixing ratios in the gcode and have all my tools defined in the config.g as generic. I am guessing that the filament estimates are based on the tools rather than the gcode. I will have to investigate and experiment further. (just thinking out loud)

                          Thanks

                          deckingmanundefined 1 Reply Last reply Reply Quote 0
                          • deckingmanundefined
                            deckingman @JUNK
                            last edited by

                            @JUNK It depends what it is that you want to achieve and there are usually several options to achieve the same objective. If the object is made up several distinct shapes which have to be different colours, then I find it easiest to create separate stl files for each piece and assign a specific tool to each of those pieces. But I may change the mixing ratio for those specific tools in the slicer start gcode. If the object just has bands of colour or perhaps "fades" from one colour to another, then I find it easier to use one tool and post process the gcode file to change the mixing ratio every "n" layers. Having said all that, I never take much notice of the filament based estimates. So they might "get confused" if one changes the mixing ration within the gcode file.

                            One thing to be aware of is that the latest firmware versions now have a limit of 50 tools (number 0 to 49 IIRC) but in earlier firmware, no such limit existed. It shouldn't be a problem but just be aware of the new limitations.

                            Ian
                            https://somei3deas.wordpress.com/
                            https://www.youtube.com/@deckingman

                            JUNKundefined 1 Reply Last reply Reply Quote 0
                            • JUNKundefined
                              JUNK @deckingman
                              last edited by

                              @deckingman Good points. Thank you for the information. I am currently subscribed to the "Diamond Hotend users" and the "3d printing multi material and multi coloured" groups on Facebook. Can you recommend anywhere else to follow?

                              deckingmanundefined 1 Reply Last reply Reply Quote 0
                              • deckingmanundefined
                                deckingman @JUNK
                                last edited by

                                @JUNK said in Error in Gcode file? Operation failed (Reason:err 1):

                                @deckingman Good points. Thank you for the information. I am currently subscribed to the "Diamond Hotend users" and the "3d printing multi material and multi coloured" groups on Facebook. Can you recommend anywhere else to follow?

                                No sorry. I don't "do" social media.

                                Ian
                                https://somei3deas.wordpress.com/
                                https://www.youtube.com/@deckingman

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