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

    3.5B4: Input Shaping Plugin: Bug: Data collection cancelled

    Scheduled Pinned Locked Moved
    Beta Firmware
    5
    13
    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.
    • alexjxundefined
      alexjx
      last edited by alexjx

      There is a bug in the latest 3.5B4 input shaping plugin, when we try capturing data, we always get "Data collection cancelled" error message. If it's a multi-move test, only the first move will be recorded due to this error. Others have seen such issue too.[https://forum.duet3d.com/topic/32383/input-shaping-plugin-not-collecting-data-using-3-5-0-beta-3/23]
      I'm using a proper shielded cable (shield grounded), so I think I could rule out the potential cable issue.

      The problem is that the plugin assumes we're always using the CANBUS to connect the accelerameter, and following code will throw if it's a none CANBUS board, as in my case a Duet2 WIFI.

      // src\plugins\InputShaping\RecordMotionProfileDialog.vue:494
      
      			// Get board
      			const board = this.boards.find(board => board.canAddress === parseInt(matches[1]));
      			if (!board) {
      				throw new Error("Failed to get accelerometer board");
      			}
      

      I have zero exprience in Vue, and less in frontend, so I don't know what a proper fix should be. However, can we assume that for a none CAN-connencted board, the canAddress will always be null? And there should only be one such board? Like following?

      			// Get board
      			const board = this.boards.find(board => board.canAddress === null || board.canAddress === parseInt(matches[1]));
      			if (!board) {
      				throw new Error("Failed to get accelerometer board");
      			}
      

      Thanks
      Jia

      chrishammundefined 1 Reply Last reply Reply Quote 1
      • chrishammundefined
        chrishamm administrators @alexjx
        last edited by

        @alexjx I cannot confirm this, it works OK on my Duet 3 Mini5+ setup with 3.5-b4 which only has an accelerometer connected to the mainboard. The code you are referring to only captures the first number from the accelerometer string (0 -> 0, 1.0 -> 1) to identify the accelerometer to observe in the OM while a move is being performed.

        It may help to check the JS console for potential errors if the data collection fails.

        Duet software engineer

        alexjxundefined 1 Reply Last reply Reply Quote 0
        • alexjxundefined
          alexjx @chrishamm
          last edited by alexjx

          @chrishamm I think the codes lead to a subtle situation where it just happened to work unintentionally. As far as I recall, duet mini 3 has CAN bus capability, by another word, there will be a valid CAN address.

          Please see following picture, the accelerometerId is "0", so long if there is a board with canAddress equals to 0, the find will return a valid board. Therefore as long as we have a board with canAddress matching, we will not have the problem.

          However with duet 2 wifi, we dont have such a board, it will always return undefined in line 495, and exception afterwards.

          77703dbd-fd42-4cd4-952c-c511cfd0210a-image.png

          chrishammundefined 1 Reply Last reply Reply Quote 0
          • chrishammundefined
            chrishamm administrators @alexjx
            last edited by

            @alexjx Thanks, that's a valid concern. I just committed a possible bug fix to GitHub, are you able to test it?

            Duet software engineer

            tasundefined alexjxundefined droftartsundefined 3 Replies Last reply Reply Quote 1
            • tasundefined
              tas @chrishamm
              last edited by

              @chrishamm I can test this now on a Duet 2 Wifi in standalone. Can you provide a link to the file please, I can't find it. Must be too early in the morning.

              droftartsundefined 1 Reply Last reply Reply Quote 0
              • droftartsundefined
                droftarts administrators @tas
                last edited by

                @tas Here is the commit https://github.com/Duet3D/DuetWebControl/commit/5db3108df0e8435e726b0ec5bc2954d09c422872

                Ian

                0 chrishamm committed to Duet3D/DuetWebControl
                Potential bug fix for IS plugin

                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                tasundefined 1 Reply Last reply Reply Quote 1
                • tasundefined
                  tas @droftarts
                  last edited by

                  @droftarts Many thanks but sorry I have no idea where to put those files. I was expect a zip of DWC. Any instructions appreciated.

                  alexjxundefined 1 Reply Last reply Reply Quote 0
                  • alexjxundefined
                    alexjx @tas
                    last edited by

                    @tas I think you have to compile it. I will give it a try. I think it should work.

                    tasundefined 1 Reply Last reply Reply Quote 0
                    • tasundefined
                      tas @alexjx
                      last edited by

                      @alexjx Thanks, sorry I wasn't able to help.

                      1 Reply Last reply Reply Quote 0
                      • alexjxundefined
                        alexjx @chrishamm
                        last edited by

                        @chrishamm The patch works.

                        531e9c4e-d8ce-4e36-a7c1-a230f7276c42-image.png

                        1 Reply Last reply Reply Quote 1
                        • droftartsundefined
                          droftarts administrators @chrishamm
                          last edited by

                          @chrishamm Can you post a patched DWC.zip?

                          Ian

                          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                          • jay_s_ukundefined
                            jay_s_uk @droftarts
                            last edited by

                            @droftarts https://drive.google.com/drive/folders/1qd4OQXAwT2fin9BYjAkfLMPyyukXC77A?usp=drive_link

                            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                            tasundefined 1 Reply Last reply Reply Quote 0
                            • tasundefined
                              tas @jay_s_uk
                              last edited by

                              @jay_s_uk Excellent! Thank you. This works on my Duet 2 Wifi standalone.

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