[etherlab-users] Problems initializing Omron system
Asier Tamayo
asier.tamayo at onaedm.com
Wed Mar 22 13:16:43 CET 2017
Dear all,
We have our Etherlab master running without any problem with Beckhoff boards (digital I/O, analog I/O…). Now, we wanted to make some tests with an Omron system, but we fail to get it running. We seem unable to make it go further than the INIT state. Has anyone got any experience in working with Etherlab and Omron systems? Do we have to make something different?
In Beckhoff, each board is an EtherCAT slave. However, in Omron all the boards connected to an EtherCAT coupler are a unique slave, but “ethercat slaves” only returns the configuration of the coupler itself. In TwinCAT, we can use an XML file to set the correct configuration for the system. Then, we can create a binary file in TwinCAT and write it with “ethercat sii_write” to the SII (EEPROM) of the coupler. After that, “ethercat slaves” returns the correct Omron system configuration.
For our demo, at this moment, we will use the coupler by itself:
# ./ethercat rescan
# ./ethercat slaves
0 0:0 INIT E NX-ECC202 EtherCAT coupler V1.2
# ./ethercat cstruct
/* Master 0, Slave 0, "NX-ECC202"
* Vendor ID: 0x00000083
* Product code: 0x000000a6
* Revision number: 0x00010002
*/
ec_pdo_entry_info_t slave_0_pdo_entries[] = {
{0x2003, 0x04, 128}, /* NX Unit Registration Status 125 */
{0x2005, 0x04, 128}, /* NX Unit I/O Data Active Status 125 */
{0x2001, 0x01, 8}, /* Sysmac Error Status */
{0x0000, 0x00, 8},
};
ec_pdo_info_t slave_0_pdos[] = {
{0x1bf8, 2, slave_0_pdo_entries + 0}, /* 505th transmit PDO Mapping */
{0x1bff, 1, slave_0_pdo_entries + 2}, /* 512th transmit PDO Mapping */
{0x1bf4, 1, slave_0_pdo_entries + 3}, /* PaddingTxPdo */
};
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, 3, slave_0_pdos + 0, EC_WD_DISABLE},
{0xff}
};
# ./ethercat master
Master0
Phase: Idle
Active: no
Slaves: 1
Ethernet devices:
Main: 00:12:34:56:78:9a (attached)
Link: UP
Tx frames: 1027404
Tx bytes: 62023504
Rx frames: 1012682
Rx bytes: 61140360
Tx errors: 0
Tx frame rate [1/s]: 986 1277 2060
Tx rate [KByte/s]: 57.8 74.8 120.8
Rx frame rate [1/s]: 986 1277 2056
Rx rate [KByte/s]: 57.8 74.8 120.6
Common:
Tx frames: 1027404
Tx bytes: 62023504
Rx frames: 1012682
Rx bytes: 61140360
Lost frames: 14722
Tx frame rate [1/s]: 986 1277 2060
Tx rate [KByte/s]: 57.8 74.8 120.8
Rx frame rate [1/s]: 986 1277 2058
Rx rate [KByte/s]: 57.8 74.8 120.7
Loss rate [1/s]: 0 -0 4
Frame loss [%]: 0.0 -0.0 0.2
Distributed clocks:
Reference clock: Slave 0
Application time: 0
2000-01-01 00:00:00.000000000
# ./ethercat slaves -v
=== Master 0, Slave 0 ===
Device: Main
State: INIT
Flag: E
Identity:
Vendor Id: 0x00000083
Product code: 0x000000a6
Revision number: 0x00010002
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 - 3370868674 0 0
1 MII down closed no - - - -
2 N/A down closed no - - - -
3 N/A down closed no - - - -
Mailboxes:
Bootstrap RX: 0x0000/0, TX: 0x0000/0
Standard RX: 0x2800/256, TX: 0x2a00/256
Supported protocols: CoE
General:
Group: CommCoupler
Image name:
Order number: NX-ECC202
Device name: NX-ECC202 EtherCAT coupler V1.2
CoE details:
Enable SDO: yes
Enable SDO Info: no
Enable PDO Assign: no
Enable PDO Configuration: no
Enable Upload at startup: no
Enable SDO complete access: yes
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
We can see the slave is in state INIT. With the debug set to 1:
# dmesg -c
EtherCAT DEBUG 0: Sending broadcast-write to measure transmission delays on main link.
EtherCAT DEBUG 0: 1 slaves responded to delay measuring on main link.
EtherCAT 0: Scanning bus.
EtherCAT DEBUG 0: Scanning slave 0 on main link.
EtherCAT DEBUG 0-0: Slave has the System Time register.
EtherCAT DEBUG 0-0: Unknown category type 0x002A.
EtherCAT DEBUG 0-0: Unknown category type 0x003C.
EtherCAT DEBUG 0-0: Slave is not in the state to do mailbox com (INIT), setting to PREOP.
EtherCAT DEBUG 0-0: Configuring...
EtherCAT DEBUG 0-0: Now in INIT.
EtherCAT DEBUG 0-0: Clearing FMMU configurations...
EtherCAT DEBUG 0-0: Clearing sync manager configurations...
EtherCAT DEBUG 0-0: Clearing DC assignment...
EtherCAT DEBUG 0-0: Configuring mailbox sync managers...
EtherCAT DEBUG 0-0: SM0: Addr 0x2800, Size 256, Ctrl 0x26, En 1
EtherCAT DEBUG 0-0: SM1: Addr 0x2A00, Size 256, Ctrl 0x22, En 1
EtherCAT ERROR 0-0: Timeout while setting state PREOP.
EtherCAT 0: Bus scanning completed in 5142 ms.
EtherCAT 0: Using slave 0 as DC reference clock.
EtherCAT DEBUG 0-0: ec_slave_calc_transmission_delays_rec(delay = 0 ns)
EtherCAT DEBUG 0: No app_time received up to now.
EtherCAT DEBUG 0-0: Ready for requests.
Does anyone why the timeout is occurring? What can we do?
Thanks in advance,
Asier
Aviso legal: Este mensaje y los documentos adjuntos pueden contener información confidencial. Si usted lo ha recibido por error debe saber que la información contenida en el mismo es reservada y su uso no autorizado esta prohibido por la ley, por lo que le rogamos que nos lo comunique por la misma vía y proceda a borrar el mensaje. Legal advice: The contents of this email and any attachments may contain confidential information. If you have received it by mistake please be aware that the information is private and confidential and as such its non authorised use is legally protected, therefore we ask you to contact the sender and delete the message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20170322/89f05c11/attachment-0002.htm>
More information about the Etherlab-users
mailing list