Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2ms cycle time for stepgens #8

Open
ShadeTechnik opened this issue Apr 19, 2024 · 2 comments
Open

2ms cycle time for stepgens #8

ShadeTechnik opened this issue Apr 19, 2024 · 2 comments

Comments

@ShadeTechnik
Copy link

ShadeTechnik commented Apr 19, 2024

As I'm working on my own EtherCAT slave I was interested in the issue that caused the requirement for a 2ms servo thread to get the stepgens behaving correctly. I mentioned this to someone and they pointed me to a write up by Arthur Ketels where he describes some of the issues related to slaves misbehaving with distributed clocks. I'm not too familiar with this code implementation as it's not my strong suit but I'm curious if you think this could be part of your issue....

https://github.com/OpenEtherCATsociety/SOEM/issues/487

@MetalMusings
Copy link
Owner

MetalMusings commented Apr 20, 2024 via email

@ShadeTechnik
Copy link
Author

ShadeTechnik commented Apr 20, 2024

Looks like you picture didn't show up.

It's hard to understand where the issue is actually coming from, or actually what the issue is. Are you able to run a Mesa card @ 1ms servo thread on the same system? You would think if there are no problems running a Mesa card that the PC itself would be capable of handling an EtherCAT slave @ 1ms as well hardware wise. Most of my systems are mobile CPUs on miniPCs with Realtek NICs and aside from bios issues I've always been able to manage 1ms with a Mesa card.

The PC stuff itself I'm not terribly concerned about, I'm trying to understand the issues on the slave side so I can avoid them if possible when I go to do a slave that actually requires good synchronization. Can you expand on the issue of the delay between IRQ and the STM32 reading data? I think it suggests that's only an issue on SM2, any issues on SM3? You also mention sometimes LinuxCNC is sending empty data which I suppose implies an issue master/ethernet. Do you think there are any issues with the STM32 itself? Do you think a faster STM32 or using QSPI between the LAN9252 and STM32 would be wise for a stepgen or encoder slave? I've seen some things that also suggest that Arduino could also be a bit of an issue with timing critical stuff.

I just finished assembling my slave card, I went with a LAN9252 and STM32F446. I'll be trying to do some basic tests today. My card is pretty much meant for dealing with control panel IO like analog inputs, low speed encoders, MPG etc., so there's nothing timing critical about it. Once I get that all sorted I would like to tackle a pulse gen, high speed encoder card. Hardware wise it's not really a problem, the software/firmware stuff seems to be the only real hurdle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants