IO interface with Arduino over Ethernet

More
9 years 8 months ago #87990 by mariusl
The main problem is not the speed at which you can send the message or receive the message on either side. You will find that the servo loop running on linuxcnc does not have sufficient time to decode complete messages at every pass. You get lag or buffered data that makes it very difficult to do timing dependent I/O.

Optimizing the code is a fruitless endevour as the results will remain the same in the end. Sorry chap but this whole thing was meant to be a test to see what one can get out of the system and many have tested it ending up with the same results.

Dont stop your efforts though as you will learn a lot about the inner workings of Linuxcnc if you try to make improvements.

Keep us posted here.

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #87991 by mariusl
There is a lot of debug prints in the Python code already. If you run linuxcnc from a terminal you will see the output of the component.

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #87996 by DocStein99
I'm using a core i5 at 64 bits. The number of operations executed in an idle millisecond are way more than I need to UDP messages for push-buttons and LED indicators..... I'll figure it out. My roadblock is learning this python language.

I ran halcmd from a terminal. Also executed the code directly from the prompt, hal on a different process. I've tried what I thought was obvious at first, going through debugging and logger imports.... Argh, I spent too much time on this tonight - need to give it a break. At least I made some progress.

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #88015 by mariusl
There are many good tutorials for Python on the web. Python syntax is what makes it work so knowing that is important. I suggest that you find a good tutorial ans start there.

Here are two to look at
docs.python.org/3/tutorial/
www.learnpython.org/

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #88036 by DocStein99
Ok I made some more progress. It's all about a good test platform here, and knowing the exact data that is transmitted between the two devices - and timing, etc... It's about the speed I can deliver the data into the python script. So I have to spend a day tooling around with a network router/hub-switch with a 3rd computer loaded with wire-shark in "promiscuous mode" to analyze the network packets.

It's alot of work and testing, but it's worth it. I've used linuxCNC for many years, with a big fat cable and about 2-dozen wires running from a metal control panel into the electric cabinet - for me to trip over and get caught on each and every object in the workshop.

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #88923 by M4MazakUser
as you wrote..
( The main problem is not the speed at which you can send the message or receive the message on either side. You will find that the servo loop running on linuxcnc does not have sufficient time to decode complete messages at every pass. You get lag or buffered data that makes it very difficult to do timing dependent I/O.)
soo how do the mesa ethernet cards do it?
if there was a method of using arduino over a network card, it would bring a whole swag of interest into linuxcnc !
even if you needed a uno per axis, -a uno from china is only $5...whereas a mesa card (ive used them and they are brilliant) is over $100 us -plus you usually need daughter cards.

Please Log in or Create an account to join the conversation.

Time to create page: 0.487 seconds
Powered by Kunena Forum