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.

TMDSICE3359 eCAT master and TMDSIDK437x eCAT slave test

Other Parts Discussed in Thread: TMDSIDK437X, TMDSICE3359

Hi,

I would like to do the following tests on TMDSICE3359 as eCAT master and TMDSIDK437x as eCAT slave:

1) Latency

2) Throughput

I would like to test with slave sending 128/256 bytes of data to the master.

My questions:

1) Once TMDSIDK437x receives eCAT broadcast frames from the master, how to send known 128/256 bytes on to the eCAT telegraph frames to the master? Can I get a working project as an example which does a similar functionality?

2) I am planning to change the cycle time from the default 2msec to 100usec to test latency and throughput: How to measure this performance via wireshark? Do you have any docs to test the performance?

Thanks.

  • I am planning to do this at the moment:

    "Testing Throughput"
    1.At the eCAT master, set cycle time to 2000usec (cycle time: according to the eCAT docs, minimum is 100usec). This means, in every 2000usec master would send a new EtherCAT frame to the network (also called as "data update time").


    2.At each of the eCAT slaves, make changes in the slave such that each slave would insert 128/256 bytes (and find what is the maximum payload) of known data to the telegraph frame, which originated from the master and would eventually reach the master.


    3.Once each telegraph, which is loaded with slave data reaches the master, verify if each of the telegraph has the same amount of known data sent by each of the slave.


    4.Suppose if 1000 EtherCAT frames are sent by the master with cycle time = 200usec, verify if 1000 EtherCAT frames are received by the master finally. If it doesn't, increase the cycle time and find a threshold cycle time for which the max payload by each slave reaches the master without loss of any EtherCAT frame.


    "Testing Latency"
    1.Note down the time at which an EtherCAT frame was sent by the master (Ts)


    2.Note down the time at which that EtherCAT frame was received by the master (Te)


    3.Note down the number of slaves in the network ( n )


    4.In wireshark, note down the time taken by each slave to receive, inject its data and send it to the next slave (Ts)


    5.Start with 1 slave and keep adding more slaves one at a time and check if Te-Ts(when 2 slaves are in the network, for example) is linear with the previous Te-Ts(when 1 slave was in the network for example)- every time a new slave is added. For example, when 1 slave is in the network, if Te-Ts is 22usec, then when 2 slaves are in the network, Te-Ts is 42 usec, 3 slaves, Te-Ts=62usec, etc. Here, Ts = 20usec and D = 2usec.


    Arrive at a formula similar to this:

    Ts : Time at which the master starts to send an EtherCAT telegraph.

    Te: Time at which the master receives that EtherCAT telegraph.

    n: number of slaves in the network

    Ts: Time taken for each slave to insert its data into the EtherCAT telegraph.

    D: constant value which corresponds to time taken by the master to do EtherCAT stack related tasks, time taken for EtherCAT to go through cable, etc.

    Te-Ts = (n X Ts )+ D

    Also check if this formula is obeyed when there are 1,2 and 3 slaves (to verify if the latency is linear)

    "Testing Jitter"

    1.At the EtherCAT master, set cycle time = 2000usec. This means, in every 2000usec master would send a new EtherCAT frame to the network (also called as "data update time").


    2.Open wireshark and configure wireshark such that it shows time as seconds since previous displayed packet. Also configure wireshark such that the packets are filtered to only display Logical ReadWrite (LRW). Due to low jitter times, time resolution must be set to nanoseconds.


    3.Note down the jitter. Repeat from step 1 for cycle times = 1000usec, 500usec, 250usec, 100usec.
  • The EtherCAT team have been notified. Response may be delayed due to holidays in the USA.
  • Hi Support team,

    I am using TMDSICE3359 as EtherCAT master and TMDSIDK437x as EtherCAT slave.

     

    1. In EtherCAT master demo, which part  do I need to modify so that I can change the data sent out from master to the slave.
    2. In EtherCAT master demo, which part of the code do I need to check for the received packets from the slaves (back to the master)
    3. In the EtherCAT slave demo (under installation path/SYS_BIOS SDK 02_01_00_01/ example/ethercat_slave demo), how to change the size of the payload sent by the slave to the master?
    4. In EtherCAT slave demo, at which part of the code do I need to watch for to receive the data from the master

    Thanks.

  • Hi Thrangini, do a search for "PDO" in both master and slave project. In master, for example, you can search for myAppWorkpd() there the pointer to PDO is pbyPDOut. Maybe you can request some documentation to acontis that shows how to correctly modify Data Output and read Data Input.

    thank you,
    Paula
  • Hi Paula,

    Thanks for the reply.

    I did have a look in PDO for slave (because I am mainly interested in pumping max data from slave to master). I found a place where the output buffer size from slave to master can be increased(via PD_INPUT_SIZE and PD_OUTPUT_SIZE). I increased the size from 4(default) to 64. Then, in the place where slave inserts its data to the ecat payload, I tried doing this:

    *(pSlaveInterface->pInput)++ = 0xaabbcc00;

    *(pSlaveInterface->pInput) = 0x11223344;

    instead of (the default, which is)

    *(pSlaveInterface->pInput) = 0xaabbcc00;

    But, still I could not see data increase from slave to master in the ecat frames.

    I do not have source code where the type of pSlaveInterface(which is pECAT_SLAVE_INTERFACE) is defined. I have access to only 2 files pretty much(tiescappl.c and tiescutils.c) in ethercat slave demo. Do you have the rest of the source code, or do I request Acontis to provide me the rest of the source code?

    Thanks.

  • This is what I have done

    1. Changed the PD input and output size in tiescutils.c from 4(default) to 12
    #define PD_INPUT_SIZE 12
    #define PD_OUTPUT_SIZE 12
    I wanted to send three 32 bit data from slave to master.

    2. In tiescappl.c, under Demo_Application, I have included the following:
    INPUT |=0x123344AB;
    *(pSlaveInterface->pInput) = INPUT;
    *(pSlaveInterface->pInput++) ;
    *(pSlaveInterface->pInput) = 0xA1B2C3D4;
    *(pSlaveInterface->pInput++);
    *(pSlaveInterface->pInput) = 0x11112222;
    *(pSlaveInterface->pInput--);
    *(pSlaveInterface->pInput--);

    When I debugged using breakpoints, I can see these three 32 bit values stored correctly in successive locations inside pInput.
    But, for some reason, I get only 4 byte data from slave to master in the ethercat frames (confirmed this via wireshark).

    Since I cannot see what is inside Ecat_open and other parts of the code (because they are all in binary), I am not able to debug any further.
  • Hi Paula,

    I have asked Acontis to provide docs regarding how to increase payload size from slave to master.

    Unfortunately, they said that they support only EtherCAT master stack and not the TI EtherCAT slave.

    So, could you please help me to get the docs where it explains how to increase payload from slave to master/alternatively, could you please suggest if the following are the only changes needed?

    1. Changed the PD input and output size in tiescutils.c from 4(default) to 12
    #define PD_INPUT_SIZE 12
    #define PD_OUTPUT_SIZE 12
    I wanted to send three 32 bit data from slave to master.

    2. In tiescappl.c, under Demo_Application, I have included the following:
    INPUT |=0x123344AB;
    *(pSlaveInterface->pInput) = INPUT;
    *(pSlaveInterface->pInput++) ;
    *(pSlaveInterface->pInput) = 0xA1B2C3D4;
    *(pSlaveInterface->pInput++);
    *(pSlaveInterface->pInput) = 0x11112222;
    *(pSlaveInterface->pInput--);
    *(pSlaveInterface->pInput--);

    [When I debugged using breakpoints, I can see these three 32 bit values stored correctly in successive locations inside pInput.
    But, for some reason, I get only 4 byte data from slave to master in the ethercat frames (confirmed this via wireshark).]

    Thanks.

  • Hi Tharangini, TI EtherCAT slave uses EtherCAT Slave Stack Code (SSC) ET9300. No sure if you have already enable full feature EtherCAT slave example from SDK. If not, I would recommend you to get the full stack code. SSC stack code is available for ETG members from the ETG website. Inside Industrial SDK User Guide you can find steps on how to patch example ecat with Beckhoff Slave Stack Code (SSC 5.11).

    For additional questions about SSC stack you can also reach ETG forums.

    Thank you,

    Paula

  • Thanks for your reply, Paula. I think apart from modifying the slave code, the ESI file also needs to be modified for number of input bytes from the slave and to the slave. I haven't tried this out yet, though.