Position loss UC-300ETH

If you think you've found a bug post it here.

Re: Position loss UC-300ETH

Postby Derek » Wed Sep 13, 2017 1:00 pm

Did some more testing.

Ran the same test two times on Y axis. UC300-ETH 100 kHz. position loss .009" each time. Changed it to 200 kHz and ran twice and it was off .0045" each time. So basically all it did was half the error. Went back to the USB and it was within .0003" each time.

Setting up to do some machining so I won't be able to check anything today.

Derek
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: Position loss UC-300ETH

Postby cncdrive » Thu Sep 14, 2017 10:19 am

Hi Derek,

We further investigated this issue and what we found out so far is that the issue is caused by the spindle encoder (the encoder used for rigid tapping and thread cutting).
Probably the 200kHz and 400kHz OK tests previously were just coincidences.

Without the encoder configured the issue seems to never happen, only if the spindle encoder is configured, then it is about always happen.
My collegue is now investigating the encoder code, it's interrupts etc., because something in that causes the issue,
probably the interrupt of the encoder counter takes too long or something like that, we will hopefully see soon and can correct the issue.

And if you will have some free time and could test it on your side too to 0 all the spindle encoder pins and make the same simple running tests would be great.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Position loss UC-300ETH

Postby cncdrive » Thu Sep 14, 2017 10:20 am

And one more thing is that the other issue, the issue about the B-axis, we found the reason for that and already corrected that one.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Position loss UC-300ETH

Postby Derek » Thu Sep 14, 2017 11:19 am

Well that was the problem.

Zero'd the encoder stuff and ran 3 tests. Drifted .0005 or so but that was a cold machine and I run heavy way oil.

Man talk about a weird bug. It just shows you how long in the development cycle it can take for some things to show up.

Let me know when you have something to test via email.

Thanks
Derek
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: Position loss UC-300ETH

Postby cncdrive » Thu Sep 14, 2017 11:37 am

Ok, thanks for the test.
Yes, I agree. The software is so complex with so many possible settings and so many functions that sometimes problems are explored only after months.
My collegue suspects though that this issue was probably caused when we added the aux encoders, because then the encoder code was changed to handle all 6+1 encoders.
But this is just speculation, an idea yet, will see soon what is exactly causing it in the encoder code, because my collegue is already working on the debugging.

I will post test version with the issue corrected as soon as possible.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Position loss UC-300ETH

Postby cncdrive » Thu Sep 14, 2017 11:02 pm

Hi Derek,

We fixed the issue, it was with the encoder interrupt priority, it was accidentally set too high and the encoder counter routine execution took too long,
so the encoder counter interrupted the DMA controller of the output signals which caused the lost steps.
The position error could not be seen on the DROs, because the DMA is the last step in the process, it is after everything output is already calculated, it is basicly a buffer for the step dir signals.
The calculated step/dir bytes are placed into the DMA memory and then the data is shifted to the outputs by the DMA controller independently of the microcontroller code running.
Accidentally the encoder interrupt priority was set to the same high level as the DMA controller's interrupt level which caused the DMA controller to loose data when it was interrupted and could not shift some data out to the outputs.

Here is the download: viewtopic.php?f=2&t=240&p=5405#p5405

Please test it.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Position loss UC-300ETH

Postby Derek » Fri Sep 15, 2017 12:36 pm

Tried it out. Works great. B axis works properly now. Did position test at 100 kHz and 200 kHz with no position loss.

Thanks
Derek
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: Position loss UC-300ETH

Postby cncdrive » Fri Sep 15, 2017 1:47 pm

Hi Derek,

OK, good to hear that the fixes work good at you too.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Previous

Return to Report a bug

Who is online

Users browsing this forum: No registered users and 10 guests