{"action":"created","issue":{"url":"https://api.github.com/repos/synthetos/g2/issues/95","labels_url":"https://api.github.com/repos/synthetos/g2/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/synthetos/g2/issues/95/comments","events_url":"https://api.github.com/repos/synthetos/g2/issues/95/events","html_url":"https://github.com/synthetos/g2/issues/95","id":88960353,"number":95,"title":"Long uptime issues","user":{"login":"stg","id":304625,"avatar_url":"https://avatars.githubusercontent.com/u/304625?v=3","gravatar_id":"","url":"https://api.github.com/users/stg","html_url":"https://github.com/stg","followers_url":"https://api.github.com/users/stg/followers","following_url":"https://api.github.com/users/stg/following{/other_user}","gists_url":"https://api.github.com/users/stg/gists{/gist_id}","starred_url":"https://api.github.com/users/stg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stg/subscriptions","organizations_url":"https://api.github.com/users/stg/orgs","repos_url":"https://api.github.com/users/stg/repos","events_url":"https://api.github.com/users/stg/events{/privacy}","received_events_url":"https://api.github.com/users/stg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-17T08:56:37Z","updated_at":"2015-06-23T21:28:12Z","closed_at":null,"body":"I've been seeing some strange issues when running jobs on a board that has been powered for a long time (several weeks) and I am therefore wondering if timer rollover issues have been taken into account?\r\n\r\nTypically I've come to always reset the boards every time I need to use them, but sometimes I've been forced to keep them on for long periods of time waiting for tools and materials while needing to keep the system running, as my machine has no absolute positioning system and relies on steppers being powered and G2 remembering the exact position of the currently held microstep.\r\n\r\nAttempting to restart the job at that point has yielded strange effects that I do not fully understand."},"comment":{"url":"https://api.github.com/repos/synthetos/g2/issues/comments/114646980","html_url":"https://github.com/synthetos/g2/issues/95#issuecomment-114646980","issue_url":"https://api.github.com/repos/synthetos/g2/issues/95","id":114646980,"user":{"login":"stg","id":304625,"avatar_url":"https://avatars.githubusercontent.com/u/304625?v=3","gravatar_id":"","url":"https://api.github.com/users/stg","html_url":"https://github.com/stg","followers_url":"https://api.github.com/users/stg/followers","following_url":"https://api.github.com/users/stg/following{/other_user}","gists_url":"https://api.github.com/users/stg/gists{/gist_id}","starred_url":"https://api.github.com/users/stg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stg/subscriptions","organizations_url":"https://api.github.com/users/stg/orgs","repos_url":"https://api.github.com/users/stg/repos","events_url":"https://api.github.com/users/stg/events{/privacy}","received_events_url":"https://api.github.com/users/stg/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T21:28:12Z","updated_at":"2015-06-23T21:28:12Z","body":"Wow - I didn't realize I had it running that long, but looking back at the last time it happened it does seem to match the time frame. Also, this is the only occurance where I could think of no external issues that could be the culprit.\r\n\r\nI can't account for the symptoms exactly but here's what I remember. By restarting the job I mean loading the g-code for the next tool and hitting run. The machine started cutting, but with an offset. I stopped the job, reloaded the g-code (thought I had gotten the wrong file) and tried again. This time I got another offset. I stopped again and tried to manually correct the offset (G28.3) but then the spindle would no longer start. This led me to reboot the board and try again. G-code files were verified to be correct upon successfully completing the job after the reboot.\r\n\r\nWhile I cannot say for sure if timer rollover is the issue but I can't come up with any ideas on external causes and I've had similar timer issues myself on a few occations, various projects. Typically it can be easily fixed by rewriting any timer math to make rollovers transparent. Using a trivial blocking delay as an example (for completeness, I'm sure you're already aware):\r\n\r\nwhile(now() < start + delay); // evil code\r\nwhile((typeof(start))(now() - start) < delay); // rollover is transparent"}}