Parallel port stepper control and etherCAT I/O

More
21 Oct 2022 18:45 #254714 by O.R
I went back to latest LinuxCNC and Buster 10. Base thread latency is about 50k if i only move the test window and don't do anything else. I made quick settings for X and Z motors without any other I/O. When  LinuxCNC starts, it shows that "Unexpected realtime delay on task 0 with period 78125", but if i run example codes several times it does not popup any realtime error messages. Is this kind of test good enough to prove that latency is not problem or is there better ways to test it? 

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

More
21 Oct 2022 19:22 #254722 by tommylight

"Unexpected realtime delay on task 0 with period 78125", 

Immediately under it, it says "this message will be shown only once".
It will continue running but missed steps will not be reported anymore.
Usually for a hobby machine might not be such a big deal, but for production it is not good.
Raise the base period in the ini file to 100000 and check if it reports the error again.

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

More
22 Oct 2022 12:04 #254751 by O.R
If base period is 131000 then i don't get delay error. Will this high period time cause problem if can get enough velocity and don't get any other error messages?

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

More
22 Oct 2022 16:58 #254774 by tommylight
If you do not get errors, everything will work properly.
I use some laptops with 300000 base period, does not matter as long as there are no errors reported and you get enough speed to work.
The following user(s) said Thank You: CORBETT

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

More
22 Oct 2022 17:26 #254779 by CORBETT
O.R

I saw you had the base thread at 131000, unless something has changed you will need to multiply that number to get your servo thread.  I tinkered with theads many years ago and I had that problem with odd numbers.  In other words if your base thread was 30000, you couldn't run a 40000 or 50000 for the servo thread, it had to be 60000 to be a multiple of the base thread.  

I just wanted to put that out there so that if you started having problems it could be that the threads were off.

Tom, correct me if I am wrong about this.

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

More
22 Oct 2022 17:35 #254784 by tommylight
Yes, for sure it mentions it has to be a multiple, but i am fairly certain the new versions will round those numbers.
And i never noticed any issues with strange base period numbers, it just works whatever you put in.
Also, servo period is usually 1000000, and not to be changed as it changes a lot of other parameters, even the pid loop needs changed values if the servo period changes.
The following user(s) said Thank You: CORBETT

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

More
22 Oct 2022 19:33 - 22 Oct 2022 19:41 #254793 by CORBETT
Ahh, ok got you about the servo thread... will keep that in mind.  Yeah, I knew it would change the PID loop, but did not think about other parameters.
I get stuck on how things were for a previous LCNC version and miss some of the changes for next version.   It's a non-stop learning process.
Last edit: 22 Oct 2022 19:41 by CORBETT.

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

More
23 Oct 2022 13:01 - 23 Oct 2022 13:03 #254851 by O.R
Back to etherCAT installation. I get "Failed to enable unit: Unit file ethercat.service does not exist." what could be wrong?
 ethercat.conf file was empty, is that ok?
sorvi@debian:~$ sudo apt install geany curl

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for sorvi:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
geany is already the newest version (1.33-1).
curl is already the newest version (7.64.0-4+deb10u3).
curl set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 42 not upgraded.
sorvi@debian:~$ sudo geany /etc/apt/sources.list
sorvi@debian:~$ sudo apt update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
Hit:2 http://deb.debian.org/debian buster InRelease       
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Get:4 https://download.opensuse.org/repositories/home:/bone11111:/branches:/science:/EtherLab/Debian_10 ./ InRelease [1,339 B]
Hit:5 http://www.linuxcnc.org buster InRelease                                 
Ign:4 https://download.opensuse.org/repositories/home:/bone11111:/branches:/science:/EtherLab/Debian_10 ./ InRelease
Get:6 https://download.opensuse.org/repositories/home:/bone11111:/branches:/science:/EtherLab/Debian_10 ./ Packages [34.7 kB]
Fetched 70.8 kB in 4s (20.0 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
42 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: GPG error: https://download.opensuse.org/repositories/home:/bone11111:/branches:/science:/EtherLab/Debian_10 ./ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A08216C4FF0D8EF7
W: The repository 'https://download.opensuse.org/repositories/home:/bone11111:/branches:/science:/EtherLab/Debian_10 ./ InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
sorvi@debian:~$ KEYRING=/usr/share/keyrings/ethercat.gpg
sorvi@debian:~$ curl -fsSL https://download.opensuse.org/repositories/home:/bone11111:/branches:/science:/EtherLab/Debian_10/Release.key | gpg --dearmor | sudo tee "$KEYRING" >/dev/null
sorvi@debian:~$ sudo apt install -y linux-headers-rt-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  linux-compiler-gcc-8-x86 linux-headers-4.19.0-22-common-rt linux-headers-4.19.0-22-rt-amd64 linux-kbuild-4.19
The following NEW packages will be installed:
  linux-compiler-gcc-8-x86 linux-headers-4.19.0-22-common-rt linux-headers-4.19.0-22-rt-amd64 linux-headers-rt-amd64
  linux-kbuild-4.19
0 upgraded, 5 newly installed, 0 to remove and 42 not upgraded.
Need to get 9,389 kB of archives.
After this operation, 45.8 MB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security buster/updates/main amd64 linux-compiler-gcc-8-x86 amd64 4.19.260-1 [623 kB]
Get:2 http://security.debian.org/debian-security buster/updates/main amd64 linux-headers-4.19.0-22-common-rt all 4.19.260-1 [6,796 kB]
Get:3 http://security.debian.org/debian-security buster/updates/main amd64 linux-kbuild-4.19 amd64 4.19.260-1 [857 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 linux-headers-4.19.0-22-rt-amd64 amd64 4.19.260-1 [1,106 kB]
Get:5 http://security.debian.org/debian-security buster/updates/main amd64 linux-headers-rt-amd64 amd64 4.19+105+deb10u17 [7,020 B]
Fetched 9,389 kB in 3s (2,788 kB/s)                
Selecting previously unselected package linux-compiler-gcc-8-x86.
(Reading database ... 121668 files and directories currently installed.)
Preparing to unpack .../linux-compiler-gcc-8-x86_4.19.260-1_amd64.deb ...
Unpacking linux-compiler-gcc-8-x86 (4.19.260-1) ...
Selecting previously unselected package linux-headers-4.19.0-22-common-rt.
Preparing to unpack .../linux-headers-4.19.0-22-common-rt_4.19.260-1_all.deb ...
Unpacking linux-headers-4.19.0-22-common-rt (4.19.260-1) ...
Selecting previously unselected package linux-kbuild-4.19.
Preparing to unpack .../linux-kbuild-4.19_4.19.260-1_amd64.deb ...
Unpacking linux-kbuild-4.19 (4.19.260-1) ...
Selecting previously unselected package linux-headers-4.19.0-22-rt-amd64.
Preparing to unpack .../linux-headers-4.19.0-22-rt-amd64_4.19.260-1_amd64.deb ...
Unpacking linux-headers-4.19.0-22-rt-amd64 (4.19.260-1) ...
Selecting previously unselected package linux-headers-rt-amd64.
Preparing to unpack .../linux-headers-rt-amd64_4.19+105+deb10u17_amd64.deb ...
Unpacking linux-headers-rt-amd64 (4.19+105+deb10u17) ...
Setting up linux-compiler-gcc-8-x86 (4.19.260-1) ...
Setting up linux-kbuild-4.19 (4.19.260-1) ...
Setting up linux-headers-4.19.0-22-common-rt (4.19.260-1) ...
Setting up linux-headers-4.19.0-22-rt-amd64 (4.19.260-1) ...
Setting up linux-headers-rt-amd64 (4.19+105+deb10u17) ...
sorvi@debian:~$ sudo apt-get install ethercat-dkms libethercat libethercat-dev ethercat-master
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dkms linux-headers-4.19.0-22-amd64 linux-headers-4.19.0-22-common linux-headers-amd64
Suggested packages:
  python3-apport menu
The following NEW packages will be installed:
  dkms ethercat-dkms ethercat-master libethercat libethercat-dev linux-headers-4.19.0-22-amd64
  linux-headers-4.19.0-22-common linux-headers-amd64
0 upgraded, 8 newly installed, 0 to remove and 42 not upgraded.
Need to get 11.0 MB of archives.
After this operation, 127 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Abort.
sorvi@debian:~$ sudo geany /etc/ethercat.conf
sorvi@debian:~$ sudo systemctl enable ethercat.service
Failed to enable unit: Unit file ethercat.service does not exist.
sorvi@debian:~$
Last edit: 23 Oct 2022 13:03 by O.R.

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

More
25 Oct 2022 02:42 #254984 by CORBETT
Yes, it doesn't look like it fully installed.  When you did the "sudo geany /etc/ethercat.conf" was it blank?

At this point it looks like it did not install from the archives
Do you want to continue? [Y/n] y
Abort.

I would think something is wrong in the sources.list or possibly the keyring but not sure.  I was going to do a fresh install yesterday on my day off but did not have time to tinker with it.   When I get a chance, I will do an install to see what is going wrong for you.

I haven't installed it this way enough to know all the problems yet, but I did not have any issue when I did try it for the first time.  It was seamless back when I did it at first of September, only took a few minutes to have it running and seeing terminals.  I always went the ec-debianize route as it had all the patches over compiling the IgH code, but since ec-debianize doesn;t work anymore I am starting to try out this way a little more simply to save time over doing it the manual way of compiling.  Plus, the guy who host the repository is part of the IgH team (Andreas Stewering-Bone), so I trust him.

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

More
25 Oct 2022 08:27 #255002 by rodw
Can you share your /etc/ethercat.conf file?
I don't see where you used ip a to determine your mac address before using geany to make edits.
Did you update your mac address as shown in the sticky how to?

We know this was still working earlier in October.
 

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

Time to create page: 0.185 seconds
Powered by Kunena Forum