[etherlab-users] Etherlab example mini module

Thomas Elste thomas.elste at imms.de
Mon Jul 16 10:24:05 CEST 2007


Hi Philipp,

> I am using a chip called netX from hilscher (www.hilscher.com). It is
> working correctly when I connect it to a TwinCAT Master (the EtherCAT
> software from Beckhoff).
I'm trying to use a netX (cifX-Re-50 PCI card) with the Etherlab master,  
too.
So far I've encountered several problems, with this non Beckhoff component:

1. After scanning the bus, the master tries to read the netX eeprom.  
Therefor
it reads the eeprom sequentially until the data word gets 0xffff. Problem  
is,
this never happens with the netX. So the master reads, and reads ...
I've fixed this quick and dirty by assigning a fixed eeprom size.

2. After the eeprom data has been read, the master tries to scan the data  
and
find out the slaves configuration (syncmanager config, pdos, etc.). But
except vendor id, product code and some other numbers, the netX eeprom
doesn't contain any configuration data. TwinCat uses the xml file delivered
with the netX to configure it as slave. The Etherlab master seems to depend
on the eeprom content.
I've fixed this by generating the eeprom content for the netX manually and
copy it after the scan into the masters data structure (very quick and  
dirty,
indeed).

3. The biggest problem, so far. The netX Ethercat firmware seems to  
understand
just LRD/LWR (logical read and logical write) datagrams (note the
UseLrdLwr="1" in the xml file). Whereas the master uses the LRW (logical
read/write) datagram (combined) type. So after fixing problem 1 and 2 , the
netX gets configured, but I was not able to exchange any process data. I've
get this to work by assigning two domains to the netX (one for input one  
for
output) and use the appropriate datagram type within the master (also a  
quick
hack).

4. To change the slaves status, TwinCat writes the AL control register  
always
with the ERR_ACK bit set, without worrying. The Etherlab master doesn't.  
This
causes the state change not always carried out by the netX. I've changed  
this,
too.

All in all, tracking this problems down I'm now able to exchange process  
data
with the netX on a one master - one slave bus. Mailboxes, CoE or EoE, I've
not even tought about, yet.

I'm not sure howto come up with a definite solution for the problems.  
Problem
1 could be easily solved, with the master checking for a maximum eeprom  
size
to scan (or a configured eeprom size in the slave db). Problem 2 needs  
either
Hilscher to change to netX firmware, so that it contains the correct config
data. Or the master has to be enhanced with a way to configure the slaves
manually (enhanced slave db?, xml parser?).
Problem 3 needs either also the netX firmware to be changed in  
understanding
LWR datagrams. Or the master, so it could use LRD/LWR (I don't think LWR is
mandatory for slaves to understand (?)).

I would be happy, if someone from the developers could comment on this,  
too.


Best regards
Thomas



PS: my slave0/info for the netX:

Name:
Vendor ID: 0x00000044
Product code: 0x6E657478

State: PREOP (PREOP)
Flags: online, ok
Ring position: 0
Advanced position: 0:0
Coupler: no
Current consumption: 0 mA

Data link status:
   Port 0 (unknown (255)) Link down, Loop closed, No signal
   Port 1 (unknown (255)) Link up, Loop open, Signal detected
   Port 2 (unknown (255)) Link down, Loop closed, No signal
   Port 3 (unknown (255)) Link down, Loop closed, No signal

Sync-Managers:
   0: 0x1000, length 128, control 0x26, enable
   1: 0x1100, length 128, control 0x22, enable
   2: 0x1200, length 4, control 0x64, enable
   3: 0x1400, length 4, control 0x20, enable

PDOs:
   RXPDO "wOut0" (0x1A00), Sync-Manager 2
     "Output" 0x2003:1, 32 bit
   TXPDO "wIn0" (0x1600), Sync-Manager 3
     "Input" 0x2004:1, 32 bit



More information about the Etherlab-users mailing list