Page 3 of 3

Re: Position loss UC-300ETH

PostPosted: Wed Sep 13, 2017 1:00 pm
by Derek
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

Re: Position loss UC-300ETH

PostPosted: Thu Sep 14, 2017 10:19 am
by cncdrive
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.

Re: Position loss UC-300ETH

PostPosted: Thu Sep 14, 2017 10:20 am
by cncdrive
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.

Re: Position loss UC-300ETH

PostPosted: Thu Sep 14, 2017 11:19 am
by Derek
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

Re: Position loss UC-300ETH

PostPosted: Thu Sep 14, 2017 11:37 am
by cncdrive
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.

Re: Position loss UC-300ETH

PostPosted: Thu Sep 14, 2017 11:02 pm
by cncdrive
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.

Re: Position loss UC-300ETH

PostPosted: Fri Sep 15, 2017 12:36 pm
by Derek
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

Re: Position loss UC-300ETH

PostPosted: Fri Sep 15, 2017 1:47 pm
by cncdrive
Hi Derek,

OK, good to hear that the fixes work good at you too.