[Etherlab-users] Patch for --enable-regalias

Graeme Foot Graeme.Foot at touchcut.com
Tue Dec 13 02:04:31 CET 2022


Hi,

I have attached a patch for the --enable-regalias option.

--enable-regalias enables reading slave aliases from register 0x0012.  When enabled all slaves read 0x0012, replacing any alias value read from the SII.  However, if you set a new alias on a slave (with the "ethercat alias" function) the 0x0012 register is not updated (and is readonly to the master so can't be).  This requires the slave to be repowered/restarted for the register to update.  So if you restart the master without repowering/restarting the slave, the master will read the old alias from the 0x0012 register.

The patch will now only read register 0x0012 if the SII alias is non-zero.  This slightly shortens the slave scan for most slaves (that have aliases) and allows the master to use the correct alias on restart.  However, if you are resetting the alias (setting it to zero) the slave will still require a repower/reset.

Note you shouldn't be setting aliases via the "ethercat alias" function on slaves with dials/dipswitches, or slaves that only support 0x0012 (and not SII aliases), so we can ignore any issues these slaves could have.

The patch is based on mercurial revision 2679 (33b922ec1871) and the gavinl patchset 20171108.


Regards,
Graeme Foot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20221213/77f87cd5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Only-read-alias-from-0x0012-reg-if-SII-alias-is-zero.patch
Type: application/octet-stream
Size: 2658 bytes
Desc: 0001-Only-read-alias-from-0x0012-reg-if-SII-alias-is-zero.patch
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20221213/77f87cd5/attachment.obj>


More information about the Etherlab-users mailing list