LinuxCNC S-Curve Accelerations
- grandixximo
-
Topic Author
- Away
- Premium Member
-
Less
More
- Posts: 82
- Thank you received: 65
07 Jan 2026 07:42 - 07 Jan 2026 07:59 #341117
by grandixximo
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations
Spikes when you run latency-histogram are caused by the CPU doing other stuff, like checking the network status, reading your mouse and keyboard inputs, display graphical elements, going to sleep because its got nothing to do.
This is not in topic of this discussion about s-curve
Edit:
My test methodology was analytical, I ran same g-code, on same machine, same halscope size, changed the least variables as possible, only planner_type 0 vs planner_type 1
Please in future if anyone wants to bring forth issues about our s-curve implementation, they should use similar testing methodology, during our own internal testing of the S-curve calculations, we also often forgot to do this straight fair comparison, and it sent us on wild goose chases. Mind that we are aware that there are blending issues, this is something that we are working on, but these issues persist in both planner_types. Therefore please try to compare planner_type 0 vs planner_type 1 without changing anything else before bringing forward issues.
This is not in topic of this discussion about s-curve
Edit:
My test methodology was analytical, I ran same g-code, on same machine, same halscope size, changed the least variables as possible, only planner_type 0 vs planner_type 1
Please in future if anyone wants to bring forth issues about our s-curve implementation, they should use similar testing methodology, during our own internal testing of the S-curve calculations, we also often forgot to do this straight fair comparison, and it sent us on wild goose chases. Mind that we are aware that there are blending issues, this is something that we are working on, but these issues persist in both planner_types. Therefore please try to compare planner_type 0 vs planner_type 1 without changing anything else before bringing forward issues.
Last edit: 07 Jan 2026 07:59 by grandixximo.
The following user(s) said Thank You: endian
Please Log in or Create an account to join the conversation.
- endian
-
- Offline
- Elite Member
-
Less
More
- Posts: 281
- Thank you received: 90
07 Jan 2026 07:58 - 07 Jan 2026 08:07 #341119
by endian
Replied by endian on topic LinuxCNC S-Curve Accelerations
I think we are not understanding us now ... I just share latency histogram to just prove my RT and latency free setup(eliminate hardware setup source), not to share pictute of spikes of my latency... I defenetly know that latency histogram and scope are two different things but over histogram we are fast and visible proving our setup of RT...
here is scope of Intel core duo and AI tells me that Intal core duo has not some hardware instructions which can cause overloading from time to time ... here was most visible spiking
Edit > yes my testing was doing exactly as you are talking ... first test was 3 phase and the 7phase generator ..
it was just testing after experience with scurve of grotius where spiking what much greater and creating time lagging during cloud of point movement ... this situation is now not present at all I think, it works really well .. motion is excelent
great job ! I am amazed.
here is scope of Intel core duo and AI tells me that Intal core duo has not some hardware instructions which can cause overloading from time to time ... here was most visible spiking
Edit > yes my testing was doing exactly as you are talking ... first test was 3 phase and the 7phase generator ..
it was just testing after experience with scurve of grotius where spiking what much greater and creating time lagging during cloud of point movement ... this situation is now not present at all I think, it works really well .. motion is excelent
great job ! I am amazed.
Last edit: 07 Jan 2026 08:07 by endian. Reason: adding testing routine example
The following user(s) said Thank You: grandixximo
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Away
- Premium Member
-
Less
More
- Posts: 82
- Thank you received: 65
07 Jan 2026 08:07 #341120
by grandixximo
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations
Yes, I think I understand you better now. Still you asked me what I would be doing about the spiking, and in my testing there is no spiking that I should be doing anything about, at least as far as the code we have contributed, and as far as my testing shows to me, but I am open to different hardware having different reactions to the algorithms, but this has to be empirically shown to be true with a test similar to mine, it is easy to introduce third variables unintentionally, so any testing has to be done with the least variation as possible, try to change only planner_type 0 to planner_type 1
This toggle exist exactly for the purpose of quick comparison between original trapez vs new s-curve.
This toggle exist exactly for the purpose of quick comparison between original trapez vs new s-curve.
The following user(s) said Thank You: endian
Please Log in or Create an account to join the conversation.
- endian
-
- Offline
- Elite Member
-
Less
More
- Posts: 281
- Thank you received: 90
07 Jan 2026 08:13 #341121
by endian
Replied by endian on topic LinuxCNC S-Curve Accelerations
I definitely agree with your opinion ... therefore I have testing at CoreDuo, i5 and i7 too ... and then just share my observation
As I said before I am not expert of this topic but it is very interesting to help if there is a play to ...
can you share your hardware setup with us which is the best to avoid spiking please?
As I said before I am not expert of this topic but it is very interesting to help if there is a play to ...
can you share your hardware setup with us which is the best to avoid spiking please?
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Away
- Premium Member
-
Less
More
- Posts: 82
- Thank you received: 65
07 Jan 2026 08:17 - 07 Jan 2026 08:30 #341122
by grandixximo
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations
Our S-Curve code has almost nothing to do with what Grotius did, we have been working on this long before Grotius started on it, we have read Grotius reference material, and followed Grotius progress, and took some inspiration for some refining of our original code we were testing, and we are very grateful for his work, but you cannot compare our S-Curve to Grotius's one.
The testing that you can report to us are to be done with the latest code from github, on my fork of linuxcnc
github.com/grandixximo/Linuxcnc-G-code
You have to provide pictures or written comparison with planner_type 1 and with planner_type 0
Then we will try to reproduce on our end, and see if we can fix whatever the issue might be.
Edit:
As far as hardware goes, we had been running intel G2030 CPUS for many years with mesa PCI LPT and realtek network with mesa_eth cards, but these systems are now very hard to come by, we work now with NUCS, and have used N100 and now N150 based SBC's with intel i225 (igc) for good ethercat latency, we are probably around 20us latency (which I'm not super happy with), but mind that we do not run much of anything but mate-debian ethercat-master and linuxcnc, not even axis UI runs on our systems, we have our own remote UI.
The testing that you can report to us are to be done with the latest code from github, on my fork of linuxcnc
github.com/grandixximo/Linuxcnc-G-code
You have to provide pictures or written comparison with planner_type 1 and with planner_type 0
Then we will try to reproduce on our end, and see if we can fix whatever the issue might be.
Edit:
As far as hardware goes, we had been running intel G2030 CPUS for many years with mesa PCI LPT and realtek network with mesa_eth cards, but these systems are now very hard to come by, we work now with NUCS, and have used N100 and now N150 based SBC's with intel i225 (igc) for good ethercat latency, we are probably around 20us latency (which I'm not super happy with), but mind that we do not run much of anything but mate-debian ethercat-master and linuxcnc, not even axis UI runs on our systems, we have our own remote UI.
Last edit: 07 Jan 2026 08:30 by grandixximo.
The following user(s) said Thank You: endian, zmrdko
Please Log in or Create an account to join the conversation.
- endian
-
- Offline
- Elite Member
-
Less
More
- Posts: 281
- Thank you received: 90
07 Jan 2026 08:24 #341123
by endian
Replied by endian on topic LinuxCNC S-Curve Accelerations
Yes Michel did amazing job ... I have been in touch with him few months ago and he knows about the situation of his scurve too .. We have testing it long time and talking about the possible solutions but he is down for now ...
Can you share some details of hints to best hardware performace at your side please?
Can you share some details of hints to best hardware performace at your side please?
Please Log in or Create an account to join the conversation.
- zmrdko
-
- Offline
- Elite Member
-
Less
More
- Posts: 185
- Thank you received: 49
07 Jan 2026 08:49 #341124
by zmrdko
Replied by zmrdko on topic LinuxCNC S-Curve Accelerations
Hello grandixximo,
amazing work, I have cloned your repo and tested rip install on my i7 9700k.
I have just read in your last post, that you are using external UI, which is brilliant idea - to offload system running linuxcnc and use UI on another PC.
Can you share some details, if it's possible?
Thank you very much for you work, time and effort.
amazing work, I have cloned your repo and tested rip install on my i7 9700k.
I have just read in your last post, that you are using external UI, which is brilliant idea - to offload system running linuxcnc and use UI on another PC.
Can you share some details, if it's possible?
Thank you very much for you work, time and effort.
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Away
- Premium Member
-
Less
More
- Posts: 82
- Thank you received: 65
07 Jan 2026 09:00 - 07 Jan 2026 09:06 #341125
by grandixximo
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations
We have our own proprietary protocol, but you can take a look at this, it's very similar to our own work:
linuxcnc.org/docs/2.8/html/man/man1/linuxcncrsh.1.html
It's all good and well, but let's try to stay on topic, I'm more interested in tp0 vs tp1 issues, or other S-curve/blending related topics.
linuxcnc.org/docs/2.8/html/man/man1/linuxcncrsh.1.html
It's all good and well, but let's try to stay on topic, I'm more interested in tp0 vs tp1 issues, or other S-curve/blending related topics.
Last edit: 07 Jan 2026 09:06 by grandixximo.
The following user(s) said Thank You: endian, zmrdko
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11599
- Thank you received: 3900
07 Jan 2026 11:26 #341127
by rodw
Replied by rodw on topic LinuxCNC S-Curve Accelerations
I really think this discussion of latency is irrelevant. I've had my doubts about 2 core CPU's being adequate for a few years but with careful tuning they work for some.
Either the latency is acceptable or it isn't on a specific PC. There is no hard and fast rule for what is acceptable.You all seem to be working with ethercat or Mesa devices so system latency is no longer relevant if the system is correctly set up to minimize system processes that cause periodic latency spikes.
Network latency is a fairly new concept for Linuxcnc users and has only been an issue since the release of Debian Bullseye but that coincides with increased power saving technology and an insistence by kernel developers to use fully open source network drivers and not incorporate the Realtek DKMS drivers where full source is not available.
I really would like to see actual results discussed, not theoretical dicussions about what might work and what might not. From kernel traces, I know there is a spare 800 ns on most systems before latency will be an issue. I am sure that is more than enough to support any additional processing.
Either the latency is acceptable or it isn't on a specific PC. There is no hard and fast rule for what is acceptable.You all seem to be working with ethercat or Mesa devices so system latency is no longer relevant if the system is correctly set up to minimize system processes that cause periodic latency spikes.
Network latency is a fairly new concept for Linuxcnc users and has only been an issue since the release of Debian Bullseye but that coincides with increased power saving technology and an insistence by kernel developers to use fully open source network drivers and not incorporate the Realtek DKMS drivers where full source is not available.
I really would like to see actual results discussed, not theoretical dicussions about what might work and what might not. From kernel traces, I know there is a spare 800 ns on most systems before latency will be an issue. I am sure that is more than enough to support any additional processing.
The following user(s) said Thank You: grandixximo, endian
Please Log in or Create an account to join the conversation.
- ihavenofish
- Away
- Platinum Member
-
Less
More
- Posts: 943
- Thank you received: 232
08 Jan 2026 02:20 #341150
by ihavenofish
Replied by ihavenofish on topic LinuxCNC S-Curve Accelerations
O_o
o_O
o_O
Please Log in or Create an account to join the conversation.
Time to create page: 0.137 seconds