[etherlab-users] EtherCAT :: Problems with EL4732 and EL3702 distribuited clock

Guido guithercat at gmail.com
Wed Jul 25 15:57:01 CEST 2012


Hi,
    I tried using the ecrt_master_sync_slave_clocks(master) function 
after ecrt_master_sync_reference_clock(master) but the flickers appear 
to increase. It also seems that there might be interference with the 
movement of the mouse.
     Please, can anyone send me a sample code to try out a square wave 
on these devices, perhaps even using SOEM to compare if there are 
problems with both EtherCAT master.

  Thanks.
   Guido

Il 24/07/2012 15:11, Bilko AS, Oguz Dilmac ha scritto:
> Hi,
>
> Did you try using ecrt_master_sync_slave_clocks(master) function after 
> ecrt_master_sync_reference_clock(master)?
>
> Best regards,
> Oguz.
>
> 23.07.2012 17:13 tarihinde, Guido yazdı:
>> Hello everybody,
>> my name is Guido and I am evaluating the EtherLab EtherCAT-Master.
>> I've just done some simple tests and everything is working properly. 
>> I have instead some problems regarding Beckhoff EL4732 and EL3702 
>> modules. Looking the mailing lists I was able to send an output 
>> voltage value and to read it with the input module. However I have a 
>> problem: when I set the output like a square wave I have periodically 
>> (after about 10 seconds) a lost of synchronism, visible on the 
>> oscilloscope like a flicker of the square wave . The task that I have 
>> written is a simple real-time tasks (under rtai) with a periodicity 
>> of 1 ms (which I have checked).
>> I made the setting of the Distributed clock (without oversampling) ​​ 
>> with the instructions:
>>
>> ecrt_slave_config_dc(sc_ana_out, 0x0730, 1000000, 0, 0, 0); //1ms 
>> (EL4732)
>> ecrt_slave_config_dc(sc_ana_in, 0x0730, 1000000, 0, 0, 0); //1ms 
>> (EL3702)
>>
>> while in the cycle run:
>>
>> while(1) {
>> ecrt_master_receive(master);
>> ecrt_domain_process(domain1);
>>
>> blink=!blink;
>>
>> if(blink) ch1_volt=0x3FFF;
>> else ch1_volt=0;
>>
>> EC_WRITE_S16(domain1_pd+off_el4732_ch1, ch1_volt);
>> EC_WRITE_S16(domain1_pd+off_el4732_cc1, 0)
>>
>> tv.tv_usec +=1000;
>> if (tv.tv_usec>=1000000) {
>> tv.tv_usec -=1000000;
>> tv.tv_sec++;
>> }
>> ecrt_master_application_time(master, EC_TIMEVAL2NANO(tv));
>> ecrt_master_sync_reference_clock(master)
>>
>> ecrt_domain_queue(domain1);
>> ecrt_master_send(master);
>>
>> rt_task_wait_period();
>> }
>>
>> Does anyone tell me where is the problem?
>> I also tried to follow the same steps with the SOEM master, setting 
>> the Distribuited Clock with the ec_dcsync01 and the ec_configdc() 
>> func. but in this case I can not see the output voltage on the module.
>>
>> Can anyone help me to solve these problems?
>> Thank you so much.
>> Guido
>> _______________________________________________
>> etherlab-users mailing list
>> etherlab-users at etherlab.org
>> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>




More information about the Etherlab-users mailing list