<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:860895649;
        mso-list-type:hybrid;
        mso-list-template-ids:662838612 536870913 536870915 536870917 536870913 536870915 536870917 536870913 536870915 536870917;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:1467432587;
        mso-list-type:hybrid;
        mso-list-template-ids:963154754 536870927 536870937 536870939 536870927 536870937 536870939 536870927 536870937 536870939;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</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-SE" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><a name="_Hlk494708962"><span lang="EN-US">Dear etherlab-users,<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">I am quite new to the use of ethercat in linux and struggling to get a particular slave from state PREOP to OP, and to read values of this slave. I have found some commends on
 this topic already, where it is suggested to do a “reg_write” at “0x500 -tbool 1”. Other suggested to generate a SII file out of an XML file with TwinCAT and to download it to the slave. I did both but without success. The slave I am struggling with is an
 absolute encoder, and the problem might be related to the memory architecture of the EEPROM.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">I am using “ethercat version IgH EtherCAT master 1.5.2” on “Ubuntu 20.04.2 LTS” with “uname -r 5.4.84-rt47” kernel.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">First, I am wondering if it is required to have an application in order to communicate with slaves or is this also possible via the terminal. I can do the following in the terminal:<o:p></o:p></span></span></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">When I enter “sudo ethercat slaves” all connected slaves a listed, so I assume that the bus topology is correctly recognized.<o:p></o:p></span></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">I can list all sdos with “sudo ethercat sdos -p0”, e.g., SDO 0x6004, "Position value" 0x6004:00, r-r-r-, uint32, 32 bit,
 "SubIndex 000".<o:p></o:p></span></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">I
<b>do not</b> receive the correct position values, e.g., when I read the position sdo with “sudo ethercat upload -p0 -tuint32 0x6004 0” I receive “0x00000000 0”. When I enter ”dmesg” I receive three error massages: “SDO download 0x6004 (4 bytes) aborted.”,
 “SDO abort message 0x06010000: "Unsupported access to an object".”, and “Failed to process SDO request.”. However, a meaningful value is displayed in TwinCAT.<o:p></o:p></span></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">I
<b>cannot</b> change the state of the slaves to OP via the terminal.<o:p></o:p></span></span></li></ul>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">Second, I am wondering if the reg_write can be done in the terminal (which appears not work in my case):<o:p></o:p></span></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo2"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">Change state “sudo ethercat state -p0 INIT” works.<o:p></o:p></span></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo2"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">Do “sudo ethercat -p0 reg_write 0x500 -tbool 1” appear to work.<o:p></o:p></span></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo2"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">Change state “sudo ethercat state -p0 PREOP” works.<o:p></o:p></span></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo2"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">Change state “</span></span><span style="mso-bookmark:_Hlk494708962"><span lang="en-SE" style="font-size:9.0pt;font-family:"Lucida Console"">sudo
 ethercat state -p0 SAFEOP</span></span><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">”
<b>does not work</b>. When I enter ”dmesg” I receive two error massages: “Failed to set SAFEOP state, slave refused state change (PREOP + ERROR)” and “AL status message 0x001E: "Invalid input configuration”.”.<o:p></o:p></span></span></li></ol>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">I would appreciate it a lot if somebody could answer me my question!<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">Kind regards,<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US">Gabriel<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="en-SE"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="en-SE"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-GB" style="font-size:8.0pt;color:#7F7F7F;mso-fareast-language:#2000">_____________________________________________________________________________</span></span><span style="mso-bookmark:_Hlk494708962"><span lang="EN-GB" style="mso-fareast-language:#2000"><o:p></o:p></span></span></p>
<p class="MsoNormal"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="Picture_x0020_7" o:spid="_x0000_s1026" type="#_x0000_t75" style='position:absolute;margin-left:-.05pt;margin-top:3.1pt;width:65.3pt;height:58.8pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;mso-position-horizontal-relative:margin;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;mso-width-relative:margin;mso-height-relative:margin'>
<v:imagedata src="cid:image001.png@01D70A10.3B96EBE0" o:title="" croptop="-17771f" cropbottom="-20036f" />
<w:wrap type="square" anchorx="margin"/>
</v:shape><![endif]--><![if !vml]><img width="87" height="78" style="width:.9062in;height:.8125in" src="cid:image002.png@01D70A10.3B96EBE0" align="left" hspace="12" v:shapes="Picture_x0020_7"><![endif]><span style="mso-bookmark:_Hlk494708962"></span><span style="mso-bookmark:_Hlk494708962"><b><span lang="EN-US" style="font-size:9.0pt;color:black;mso-fareast-language:SV">Gabriel
 Forstner</span></b></span><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US" style="font-size:9.0pt;color:black;mso-fareast-language:SV">,
<i>Senior Software and Automation Engineer  <o:p></o:p></i></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US" style="font-size:9.0pt;color:black;mso-fareast-language:SV">CorPower Ocean
<b><br>
</b>Västberga Allé 60, 126 30 Hägersten <br>
M: +46 73 155 88 88</span></span><span style="mso-bookmark:_Hlk494708962"><span lang="EN-US" style="font-size:9.0pt;mso-fareast-language:SV"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_Hlk494708962"></span><a href="http://www.corpowerocean.com/"><span style="mso-bookmark:_Hlk494708962"><span lang="EN-GB" style="font-size:9.0pt;color:blue;mso-fareast-language:SV">www.corpowerocean.com</span></span><span style="mso-bookmark:_Hlk494708962"></span></a><span style="mso-bookmark:_Hlk494708962"></span><span lang="EN-GB" style="font-size:9.0pt;mso-fareast-language:SV"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="en-SE"><o:p> </o:p></span></p>
</div>
</body>
</html>