3.5B4: Input Shaping Plugin: Bug: Data collection cancelled
-
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 benull
? 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 -
@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.
-
@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. -
@alexjx Thanks, that's a valid concern. I just committed a possible bug fix to GitHub, are you able to test it?
-
@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.
-
@tas Here is the commit https://github.com/Duet3D/DuetWebControl/commit/5db3108df0e8435e726b0ec5bc2954d09c422872
Ian
-
@droftarts Many thanks but sorry I have no idea where to put those files. I was expect a zip of DWC. Any instructions appreciated.
-
@tas I think you have to compile it. I will give it a try. I think it should work.
-
@alexjx Thanks, sorry I wasn't able to help.
-
@chrishamm The patch works.
-
@chrishamm Can you post a patched DWC.zip?
Ian
-
-
@jay_s_uk Excellent! Thank you. This works on my Duet 2 Wifi standalone.
-
-