Dear Etherlab community, I have been using the EtherCAT master for a few days. I think I understand more or less how to configure the PDOs and domains for one or more slaves, but I'm having trouble with the distributed clock (DC). In particular, my setup is currently as follows: - master - Beckhoff EK1100 - Beckhoff EL2262
The latter is a digital output with oversampling capabilities. It can output a sample every Sync0, which in turn can be set to trigger faster than the application cycle. I used this slave successfully with other EtherCAT masters, so I know it is working properly. In my code I've set the PDOs using "ecrt_slave_config_pdos" and assigned them to the domain1 using "ecrt_slave_config_reg_pdo_entry". Then I've set this slave to be the reference clock using ecrt_master_select_reference_clock (master, sc); // Set this slave to be reference clock and finally I've set the DC settings (and Sync0/1) using "ecrt_slave_config_dc" (by the way, the AssignActivate data is 0x0730 for this slave). Then, for every application cycle I call, in order: - ecrt_master_application_time - ecrt_master_receive - ecrt_domain_process - check_domain1_state - ecrt_master_sync_reference_clock_to - ecrt_master_sync_slave_clocks - ecrt_domain_queue - ecrt_master_send The problems I see are: - the outputs are constantly OFF, even if I've set an alternating pattern of ON and OFF, - the slave stops at PREOP, - if I inspect the master from the cli using "ethercat master -v", I see that the reference clock is set to Slave 0, instead of Slave 1. Moreover, the DC reference time is set correctly every time I restart the application, but it does not update during execution. Conversely, the application time increase as expected - during " check_domain1_state", I see that the wc_state==EC_WC_ZERO (no process data exchanged) I am willing to share my code if it is required. Thank you for your help and, especially, thank you for providing such powerful software as open source. Best regards, Davide
-- Etherlab-users mailing list Etherlab-users@etherlab.org https://lists.etherlab.org/mailman/listinfo/etherlab-users