- Posts: 5
- Thank you received: 1
Ethercat HAL driver
- ccdodo
- Offline
- New Member
-
Less
More
- ccdodo
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 1
13 years 4 months ago #36017
by ccdodo
Replied by ccdodo on topic Ethercat HAL driver
Hi, I have installed the EtherCAT master follow the wiki
wiki.linuxcnc.org/cgi-bin/wiki.pl?EtherCatDriver
. I have some beckhoff modules: EK1100 ,EL2008,EL1008,EL2521. But I can't visit the slaves. When running 'ethercat master',it shows:
Master0
Phase: Waiting for device(s)...
Active: no
Slaves: 0
Ethernet devices:
Main: 00:01:6c:8b:dd:f8 (waiting...)
Link: DOWN
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Tx errors: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 0 0 0
Rx rate [KByte/s]: 0.0 0.0 0.0
Common:
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Lost frames: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 1040384 -606352 -1065589
Rx rate [KByte/s]: 0.0 0.0 1645326.0
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Distributed clocks:
Reference clock: None
Application time: 0
2000-01-01 00:00:00.000000000
My Network adapter is Intel Pro/100 VM, and the ethercat config file content is:
MASTER0_DEVICE="00:01:6C:8B:DD:F8"
DEVICE_MODULES="e100"
So I don't know how to fix it. anyone can help?
Master0
Phase: Waiting for device(s)...
Active: no
Slaves: 0
Ethernet devices:
Main: 00:01:6c:8b:dd:f8 (waiting...)
Link: DOWN
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Tx errors: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 0 0 0
Rx rate [KByte/s]: 0.0 0.0 0.0
Common:
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Lost frames: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 1040384 -606352 -1065589
Rx rate [KByte/s]: 0.0 0.0 1645326.0
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Distributed clocks:
Reference clock: None
Application time: 0
2000-01-01 00:00:00.000000000
My Network adapter is Intel Pro/100 VM, and the ethercat config file content is:
MASTER0_DEVICE="00:01:6C:8B:DD:F8"
DEVICE_MODULES="e100"
So I don't know how to fix it. anyone can help?
- willrat
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 1
13 years 4 months ago #36084
by willrat
Replied by willrat on topic Ethercat HAL driver
I'm no expert but I've got it working with an EK1100 on both e1000 and r8169 network cards with a variety of slave modules. Here what I would do...
I'm not using the etherlab control as outlined by sascha. I just use the etherlab (1.5.2) package control scripts from the command line.
My config file is in /etc/ethercat.conf as per etherlab default but the modified version outlined on the wiki places it elsewhere... so you might have a problem there.
You should try to get the etherlab part running first -- so going to the etherlab mailing list may also be a good start.
First you can check that the module is the correct module it should be
sudo ethercatctl stop
check your 'normal' driver is e100 not e1000 or e1000e
lsmod | grep -i e100
if e100 is not listed then that might the problem
sudo ethercatctl start
note any errors; check dmesg for errors
then check the module is loaded
sudo lssmod | grep -i ec
you should have
ec_master
ec_e100
any module listed with a ec_ prefix is an ethercat module;
If that looks OK then run the ethercat command with -v to print more info.
Check dmesg after running
ethercat -v master
I'm not using the etherlab control as outlined by sascha. I just use the etherlab (1.5.2) package control scripts from the command line.
My config file is in /etc/ethercat.conf as per etherlab default but the modified version outlined on the wiki places it elsewhere... so you might have a problem there.
You should try to get the etherlab part running first -- so going to the etherlab mailing list may also be a good start.
First you can check that the module is the correct module it should be
sudo ethercatctl stop
check your 'normal' driver is e100 not e1000 or e1000e
lsmod | grep -i e100
if e100 is not listed then that might the problem
sudo ethercatctl start
note any errors; check dmesg for errors
then check the module is loaded
sudo lssmod | grep -i ec
you should have
ec_master
ec_e100
any module listed with a ec_ prefix is an ethercat module;
If that looks OK then run the ethercat command with -v to print more info.
Check dmesg after running
ethercat -v master
The following user(s) said Thank You: ccdodo
- ccdodo
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 1
13 years 3 months ago #36297
by ccdodo
Replied by ccdodo on topic Ethercat HAL driver
Thanks very much for your answer! I de-installed the package 'ethercat_1.5.2-1_i386.deb', and then reinstalled the ethercat master by using etherlab source code. Finally , it works.
I just follow the etherlab's doc:
$ ./configure
$ make
$ make modules
# make install
# make modules install
# depmod
cd /opt/etherlab
cp etc/sysconfig/ethercat /etc/sysconfig/
ln -s etc/init.d/ethercat /etc/init.d/
then customize the sysconfig file /etc/sysconfig/ethercat
start the master
/etc/init.d/ethercat start
and I can find the master and slaves.
$ sudo /opt/etherlab/bin/ethercat -v master
Master0
Phase: Idle
Active: no
Slaves: 4
Ethernet devices:
Main: e0:05:c5:eb:5a:7f (attached)
Link: UP
Tx frames: 35480
Rx frames: 35479
Lost frames: 0
Tx bytes: 2148072
Tx errors: 0
Tx frame rate [1/s]: 250 780 458
Tx rate [KByte/s]: 14.6 46.1 27.1
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Backup: None.
Distributed clocks:
Reference clock: Slave 0
Application time: 0
2000-01-01 00:00:00.000000000
sudo /opt/etherlab/bin/ethercat -v slave
=== Master 0, Slave 0 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000002
Product code: 0x044c2c52
Revision number: 0x00110000
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 0 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes - 3877337170 0 0
1 EBUS up open yes 1 3877338060 890 145
2 MII down closed no - - - -
3 N/A down closed no - - - -
General:
Group: SystemBk
Image name:
Order number: EK1100
Device name: EK1100 EtherCAT-Koppler (2A E-Bus)
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: -2000 mA
=== Master 0, Slave 1 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000002
Product code: 0x07d83052
Revision number: 0x00100000
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 145 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 EBUS up open yes 0 3816389530 0 145
1 EBUS up open yes 2 3816390130 600 145
2 N/A down closed no - - - -
3 N/C down closed no - - - -
General:
Group: DigOut
Image name:
Order number: EL2008
Device name: EL2008 8K. Dig. Ausgang 24V, 0.5A
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 110 mA
=== Master 0, Slave 2 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000002
Product code: 0x03f03052
Revision number: 0x00100000
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 290 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 EBUS up open yes 1 2666310340 0 145
1 EBUS up open yes 3 2666310650 310 155
2 N/A down closed no - - - -
3 N/C down closed no - - - -
General:
Group: DigIn
Image name: TERM_DI
Order number: EL1008
Device name: EL1008 8K. Dig. Eingang 24V, 3ms
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 90 mA
=== Master 0, Slave 3 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000002
Product code: 0x09d93052
Revision number: 0x03fb0000
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 445 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 EBUS up open yes 2 3745942530 0 155
1 EBUS down closed no - - - -
2 N/A down closed no - - - -
3 N/C down closed no - - - -
Mailboxes:
Bootstrap RX: 0x1000/244, TX: 0x10f4/244
Standard RX: 0x1200/54, TX: 0x1280/54
Supported protocols: CoE, FoE
General:
Group: DigOut
Image name:
Order number: EL2521
Device name: EL2521 1K. Pulse Train Ausgang
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: no
Enable Upload at startup: no
Enable SDO complete access: yes
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 280 mA
I just follow the etherlab's doc:
$ ./configure
$ make
$ make modules
# make install
# make modules install
# depmod
cd /opt/etherlab
cp etc/sysconfig/ethercat /etc/sysconfig/
ln -s etc/init.d/ethercat /etc/init.d/
then customize the sysconfig file /etc/sysconfig/ethercat
start the master
/etc/init.d/ethercat start
and I can find the master and slaves.
$ sudo /opt/etherlab/bin/ethercat -v master
Master0
Phase: Idle
Active: no
Slaves: 4
Ethernet devices:
Main: e0:05:c5:eb:5a:7f (attached)
Link: UP
Tx frames: 35480
Rx frames: 35479
Lost frames: 0
Tx bytes: 2148072
Tx errors: 0
Tx frame rate [1/s]: 250 780 458
Tx rate [KByte/s]: 14.6 46.1 27.1
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Backup: None.
Distributed clocks:
Reference clock: Slave 0
Application time: 0
2000-01-01 00:00:00.000000000
sudo /opt/etherlab/bin/ethercat -v slave
=== Master 0, Slave 0 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000002
Product code: 0x044c2c52
Revision number: 0x00110000
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 0 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes - 3877337170 0 0
1 EBUS up open yes 1 3877338060 890 145
2 MII down closed no - - - -
3 N/A down closed no - - - -
General:
Group: SystemBk
Image name:
Order number: EK1100
Device name: EK1100 EtherCAT-Koppler (2A E-Bus)
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: -2000 mA
=== Master 0, Slave 1 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000002
Product code: 0x07d83052
Revision number: 0x00100000
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 145 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 EBUS up open yes 0 3816389530 0 145
1 EBUS up open yes 2 3816390130 600 145
2 N/A down closed no - - - -
3 N/C down closed no - - - -
General:
Group: DigOut
Image name:
Order number: EL2008
Device name: EL2008 8K. Dig. Ausgang 24V, 0.5A
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 110 mA
=== Master 0, Slave 2 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000002
Product code: 0x03f03052
Revision number: 0x00100000
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 290 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 EBUS up open yes 1 2666310340 0 145
1 EBUS up open yes 3 2666310650 310 155
2 N/A down closed no - - - -
3 N/C down closed no - - - -
General:
Group: DigIn
Image name: TERM_DI
Order number: EL1008
Device name: EL1008 8K. Dig. Eingang 24V, 3ms
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 90 mA
=== Master 0, Slave 3 ===
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000002
Product code: 0x09d93052
Revision number: 0x03fb0000
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 445 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 EBUS up open yes 2 3745942530 0 155
1 EBUS down closed no - - - -
2 N/A down closed no - - - -
3 N/C down closed no - - - -
Mailboxes:
Bootstrap RX: 0x1000/244, TX: 0x10f4/244
Standard RX: 0x1200/54, TX: 0x1280/54
Supported protocols: CoE, FoE
General:
Group: DigOut
Image name:
Order number: EL2521
Device name: EL2521 1K. Pulse Train Ausgang
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: no
Enable Upload at startup: no
Enable SDO complete access: yes
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 280 mA
- sascha
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 29
13 years 2 months ago #37489
by sascha
Replied by sascha on topic Ethercat HAL driver
This sould also work with the ethercat deb. I've just modified the way of loading modules and configuration to be a little bit more "debian like", but the doc is not complete.
If using the deb after changing the conf in /etc/default/ethercat just do a "sudo update-ethercat-config". This will activate the new configuration.
If using the deb after changing the conf in /etc/default/ethercat just do a "sudo update-ethercat-config". This will activate the new configuration.
The following user(s) said Thank You: Nico2017
- Oscmol
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 2
13 years 2 weeks ago #39986
by Oscmol
Replied by Oscmol on topic Ethercat HAL driver
Hi
I have some questions about this HAL driver for the ethercat.
I did see that it says that it supports distributed clocks is this also for the servo drives?
Would it work to connect 5 servodrives over ethercat and interpolate them or this driver is not made for that kind of tasks?
We are using ethercat drives at my work, so i have good knowledge about this bt not with this HAL driver and Linux CNC.
Is there any one using servos like i wonder and have good result or its better to go for the old style with analog and pulse signals?
Best regards
Oscar
I have some questions about this HAL driver for the ethercat.
I did see that it says that it supports distributed clocks is this also for the servo drives?
Would it work to connect 5 servodrives over ethercat and interpolate them or this driver is not made for that kind of tasks?
We are using ethercat drives at my work, so i have good knowledge about this bt not with this HAL driver and Linux CNC.
Is there any one using servos like i wonder and have good result or its better to go for the old style with analog and pulse signals?
Best regards
Oscar
Time to create page: 0.568 seconds