[etherlab-dev] EtherCAT :: generating voltageon BeckhoffEL4732terminal fails

Daniel Bechter daniel.bechter at omicron.at
Thu Apr 16 10:58:15 CEST 2009


> Try to specify all pdos and sm exactly as in the output of ethercat xml.
> Same order and the complete list of pdos.

Done so now. I added all PDO's and entries to the sync stucture now and in
the same order as in the XML. CycleCounter and Value are now swapped within
the data image.

const static ec_pdo_entry_reg_t domain1_regs[] = {
	{AnaOutSlavePos, Beckhoff_EL4732, 0x7000, 1, &off_ana_out}, //
channel 1 sample value
	{}
};

static ec_pdo_entry_info_t el4732_pdo_entries[] = {
	{0x7800, 1, 16}, // channel 1 cycle count
	{0x7000, 1, 16}, // channel 1 sample value
	{0x7800, 2, 16}, // channel 2 cycle count
	{0x7000, 2, 16}, // channel 2 sample value
	{0x1d09, 152, 32} // StartTimeNextOutput
};

static ec_pdo_info_t el4732_pdos[] = {
	{0x1680, 1, &el4732_pdo_entries[0]},
	{0x1600, 1, &el4732_pdo_entries[1]},
	{0x1780, 1, &el4732_pdo_entries[2]},
	{0x1700, 1, &el4732_pdo_entries[3]},
	{0x1a82, 1, &el4732_pdo_entries[4]}
};

static ec_sync_info_t el4732_syncs[] = {
	{0, EC_DIR_OUTPUT, 2, el4732_pdos},
	{1, EC_DIR_OUTPUT, 2, &el4732_pdos[2]},
	{2, EC_DIR_INPUT, 1, &el4732_pdos[4]},
    	{0xff}
};


All logs look fine, working counter 1/1, domain state 2, data is transmitted
(according to the data command). But still no voltage is generated by the
EL4732. Only one warning shows up in the syslog ("WARNING: 1 datagram
UNMATCHED"), but I have seen this at startup with other tasks that worked
correctly, too...

XML output from the command-line tool is attached to my first mail.


> In the your sylog output the working counter is 1/1 like expected??

Yes, the code from my first mail here is an example that worked concerning
PDO and SM configuration. But no voltage is generated by the EL4732.

I also added an analog-in terminal recently and it all ends up with a working
counter 2/3 and domain state 1. I can't find an error in my code, but I first
want to track down the problem with the analog-out terminal...



More information about the Etherlab-dev mailing list