- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Ethercat installation from repositories - how to step by step
Ethercat installation from repositories - how to step by step
28 Aug 2023 21:23 #279216
by rodw
Replied by rodw on topic Ethercat installation from repositories - how to step by step
The default Bookworm kernel in my ISO is 6.1 so you are in the clear!
Sorry but the download had a regression and is missing nonfree and nonfree-firmware in /etc/apt/sources.list
You will nead them. Please edit the file and add "nonfree nonfree-firmware" to the end of each line starting with deb then
sudo apt update
sudo apt upgrade (to get the very latest 2.9 linuxcnc)
So once installed, I think you should install the r8125-dkms driver (which is in non-free) to get best network performance
sudo apt install r8125-dkms
If this breaks your network, it must be purged, not removed sudo apt purge r8125-dkms
@transint, I can't help without seeing your config files. Sounds like you got something wrong there.
Sorry but the download had a regression and is missing nonfree and nonfree-firmware in /etc/apt/sources.list
You will nead them. Please edit the file and add "nonfree nonfree-firmware" to the end of each line starting with deb then
sudo apt update
sudo apt upgrade (to get the very latest 2.9 linuxcnc)
So once installed, I think you should install the r8125-dkms driver (which is in non-free) to get best network performance
sudo apt install r8125-dkms
If this breaks your network, it must be purged, not removed sudo apt purge r8125-dkms
@transint, I can't help without seeing your config files. Sounds like you got something wrong there.
The following user(s) said Thank You: mwc
Please Log in or Create an account to join the conversation.
28 Aug 2023 21:35 #279219
by mwc
Replied by mwc on topic Ethercat installation from repositories - how to step by step
It'll likely be the weekend before I get a chance to try this.
I've not had any time to work on the machine that this setup is likely to end up on, but I've been checking in occasionally to see what developments have been happening, however I might soon have a bit free time to get a few workshop projects worked on, so am wanting to see if I can get this working reliably or not.
I've not had any time to work on the machine that this setup is likely to end up on, but I've been checking in occasionally to see what developments have been happening, however I might soon have a bit free time to get a few workshop projects worked on, so am wanting to see if I can get this working reliably or not.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
29 Aug 2023 05:53 #279257
by Transint
Replied by Transint on topic Ethercat installation from repositories - how to step by step
Warning: Spoiler!
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
<!-- Slave 0 - DIEWU 16 input, 16 output Ethercat IO Module -->
<slave idx="0" type="generic" vid="00000b95" pid="0x00010200" configPdos="false">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1a00">
<!-- Digtial Outputs (DIEWU_EtherCAT_DIO_16)-->
<pdoEntry idx="3101" subIdx="01" bitLen="8" halType="complex">
<complexEntry bitLen="1" halPin="out-01" halType="bit"/>
<complexEntry bitLen="1" halPin="out-02" halType="bit"/>
<complexEntry bitLen="1" halPin="out-03" halType="bit"/>
<complexEntry bitLen="1" halPin="out-04" halType="bit"/>
<complexEntry bitLen="1" halPin="out-05" halType="bit"/>
<complexEntry bitLen="1" halPin="out-06" halType="bit"/>
<complexEntry bitLen="1" halPin="out-07" halType="bit"/>
<complexEntry bitLen="1" halPin="out-08" halType="bit"/>
</pdoEntry>
</pdo>
<pdo idx="1a01">
<!-- Digtial Outputs (DIEWU_EtherCAT_DIO_16)-->
<pdoEntry idx="3101" subIdx="02" bitLen="8" halType="complex">
<complexEntry bitLen="1" halPin="out-09" halType="bit"/>
<complexEntry bitLen="1" halPin="out-10" halType="bit"/>
<complexEntry bitLen="1" halPin="out-11" halType="bit"/>
<complexEntry bitLen="1" halPin="out-12" halType="bit"/>
<complexEntry bitLen="1" halPin="out-13" halType="bit"/>
<complexEntry bitLen="1" halPin="out-14" halType="bit"/>
<complexEntry bitLen="1" halPin="out-15" halType="bit"/>
<complexEntry bitLen="1" halPin="out-16" halType="bit"/>
</pdoEntry>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1600">
<!-- Digtial_inputs -->
<pdoEntry idx="3001" subIdx="01" bitLen="8" halType="complex">
<complexEntry bitLen="1" halPin="in-01" halType="bit"/>
<complexEntry bitLen="1" halPin="in-02" halType="bit"/>
<complexEntry bitLen="1" halPin="in-03" halType="bit"/>
<complexEntry bitLen="1" halPin="in-04" halType="bit"/>
<complexEntry bitLen="1" halPin="in-05" halType="bit"/>
<complexEntry bitLen="1" halPin="in-06" halType="bit"/>
<complexEntry bitLen="1" halPin="in-07" halType="bit"/>
<complexEntry bitLen="1" halPin="in-08" halType="bit"/>
</pdoEntry>
</pdo>
<pdo idx="1601">
<pdoEntry idx="3001" subIdx="02" bitLen="8" halType="complex">
<complexEntry bitLen="1" halPin="in-09" halType="bit"/>
<complexEntry bitLen="1" halPin="in-10" halType="bit"/>
<complexEntry bitLen="1" halPin="in-11" halType="bit"/>
<complexEntry bitLen="1" halPin="in-12" halType="bit"/>
<complexEntry bitLen="1" halPin="in-13" halType="bit"/>
<complexEntry bitLen="1" halPin="in-14" halType="bit"/>
<complexEntry bitLen="1" halPin="in-15" halType="bit"/>
<complexEntry bitLen="1" halPin="in-16" halType="bit"/>
</pdoEntry>
</pdo>
</syncManager>
</slave>
<!-- Slave 1 - Servo 2DM556-EC-->
<slave idx="0" type="generic" vid="66668888" pid="20190302" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="70 17"/></sdoConfig> <!-- Max motor current (6.0) -->
<sdoConfig idx="2007" subIdx="6"><sdoDataRaw data ="05"/></sdoConfig> <!-- Input 6 - Emergency Stop -->
<sdoConfig idx="2007" subIdx="5"><sdoDataRaw data ="05"/></sdoConfig> <!-- Input 3 - Home Function -->
<sdoConfig idx="2011" subIdx="0"><sdoDataRaw data ="01 00"/></sdoConfig> <!-- Closed loop -->
<sdoConfig idx="6098" subIdx="0"><sdoDataRaw data ="11 00"/></sdoConfig> <!-- Home mode 17 -->
<sdoConfig idx="607C" subIdx="0"><sdoDataRaw data ="00 00"/></sdoConfig> <!-- Home offset 0 -->
<sdoConfig idx="609A" subIdx="0"><sdoDataRaw data ="F4 01"/></sdoConfig> <!-- Home accelleration 500 -->
<sdoConfig idx="6099" subIdx="01"><sdoDataRaw data ="C4 09"/></sdoConfig> <!-- Home fast speed 2500-->
<sdoConfig idx="6099" subIdx="02"><sdoDataRaw data ="F4 01"/></sdoConfig> <!-- Home slow speed 500 -->
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<!-- Target Position -->
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
<!-- Target Velocity -->
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
<!-- Digtial Outputs (manufacturer's extension ECT86/ECT60)-->
<pdoEntry idx="204A" subIdx="0" bitLen="16" halType="complex">
<complexEntry bitLen="1" halPin="out-1" halType="bit"/>
<complexEntry bitLen="1" halPin="out-2" halType="bit"/>
<complexEntry bitLen="14"/>
</pdoEntry>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
<!-- Digtial_inputs (cia402 compatible) -->
<pdoEntry idx="60FD" subIdx="0" bitLen="32" halType="complex">
<complexEntry bitLen="1" halPin="CW-limit" halType="bit"/>
<complexEntry bitLen="1" halPin="CCW-limit" halType="bit"/>
<complexEntry bitLen="13"/>
<complexEntry bitLen="1" halPin="DI3" halType="bit"/>
<complexEntry bitLen="1" halPin="DI4" halType="bit"/>
<complexEntry bitLen="10"/>
</pdoEntry>
</pdo>
</syncManager>
</slave>
</master>
</masters>
Warning: Spoiler!
/* Master 0, Slave 0, "DIEWU_EtherCAT_DIO_16"
* Vendor ID: 0x00000b95
* Product code: 0x00010200
* Revision number: 0x00000001
*/
ec_pdo_entry_info_t slave_0_pdo_entries[] = {
{0x3101, 0x01, 8}, /* Output */
{0x3101, 0x02, 8}, /* Output */
{0x3001, 0x01, 8}, /* Input */
{0x3001, 0x02, 8}, /* Input */
};
ec_pdo_info_t slave_0_pdos[] = {
{0x1a00, 1, slave_0_pdo_entries + 0}, /* Byte 0 */
{0x1a01, 1, slave_0_pdo_entries + 1}, /* Byte 1 */
{0x1600, 1, slave_0_pdo_entries + 2}, /* Byte 0 */
{0x1601, 1, slave_0_pdo_entries + 3}, /* Byte 1 */
};
ec_sync_info_t slave_0_syncs[] = {
{0, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_ENABLE},
{1, EC_DIR_OUTPUT, 1, slave_0_pdos + 1, EC_WD_ENABLE},
{2, EC_DIR_INPUT, 2, slave_0_pdos + 2, EC_WD_DISABLE},
{0xff}
};
/* Master 0, Slave 1, "2DM556-EC"
* Vendor ID: 0x66668888
* Product code: 0x20190302
* Revision number: 0x20190220
*/
ec_pdo_entry_info_t slave_1_pdo_entries[] = {
{0x6040, 0x00, 16},
{0x6060, 0x00, 8},
{0x607a, 0x00, 32},
{0x60b8, 0x00, 16},
{0x60fe, 0x01, 32},
{0x60fe, 0x02, 32},
{0x603f, 0x00, 16},
{0x6041, 0x00, 16},
{0x6061, 0x00, 8},
{0x6064, 0x00, 32},
{0x60b9, 0x00, 16},
{0x60ba, 0x00, 32},
{0x60bb, 0x00, 32},
{0x60bc, 0x00, 32},
{0x60bd, 0x00, 32},
{0x60fd, 0x00, 32},
};
ec_pdo_info_t slave_1_pdos[] = {
{0x1600, 6, slave_1_pdo_entries + 0},
{0x1a00, 10, slave_1_pdo_entries + 6},
};
ec_sync_info_t slave_1_syncs[] = {
{0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
{1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
{2, EC_DIR_OUTPUT, 1, slave_1_pdos + 0, EC_WD_ENABLE},
{3, EC_DIR_INPUT, 1, slave_1_pdos + 1, EC_WD_DISABLE},
{0xff}
};
Please Log in or Create an account to join the conversation.
30 Aug 2023 22:09 #279419
by Goodwood
Replied by Goodwood on topic Ethercat installation from repositories - how to step by step
Thank you so much for such a quick installation with absolutely no hitches. I'm in shock.
The next challenge is to install the Yaskawa sigma 7 servos and drives.Do you have a list of the chips that this will run on. I want to put it onto an IPC. Thanks again.
The next challenge is to install the Yaskawa sigma 7 servos and drives.Do you have a list of the chips that this will run on. I want to put it onto an IPC. Thanks again.
Please Log in or Create an account to join the conversation.
31 Aug 2023 03:42 #279440
by rodw
Some people have got linuxcnc to run on 2 core machines but it needs a bit more work. eg update the kernel and check/update network drivers
Replied by rodw on topic Ethercat installation from repositories - how to step by step
Great feedback thanks. Any industrial 64 bit 4 core PC I think. I don't think we have 32 bit repos of linuxcnc for bookworm.Thank you so much for such a quick installation with absolutely no hitches. I'm in shock.
The next challenge is to install the Yaskawa sigma 7 servos and drives.Do you have a list of the chips that this will run on. I want to put it onto an IPC. Thanks again.
Some people have got linuxcnc to run on 2 core machines but it needs a bit more work. eg update the kernel and check/update network drivers
The following user(s) said Thank You: Goodwood
Please Log in or Create an account to join the conversation.
31 Aug 2023 05:27 #279445
by endian
Replied by endian on topic Ethercat installation from repositories - how to step by step
I am running 2 core now too and have more problems.
hich hw can you recommned for it please?
I am looking for small or mini PC with single network and single wifi connection. I found something like Lenovo ThinkCentre M93p Tiny Intel Core i5-4590T, HD 4600, 8GB DDR3 RAM, 256GB SSD ... do you think, should it run without major problems?
thanks
regards Slav
hich hw can you recommned for it please?
I am looking for small or mini PC with single network and single wifi connection. I found something like Lenovo ThinkCentre M93p Tiny Intel Core i5-4590T, HD 4600, 8GB DDR3 RAM, 256GB SSD ... do you think, should it run without major problems?
thanks
regards Slav
Please Log in or Create an account to join the conversation.
31 Aug 2023 06:29 - 31 Aug 2023 06:30 #279449
by rodw
Replied by rodw on topic Ethercat installation from repositories - how to step by step
Try this 6.3 kernel I built linuxcnc.org/docs/2.9/html/getting-start...lling_a_later_kernel
Also check to see you don't have a Realtek network card as per this chapter in the same document
linuxcnc.org/docs/2.9/html/getting-start...ltek_network_drivers
EDIT: and also isolcpus=1
Also check to see you don't have a Realtek network card as per this chapter in the same document
linuxcnc.org/docs/2.9/html/getting-start...ltek_network_drivers
EDIT: and also isolcpus=1
Last edit: 31 Aug 2023 06:30 by rodw.
The following user(s) said Thank You: endian
Please Log in or Create an account to join the conversation.
31 Aug 2023 10:04 #279459
by endian
Replied by endian on topic Ethercat installation from repositories - how to step by step
Isolation cores is basic thing what have to be done after any kind of work with lcnc .. very important like u said..
I do not find my network hardware in that list... My pc has
*-network
description: Ethernet interface
product: 82567LM-3 Gigabit Network Connection
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: enp0s25
version: 02
serial: 1c:c1:de:53:03:7b
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.5-3 latency=0 link=no multicast=yes port=twisted pair
resources: irq:28 memory:f0500000-f051ffff memory:f0525000-f0525fff ioport:2100(size=32)
Maybe should be problem with kernel ... Because there is 4.19.0.11 kernel ... I have to add new harddrive to boot on your hybrid.iso which looks very nice ...
But kernel have to be replaced with 6.3 because only 2 cores in hardware... Am I right?
I do not find my network hardware in that list... My pc has
Warning: Spoiler!
*-network
description: Ethernet interface
product: 82567LM-3 Gigabit Network Connection
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: enp0s25
version: 02
serial: 1c:c1:de:53:03:7b
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.5-3 latency=0 link=no multicast=yes port=twisted pair
resources: irq:28 memory:f0500000-f051ffff memory:f0525000-f0525fff ioport:2100(size=32)
Maybe should be problem with kernel ... Because there is 4.19.0.11 kernel ... I have to add new harddrive to boot on your hybrid.iso which looks very nice ...
But kernel have to be replaced with 6.3 because only 2 cores in hardware... Am I right?
Please Log in or Create an account to join the conversation.
31 Aug 2023 10:57 #279463
by rodw
Replied by rodw on topic Ethercat installation from repositories - how to step by step
Ok, you have an Intel NIC. That is good!. For ethercat, just use the generic driver.
4.19 is buster and I've never used it. You could adapt the how to and getting linuxcnc doc to Buster by changing a few settings.
Everything I have set up recently has been around Bookworm. A couple of guys I know have got Bookworm working with Mesa devices on 2 core machines with the 6.3 kernel. You probably should add the coalescing settings as shown in man hm2_eth. But ethercat is much more efficient so it performs better than the protocols Mesa use so it might not be necessary.
The other thing you could try is IRQ pinning and pin the NIC interrupt to the one Linuxcnc uses (likely the isolated core) You will hhave to google that but the theory is that if both the servo thread (and perhaps the ethercat master too) and NIC are all on the same core, it will be more efficient
I think your i5 will be fine. I have a i3 that works pretty welll once optimised even with a crappy Realtek NIC.
4.19 is buster and I've never used it. You could adapt the how to and getting linuxcnc doc to Buster by changing a few settings.
Everything I have set up recently has been around Bookworm. A couple of guys I know have got Bookworm working with Mesa devices on 2 core machines with the 6.3 kernel. You probably should add the coalescing settings as shown in man hm2_eth. But ethercat is much more efficient so it performs better than the protocols Mesa use so it might not be necessary.
The other thing you could try is IRQ pinning and pin the NIC interrupt to the one Linuxcnc uses (likely the isolated core) You will hhave to google that but the theory is that if both the servo thread (and perhaps the ethercat master too) and NIC are all on the same core, it will be more efficient
I think your i5 will be fine. I have a i3 that works pretty welll once optimised even with a crappy Realtek NIC.
Please Log in or Create an account to join the conversation.
03 Sep 2023 22:37 #279765
by mwc
Replied by mwc on topic Ethercat installation from repositories - how to step by step
Just installed this, and it's a step forward from my previous test, but still have an initial startup issue so I'll update my other thread shortly.
One minor thing Rod, Git isn't installed by default in your iso.
Also the realtek drivers aren't that easy to install on the H3. I did try following the Odriod instructions ( odroid-h3:hardware:install_ethernet_driver_on_h3plus [ODROID Wiki] ), but it came up with an error, so I skipped them for now. The generic driver appears to work fine.
One minor thing Rod, Git isn't installed by default in your iso.
Also the realtek drivers aren't that easy to install on the H3. I did try following the Odriod instructions ( odroid-h3:hardware:install_ethernet_driver_on_h3plus [ODROID Wiki] ), but it came up with an error, so I skipped them for now. The generic driver appears to work fine.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Ethercat installation from repositories - how to step by step
Time to create page: 0.684 seconds