<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; } @font-face { font-family: "Cambria Math"; } @font-face { font-family: Calibri; } @font-face { font-family: Consolas; } p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; } a:link, span.MsoHyperlink { color: rgb(5, 99, 193); text-decoration: underline; } a:visited, span.MsoHyperlinkFollowed { color: rgb(149, 79, 114); text-decoration: underline; } pre { margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: "Courier New"; } span.HTMLPreformattedChar { font-family: Consolas; } p.msochpdefault, li.msochpdefault, div.msochpdefault { margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; } span.emailstyle17 { font-family: Calibri, sans-serif; color: windowtext; } span.spelle { } span.EmailStyle23 { font-family: Calibri, sans-serif; color: rgb(31, 73, 125); } span.EmailStyle24 { font-family: Calibri, sans-serif; color: rgb(31, 73, 125); } span.SpellE { } .MsoChpDefault { font-size: 10pt; } @page WordSection1 { margin: 72pt; } div.WordSection1 { }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Dear Gavin,</span></p>
<p class="MsoNormal"><span style="color:#1F497D"><br>
</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thank you very, very much for your help!</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">According to the manual of my slave I should be able to map
</span><span lang="EN-NZ" style="color:navy">0x2058 to PDO. What is puzzling me is that it seems that I have done that, using the following series of console commands:</span></p>
<p class="MsoNormal"><span lang="EN-NZ" style="color:navy"><br>
</span></p>
<p class="MsoNormal"><span lang="EN-NZ" style="color:navy"> </span></p>
<div>sudo ethercat download -a 0 0x1a00 00 0x00<br>
</div>
<p class="MsoNormal"><span lang="EN-NZ" style="color:navy"><br>
</span></p>
<div>sudo ethercat download -a 0 0x1a00 01 0x20580010<br>
</div>
<div><br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">sudo ethercat download -a 0 0x1a00 00</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"> 0x0</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">​2</span></div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Now polling the slave with:</span></div>
<div><br>
</div>
<p class="MsoNormal" style=""><span class="SpellE"><span lang="EN-NZ" style="font-size:12.0pt; color:black">sudo</span></span><span lang="EN-NZ" style="font-size:12.0pt; color:black">
<span class="SpellE">ethercat</span> upload -a 0 0x1a00 01</span></p>
<p class="MsoNormal" style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"><br>
</span></p>
<p class="MsoNormal" style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">gives me:</span></p>
<p class="MsoNormal" style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"><br>
</span></p>
<div>0x20580010 542638096<br>
</div>
<div><br>
</div>
<div>However, if I execute ethercat cstruct -a 0, the field corresponding to 0x1a00 01 is still:<br>
</div>
<div><br>
</div>
<div>{0x6041, 0x00, 16}<br>
</div>
<div><br>
</div>
<div>which was the previous value.<br>
</div>
<div><br>
</div>
<div>Running the ecrt_slave_config_pdos changes nothing in the slave config, as inspected later on by sudo ethercat upload.<br>
</div>
<div>But do I understand correctly, that it should alter the configuration of the slave automatically, using the slave config, to the mapping I specified ealier in the file? Or do I have to run ecrt_master_activate(master) first so that all my actions are implemented?<br>
</div>
<div><br>
</div>
<div><br>
I thought that all of this might also be caused by ec_slave_config_t passed on to ecrt_slave_config_pdos not being correct. I tried to dereference and output it, after it was generated by ecrt_master_slave_config, but I failed to compile such code.<br>
</div>
<div><br>
This realisation was brought to me, as command:<br>
</div>
<div><br>
</div>
<div>sudo ethercat config <br>
</div>
<div><br>
</div>
<div>gives no visible output for any for my slaves.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I will be grateful for any more feedback.<br>
</div>
<div><br>
</div>
<div>Yours sincerely,<br>
</div>
<div>Jakub Sikorski<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<br>
</div>
<p class="MsoNormal" style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"><br>
</span></p>
<p class="MsoNormal"><span lang="EN-NZ" style="color:navy"> </span></p>
<p class="MsoNormal"><span> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a name="_MailOriginal"><b><span lang="EN-US" style="">From:</span></b></a><span style=""><span lang="EN-US" style=""> Gavin Lambert [mailto:gavinl@compacsort.com]
<br>
<b>Sent:</b> <span class="SpellE">woensdag</span> 15 <span class="SpellE">juni</span> 2016 1:31<br>
<b>To:</b> Sikorski, J. (CTW) <j.sikorski@utwente.nl><br>
<b>Cc:</b> etherlab-users@etherlab.org<br>
<b>Subject:</b> RE: [<span class="SpellE">etherlab</span>-users] I cannot proceed with configuration of PDOs using
<span class="SpellE">Libethercat</span>.</span></span></p>
</div>
</div>
<p class="MsoNormal"><span style=""> </span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="">Hi </span></span><span style=""><span lang="EN-NZ" style="font-size:12.0pt">Jakub,</span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt"> </span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt">Most
<span class="SpellE">EtherCAT</span> slaves do not allow you to arbitrarily remap the contents of PDOs (the entries in the
<span class="SpellE"><span style="color:black">ec_pdo_entry_info_t</span></span><span style="color:black">); only to select between different predefined groups of PDOs via the
<span class="SpellE">ec_pdo_info_t</span>.  Some don’t support even that and just have a fixed layout (especially devices that don’t support
<span class="SpellE">CoE</span>).</span></span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Have a look in the manual for your slave device to see what combinations it supports.  Also note that indexes outside the 0x6000 or 0xA000 range are rarely available
 to be mapped as PDOs; you may need to access it as an SDO instead.  If this is for a one-time
<span class="SpellE">startup</span> configuration setting rather than for cyclic data, then look at the
<span class="SpellE">ecrt_slave_config_sdo</span>* family of functions.</span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Another thing that you can look at is to look in the syslog after running your application; if you’re trying to change a PDO and the device does not support this then
 it should log a warning.  You might need to set “<span class="SpellE">ethercat</span> debug 1” before running your application – this includes quite a bit of extra detail about the slave configuration process.</span></span><span style=""><span lang="EN-NZ" style=""></span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:#1F497D"> </span></span></p>
<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" style=""><span style=""><b><span lang="EN-US" style="">From:</span></b></span><span style=""><span lang="EN-US" style="">
<span class="SpellE">etherlab</span>-users [</span></span><a href="mailto:etherlab-users-bounces@etherlab.org"><span style=""><span lang="EN-US" style="">mailto:etherlab-users-bounces@etherlab.org</span></span><span style=""></span></a><span style=""><span lang="EN-US" style="">]
<b>On Behalf Of </b></span></span><a href="mailto:j.sikorski@utwente.nl"><span style=""><span lang="EN-US" style="">j.sikorski@utwente.nl</span></span><span style=""></span></a><span style=""><span lang="EN-US" style=""><br>
<b>Sent:</b> Wednesday, 15 June 2016 06:40<br>
<b>To:</b> </span></span><a href="mailto:etherlab-users@etherlab.org"><span style=""><span lang="EN-US" style="">etherlab-users@etherlab.org</span></span><span style=""></span></a><span style=""><span lang="EN-US" style=""><br>
<b>Subject:</b> [<span class="SpellE">etherlab</span>-users] I cannot proceed with configuration of PDOs using
<span class="SpellE">Libethercat</span>.</span></span></p>
</div>
</div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style=""> </span></span></p>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black">Dear <span class="SpellE">
<span class="spelle">EtherLab</span></span> Users,</span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black"> </span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black"> </span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black">I installed the
<span class="SpellE">IgH</span> <span class="SpellE">EtherCAT</span> master, and to educate myself how to implement the communication, I set up a small network comprising of
<span class="SpellE">IgH</span> master and one <span class="SpellE">Technosoft</span> Motion iPOS4808 drive.</span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black"> </span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black">The ./<span class="SpellE">ethercat</span> slaves command detects it.</span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black"> </span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black">The ./<span class="SpellE">ethercat</span>
<span class="SpellE">cstruct</span> gives me the following configuration:</span></span></p>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="color:black"> </span></span></p>
<div>
<p class="MsoNormal"><span style=""><span class="SpellE"><span lang="EN-NZ" style="font-size:12.0pt; color:black">ec_pdo_entry_info_t</span></span></span><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> slave_0_pdo_entries[] = {</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x6040, 0x00, 16},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x607a, 0x00, 32},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x6041, 0x00, 16},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x6064, 0x00, 32},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x6077, 0x00, 16},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x60f4, 0x00, 32},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x60fd, 0x00, 32},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">};</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span class="SpellE"><span lang="EN-NZ" style="font-size:12.0pt; color:black">ec_pdo_info_t</span></span></span><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> slave_0_pdos[] = {</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x1600, 2, slave_0_pdo_entries + 0},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x1a00, 3, slave_0_pdo_entries + 2},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0x1a01, 2, slave_0_pdo_entries + 5},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">};</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span class="SpellE"><span lang="EN-NZ" style="font-size:12.0pt; color:black">ec_sync_info_t</span></span></span><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> slave_0_syncs[] = {</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_DISABLE},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {3, EC_DIR_INPUT, 2, slave_0_pdos + 1, EC_WD_DISABLE},</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">    {0xff}</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">};</span></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Now I want to use C++ functions, to change the value outputted at 0x1a00 x02 to the object 0x2058 x00 with size 16 bit.</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Hence, based on the
<span class="SpellE">cstruct</span> file, as well as ~/ethercat-1.5.2/example/user/<span class="SpellE">main.c</span> , I write the following code (spread over
<span class="SpellE">main.h</span> and main.cpp) to achieve this.</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<pre><span style=""><span lang="EN-NZ" style="color:navy">#include</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">"<span class="SpellE">auxfun.h</span>"</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:green">//</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">Application</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">parameters</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:navy">#define</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">FREQUENCY</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">100</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:navy">#define</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">PRIORITY</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:green">//</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">Optional</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">features</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:navy">#define</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">CONFIGURE_PDOS</span></span><span style=""><span lang="EN-NZ" style="color:silver">  </span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:navy">#define</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">SDO_ACCESS</span></span><span style=""><span lang="EN-NZ" style="color:silver">      </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:green">//</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:green">EtherCAT</span></span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_master_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">*master</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">NULL</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_master_state_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">master_state</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{};</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_domain_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">*domain1</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">NULL</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_domain_state_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">domain1_state</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{};</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_slave_config_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">*sc_iPOS0</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">NULL</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_slave_config_state_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">sc_iPOS0_state</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{};</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:green">//</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">Timer</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:olive">unsigned</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:olive">int</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">sig_alarms</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:olive">unsigned</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:olive">int</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">user_alarms</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:green">/****************************************************************************/</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:green">//</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">process</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">data</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">uint8_t</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">*domain1_pd</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">NULL</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:navy">#define</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:navy">AxisBotPos</span></span></span><span style=""><span lang="EN-NZ" style="color:silver">  </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">//Bottom</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">frame</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:green">iPOS</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">Alias</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:navy">#define</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">IPOS4808BX_CAT</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x000001a3</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x019f418d</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">//</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">Vendor</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">ID,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">Product</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">Code</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:olive">const</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:olive">static</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_pdo_entry_reg_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">domain1_regs[]</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:navy">AxisBotPos</span></span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver">  </span></span><span style=""><span lang="EN-NZ" style="color:navy">IPOS4808BX_CAT</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x6060</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">&off_iPOS0_Rx},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:navy">AxisBotPos</span></span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver">  </span></span><span style=""><span lang="EN-NZ" style="color:navy">IPOS4808BX_CAT</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x2058</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">&off_iPOS0_Tx},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{}</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black">};</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:green">//</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">Analog</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">in</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">--------------------------</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_pdo_entry_info_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_pdo_entries[]</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x6040</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">16</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x6060</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">8</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x6041</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">16</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x2058</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">16</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x6077</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">16</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x60f4</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">32</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x60fd</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0x00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">32</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black">};</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_pdo_info_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_pdo[]</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x1600</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">2</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_pdo_entries</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">+</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x1a00</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">3</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_pdo_entries</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">+</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">2</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0x1a01</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">2</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_pdo_entries</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">+</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">5</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black">};</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">ec_sync_info_t</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_syncs[]</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:purple">EC_DIR_OUTPUT</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">NULL</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:purple">EC_WD_DISABLE</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:purple">EC_DIR_INPUT</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">NULL</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:purple">EC_WD_DISABLE</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">2</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:purple">EC_DIR_OUTPUT</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_pdo</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">+</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:purple">EC_WD_DISABLE</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">3</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:purple">EC_DIR_INPUT</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">2</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_pdo</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">+</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:purple">EC_WD_DISABLE</span></span><span style=""><span lang="EN-NZ" style="color:black">},</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span><span style=""><span lang="EN-NZ" style="color:navy">0xff</span></span><span style=""><span lang="EN-NZ" style="color:black">}</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black">};</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:navy">#include</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">"<span class="SpellE">main.h</span>"</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:green">/****************************************************************************/</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:olive">int</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">main(</span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:olive">int</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">argc</span></span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:olive">char</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">**<span class="SpellE">argv</span>)</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black">{</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="font-family:"Cambria Math",serif; color:black">​​</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:olive">struct</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:purple">itimerval</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">tv</span></span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">master</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">ecrt_request_master</span></span></span><span style=""><span lang="EN-NZ" style="color:black">(</span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">);</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:olive">if</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">(!master)</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">        </span></span><span style=""><span lang="EN-NZ" style="color:olive">return</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">-</span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="font-family:"Cambria Math",serif; color:black">​</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">domain1</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">ecrt_master_create_domain</span></span></span><span style=""><span lang="EN-NZ" style="color:black">(master);</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:olive">if</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">(!domain1)</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">        </span></span><span style=""><span lang="EN-NZ" style="color:olive">return</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">-</span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:olive">if</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">(!(sc_iPOS0</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">=</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">ecrt_master_slave_config</span></span></span><span style=""><span lang="EN-NZ" style="color:black">(</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">                    </span></span><span style=""><span lang="EN-NZ" style="color:black">master,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:navy">AxisBotPos</span></span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">IPOS4808BX_CAT</span></span><span style=""><span lang="EN-NZ" style="color:black">)))</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">        </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">fprintf</span></span></span><span style=""><span lang="EN-NZ" style="color:black">(<span class="SpellE">stderr</span>,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">"Failed</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">to</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">get</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">slave</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">configuration.\n"</span></span><span style=""><span lang="EN-NZ" style="color:black">);</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">        </span></span><span style=""><span lang="EN-NZ" style="color:olive">return</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">-</span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">}</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">printf</span></span></span><span style=""><span lang="EN-NZ" style="color:black">(</span></span><span style=""><span lang="EN-NZ" style="color:green">"Configuring</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">PDOs...\n"</span></span><span style=""><span lang="EN-NZ" style="color:black">);</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:olive">if</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">(<span class="SpellE">ecrt_slave_config_pdos</span>(sc_iPOS0,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">4</span></span><span style=""><span lang="EN-NZ" style="color:black">,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">iPOS0_syncs))</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">{</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">        </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">fprintf</span></span></span><span style=""><span lang="EN-NZ" style="color:black">(<span class="SpellE">stderr</span>,</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">"Failed</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">to</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">configure</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">PDOs.\n"</span></span><span style=""><span lang="EN-NZ" style="color:black">);</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">        </span></span><span style=""><span lang="EN-NZ" style="color:olive">return</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black">-</span></span><span style=""><span lang="EN-NZ" style="color:navy">1</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span lang="EN-NZ" style="color:black">}</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:silver">    </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">cout</span></span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black"><<</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:green">"Done"</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:black"><<</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span class="SpellE"><span lang="EN-NZ" style="color:black">endl</span></span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:olive">return</span></span><span style=""><span lang="EN-NZ" style="color:silver"> </span></span><span style=""><span lang="EN-NZ" style="color:navy">0</span></span><span style=""><span lang="EN-NZ" style="color:black">;</span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black">}</span></span><span style=""><span lang="EN-NZ" style="font-family:"Cambria Math",serif; color:black">​</span></span><span style=""><span lang="EN-NZ" style="color:black"></span></span></pre>
<pre><span style=""><span lang="EN-NZ" style="color:black"> </span></span></pre>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">I run the code above. It executes with no problem.</span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Now, I checked, using: </span></span></p>
</div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="color:black"> </span></span></p>
<div>
<p class="MsoNormal" style=""><span style=""><span class="SpellE"><span lang="EN-NZ" style="font-size:12.0pt; color:black">sudo</span></span></span><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">
<span class="SpellE">ethercat</span> upload -a 0 0x1a00 01</span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">whether the introduced mapping modification worked. Unfortunately it seems that it is not the case and I get the same variable that was in ./<span class="SpellE">ethercat</span> <span class="SpellE">cstruct</span>
 at that position.</span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Then I tried to change the variable manually using ./<span class="SpellE">ethercat</span> download <span style="background:white">-a 0 0x1a00 01 </span>0x20580010.
 This worked, at least in the console (confirmed by ./<span class="SpellE">ethercat</span> upload). However,
<span class="SpellE">cstruct</span> still outputs previous values. I also tried the same procedure with other PDO variables to the same effect, my C++ code changes nothing in the mapping.</span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">If anyone of you could look into the code and tell me whether what I am doing is correct (or wrong), I would be
<span class="SpellE">exteremely</span> grateful. I mostly do not know where even to start debugging right now.</span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Thank you a lot in advance.</span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Yours faithfully,</span></span></p>
</div>
<div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black">Jakub Sikorski</span></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style=""><span lang="EN-NZ" style="font-size:12.0pt; color:black"> </span></span></p>
</div>
<p class="MsoNormal" style=""><span style=""><span lang="EN-NZ" style="color:black"> </span></span></p>
<span style=""></span>
<p class="MsoNormal" style=""><span lang="EN-NZ" style="color:black"> </span></p>
</div>
</div>
</div>
</body>
</html>