<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">I’m not sure this makes sense.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Register 0x0012 is typically used for slave identification for slaves that have hardware switches of some kind to specify the desired alias. In almost all cases, these will have an SII alias of zero; as such it would be counterproductive
to skip reading them in that case. It is usually required to reboot the slave to change its id switch. (See “Explicit Device Identification” in ETG1020 for more info.)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the absence of devices that use such a hardware id selector, you should avoid using the –enable-regalias configuration option for improved scan performance.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For master-based changing of the alias (e.g. via the “ethercat alias” command), rebooting the slave is still required and (unless the slave implementation has chosen otherwise) will also be reflected in register 0x0012, so this will work
regardless of whether –enable-regalias is enabled or not.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I could perhaps understand a patch to instead only read register 0x0012 if the ESI alias
<b>is</b> zero (and trust the ESI alias otherwise), to perhaps allow changing the alias without rebooting. However the documentation is fairly clear that the reboot is not optional. Etherlab does bypass some of this requirement by only using the station address
(not the alias) on the wire, thus making it appear as if the device is answering to an alias change without a reboot, but it’s best not to rely on this sort of implementation detail.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">(A slave may also choose to implement CoE object 0x10E0, which allows updating 0x0012 without a reboot, but this is not mandatory.)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<span style="FONT-FAMILY: Gotham, Calibri, 'sans-serif'; COLOR: #231f20"><strong>Gavin Lambert<br></strong>
<br>
Senior Software Developer TOMRA Fresh Food<br>
<br>
</span><br>
<br><img style="HEIGHT: 45px; WIDTH: 192px" src="cid:TOMRA_CMYK_final_size_times_two_cd761a01-1d1f-446e-9316-8012271820b6.png" width="192" height="45" border="0">
<br>
<P
style="FONT-SIZE: 10pt; MARGIN-BOTTOM: 5pt; FONT-FAMILY: Arial; MARGIN-TOP: 0px"><IMG
border=0
src="cid:TOMRA_50th-Email_Signature_Food-08_ba63a226-17be-4b94-80e3-3f48ae3d72b3.jpg"></P> <A href="https://www.facebook.com/TOMRA.Food/" target=_blank><IMG
alt="tomra facebook" src="cid:TF-FB-icon_b77c57e4-4990-4f9d-b3a2-8e6ab45df7f2.jpg"
height=30></A> <A href="https://www.linkedin.com/company/tomra-food/"
target=_blank><IMG alt="tomra linkedin"
src="cid:TF-LinkedIn-icon_d54c4829-dcb9-450c-9187-34b26e85ebaa.jpg"
height=30></A> <A href="https://twitter.com/TOMRAFood" target=_blank><IMG
alt="tomra twitter"
src="cid:TF-twitter-icon_65c62d2e-772c-4a2c-97c5-d84fbfc204d5.jpg"
height=30></A> <A
href="https://www.youtube.com/playlist?list=PLDD3B1A7BAE919EC6"
target=_blank><IMG alt="tomra youtube"
src="cid:TF-Youtube-icon_8b2c830c-70d9-48da-a4db-db9191d346ba.jpg"
height=30></A> <A href="https://www.instagram.com/tomrafood/"
target=_blank><IMG alt="tomra instragram"
src="cid:TOMRAinstagram_45b30c55-490a-4f32-8fd3-998c152e3494.jpg"
height=30></A><BR><span style="FONT-SIZE: 75%; FONT-FAMILY: Calibri, Candara, Segoe, Optima, Arial, sans-serif; COLOR: #6e8186"> <b>Compac Technologies Ltd</b>
| 4 Henderson Place | PO Box 13 516 | Onehunga 1061 | New Zealand </span><br>
<p style="FONT-SIZE: 10pt; MARGIN-BOTTOM: 5pt; FONT-FAMILY: Arial; MARGIN-TOP: 0px"></p>
<span style="FONT-SIZE: 75%; FONT-FAMILY: Calibri, Candara, Segoe, Optima, Arial, sans-serif; COLOR: #6e8186"> Phone: +64 96 34 00 88 | <a href="https://www.compacsort.com">https://www.compacsort.com</a></span><br>
<span style="FONT-SIZE: 60%; FONT-FAMILY: Gotham, Calibri, 'sans-serif'; COLOR: #6e8186">The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication in error, please notify the sender and delete the communication. </span><br>
<span style="FONT-SIZE: 60%; FONT-FAMILY: Gotham, Calibri, 'sans-serif'; WIDTH: 75%; COLOR: #6e8186">
</span><div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Graeme Foot<br>
<b>Sent:</b> Tuesday, 13 December 2022 14:05<br>
<b>To:</b> etherlab-users@etherlab.org<br>
<b>Subject:</b> [Etherlab-users] Patch for --enable-regalias<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span lang="EN-NZ">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">I have attached a patch for the --enable-regalias option.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">--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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">The patch is based on mercurial revision 2679 (33b922ec1871) and the gavinl patchset 20171108.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">Graeme Foot.<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>