<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">The problem is that the downloads are not persistent and the PDO / Sync registers do not hold on power cycle…so the downloads need to happen every time on boot. Is it common practice to run the SDO downloads using the tool using a script on startup?</div><div class=""><br class=""></div><div class="">Going back to my original question, what is the difference is between running the etherlab tool to download SDO’s in which im <b class=""><i class="">not</i></b> getting the “Protocol not supported” error (which I have done and it re-assigns the PDO entries correctly which changes the output of the cstruct to match the Rev25 and below), and trying to do it from my software using the application library using ecrt_master_sdo_download() (pre-cyclic task / ecrt_domain_reg_pdo_entry_list()) which essentially uses the same code using the ioctl interface which is where I'm getting the “Protocol not supported” error?</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 5, 2018, at 7:30 PM, Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com" class="">gavin.lambert@tomra.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">Ok. So after you do that and rescan, check the output of “ethercat cstruct”. This should have changed to reflect the new configuration of the assignment registers (assuming that the slave actually did accept the downloads), and this is the data that you need to include in your application code<span class="Apple-converted-space"> </span><i class="">instead of</i><span class="Apple-converted-space"> </span>trying to explicitly write to the assignment registers. (Using the correct sequence in<span class="Apple-converted-space"> </span></span><span lang="EN-US" class="">ecrt_domain_reg_pdo_entry_list makes Etherlab do those same downloads internally during configuration.)</span><span class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><o:p class=""> </o:p></span></div><div style="border-style: none none none solid; border-left-width: 1.5pt; border-left-color: blue; padding: 0cm 0cm 0cm 4pt;" class=""><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span lang="EN-US" class="">From:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space"> </span>Derrill Vezina [<a href="mailto:dvezina@caroneng.com" class="">mailto:dvezina@caroneng.com</a>]<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, 6 July 2018 02:03<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com" class="">gavin.lambert@tomra.com</a>>; Derrill Vezina <<a href="mailto:vezinadj@gmail.com" class="">vezinadj@gmail.com</a>>; <a href="mailto:etherlab-users@etherlab.org" class="">etherlab-users@etherlab.org</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [etherlab-users] Failed to execute SDO download: Protocol not supported<o:p class=""></o:p></span></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Hi Gavin.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">I fully understand that this is a Beckhoff / integration issue and not anything to do with the master. I have been doing as you instructed and it has worked with different revisions with different PDO structures with a bunch of different cards up until this specific situation. Without getting too in depth with it, Beckhoff allowed setting two PDO’s originally including the period and duty cycle of the PWM wave output on the EL2502 for each channel. They decided on REV25+ that they were going to remove the period as a PDO and use it as an SDO. To fix this, Beckhoff has instructed a sequence of setting some startup SDO configuration registers that would set the PDO assignment back to the “old way” in which I have successfully done using the Etherlab tool using the following commands (only one card on the stack after starting the master):<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">./ethercat download --position 1 --type uint16 0x1C12 0x00 0x00<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">./ethercat download --position 1 --type uint8 0x1C13 0x00 0x00<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">./ethercat download --position 1 --type uint16 0x1C12 0x01 0x1602<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">./ethercat download --position 1 --type uint16 0x1C12 0x02 0x1603<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">./ethercat download --position 1 --type uint16 0x1C12 0x00 0x02<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">./ethercat rescan<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Everything works great after that sequence.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">I guess my confusion lies in the fact that the tool successfully downloads the PDO’s using the ioctl interface without getting a “Protocol not supported” error. Is there a reason why I would get a “Protocol not supported” error using the application interface library to do this (ecrt_master_sdo_download()) but not using the tool? Is the master state the problem?<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span lang="EN-US" style="font-size: 12pt;" class="">From:<span class="Apple-converted-space"> </span></span></b><span lang="EN-US" style="font-size: 12pt;" class="">etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">etherlab-users-bounces@etherlab.org</a>> on behalf of Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">gavin.lambert@tomra.com</a>><br class=""><b class="">Date:<span class="Apple-converted-space"> </span></b>Thursday, June 28, 2018 at 7:45 PM<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b>Derrill Vezina <<a href="mailto:vezinadj@gmail.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">vezinadj@gmail.com</a>>, "<a href="mailto:etherlab-users@etherlab.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">etherlab-users@etherlab.org</a>" <<a href="mailto:etherlab-users@etherlab.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">etherlab-users@etherlab.org</a>><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>Re: [etherlab-users] Failed to execute SDO download: Protocol not supported<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">You don’t need to perform explicit downloads of the PDO assignment or configuration registers at all, ever; they are managed internally by the master library. Simply use the combination of ecrt_slave_config_pdos and ecrt_domain_reg_pdo_entry_list as shown in the examples. You can use “ethercat cstruct” to generate the required data structures for these calls. (In some cases or for particular slaves, eg. with overlapping or repeated PDOs, you might need to do something a little more complicated, but that is rare.)<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">If you have slaves with different revisions, note that different structures may be required for each revision, if the PDO layout has been changed.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">If the slave does not support CoE (which is what the “protocol not supported” error implies) then it is not possible to alter the slave’s PDO assignment – it has a manufacturer-defined fixed setup. You must make sure that the configuration and assignment defined in your application matches this, by using those APIs mentioned above.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div><div style="border-style: none none none solid; border-left-width: 1.5pt; border-left-color: blue; padding: 0cm 0cm 0cm 4pt;" class=""><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span lang="EN-US" class="">From:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space"> </span>Derrill Vezina<br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, 29 June 2018 01:40<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span><a href="mailto:etherlab-users@etherlab.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">etherlab-users@etherlab.org</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>[etherlab-users] Failed to execute SDO download: Protocol not supported<o:p class=""></o:p></span></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Hi,<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 12pt;" class=""> </span><span lang="EN-US" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">I am currently using a Beckhoff EL2502 PWM output card with the Etherlab 1.5.2 master using the generic ethernet driver. On startup, I am trying to set a PDO assignment SDO register using ecrt_master_sdo_download() and am getting an error back “Failed to execute SDO download: Protocol not supported”.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">I am not able to set a PDO assignment SDO registers using the ecrt_slave_config_sdoX() calls…which from my reading of other mailing list posts is only used for configuration registers.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">In turn, I was able to use the Ethercat Etherlab tool and change the PDO mapping so I assumed it is available from the application interface since they use the same calls (ioctl interface)<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Beckhoff changed the firmware on the card and I’m trying to reassign the PDO’s to the old mappings… this isn’t the first time I’ve run into this problem so I'm looking for a solution for all cards that would have this problem. Ideally, id like to do it through the application interface and avoid running a script on startup that uses the tool.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Has anyone has success with doing this type of transaction?<o:p class=""></o:p></span></div></div></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">etherlab-users mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:etherlab-users@etherlab.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">etherlab-users@etherlab.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="http://lists.etherlab.org/mailman/listinfo/etherlab-users" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://lists.etherlab.org/mailman/listinfo/etherlab-users</a></div></blockquote></div><br class=""></div></body></html>