Controlling IIWA using EtherCat

  • Hello everyone,


    We plan to use the IIWA in an industrial context in the following way:

    • A real-time capable desktop computer (linux) sends targeted axis positions to the sunrise controller.
    • The sunrise controller sends its axis positions to the computer.

    Instead of using FRI, we want to use EtherCat (because of e.g. real-time requirements and future communication with /control of EtherCat-capable devices mounted on IIWA) for the communication between the computer and the sunrise controller. Therefore, we have the following questions:

    1. In the FRI case, the master is sunrise (and the computer is the slave). Right? is it still true in the EtherCat case mentioned above?
    2. What is the simplest way to establish a FRI-like EtherCat-connection between a destop computer and the iiwa controller sunrise?
      • by attaching a fieldbus coupler with I/O at port X65 (KUKA bus extension) of sunrise and using the coupler API on the computer to read-write the I/Os?
      • ...?
    3. How to configure the communication frequency between computer and sunrise similarly to FRI (e.g., read/wite every 0.1 ms)?

    We will appreciate any hint, since we are not familiar with IIWA.


    Thank's

  • AD
  • Hello again,


    Has somebody some experience in controlling (i.e. sending joint trajectories to) a KUKA LWR robot by using EtherCat ?

    Please, could you describe your setup or how it works?


    Thank you!

  • did not use FRI but will to offer some comments:


    FRI is a paid option for a reason.


    and just for orientation, on other Kuka robots (not iiwa), communication packages pricing correlates with speed. the more expensive ones are more capable:

    EKI = $$

    RSI = $$$

    FSD = $$$$


    so if you want hihg performance you either need to dig deep into pockets or into bag of tricks.


    "real time" is not defined very accurately. just that reponses are "fast enough". for some application that may be 1sec. for other 10ms, etc. so you will ned o go by what is available.


    i may be wrong but if i recall, EtherCat on KUKA side can send/receive message every 1ms. so 0.1ms is a pipe dream.


    yes, EtherCat is internally X44 (on CCU) and normally it connects to external port X65, but... there may be some devices already installed between X44 and X65. This is why you need to check schematics of YOUR robot controller.


    EtherCat is a fieldbus so each device has a role. Sunrise controller implements on EtherCat Master. Therefore ay devices that connect to it, must be EtherCat slaves. Master-Master communicaiton is not possible without additional hardware to bridge the two networks.


    so if your external PC has EtherCat slave capable interface that is supported by Kuka, you can have a direct connection (point to point) between them. your computer will appear as EtherCat slave on KEB (Kuka Extension Bus) which is basically bunhc of I/O. ESI file will need to be chosen/edited to reflect chosen size of I/O blocks that you wish to exchange in each transfer. I would suggest to talk to Kuka about choosing supported product for your PC EtherCAT interface as only some are actually supported and tested. And trust me, you don't want to be the one testing...


    data transfer is cyclical and it is controlled by Master which in this case is KUKA controller.

    this means you can update data on each end as fast or as slow as you want but.... messages will only be transmitted when Master chooses (every 1ms or so). so if your values changes are slow enough (not faster than cycle interval chosen by master), the other side will have a chance to see that.

    if you change data faster than that, some of changes will not be seen (they will be skipped until the "next train departure").

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • data transfer is cyclical and it is controlled by Master which in this case is KUKA controller.

    this means you can update data on each end as fast or as slow as you want but.... messages will only be transmitted when Master chooses (every 1ms or so). so if your values changes are slow enough (not faster than cycle interval chosen by master), the other side will have a chance to see that.

    if you change data faster than that, some of changes will not be seen (they will be skipped until the "next train departure").

    panic mode : Thank you for your reply!


    Using the Sync0 and Sync1 interrups of EtherCat do you think it will be possible to tell the synchronized slave (Computer) when they can read from / write to the master (Controller)?

    see https://infosys.beckhoff.com/e…ystem/2469122443.html&id=

    May be a distributed clock synchronization is also required?

    see https://infosys.beckhoff.com/e…ml&id=5142598304987524894

    • Helpful

    I never used EtherCat to send positions. I dabbled a bit with FRI a couple years ago, it was a hassle for me, wasn't worth it. I use the SmartServo option that comes with the LBR iiwa, pretty handy and straight forwards. I send the positions via UDP or TCP/IP, not hard real time (iiwa is slower than other KRC4 robots) but quite responsive and smooth movement.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now