Kernel frequency and pulsing

If you have a question about the software please ask it here.

Kernel frequency and pulsing

Postby A_Camera » Fri Mar 31, 2017 6:42 am

Hi Balázs,

I have a question regarding the subject. We have a discussion regarding this over on mycncuk forum and what I wrote last night was this:

Here is how I calculate this for my machine:

In my case, my machine is capable of 8000mm/min on each axis, though I limited the Z to 6000 mm/min. If all axes are moved at the top speed, that means a total of 22000 mm/min, which is equal to 366.7 mm/sec. Each mm requires 400 pulses (2000 per rev), so that speed requires 146666 pulses for all axes at maximum speed, which is OK, since my drivers are capable of maximum 200 kHz. BUT... if I had dual screw on one axis I'd be driving with a total of 30000 mm/min, which is 500 mm/sec which would in my case require 200000 pulses and which is the maximum limit of my drivers. OK, I could change micro stepping to solve that, but never the less, it would make a huge difference.

The pulsing (kernel) frequency means that the (positive or negative) pulse width is equal (1/f)/2 => 2.5us for each pulse, regardless of the speed, if the frequency is set to 200 kHz. Of course, if I'd set my UC300ETH to 400 kHz kernel then I'd get 1.25 us pulses, and the opto couplers may not be able to cope with such short pulses, which is what I noticed. when I tested it out.


Now, after a night's sleep I am not sure this is calculated right because basically it would limit the speed as the number of axes increase, so with 6 axis it would present a problem. So, here is what I think is right, please correct me if I am wrong.

The UC300ETH is capable of handling 6 motors and the maximum kernel frequency is 400kHz (1.25us pulses). This means that the motion controller is capable of outputting the 400kHz for each of the six motors in parallel at the same time to produce a synchronized motion at that speed. If my system would have no limitations at all (theoretical system) then it would give me a maximum of 60000 mm/min (1000 mm/sec) speed on all six motors. For my real system, with the obvious limitations, it means that I should use 8000 mm/min (maximum speed of one axis) as base of my calculation and should set 100kHz kernel frequency (the calculated need is 53.3kHz) and if I set 100kHz I could still use all six axes (if I had six) and keep that speed constantly.

Thanks for clarifying this.
A_Camera
 
Posts: 638
Joined: Tue Sep 20, 2016 11:37 am

Re: Kernel frequency and pulsing

Postby cncdrive » Fri Mar 31, 2017 8:22 am

Hi Josef,

Yes, you are right, I mean the quoted thinking was wrong and as you wrote your second not quoted thinking and calculation is the correct one.
With the 400 steps per millimiters your theoritical axis could do 1000 mm/sec or 60000 mm/min maximum speed with the 400kHz kernel frequency.
And for example if all axis are setup with 400 steps per millimeters setting then all axis can do the same up to 1000 mm/sec speed, because as you wrote they work parallel, so as you add axis the frequencies do not add together, but every axis can do it's own 400kHz.

The motion controller will therefor give you no limitation at all in the driving frequency with your real axes, the limit will be the drives with the 200kHz max. frequency they can handle.
Most stepper drives cannot do more than that, I did not see many which could handle more than 200kHz and this is because there is a tradeoff between the length of the pulses and the possibility to filter the noise from the signal in the drive. As the kernel frequency gets higher the pulses gets shorter and so you can place a lower time constant RC filter to filter out noise, spikes etc from the line, so the more frequency the drive can handle the less noise immune the drive will be. 400kHz is still managable, but I would not build a system with step/dir interface in the MegaHertzes range, because you would only have sub microseconds to filter the signal, this is why step dir is not really used in this high frequency domain, but there are much better solutions for this, like ethercat bus systems when a so high resolution is required.

And yes, the pulses are always as short as 1/(kernel frequency * 2), the motion controller will always output this pulse length, because when the frequency reaches the kernel frequency then the pulses can't be longer than that anyways.
cncdrive
Site Admin
 
Posts: 4741
Joined: Tue Aug 12, 2014 11:17 pm

Re: Kernel frequency and pulsing

Postby A_Camera » Fri Mar 31, 2017 9:18 am

Thank you very much for the clarification. I don't know how I was thinking last night, when I wrote that quoted part, but I must have been tired... I must also have been tired before (or was not thinking at all, just looked at the specs of my drivers), when I set my machine to 200kHz kernel, since that is also totally pointless in my case, with my speeds. :oops:

Anyway, now that it is cleared, I'll set to 100kHz and will keep it there.
A_Camera
 
Posts: 638
Joined: Tue Sep 20, 2016 11:37 am


Return to Ask a question from support here

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron