{"action":"created","issue":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/938","repository_url":"https://api.github.com/repos/Smoothieware/Smoothieware","labels_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/938/labels{/name}","comments_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/938/comments","events_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/938/events","html_url":"https://github.com/Smoothieware/Smoothieware/issues/938","id":158759672,"number":938,"title":"Movements are stopping short then being corrected.","user":{"login":"Zaaphod","id":3008560,"avatar_url":"https://avatars.githubusercontent.com/u/3008560?v=3","gravatar_id":"","url":"https://api.github.com/users/Zaaphod","html_url":"https://github.com/Zaaphod","followers_url":"https://api.github.com/users/Zaaphod/followers","following_url":"https://api.github.com/users/Zaaphod/following{/other_user}","gists_url":"https://api.github.com/users/Zaaphod/gists{/gist_id}","starred_url":"https://api.github.com/users/Zaaphod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zaaphod/subscriptions","organizations_url":"https://api.github.com/users/Zaaphod/orgs","repos_url":"https://api.github.com/users/Zaaphod/repos","events_url":"https://api.github.com/users/Zaaphod/events{/privacy}","received_events_url":"https://api.github.com/users/Zaaphod/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-06T19:51:23Z","updated_at":"2016-06-06T21:02:30Z","closed_at":"2016-06-06T20:11:42Z","body":"I've been having this issue since I first started trying to use smoothieboard, and it's preventing me from using it at all,  So I'm submitting this as a bug report here to hopefully get to the bottom of it and find a solution.  \r\n\r\nThe problem is smoothie is decelerating and stopping short of it's intended position, then correcting the error.  I do not know where or how this is happening, I just know that it is defiantly what is going on. \r\nI decided to buy a logic analyzer to eliminate all possibilities of hardware compatibility issues, I'm using the latest edge firmware (as of 6/6/2016) and the sample 3d printer config file.  I'm going to attempt to illustrate this issue.\r\n\r\nI'm using pronterface to control smoothie,  and only issuing a single move command to demonstrate this issue. I am using 4 channels of a logic analyzer connected to X-Step, X-Dir, Y-Step, and Y-Dir. \r\n\r\nBelow is a screenshot of the Acceleration of the following command: G0 X1250 Y750 F30000  This is a completely valid command on my machines.  You can see this is a perfect, nice smooth acceleration, it takes 4.1538ms between the first and second pulse on the X axis, and each pulse is closer than the last\r\n![accel](https://cloud.githubusercontent.com/assets/3008560/15833609/987cccba-2bf5-11e6-8409-bd55c8f96f82.png)\r\n\r\nnow lets look at the Deceleration of the same command.. scrolling near the end of the sample,  here we see what appears to be a perfect, nice smooth deceleration 4.863ms occurring at just after 4.9s... now this would be great, but unfortunately, It's only completed 99,867 steps on X, but it should have been 100,000 exactly since I am using the default of 80steps per mm and I told it to go 1250 steps... so it's 133 steps short (this is over 1/8\" on my machine)\r\n![decel](https://cloud.githubusercontent.com/assets/3008560/15833758/27ab3048-2bf6-11e6-8607-bd99e4fb8426.png)\r\n\r\nSo if we scroll some more, we see that smoothie is correcting for this shortfall.  you can see my mark I made at just after 4.9s, and the correction steps to the right.   The steps are always at a very slow frequency in comparison to the movement speed.  Also notice that both X and Y completed at about the same time, and started the correction pulses around the same time.\r\n![correct](https://cloud.githubusercontent.com/assets/3008560/15834223/541ac22c-2bf8-11e6-8ac8-614dc89c6d69.png)\r\n\r\nSince the time between the first and second step was 4.1538ms and the time between the 99,866th and 99,867th was 4.863, this is way outside of what would be considered the end speed.  also notice the correction steps are NOT decelerating, the first one and the last one are all exactly 39ms  The next two screen shots show the first and last of these correction pulses\r\n![adjust width](https://cloud.githubusercontent.com/assets/3008560/15834322/fcfdddfc-2bf8-11e6-8795-0db149a8cfcc.png)\r\n![adjust width end](https://cloud.githubusercontent.com/assets/3008560/15834326/01ae7230-2bf9-11e6-984f-c9b6320e4ab0.png)\r\nnow here is a screenshot showing the whole thing.... notice my mark at 4.9seconds, these corrections are continuing for over 5 full seconds on the X axis, adding 133 steps on X, but Y stopped much before then.. \r\n![all](https://cloud.githubusercontent.com/assets/3008560/15834450/9539711c-2bf9-11e6-9253-34d7f9269c0c.png)\r\n\r\nso this presents a problem... because the corrections are NOT completing at the same time, it's not positioning the machine correctly.  Here is another example.. doing a G0 X0 Y700 from the previous move which should move X-100000 and Y-4000 steps: you can see here that Y reached it's final correct location at about 4.6seconds, while X continued this until 9.6seconds... which means Y reached it's location more than 4 seconds before X and the shape is also wrong because X moved over 1/8\" after Y stopped... this is the real problem.. it doesn't matter if it happens so fast  you can't see it,  it's still happening, even on microstep drives.. it's mispositioning then correcting.   After these adjustment steps complete X has output exactly 100000 and Y has output exactly 4000 steps.\r\n![g0x1250y50](https://cloud.githubusercontent.com/assets/3008560/15834529/eb6e11b4-2bf9-11e6-9076-9cbb5ce963f2.png)\r\n\r\nI have been unable to stop this from happening.. There is something being calculated wrong that is causing the movement to ALWAYS come up short, then require a correction. Those 133 steps at the end of the X movement should have happened during the rapid part of pulse train, not after the end of the deceleration.  It seems to require a longer correction for longer moves and a shorter correction for short moves, and it seems that the acceleration has something to do with the magnitude of the error, with fast accelerations requiring less adjustment than slow accelerations.  With the super fast accelerations in the default config file, it's still doing this, but there are only 9 adjustments, which you would never see on a microstep drive, the problem is, I cannot possibly accelerate my machines that fast... and just because you don't see it, doesn't mean it's working right.  There is something fundamental causing this to happen.\r\n\r\nI'm happy to assist in any way I can in diagnosing and trying to resolve this issue.  I'll be happy to run tests and provide logic analysis, and I can even try to help figure out what's happening in the code, but I'm not familiar with this project enough to even know where to look for things like step generation and acceleration control.   If someone can point me in the right direction of the relevant code, I'll be happy to see if I can figure out what's happening.    Perhaps I can learn how to trace through the code during execution and put in a few breakpoints, analyze the results of some variables to figure out what's happening\r\n\r\nFor further reading on this issue,  please see my post [here]( https://groups.google.com/forum/#!topic/smoothieware-support/nZZsi_qJQCg)\r\n\r\nand I also have videos here and here of the machine demonstrating this issue.\r\n[Straight line test](https://www.youtube.com/watch?v=WEIu9AZFOOs)\r\n[Rectangle program test](https://www.youtube.com/watch?v=eRnPhxIt0Tk)\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/comments/224087473","html_url":"https://github.com/Smoothieware/Smoothieware/issues/938#issuecomment-224087473","issue_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/938","id":224087473,"user":{"login":"arthurwolf","id":108821,"avatar_url":"https://avatars.githubusercontent.com/u/108821?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurwolf","html_url":"https://github.com/arthurwolf","followers_url":"https://api.github.com/users/arthurwolf/followers","following_url":"https://api.github.com/users/arthurwolf/following{/other_user}","gists_url":"https://api.github.com/users/arthurwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurwolf/subscriptions","organizations_url":"https://api.github.com/users/arthurwolf/orgs","repos_url":"https://api.github.com/users/arthurwolf/repos","events_url":"https://api.github.com/users/arthurwolf/events{/privacy}","received_events_url":"https://api.github.com/users/arthurwolf/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T21:02:30Z","updated_at":"2016-06-06T21:02:30Z","body":"On Mon, Jun 6, 2016 at 11:00 PM, Zaaphod <notifications@github.com> wrote:\n\n> I'll be more than happy to test the new code and will report back on my\n> findings. I'm hopeful that it will help because I would really like to use\n> smoothie board, as I really like everything else about it.. I just can't\n> figure this issue out.\n>\n> I don't have an unusual setup at all.. It's just a cnc router with 1/2\n> step drives that I would like to accelerate at 250 mm/s/s.\n>\n\nIn the Smoothie community, that qualifies as \"unusual\". I believe most CNC\nrouters used in the community right now use microstepping of 1/16 or\nhigher, and accelerate significantly faster than 250mm/s ( though not\nalways ).\nNot that there's anything wrong with your setup, but it's definitely\nunusual, and something that has likely not been tested much before.\n\n> This is why I'm testing it with the stock config file and only changing\n> the acceleration.. I'm not even changing the steps per mm, just to make\n> sure.... so literally changing no other numbers.\n>\n> The thing that is odd is it is doing a perfect deceleration, but it's\n> doing it too soon. whatever is causing this is always happening,\n>\n> I just did a test with a completely unchanged config file with the default\n> 4000 acceleration, This is from a completely un-touched config file and\n> giving only a single command of G0 X1000 Y50 F15000 and not specifying the\n> federate whatever causes those pulses out past my mark which is the point\n> at which the timing matches the initial two pulses is demonstrating this\n> issue.. It always happens, I can't prevent it no matter what I do. Even\n> though you would not see these slow steps on a microstep driver, they are\n> still causing an unnecessarily slow delay before the next movement can\n> happen.\n>\n> [image: 4000 2]\n> <https://cloud.githubusercontent.com/assets/3008560/15837403/1cde12d2-2c07-11e6-8a74-6ecd30fdf7f1.png>\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/Smoothieware/Smoothieware/issues/938#issuecomment-224086815>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe/AAGpFe7Cy0BenCRMZDgKlgn4yfA9m-Khks5qJIpagaJpZM4IvQBA>\n> .\n>\n\n\n\n-- \nCourage et bonne humeur.\n"}}
{"actor":{"display_login":"arthurwolf"}}