Dear etherlab users,

I am working with an ethercat bus coupler of Phoenix Contact: IL EC BK. This 
works differently from Beckhoff ethercat bus couplers (EK1100), which I have 
been using in the past. Phoenix Contact works with Ethercat modules which are 
added to the bus coupler. Hence, there is only 1 Slave with multiple modules 
depending on what you add to the coupler.

I cannot get the IL EC BK to SafeOp or Op from PreOP: it keeps getting a 
timeout when going from PreOp to SafeOp. I don't have any experience with 
Ethercat modules and I suspect the modules might be the issue. The IL EC BK 
automatically detects the correct module (tested with IB IL 24/230 DOR4/W-PAC, 
which is a relais module with 4 outputs). To be more precise, the coupler 
detects the generic 4DO module automatically => also in 0xf050, "Detected 
Module Ident List", entry 0x01. The mapping to the PDO's also seems correct: 
you can view the module1 (generic 4DO) outputs mapped on 0x1600:

SDO 0x1600, "Module 01 RxPDO-Mapping"
  0x1600:00, r-r-r-, uint8, 8 bit, "SubIndex 000"
  0x1600:01, r-r-r-, uint32, 32 bit, "SubIndex 001"

and the value written on 0x1600:01 (ethercat upload 0x1600 0x01) is 0x70000104. 
However the PDOs dont seem to be set,
ethercat cstruct:
/* Master 0, Slave 0, "IL EC BK"
 * Vendor ID:       0x00000084
 * Product code:    0x00293cab
 * Revision number: 0x00000001
 */

ec_sync_info_t slave_0_syncs[] = {
    {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
    {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
    {2, EC_DIR_OUTPUT, 0, NULL, EC_WD_ENABLE},
    {3, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
    {0xff}
};

ethercat pdos:
SM0: PhysAddr 0x1000, DefaultSize  512, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1200, DefaultSize  512, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1400, DefaultSize    0, ControlRegister 0x44, Enable 1
SM3: PhysAddr 0x2000, DefaultSize    0, ControlRegister 0x00, Enable 1

The module is not in the configured module list: 0xf030, "Configured Module 
Ident List". Also adding the module manually to this configured list does not 
change anything to the PDOs or cstruct.
 
Here is the output of syslog when trying to go to SafeOp:
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.167479] EtherCAT: 1 master 
waiting for devices.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.173760] ec_generic: EtherCAT 
master generic Ethernet device module 1.5.2 1.5.2-287-gc022ddb
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.173768] EtherCAT: Accepting 
10:65:30:5D:9A:60 as main device for master 0.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.173776] ec_generic: Binding 
socket to interface 2 (enp0s31f6).
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.196955] EtherCAT 0: Starting 
EtherCAT-IDLE thread.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.197068] EtherCAT 0: Link 
state of ecm0 changed to UP.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.204739] EtherCAT 0: 1 
slave(s) responding on main device.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.204741] EtherCAT 0: Slave 
states on main device: INIT.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.205304] EtherCAT 0: Scanning 
bus.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.617592] EtherCAT 0: Bus 
scanning completed in 412 ms.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.617593] EtherCAT 0: No DC 
reference clock found.
Mar 20 14:14:23 jonas-Latitude-5580 kernel: [ 2446.624880] EtherCAT 0: Slave 
states on main device: PREOP.
Mar 20 14:15:22 jonas-Latitude-5580 kernel: [ 2505.093969] EtherCAT ERROR 0-0: 
Timeout while setting state SAFEOP.
Mar 20 14:16:17 jonas-Latitude-5580 kernel: [ 2560.107046] EtherCAT 0: Slave 
states on main device: PREOP + ERROR.
Mar 20 14:17:01 jonas-Latitude-5580 CRON[6321]: (root) CMD (   cd / && 
run-parts --report /etc/cron.hourly)
Mar 20 14:30:22 jonas-Latitude-5580 kernel: [ 3405.294456] EtherCAT ERROR 0-0: 
AL status message 0x0001: "Unspecified error".

I also tried with Twincat 3 and there the slave works correctly after loading 
the ESI file and selecting the correct module from the list of modules. So the 
hardware itself works. I have found out that Twincat does 3 Startup steps 
between PreOp and SafeOp:
1) CoE download pdo 0x1c12     0x1c12 C 0
2) CoE download pdo 0x1c13     0x1c13 C 0
3) CoE download slot cfg            0xF030 C 0
However i cannot write with SDO download to these 0x1c12 and 0x1c13, writing to 
0xF030 works, but does not seem to have any effect. So, I believe some 
additional steps are done in Twincat, which are not done automatically in 
etherlab.

I don't know which steps are missing to correctly configure/set the EtherCat 
modules and thus the corresponding PDOs of the slave with Etherlab on ubuntu. 
Has anyone experience with EtherCat modules?


Thank you and with kind regards,

Jonas 

-- 
Etherlab-users mailing list
Etherlab-users@etherlab.org
https://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to