[etherlab-users] xenomai context switch
Alessio Margan @ IIT
alessio.margan at iit.it
Mon Jan 14 12:28:36 CET 2013
Hi all,
I'm testing some beckhoff ethercat modules to work with our
linux+xenomai setup.
I've just modified the xenomai_posix example to work with our modules
here some system info
Linux 2.6.38.8_xenomai-ipipe-2.6.1 #3 SMP PREEMPT
embedded at ccub-deb-test:~$ lsmod
Module Size Used by
ec_rtdm 6089 0
ec_e1000e 102195 0
ec_master 181422 2 ec_rtdm,ec_e1000e
xeno_16550A 7123 0
xeno_rtipc 32935 0
xeno_posix 230848 0
xeno_rtdm 36622 4 ec_rtdm,xeno_16550A,xeno_rtipc,xeno_posix
xeno_native 135141 1 ec_rtdm
nfsd 66183 11
exportfs 2426 1 nfsd
i2c_dev 3441 2
8250 21164 2
serial_core 12482 1 8250
uhci_hcd 14455 0
ehci_hcd 25985 0
usbcore 78042 2 uhci_hcd,ehci_hcd
e100 20931 0
rng_core 2258 0
embedded at ccub-deb-test:~$ ethercat slaves
0 0:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 1:0 PREOP + EL3104 4K. Ana. Eingang +/-10V Diff.
2 1:1 PREOP + EL4134 4K. Ana. Ausgang -10/+10V. 16bit
3 1:2 PREOP + EL5101 1K. Inc. Encoder 5V
4 1:3 PREOP + EL5001 1K. SSI Encoder
the ethercat service start fine and find the slaves ....
EtherCAT 0: Link state changed to UP.
EtherCAT 0: 5 slave(s) responding.
EtherCAT 0: Slave states: INIT.
EtherCAT 0: Scanning bus.
EtherCAT 0: Bus scanning completed in 911 ms.
EtherCAT 0: Slave states: INIT, PREOP.
EtherCAT 0: Slave states: PREOP.
I've got some warning like this ....
EtherCAT WARNING 0-3: SDO information error response while fetching SDO
entry 0x1800:07!
EtherCAT ERROR 0-3: SDO abort message 0x06090011: "Subindex does not exist".
EtherCAT WARNING 0-3: SDO information error response while fetching SDO
entry 0x1800:09!
EtherCAT ERROR 0-3: SDO abort message 0x06090011: "Subindex does not exist".
when I run the test with a cycle time of 2000 ms I got
EtherCAT: Requesting master 0...
EtherCAT: Successfully requested master 0.
EtherCATrtdm 0: Master attach start!
EtherCAT: Requesting master 0...
EtherCAT: attaching Master 0!
EtherCATrtdm 0: Master searching for domain!
EtherCATrtdm 0: Creating Master mutex ETHrtdmLOCK0!
Xenomai: registered exported object ETHrtdmLOCK0 (mutexes)
EtherCATrtdm 0: MSTR ATTACH done domain=4107057984!
EtherCAT 0: Domain0: Logical address 0x00000000, 24 byte, expected
working counter 3.
EtherCAT 0: Datagram domain0-0: Logical offset 0x00000000, 24 byte,
type LRW.
EtherCAT 0: Master thread exited.
EtherCAT 0: Starting EtherCAT-OP thread.
EtherCAT WARNING 0: 1 datagram UNMATCHED!
EtherCAT 0: Domain 0: Working counter changed to 1/3.
EtherCAT 0: Slave states: PREOP, OP.
EtherCAT 0: Domain 0: Working counter changed to 3/3.
that seems fine but I have rt context switch
embedded at ccub-deb-test:~$ cat /proc/xenomai/stat
CPU PID MSW CSW PF STAT %CPU NAME
0 0 0 43755184 0 00500080 99.4 ROOT/0
1 0 0 0 0 00500080 99.8 ROOT/1
0 1931 10434525 10442555 0 00b00380 0.2 test_ec
0 1934 56787 113572 0 00b00184 0.0 test_ec
1 0 0 15072128 0 00000000 0.1 IRQ521: [timer]
and If I run the test with a cycle time of 500 us I got some message
like this
EtherCAT: Requesting master 0...
EtherCAT: Successfully requested master 0.
EtherCATrtdm 0: Master attach start!
EtherCAT: Requesting master 0...
EtherCAT: attaching Master 0!
EtherCATrtdm 0: Master searching for domain!
EtherCATrtdm 0: Creating Master mutex ETHrtdmLOCK0!
Xenomai: registered exported object ETHrtdmLOCK0 (mutexes)
EtherCATrtdm 0: MSTR ATTACH done domain=4107057408!
EtherCAT 0: Domain0: Logical address 0x00000000, 24 byte, expected
working counter 3.
EtherCAT 0: Datagram domain0-0: Logical offset 0x00000000, 24 byte,
type LRW.
EtherCAT 0: Master thread exited.
EtherCAT 0: Starting EtherCAT-OP thread.
EtherCAT WARNING 0: 1 datagram UNMATCHED!
EtherCAT 0: Domain 0: Working counter changed to 1/3.
EtherCAT 0: Slave states: PREOP, OP.
EtherCAT 0: Domain 0: Working counter changed to 3/3.
EtherCAT 0: Domain 0: Working counter changed to 0/3.
EtherCAT WARNING 0: 48 datagrams UNMATCHED!
EtherCAT WARNING: Datagram f4b88c80 (domain0-0) was SKIPPED 46 times.
EtherCAT 0: Domain 0: 15 working counter changes - now 3/3.
EtherCAT WARNING 0: 54 datagrams UNMATCHED!
EtherCAT WARNING: Datagram f4b88c80 (domain0-0) was SKIPPED 5 times.
EtherCAT 0: Domain 0: Working counter changed to 0/3.
EtherCAT WARNING 0: 14 datagrams UNMATCHED!
EtherCAT WARNING: Datagram f4b88c80 (domain0-0) was SKIPPED 7 times.
EtherCAT 0: Domain 0: 15 working counter changes - now 3/3.
EtherCAT WARNING 0: 136 datagrams UNMATCHED!
EtherCAT WARNING: Datagram f4b88c80 (domain0-0) was SKIPPED 68 times.
so this means I'm loosing data ?
why I have rt context switch ?
Am I missiing something configuring ethercat ?
TIA
Alessio
--
Untitled Document
ISTITUTO ITALIANO
DI TECNOLOGIA
Alessio Margan
/Senior Technician/
/Advanced Robotics/
Via Morego, 30 16163 Genova
<http://maps.google.com/maps?f=q&hl=en&geocode=&q=via+morego,+30+genova&sll=37.0625,-95.677068&sspn=85.420533,191.601563&ie=UTF8&ll=44.474913,8.907037&spn=0.004685,0.011652&t=h&z=17&iwloc=addr>
alessio.margan[at]iit <mailto:alessio.margan at iit.it>
www.iit.it <http://www.iit.it>
*Legal Disclaimer*
This electronic message contains information that is confidential. The
information is intended for the use of the addressee only. If you are
not the addressee we would appreciate your notification in this respect.
Please note that any disclosure, copy, distribution or use of the
contents of this message is prohibited and may be unlawful. We have
taken every reasonable precaution to ensure that any kind of attachment
to this e-mail has been swept for viruses. However, we cannot accept
liability for any damage sustained as a result of software viruses and
would advise you to carry out your own virus checks before opening any
attachment.
*Avvertenza legale*
Questo messaggio Email contiene informazioni confidenziali riservate ai
soli destinatari. Qualora veniate in possesso di tali informazioni
senza essere definito come destinatario vi reghiamo di leggere le
seguenti note. Ogni apertura, copia, distribuzione del contenuto del
messaggio e dei suoi allegati è proibito e potrebbe violare le presenti
leggi. Abbiamo attivato ogni possibile e ragionevole precauzione per
assicurare che gli allegati non contengano virus. Comunque non
assumeremo alcuna responsabilità per ogni eventuale danno causato da
virus software e simili in quanto è onere del destinatario verificarne
l'assenza in ogni allegato attuando propri indipendenti controlli.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130114/bfeae14f/attachment-0003.htm>
More information about the Etherlab-users
mailing list