<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Problem solved it seems.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Re-configuring with <span style="font-size:11pt;font-family:Calibri, Calibri_MSFontService, sans-serif;line-height:18px" data-contrast="auto" class="TextRun SCXO56221452 BCX2" lang="SV-SE"><span class="NormalTextRun SCXO56221452 BCX2"></span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size:11pt;font-family:Calibri, Calibri_MSFontService, sans-serif;line-height:18px" data-contrast="auto" class="TextRun SCXO56221452 BCX2" lang="SV-SE"><span class="NormalTextRun SCXO56221452 BCX2"><br>
</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size:11pt;font-family:Calibri, Calibri_MSFontService, sans-serif;line-height:18px" data-contrast="auto" class="TextRun SCXO56221452 BCX2" lang="SV-SE"><span class="NormalTextRun SCXO56221452 BCX2">--</span><span class="SpellingError SCXO56221452 BCX2">enable-eoe</span><span class="NormalTextRun SCXO56221452 BCX2">=no</span></span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
seems to have solved the problem. I don't need Ethernet over EtherCAT. However I can not really explain why it works now.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This is what I did:<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
./bootstrap<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div class="OutlineElement Ltr BCX2 SCXO56221452">
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span style="font-size:11pt;font-family:Calibri, Calibri_MSFontService, sans-serif;line-height:18px" data-contrast="auto" class="TextRun SCXO56221452 BCX2" lang="SV-SE"><span class="SpellingError SCXO56221452 BCX2"></span><span class="NormalTextRun SCXO56221452 BCX2">./</span><span class="SpellingError SCXO56221452 BCX2">configure</span><span class="NormalTextRun SCXO56221452 BCX2">
--</span><span class="SpellingError SCXO56221452 BCX2">enable-eoe</span><span class="NormalTextRun SCXO56221452 BCX2">=no --</span><span class="SpellingError SCXO56221452 BCX2">disable</span><span class="NormalTextRun SCXO56221452 BCX2">-</span><span class="SpellingError SCXO56221452 BCX2">sii</span><span class="NormalTextRun SCXO56221452 BCX2">-cache
--</span><span class="SpellingError SCXO56221452 BCX2">enable-generic</span><span class="NormalTextRun SCXO56221452 BCX2"> --</span><span class="SpellingError SCXO56221452 BCX2">enable-rtmutex</span><span class="NormalTextRun SCXO56221452 BCX2"> --disable-8139too
prefix=/</span><span class="SpellingError SCXO56221452 BCX2">opt</span><span class="NormalTextRun SCXO56221452 BCX2">/CPO/</span><span class="SpellingError SCXO56221452 BCX2">lib</span><span class="NormalTextRun SCXO56221452 BCX2">/</span><span class="SpellingError SCXO56221452 BCX2">etherlab</span></span><span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">
<br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">make</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">make modules</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">make install</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">make modules_install</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">After restarting the master:<br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><span style="color:windowtext;font-size:11pt" data-contrast="auto" class="TextRun SCXO47134645 BCX2" lang="SV-SE"><span class="NormalTextRun SCXO47134645 BCX2"></span><span class="SpellingError SCXO47134645 BCX2">systemctl</span><span class="NormalTextRun SCXO47134645 BCX2">
</span><span class="SpellingError SCXO47134645 BCX2">restart</span><span class="NormalTextRun SCXO47134645 BCX2">
</span><span class="SpellingError SCXO47134645 BCX2">ethercat.service</span></span><br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">it all seems to work just fine.</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">Thank you all for your effort,</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif">Joachim Sällvin<br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><br>
</span></p>
<p class="Paragraph SCXO56221452 BCX2" style="font-weight:normal;color:windowtext;text-align:left" lang="SV-SE">
<span class="EOP SCXO56221452 BCX2" style="font-size:11pt;line-height:18px;font-family:Calibri, Calibri_MSFontService, sans-serif"><br>
</span></p>
</div>
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Från:</b> Sebastien BLANCHET <blanchet@iram.fr><br>
<b>Skickat:</b> den 21 september 2020 11:44<br>
<b>Till:</b> Joachim Sällvin <joachim.sallvin@corpowerocean.com>; etherlab-users@etherlab.org <etherlab-users@etherlab.org><br>
<b>Ämne:</b> Re: [Etherlab-users] AKD drive Failed to set SAFEOP state, slave refused state change</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Hi,<br>
<br>
You should enable the debug mode to understand that happened just before <br>
the error<br>
--------------------------------<br>
$ ethercat debug --help<br>
ethercat debug <LEVEL><br>
<br>
Set the master's debug level.<br>
<br>
Debug messages are printed to syslog.<br>
<br>
Arguments:<br>
LEVEL can have one of the following values:<br>
0 for no debugging output,<br>
1 for some debug messages, or<br>
2 for printing all frame contents (use with caution!).<br>
<br>
Numerical values can be specified either with decimal (no<br>
prefix), octal (prefix '0') or hexadecimal (prefix '0x') base.<br>
-------------------------------<br>
<br>
<br>
Level 2 of debugging is very (very) verbose, so you should begin with <br>
level 1<br>
<br>
$ ethercat debug 1<br>
<br>
<br>
Concerning "DefaultSize=0" for SM2 and SM3, I think that is normal, <br>
because I have also such a value on my Kollmorgen AKD drive in torque mode.<br>
<br>
#######################################<br>
<br>
$ ethercat cstruct<br>
<br>
/* Master 0, Slave 0, "AKD"<br>
* Vendor ID: 0x0000006a<br>
* Product code: 0x00414b44<br>
* Revision number: 0x00000002<br>
*/<br>
<br>
ec_pdo_entry_info_t slave_0_pdo_entries[] = {<br>
{0x6040, 0x00, 16},<br>
{0x2071, 0x00, 32},<br>
{0x6041, 0x00, 16},<br>
{0x3470, 0x02, 16},<br>
{0x3470, 0x04, 16},<br>
{0x606c, 0x00, 32},<br>
{0x2077, 0x00, 32},<br>
{0x60fd, 0x00, 32},<br>
};<br>
<br>
ec_pdo_info_t slave_0_pdos[] = {<br>
{0x1600, 2, slave_0_pdo_entries + 0},<br>
{0x1a00, 3, slave_0_pdo_entries + 2},<br>
{0x1a01, 2, slave_0_pdo_entries + 5},<br>
{0x1a02, 1, slave_0_pdo_entries + 7},<br>
};<br>
<br>
ec_sync_info_t slave_0_syncs[] = {<br>
{0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},<br>
{1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},<br>
{2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_DISABLE},<br>
{3, EC_DIR_INPUT, 3, slave_0_pdos + 1, EC_WD_DISABLE},<br>
{0xff}<br>
};<br>
<br>
#######################################<br>
<br>
$ ethercat pdos<br>
<br>
=== Master 0, Slave 0 ===<br>
SM0: PhysAddr 0x1800, DefaultSize 1024, ControlRegister 0x26, Enable 1<br>
SM1: PhysAddr 0x1c00, DefaultSize 1024, ControlRegister 0x22, Enable 1<br>
SM2: PhysAddr 0x1100, DefaultSize 0, ControlRegister 0x24, Enable 1<br>
RxPDO 0x1600 ""<br>
PDO entry 0x6040:00, 16 bit, ""<br>
PDO entry 0x2071:00, 32 bit, ""<br>
SM3: PhysAddr 0x1140, DefaultSize 0, ControlRegister 0x20, Enable 1<br>
TxPDO 0x1a00 ""<br>
PDO entry 0x6041:00, 16 bit, ""<br>
PDO entry 0x3470:02, 16 bit, ""<br>
PDO entry 0x3470:04, 16 bit, ""<br>
TxPDO 0x1a01 ""<br>
PDO entry 0x606c:00, 32 bit, ""<br>
PDO entry 0x2077:00, 32 bit, ""<br>
TxPDO 0x1a02 ""<br>
PDO entry 0x60fd:00, 32 bit, ""<br>
<br>
<br>
<br>
Regards,<br>
-- <br>
Sebastien BLANCHET<br>
<br>
<br>
<br>
On 9/18/20 7:20 AM, Joachim Sällvin wrote:<br>
> *Hi,*<br>
> <br>
> *My AKD drive slave refuses to go to operational. Any suggestions why?*<br>
> <br>
> *This is what dmesg tells me when trying:*<br>
> [53271.293863] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave <br>
> refused state change (PREOP + ERROR).<br>
> [53271.294126] EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid <br>
> output configuration".<br>
> <br>
> *The AKD drive is the only slave on the bus*<br>
> *$ sudo ethercat slaves*<br>
> 0 901:0 PREOP E AKD EtherCAT Drive (CoE)<br>
> <br>
> *and I've configured it so that I get*<br>
> <br>
> *$ sudo ethercat cstruct -p0*<br>
> /* Master 0, Slave 0, "AKD"<br>
> * Vendor ID: 0x0000006a<br>
> * Product code: 0x00414b44<br>
> * Revision number: 0x00000002<br>
> */<br>
> <br>
> ec_pdo_entry_info_t slave_0_pdo_entries[] = {<br>
> {0x6040, 0x00, 16},<br>
> {0x60c1, 0x01, 32},<br>
> {0x6041, 0x00, 16},<br>
> {0x3470, 0x04, 16},<br>
> {0x60fd, 0x00, 32},<br>
> {0x606c, 0x00, 32},<br>
> {0x6063, 0x00, 32},<br>
> };<br>
> <br>
> ec_pdo_info_t slave_0_pdos[] = {<br>
> {0x1600, 2, slave_0_pdo_entries + 0},<br>
> {0x1a00, 3, slave_0_pdo_entries + 2},<br>
> {0x1a01, 2, slave_0_pdo_entries + 5},<br>
> };<br>
> <br>
> ec_sync_info_t slave_0_syncs[] = {<br>
> {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},<br>
> {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},<br>
> {2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_DISABLE},<br>
> {3, EC_DIR_INPUT, 2, slave_0_pdos + 1, EC_WD_DISABLE},<br>
> {0xff}<br>
> };<br>
> <br>
> <br>
> <br>
> *I've tried with the command line tool...<br>
> *<br>
> *$ sudo ethercat states OP*<br>
> *<br>
> *<br>
> *..and with my c-application. But the result is the same.<br>
> *<br>
> *<br>
> *<br>
> *One thing that puzzles me is the size of the synch managers SM2 and SM3:*<br>
> <br>
> *$ sudo ethercat pdos*<br>
> SM0: PhysAddr 0x1800, DefaultSize 1024, ControlRegister 0x26, Enable 1<br>
> SM1: PhysAddr 0x1c00, DefaultSize 1024, ControlRegister 0x22, Enable 1<br>
> SM2: PhysAddr 0x1100, DefaultSize 0, ControlRegister 0x24, Enable 1<br>
> RxPDO 0x1600 ""<br>
> PDO entry 0x6040:00, 16 bit, ""<br>
> PDO entry 0x60c1:01, 32 bit, ""<br>
> SM3: PhysAddr 0x1140, DefaultSize 0, ControlRegister 0x20, Enable 1<br>
> TxPDO 0x1a00 ""<br>
> PDO entry 0x6041:00, 16 bit, ""<br>
> PDO entry 0x3470:04, 16 bit, ""<br>
> PDO entry 0x60fd:00, 32 bit, ""<br>
> TxPDO 0x1a01 ""<br>
> PDO entry 0x606c:00, 32 bit, ""<br>
> PDO entry 0x6063:00, 32 bit, ""<br>
> <br>
> *Should they really have DefaultSize 0?*<br>
> <br>
> *$ sudo ethercat versionIgH EtherCAT master 1.5.2 53ce5e56d511*<br>
> *$ uname -a Linux ctrlPC1 5.4.54-rt32 #1 SMP PREEMPT_RT Wed Aug 12 <br>
> 12:59:33 CEST 2020 x86_64 x86_64 x86_64 GNU/Linux*<br>
> <br>
> <br>
> <br>
> *Detailed dmesg printout:*<br>
> <br>
> <br>
> [54154.149923] EtherCAT: Master driver 1.5.2 53ce5e56d511<br>
> [54154.149991] EtherCAT: 1 master waiting for devices.<br>
> [54154.154118] ec_generic: EtherCAT master generic Ethernet device <br>
> module 1.5.2 53ce5e56d511<br>
> [54154.154127] EtherCAT: Accepting 78:D0:04:27:52:E4 as main device for <br>
> master 0.<br>
> [54154.154131] ec_generic: Binding socket to interface 4 (enp0s31f6).<br>
> [54154.189154] EtherCAT 0: Starting EtherCAT-IDLE thread.<br>
> [54154.189384] EtherCAT 0: Link state of ecm0 changed to UP.<br>
> [54154.197141] EtherCAT 0: 1 slave(s) responding on main device.<br>
> [54154.197149] EtherCAT 0: Slave states on main device: PREOP.<br>
> [54154.197613] EtherCAT 0: Scanning bus.<br>
> [54154.489005] EtherCAT 0: Bus scanning completed in 292 ms.<br>
> [54154.489006] EtherCAT 0: Using slave 0 as DC reference clock.<br>
> [54154.489007] EtherCAT 0: Starting EoE thread.<br>
> [54154.521934] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave <br>
> refused state change (PREOP + ERROR).<br>
> [54154.522227] EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid <br>
> output configuration".<br>
> [54154.525166] EtherCAT 0-0: Acknowledged state PREOP.<br>
> <br>
> <br>
> Any ideas?<br>
> <br>
> Best Regards,<br>
> <br>
> Joachim Sällvin<br>
> <br>
> Software Developer<br>
> CorpowerOcean<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>