Back to top

AKD-P01206 with SOEM open-source EtherCat Master not working

I am unable to communicate with the AKD  using the SOEM open source master library.  The example solutions which work on any slave do not work with the AKD.  TwinCat works fine and if I leave TwinCat open in config mode, I can then run the SOEM example program just fine.  As soon as I turn off TwinCat and reboot the AKD the example program no longer works.  The SOEM software can not set the AKD into SAFE-OP Mode.  I get the following message:

Not all slaves reached safe operational state.
Slave 1 ; State=11 ; StatusCode=  11; Invalid requested state change
 

Is there a document that describes the exact AKD initialization sequence?  Or maybe sample code somewhere?

 

Thanks!

Comments

pholden's picture
pholden
I found the problem with the help of the SOEM source code administrator.  TwinCat3 works fine because it is using the ESI from the local TwinCat directory that was provided with the AKD TwinCat startup zip file.  When I remove it & force TwinCat3 to try to manage the AKD device from its EEPROM ESI, I get the same issues as the SOEM.  I then tried to use TwinCat 3 to update the AKD EEPROM and got a write error.  So, how do I get this updated version of the ESI into the AKD device?
Martin Rupf's picture
Martin Rupf
Not exactly sure I understand the point you're stuck.
You're able to put the Drive into Pre-Operational?
In Pre-Operational you have the chance to setup all the real time communication relevant data to the drive, including the PDO mapping from the ESI. Therefore in this state writing the correct SDO should allow you to set the mapping to match the Master. This has then to be done every time starting EtherCat. (There is no option to safe it to the drive.)

I'm adding here the references to the Kollmorgen EtherCat Master help. Form where also the AKD as preferred drive is mentioned.
http://curvegen.kollmorgen.com/webhelp/kas/Content/3.UnderstandKAS/EtherCAT%20Motion%20Bus%20Concept.htm

Hope this helps some more.
Anyway let me know how it goes, this SOEM seems to be an interesting project.
pholden's picture
pholden
We were finally able to get it to PRE-OP mode by setting the SM0 & SM1 length to 512 (they are both set to 1024 in the EEPROM ESI).  TwinCat uses an ESI from the Kollmorgen startup zip, which is where SM0 & SM1 length are both 512 and TwinCat works with the AKD.  After that, I just set 2 PDO mappings from the TwinCat startup instruction PDF for AKD (0x1701 and 0x1B01).  Once I add these 2 mappings the AKD immediately faults with F706.  I used KollMorgen Workbench to set this fault to "ignore" instead of "Fault".  Now I can't get into OPERATIONAL mode.
pholden's picture
pholden
One thing I don't seem to have any information on is the modes of operation word (0x6060).  How do I set it up during pre-op & what value I should I set it to?
Martin Rupf's picture
Martin Rupf
The Operation mode (0x6060) is explained in the EtherCat manual page 136.
https://www.kollmorgen.com/sites/default/files/public_downloads/AKD%20EtherCat%20Communications%20Manual%20EN%20%28REV%20R%29.pdf

The default PDO mapping (0x1701, 0x1B01) expects a position command value (0x60C1:1) and control word (0x6040) as the two PDO objects to the drive. Therefore goes with the OpMode 7 or 8, Interpolated or Cyclic Synchronous Position.

You can read back the actual active Operation mode via 0x6061.
An operating mode switch only becomes valid when read by object 0x6061.


Depending on the age of your drive and Firmware there are different sizes for the EtherCat Mail boxes implemented. With FW 1-16-00-001, the parameter ECAT.LEAGCYREV has been introduced to be backwards compatible by default but to have a chance on enabling the bigger size. http://curvegen.kollmorgen.com/webhelp/workbench/German/#CommandParamRefGuide/ECAT/ECAT.LEGACYREV.htm
see also the ethercat manual page 20&34.

 
pholden's picture
pholden
Thanks, all good info.  I did read some info on 0x6060 from one of your manuals, but a lot of the settings were missing, 7 being one of them!  This version of the manual seems like it will be much more helpful.

My client wants to be able to control velocity as well as position.  What opmode setting would I use in this case?

 
Martin Rupf's picture
Martin Rupf
For velocity command -> opmode 1, "profile velocity" allows the following of cyclic velocity setpoints via PDO 0x60FF. For this you need a different PDO setting or you use the fully flexible PDO mapping. (page 44ff) This way you have four objects (output 0x1600-1603, input 0x1A00-1A03) to be used with a maximum of 64-Bit each.
pholden's picture
pholden
Ok, so the example there is using TwinCat3.  So I will repeat the process of doing the instructions for TwinCat3 & then change my startup process in the SOEM master implementation once TwinCat3 is working.  I'll let you know how I make out.  I'm still struggling with SOEM getting into OPERATIONAL state with just 1 input & 1 output.