[etherlab-users] further investigations on NetX500 slave
Florian Pose
fp at igh-essen.com
Mon Mar 3 11:01:38 CET 2008
Hi,
On Sat, Mar 01, 2008 at 02:04:27AM +0100, Phil Sutter wrote:
> Last few days I was digging through the slave-scanning and SII parts of
> the master code, because SII_DEBUG shows that even the first read
> request (getting the first category header) failed.
> Besides, I managed to get some EEPROM dumps via TwinCAT. This one is
> quite usable:
>
> | 0000000 0180 0001 0000 0f00 0000 0000 0000 88a4
> | 0000010 0044 0000 656e 7874 0001 0003 0000 0000
> | 0000020 0000 0000 0000 0000 0000 0000 0000 0000
> | 0000030 1000 0080 1100 0080 0000 0000 0000 0000
> | 0000040 0000 0000 0000 0000 0000 0000 0000 0000
> | *
> | 0000070 0000 0000 0000 0000 0000 0000 0000 0001
> | 0000080
>
> my documentation states that the product code is at offset 0x14, and the
> configuration I have for TwinCAT says it's 0x7874656E. As this matches
> (somehow), I started playing around with ec_fsm_sii_state_start_reading().
The product code is at word address 0x000A, what fits to your contents.
> What's strange here is my documentation states bytes 0x504-0x507 are for
> specifying the EEPROM address to read/write from/to. But the function
> mentioned above uses only two bytes for the address. Is this intended?
What kind of document do you mean? The EtherCAT Data Link Protocol
Specification (IEC 61158-4-12 FDIS 08/07, p. 12078, table 50) states,
that registers 504--505 shall contain the 16-bit word address.
Registers 506--507 are not mentioned in the description of the SII
interface.
Though: Figure 44 on page 12103 mentions the SII address as to be read
from registers 0x0504--0x0507. Strange. I will be on the ETG technical
committee meeting on Wednesday, and I will ask someone... ;-) Though I
think, that this is deprecated.
> I remember once getting some quite usable identification information
> (like "0x00007874" or something for the product code) after
> accidentially implementing buggy code, so I guess there _is_ EEPROM
> data, and it does have some usable information.
>
> Another thing is the EC_WRITE_U16 macro. Having a word offset of 0x40,
> the resulting SII payload is:
> | 80 01 40 00
> which should be little endian, but actually isn't.
These are the bytes written to the registers 0x0502--0x0505, and the
word address 0x0040 will be 0x40 0x00 in little endian, what makes your
values perfectly valid.
I still don't know, what's the problem with the netX slave. You say, the
reading of the SII fails. Could you post the log messages with SII_DEBUG
enabled?
I have never had such a slave available for testing. What people told me
up to now is:
- The slave does not support the LRW datagram. This is completely ok,
because the EtherCAT standard is designed for this. The master 1.4
will supported it.
- The slave has no 'real' EEPROM, but an emulated one. This is ok too,
because the slave just has to implement the SII correctly. Though I
heard, that writing is not supported, which is a pity, if mandatory
SII data are missing.
> PS: is there any way to getting information about EtherCAT (especially
> SII structure) without becoming an ETG member?
AFAIK no, but becoming an ETG member is easy and free of charge... ;-)
--
Best regards,
Florian Pose
http://etherlab.org
More information about the Etherlab-users
mailing list