This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EtherCAT Master - Slave communication, loopback/ring topology

Other Parts Discussed in Thread: SYSBIOS

Hello,

I have an AM335X(sysbios_ind_sdk_1.1.0.8, EC_Master_2.9) and AM437X(sysbios_ind_sdk_2.1.0.1) connected over ethercat network.

Now i have them working with AM335X as a master and AM437X as a slave.

I would like the slave, AM437X looping back to the master, AM335X like in a ring topology.

How can I achieve this?

Currently, this is how my connection looks like;

from ETH_0(CPSW) of master to AM437x J6. AM437x's J9 is connecting back to MAster's ETH_1(ICSS)

I tried Master's ETH_1 in both CPSW and ICSS mode. In, CPSW, there is no ackwoledgement via EC-Engineer tool.

While in ICSS, Im getting this error message in EC-Engineer tool when Im trying to extract the ENI file:

WRN | 2016-10-03 20:02:12 | Line Crossed! At least one cable incorrectly connected (IN port and OUT port crossed)! Please open the 'Line Crossed Analyzer' to find the problem.
WRN | 2016-10-03 20:01:36 | Line Crossed! At least one cable incorrectly connected (IN port and OUT port crossed)! Please open the 'Line Crossed Analyzer' to find the problem.
WRN | 2016-10-03 20:01:35 | Line Crossed! At least one cable incorrectly connected (IN port and OUT port crossed)! Please open the 'Line Crossed Analyzer' to find the problem.
WRN | 2016-10-03 20:01:35 | Line Crossed! At least one cable incorrectly connected (IN port and OUT port crossed)! Topology cannot be determined.
WRN | 2016-10-03 20:01:35 | Network configuration mismatch! Please open the 'Network Mismatch Analyzer' to find the problem.

Kindly help.

I would like to have loopback between master and slave over ethercat network.

Thanks & Regards

Rohit

  • The EtherCAT experts have been notified. They will respond here.
  • Rohit, few comments, our EC-Master for AM335x only works for CPSW configuration (not ICSS mode).
    Also, EtherCAT is for definition a logical ring topology. It detects the end of a branch and return the EtherCAT message.

    thank you,
    Paula
  • HI Paula,

    Actually, I would like to test the redundancy in the ring topology over ethercat network.

    Here is the possible scenario im looking at:
    1) let's say there is one master and two slaves, slave1 and slave2.
    here is how they would be placed: Master -> slave1 -> slave2 ; slave2 again points back to the master.

    Now, if the connection between master and slave1 has a problem and master is not able to communicate with the salve1.
    so slave1 would not be able to pass the ethercat frame to slave2.

    However, since slave2 is connected back to the master, master would still be able to communicate with the slave 2 over ETH1 port?

    Both the Ethernet ports of the master can be active for sending and recieving of the ethercat frames?
    If so, how should i be able to configure both the ethernet ports?

    From the demo parameters,
    #define DEMO_PARAMETERS "-auxclk 2000 -v 2 -t 60000 -perf " \
    "-cpsw " \
    "1 " /* port */ \
    "1 " /* mode */ \
    "1 " /* priority */ \
    "m " /* master flag */ \
    "custom am33XX " /* custom board for AM33xx*/ \
    "1 " /* PHY address */ \
    "1 " /* PHY connection mode: RGMII */ \
    "0 " /* Not use DMA buffers */

    Master is addressing the slave through ETH0( "1 " /* port */), if the connection to be redundant, ETH1 should also be active right?
    If so, how can i achieve this?

    This way the network would become redundant and the network will not fail because of one of the salve failure?

    Thanks & Regards
    Rohit
  • Rohit, I believe redundancy is enabled by default on EC-Master, but I will ask acontis. For your information, for Acontis EC-Master technical questions you can also get direct support via email ecsupport@acontis.com

    Thank you,
    Paula
  • Rohit,

    AM335x ICE V2 board has the following configuration:
    Port ETH_0: Instance = 1, PHY address = 1, PHY connection mode = RGMII
    Port ETH_1: Instance = 2, PHY address = 3, PHY connection mode = RGMII

    When you are using redundancy, than you use both CPSW ports. Both ports cannot work together in “master” mode with the same priority.

    Please try the following parameters:

    #define DEMO_PARAMETERS              "-auxclk 2000 -v 2 -t 10000 -perf " \

                                          "-cpsw "                    \

                                          "1 "    /* port */          \

                                          "1 "    /* mode */          \

                                          "0 "    /* priority */      \

                                          "m "    /* master flag */   \

                                          "custom am33XX " /* custom board for AM33xx*/   \

                                          "1 "    /* PHY address */   \

                                          "1 "    /* PHY connection mode: RGMII */ \

                                          "0 "    /* Not use DMA buffers */ \

                                          "-cpsw "                    \

                                          "2 "    /* port */          \

                                          "1 "    /* mode */          \

                                          "1 "    /* priority */      \

                                          "s "    /* master flag */   \

                                          "custom am33XX " /* custom board for AM33xx*/   \

                                          "3 "    /* PHY address */   \

                                          "1 "    /* PHY connection mode: RGMII */ \

                                          "0 "    /* Not use DMA buffers */

     

    Thanks,

      Vladimir

  • HI Vladimir,

    The configuration that you have suggested is working fine for 1 master and 1 slave. Thank you.

    However, when I connect two slaves to the master and back to the master from slave 2, Im getting this error message:

    SYS/BIOS EcMaster Sample application running on ICE V2
    Full command line: -auxclk 2000 -v 2 -t 30000 -perf -cpsw 1 1 0 m custom am33XX 1 1 0 -cpsw 2 1 1 s custom am33XX 3 1 0

    001151 : Run demo now with cycle time 2000 usec
    001151 : Using AuxClock
    001151 : ==========================
    001151 : Initialize EtherCAT Master
    001151 : ==========================
    001151 : EC-Master V2.9.0.06 (Protected) for SYSBIOS Copyright acontis technologies GmbH @ 2016
    001152 : CPSW INF: Port 1, Prio 0, Flags [Polling] [Master], Phy 1, PhyInterface 32, MAC 68:c9:0b:1c:33:75

    001153 : CPSW INF: CPSW3G found. CPSW INF: HW-Id: 0x0019, RTL: 0, Major: 1, Minor: 0xc
    001154 : CPSW INF: PHY found. Id=0x2000a211
    001154 : CPSW INF: Restart PHY auto negotiation
    002767 : CPSW INF: PHY auto negotiation completed
    002767 : CPSW INF: Port 2, Prio 1, Flags [Polling] [Slave], Phy 3, PhyInterface 32, MAC 68:c9:0b:1c:33:77

    002769 : CPSW INF: PHY found. Id=0x2000a211
    002769 : CPSW INF: Restart PHY auto negotiation
    008820 : CPSW INF: PHY link timeout (waiting for auto negotiation completion).
    009838 : Unlicensed version, stop sending ethernet frames after 60 minutes!
    010838 : ConfigApply() Cannot apply the configuration to the EtherCAT device!
    011840 : Cannot configure EtherCAT-Master! ERROR: Invalid EtherCAT cmd in cyclic frame with redundancy (Result = 0x98110127)
    011840 : ========================
    011840 : Shutdown EtherCAT Master
    011840 : ========================
    011840 : ecatSetMasterStateEx(): No slaves configured!
    011840 : Cannot stop EtherCAT-Master! ERROR: Invalid state (0x9811000e)
    011841 : ================================================================
    011841 : PerfMsmt 'JOB_ProcessAllRxFrames' (avg/max) [usec]: 0.4/ 13.3
    011841 : PerfMsmt 'JOB_SendAllCycFrames ' (avg/max) [usec]: 0.3/ 5.3
    011841 : PerfMsmt 'JOB_MasterTimer ' (avg/max) [usec]: 0.3/ 26.9
    011841 : PerfMsmt 'JOB_SendAcycFrames ' (avg/max) [usec]: 0.3/ 9.4
    011841 : PerfMsmt 'Cycle Time ' (avg/max) [usec]: 1998.8/2011.4
    011841 : PerfMsmt 'myAppWorkPd ' (avg/max) [usec]: 0.6/ 4.4
    011918 : CPSW INF: Disable running RX-DMA
    011918 : CPSW INF: RX+TX DMA disabled. Delay 500
    011919 : CPSW INF: Disable running RX-DMA
    011919 : CPSW INF: RX+TX DMA disabled. Delay 500
    011919 : EcMasterDemo stop.

    Im unable to figure the error from the master stack code, as the function ConfigureApply() seems to be coming from the ECMaster library.

    Kindly help or suggest changes.

    Thanks & Regards

    Rohit

  • Rohit,

    Using redundancy, it is forbidden to use LRW commands in the cyclic frames. Please check “Use LRD/LWR” in EC-Engineer or in Twincat.

    Thanks,
    Vladimir
  • Rohit, In TwinCAT,  You can select LDR/LWR instead of LRW, in your slave devices at the Advanced settings > General > Behavior

    Thank you,

    Paula

  • HI Paula & Vladimir,

    Thanks for the help so far.

    Currently, when I see the topology information, I understand it is not a RING still.

    Port B of the slave is not connected back to the master. Please find the image below:

    Kindly tell me how can I configure the topology to be RING.

    To test the toplogy, I didnt connect the ethercat cable to the port A of the slave from the master's ETH0. But the Port B of the save is connected back to the Master ETH1. So , since there is a failure in the connection from master ETH0-Slave Port A, i was expecting the communication from  master ETH1 -> portB of slave.

  • Rohit,

     

    For cable redundancy you should not configure ring in EC-Engineer. You just configure 1 Master with slaves and disable LRW.

    Disable LRW is done in Advance Options -> Process Data Mode-> Disable LRW.

     

    You will not see RING in EC-Engineer.

    You should not use Port B during configuration.

    Redundancy is done automatically.

     

    Thanks,

        Vladimir