[etherlab-users] DC problems
Andreas Stewering-Bone
ab at igh-essen.com
Mon Nov 14 14:11:56 CET 2011
Hello,
Am 14.11.2011 13:55, schrieb carlos_jimenez at encopim.com:
> Quoting Andreas Stewering-Bone <ab at igh-essen.com>:
>
>> Hello,
>>
>> DC is a little bit more difficult than normal io.
>>
>> First there are some questions:
>>
>> - Which Realtime Subsystem do you use? (RTAI, Xenomai, Preempt)
>
> RTAI
>
>> - Which CPU do you use?
>
> root at rtai:~/ethercat-default/examples/dc_rtai# cat /proc/cpuinfo
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 15
> model : 2
> model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
> stepping : 9
> cpu MHz : 2800.284
> cache size : 512 KB
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 2
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up
> pebs bts cid xtpr
> bogomips : 5600.56
> clflush size : 64
> cache_alignment : 128
> address sizes : 36 bits physical, 32 bits virtual
> power management:
>
>
>> - Which NIC driver do you use?
>
> root at rtai:~/ethercat-default/examples/dc_rtai# lspci
> ...
> ___01:01.0 Ethernet controller: Intel Corporation 82547GI Gigabit
> Ethernet Controller___
> 02:08.0 Ethernet controller: Intel Corporation 82801EB/ER (ICH5/ICH5R)
> integrated LAN Controller (rev 02)
> ...
> root at rtai:~/ethercat-default/examples/dc_rtai# lsmod
> Module Size Used by
> ec_e1000 92872 0
> ec_master 216679 1 ec_e1000
> rtai_sem 24011 0
> rtai_sched 95259 1 rtai_sem
> rtai_hal 64480 2 rtai_sem,rtai_sched
> e100 26234 0
>
>
If you have the possibility please take a Realtec NIC
>> - Which etherlab master version do you use?
>
> root at rtai:~/ethercat-default/examples/dc_rtai# ethercat version
> IgH EtherCAT master devel afb40fd6018e
>
> after this commit:
> author Florian Pose <fp at igh-essen.com>
> Thu Sep 22 16:52:54 2011 +0200 (7 weeks ago)
Please take the stable branch
do a hg clone of the reposiroy
hg up stable-1.5
./boostrap
./configure .........
>
>> - What is your system latency? (RTAI/testsuite)
>
> User latency:
> root at rtai:/usr/realtime/testsuite/user/latency# ./run
> *
> *
> * Type ^C to stop this application.
> *
> *
>
> ## RTAI latency calibration tool ##
> # period = 100000 (ns)
> # average time = 1 (s)
> # use the FPU
> # start the timer
> # timer_mode is oneshot
>
> RTAI Testsuite - USER latency (all data in nanoseconds)
> 2011/11/14 13:53:08
> RTH| lat min| ovl min| lat avg| lat max| ovl max|
> overruns
> RTD| -554| -554| -490| 958|
> 958| 0
> RTD| -559| -559| -492| 1037|
> 1037| 0
> RTD| -554| -559| -480| 196|
> 1037| 0
> RTD| -554| -559| -485| 2673|
> 2673| 0
> RTD| -554| -559| -477| 2582|
> 2673| 0
> RTD| -554| -559| -481| 2629|
> 2673| 0
> RTD| -551| -559| -496| 2442|
> 2673| 0
> RTD| -553| -559| -492| 275|
> 2673| 0
> RTD| -551| -559| -491| 483|
> 2673| 0
> RTD| -551| -559| -494| 291|
> 2673| 0
> RTD| -558| -559| -489| 391|
> 2673| 0
> RTD| -557| -559| -497| 2612|
> 2673| 0
> RTD| -551| -559| -495| 276|
> 2673| 0
> RTD| -551| -559| -494| 2602|
> 2673| 0
> RTD| -551| -559| -495| 2707|
> 2707| 0
> RTD| -551| -559| -497| 388|
> 2707| 0
> RTD| -551| -559| -493| 355|
> 2707| 0
> RTD| -551| -559| -490| 2647|
> 2707| 0
> RTD| -551| -559| -492| 2688|
> 2707| 0
> RTD| -551| -559| -492| 583|
> 2707| 0
> RTD| -557| -559| -495| 463|
> 2707| 0
>
looks good
>> - Which slave do you want to use?
>
> I tried with 4 slaves, EL2004, EL1004, EL3102 and EL4132
>
Please note, these slave does not support DC, That is the reason for OP
Mode.
>>
>> About OP State
>>
>> try to set
>>
>> ethercat debug 1
>>
>> and start your application and post the dmesg output.
>
> dmesg#
>
> EtherCAT 0: Master debug level set to 1.
> ec_dc_rtai_sample: Starting...
> EtherCAT: Requesting master 0...
> EtherCAT DEBUG 0: IDLE -> OPERATION.
> EtherCAT: Successfully requested master 0.
> EtherCAT DEBUG 0: ecrt_master_callbacks(master = f7b82000, lock_cb =
> f8d86020, unlock_cb = f8d86000, cb_data = f7b82000)
> ec_dc_rtai_sample: Registering domain...
> EtherCAT DEBUG 0: ecrt_master_create_domain(master = 0xf7b82000)
> EtherCAT DEBUG 0: Created domain 0.
> ec_dc_rtai_sample: Configuring PDOs...
> EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf7b82000, alias
> = 0, position = 0, vendor_id = 0x00000002, product_code = 0x044d2c52)
> EtherCAT DEBUG 0: Creating slave configuration for 0:0,
> 0x00000002/0x044D2C52.
> EtherCAT DEBUG 0 0:0: Attached slave 0.
> EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf7b82000, alias
> = 0, position = 1, vendor_id = 0x00000002, product_code = 0x07d43052)
> EtherCAT DEBUG 0: Creating slave configuration for 0:1,
> 0x00000002/0x07D43052.
> EtherCAT DEBUG 0 0:1: Attached slave 1.
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdos(sc = 0xf7072000, n_syncs
> = 4294967295, syncs = 0xf8d868e0)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_sync_manager(sc = 0xf7072000,
> sync_index = 0, dir = 1, watchdog_mode = 0)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_assign_clear(sc =
> 0xf7072000, sync_index = 0)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_assign_add(sc =
> 0xf7072000, sync_index = 0, pdo_index = 0x1600)
> EtherCAT DEBUG 0 0:1: Loading default mapping for PDO 0x1600.
> EtherCAT DEBUG 0 0:1: Found PDO name "Channel 1".
> EtherCAT DEBUG 0 0:1: Entry 0x7000:01.
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_clear(sc =
> 0xf7072000, pdo_index = 0x1600)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_add(sc =
> 0xf7072000, pdo_index = 0x1600, entry_index = 0x7000, entry_subindex =
> 0x01, entry_bit_length = 1)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_assign_add(sc =
> 0xf7072000, sync_index = 0, pdo_index = 0x1601)
> EtherCAT DEBUG 0 0:1: Loading default mapping for PDO 0x1601.
> EtherCAT DEBUG 0 0:1: Found PDO name "Channel 2".
> EtherCAT DEBUG 0 0:1: Entry 0x7010:01.
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_clear(sc =
> 0xf7072000, pdo_index = 0x1601)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_add(sc =
> 0xf7072000, pdo_index = 0x1601, entry_index = 0x7010, entry_subindex =
> 0x02, entry_bit_length = 1)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_assign_add(sc =
> 0xf7072000, sync_index = 0, pdo_index = 0x1602)
> EtherCAT DEBUG 0 0:1: Loading default mapping for PDO 0x1602.
> EtherCAT DEBUG 0 0:1: Found PDO name "Channel 3".
> EtherCAT DEBUG 0 0:1: Entry 0x7020:01.
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_clear(sc =
> 0xf7072000, pdo_index = 0x1602)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_add(sc =
> 0xf7072000, pdo_index = 0x1602, entry_index = 0x7020, entry_subindex =
> 0x03, entry_bit_length = 1)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_assign_add(sc =
> 0xf7072000, sync_index = 0, pdo_index = 0x1603)
> EtherCAT DEBUG 0 0:1: Loading default mapping for PDO 0x1603.
> EtherCAT DEBUG 0 0:1: Found PDO name "Channel 4".
> EtherCAT DEBUG 0 0:1: Entry 0x7030:01.
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_clear(sc =
> 0xf7072000, pdo_index = 0x1603)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_pdo_mapping_add(sc =
> 0xf7072000, pdo_index = 0x1603, entry_index = 0x7030, entry_subindex =
> 0x04, entry_bit_length = 1)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_sync_manager(sc = 0xf7072000,
> sync_index = 1, dir = 2, watchdog_mode = 0)
> ec_dc_rtai_sample: Registering PDO entries...
> EtherCAT DEBUG 0: ecrt_domain_reg_pdo_entry_list(domain = 0xf7934f40,
> regs = 0xf8d86400)
> EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf7b82000, alias
> = 0, position = 1, vendor_id = 0x00000002, product_code = 0x07d43052)
> EtherCAT DEBUG 0: Domain 0: Added 1 bytes, total 1.
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_reg_pdo_entry(index = 0x7000,
> subindex = 0x01, domain = 0, bytepos=0, bitpos=0)
> EtherCAT DEBUG 0 0:1: ecrt_slave_config_dc(sc = 0xf7072000,
> assign_activate = 0x0700, sync0_cycle = 1000000, sync0_shift = 440000,
> sync1_cycle = 0, sync1_shift = 0
> ec_dc_rtai_sample: Activating master...
> EtherCAT DEBUG 0: ecrt_master_activate(master = 0xf7b82000)
> EtherCAT 0: Domain0: Logical address 0x00000000, 1 byte, expected
> working counter 1.
> EtherCAT 0: Datagram domain0-0: Logical offset 0x00000000, 1 byte,
> type LWR.
> EtherCAT DEBUG 0: Stopping master thread.
> EtherCAT DEBUG 0: Master IDLE thread exiting...
> EtherCAT 0: Master thread exited.
> EtherCAT DEBUG 0: FSM datagram is f7b823f4.
> EtherCAT 0: Starting EtherCAT-OP thread.
> ec_dc_rtai_sample: Starting cyclic sample thread...
> ec_dc_rtai_sample: RT timer started with 8333/8334 ticks.
> ec_dc_rtai_sample: Initialized.
> EtherCAT DEBUG 0: Operation thread running with fsm interval = 4000
> us, max data size=45000
> EtherCAT WARNING 0: 1 datagram UNMATCHED!
> ec_dc_rtai_sample: 5 slave(s).
> ec_dc_rtai_sample: AL states: 0x02.
> ec_dc_rtai_sample: Link is up.
> EtherCAT DEBUG 0: Set application start time = 374589987757929000
> EtherCAT DEBUG 0: Configuration changed (aborting state check).
> EtherCAT DEBUG 0: Writing system time offsets...
> ec_dc_rtai_sample: Stopping...
> EtherCAT 0: Releasing master...
> EtherCAT DEBUG 0: ecrt_master_deactivate(master = 0xf7b82000)
> EtherCAT DEBUG 0: Stopping master thread.
> EtherCAT DEBUG 0: Master OP thread exiting...
> EtherCAT 0: Master thread exited.
> EtherCAT 0: Starting EtherCAT-IDLE thread.
> EtherCAT DEBUG 0: OPERATION -> IDLE.
> EtherCAT 0: Released.
> ec_dc_rtai_sample: Unloading.
> EtherCAT DEBUG 0: Idle thread running with send interval = 4000 us,
> max data size=45000
> EtherCAT DEBUG 0: UNMATCHED datagram:
> EtherCAT DEBUG: 0B CC 00 00 00 00 01 00 00 00 06 00 00
> EtherCAT 0: Master debug level set to 0.
>
>
>
> Thank you for your response!
>
best regards
Andreas
Mit freundlichem Gruß
Andreas Stewering-Bone
--
------------------------------------------------------------------------
Dipl.-Ing.(FH) Andreas Stewering-Bone
andreas.stewering-bone at igh-essen.com
Tel.: +49 201 / 36014-15
Ingenieurgemeinschaft IgH
Gesellschaft für Ingenieurleistungen mbH
Heinz-Bäcker-Str. 34
D-45356 Essen
Amtsgericht Essen HRB 11500
USt-Id.-Nr.: DE 174 626 722
Geschäftsführung:
- Dr.-Ing. S. Rotthäuser,
- Dr.-Ing. T. Finke,
- Dr.-Ing. W. Hagemeister
Tel.: +49 201 / 360-14-0
http://www.igh-essen.com
------------------------------------------------------------------------
More information about the Etherlab-users
mailing list