[etherlab-users] Assigning Dynamic PDOs

Fabian Herb fabian.herb at indurad.com
Wed May 5 17:08:15 CEST 2010


Hi!

Thanks a lot for your answer!

Am Mittwoch 05 Mai 2010 15:38:36 schrieb Florian Pose:
> On Mon, May 03, 2010 at 06:44:48PM +0200, Fabian Herb wrote:
> > I have a little problem with a slave generating dynamic PDOs. I get
> > warnings like this:
> >
> > EtherCAT WARNING: Slave 5 does not support assigning PDOs!
> > EtherCAT WARNING: Currently assigned PDOs: (none). PDOs to assign: 0x1A85
> > 0x1A00
> > EtherCAT WARNING: Slave 5 does not support assigning PDOs!
> > EtherCAT WARNING: Currently assigned PDOs: (none). PDOs to assign: 0x1600
> 
> This means, that the master read out the PDO assignment and there are no
> PDOs assigned. But the slave tells the master via the SII (check
> 'ethercat slave -v'), that the PDO assignment can't be changed. This is
> bad. ;-)
> 
> Could it be, that the slave *supports* changing the PDO assignment?

"ethercat slave -v" contains "Enable PDO Assign: no", but the documentation of 
the slave (Beckhoff EL6751) could be understood in a way where PDO assignment 
should be allowed, so maybe you're right. Perhaps I should contact Beckhoff on 
that matter.

However the PDO assignment seems to be correctly generated by the slave, just 
a little late.

> 
> > And the whole process data for this slave is all zeroes.
> >
> > However when I look at SDOs 0x1c12 and 0x1c13, in which PDO assignment is
> > configured, they contain the correct PDO indices.
> 
> This is strange. Please try to switch the slave on while the master is
> loaded and check 'ethercat pdos'. Then unload the master, load it again
> and check 'ethercat pdos' again.

This in any case returns:
SM0: PhysAddr 0x1800, DefaultSize  558, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1a2e, DefaultSize  558, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1000, DefaultSize    0, ControlRegister 0x26, Enable 1
SM3: PhysAddr 0x1400, DefaultSize    0, ControlRegister 0x22, Enable 1

I think I should have been more precise on this one: the values in 0x1c12 and 
0x1c13 are zero until my application has sent the configuration to the slave 
and run a few seconds. When the LEDs on the slave suggest that everything went 
OK, the correct values appear. When my application exits, the values are zero 
again. The output of "ethercat pdos" is the same all the time.

> 
> > I suppose the EtherLab master reads the PDO assignment before it gets
> > generated by the slave. Is this likely to be the cause for the process
> > data to be zero? Or do I have to look somewhere else?
> 
> All-zero process data may be perfectly valid. You can monitor the
> validity via ecrt_domain_state() (or command-line: 'ethercat domain').

"ethercat domain" shows:
Domain0: LogBaseAddr 0x00000000, Size 241, WorkingCounter 5/5

> > I have pasted a full debug output here:
> > http://pastebin.de/pastebin.php?dl=6058
> 
> A few comments to your log file:
> 
> - Why do you call ecrt_master_slave_config() for the same configuration
>   hundereds of times?

This is caused by the architecture of my application. To simplify things: I 
have functions which take a slave address as parameter. Is there a problem in 
calling ecrt_master_slave_config() so often? I could probably cache the result 
easily.

> - When using ecrt_slave_config_pdo_*_add() you should first call
>   ecrt_slave_config_pdo_*_clear(), to be sure, that no objects are
>   mapped/assigned before.

I'm not sure if I already tried this out, so I'll do that. Thanks!

Best regards,
Fabian Herb

-- 
________________________________________
Fabian Herb
Embedded Software Development

indurad GmbH
The Industrial Radar Company

Lochnerstrasse 4-20
52064 Aachen, Germany
Tel: +49 241 80 968 71

fabian.herb at indurad.com
http://www.indurad.com/
_______________________________________



More information about the Etherlab-users mailing list