• Tags
  • Documentation
  • Order
  • Register
  • Login
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
524
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.
  • undefined
    alexjx
    last edited by alexjx 20 Jun 2023, 01:29

    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

    undefined 1 Reply Last reply 20 Jun 2023, 09:48 Reply Quote 1
    • undefined
      chrishamm administrators @alexjx
      last edited by 20 Jun 2023, 09:48

      @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

      undefined 1 Reply Last reply 20 Jun 2023, 10:08 Reply Quote 0
      • undefined
        alexjx @chrishamm
        last edited by alexjx 20 Jun 2023, 10:08

        @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

        undefined 1 Reply Last reply 20 Jun 2023, 11:04 Reply Quote 0
        • undefined
          chrishamm administrators @alexjx
          last edited by 20 Jun 2023, 11:04

          @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

          undefined undefined undefined 3 Replies Last reply 20 Jun 2023, 11:21 Reply Quote 1
          • undefined
            tas @chrishamm
            last edited by 20 Jun 2023, 11:21

            @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.

            undefined 1 Reply Last reply 20 Jun 2023, 11:23 Reply Quote 0
            • undefined
              droftarts administrators @tas
              last edited by 20 Jun 2023, 11:23

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

              Ian

              0 chrishamm committed 20 Jun 2023, 11:04 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

              undefined 1 Reply Last reply 20 Jun 2023, 11:29 Reply Quote 1
              • undefined
                tas @droftarts
                last edited by 20 Jun 2023, 11:29

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

                undefined 1 Reply Last reply 20 Jun 2023, 12:03 Reply Quote 0
                • undefined
                  alexjx @tas
                  last edited by 20 Jun 2023, 12:03

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

                  undefined 1 Reply Last reply 20 Jun 2023, 12:04 Reply Quote 0
                  • undefined
                    tas @alexjx
                    last edited by 20 Jun 2023, 12:04

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

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      alexjx @chrishamm
                      last edited by 20 Jun 2023, 12:15

                      @chrishamm The patch works.

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

                      1 Reply Last reply Reply Quote 1
                      • undefined
                        droftarts administrators @chrishamm
                        last edited by 20 Jun 2023, 12:17

                        @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

                        undefined 1 Reply Last reply 20 Jun 2023, 12:38 Reply Quote 0
                        • undefined
                          jay_s_uk @droftarts
                          last edited by 20 Jun 2023, 12:38

                          @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

                          undefined 1 Reply Last reply 20 Jun 2023, 12:44 Reply Quote 0
                          • undefined
                            tas @jay_s_uk
                            last edited by 20 Jun 2023, 12:44

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

                            1 Reply Last reply Reply Quote 0
                            • undefined tas referenced this topic 21 Jun 2023, 01:44
                            • undefined tas referenced this topic 28 Jun 2023, 13:22
                            9 out of 13
                            • First post
                              9/13
                              Last post
                            Unless otherwise noted, all forum content is licensed under CC-BY-SA