[etherlab-users] Set alias adress

Florian Pose fp at igh-essen.com
Tue Feb 2 10:58:39 CET 2010


Hello,

On Mon, Feb 01, 2010 at 03:54:50PM +0100, diplomarbeiter1 wrote:
> i am trying to set an alias adresses of some Beckhoff modules. The
> Ethercat bus has got 7 slaves, all wtih alias adress 0.  Now i try
> e.g. to set the alias of slave no. 4 to 3. I use the Command-line Tool
> and write: ethercat alias -p4 3 But this comand will write the alias 3
> to all slaves behind the position 4. I can change a single alias with
> following command: ethercat alias -a4 55 but only when all Slaves have
> a single alias adress. 
>
> My Question now, is it possible to set  a single alias if all modules
> of the bus has the alias 0 using the Command-line Tool or the
> functions of ecrth.h?

Yes, this is what you are already doing. The output of „ethercat slaves“
displays a combined alias/relative position (see „ethercat slaves -h“):

$ ethercat alias -p4 3
$ ethercat sl
0  0:0  OP     +  EK1100 Ethernet Kopplerklemme (2A E-Bus)
1  0:1  OP     +  EL6002 Schnittstelle (RS232)
2  0:2  OP     +  EL6002 Schnittstelle (RS232)
3  0:3  OP     +  EL6002 Schnittstelle (RS232)
4  3:0  OP     +  cSI71A 2K. Ser. Schnittstelle (RS232)
5  3:1  PREOP  +  cAO71B 2K. Ana. Ausgang +/-10V

Only slave 4 has an alias set, all following slaves could be addressed
relatively to that slave. The numbers around the colon are the possible
„alias“ and „position“ arguments of ecrt_master_slave_config() (see API
doc, and the section „Slave Adressing“ in the PDF doc).

-- 
Best regards,
Florian Pose

http://etherlab.org



More information about the Etherlab-users mailing list