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.

AM2432: Maximum supported size for Profinet acyclic data

Part Number: AM2432

Hi, 

I am using AM2432 with the Industrial SDK 11.00.00.08.

Our project involves acyclic responses of up to 2000 byte in size. I checked the Stack and this should be supported, because there is the define PN_API_IOD_MAX_RECORD_LEN (2U * 1024U).
In my code, I see that I am correctly filling the response buffer to the end, but then the response I get is always truncated at 1300 bytes, with the rest filled with zeros. I attach this image as example, on the left the reply and on the right the buffer before is sent.

immagine.png

Even in Wireshark, it seems that the len is always 1384.

immagine.png
Is this a known issue? What am i doing wrong?

Thank you, 

Best Regards,

Andrea

  • Hi Andrea,

    Thanks for your inquiry.

    the reason for this is the standard size limit of Ethernet frames. If you consider ETH, IP, UDP and DCE/RPC data, you are left with 1384 bytes divided into 84 bytes for the read-response header and 1300 bytes for record data. Nevertheless, the stack supports fragmentation of large records which should be visible in your Wireshark traces (please remove Wireshark filters to see them).

    Kind regards,
    Kamil

  • Hello Kamil, 

    thank you for your reply.

    I removed the wireshark filter but I don't find any other useful packet.

    I have attached the complete Wireshark trace. Could you tell me what other packet I should expect?

    Thank you,

    Best Regards,

    Andrea

    1854.profinet.zip

  • Hi Andrea,

    with fragmentation you should basically expect the response to be sent over 2 consecutive messages. The first one contains the first 1384 bytes of data and the second one contains the remaining bytes. I don't see this in your Wireshark trace, but I'm wondering:

    1. Why are you sending the read request twice?
    2. Would you please explain your topology?
    3. Where is the TAP located? 
    4. If you're using TIA portal, would you please share the project?

    Thanks.
    Kind regards,
    Kamil

  • Hi Kamil, 

    thank you for your reply.

    I tested the problem with a PLC and I noticed that with this setup the response is not truncated to 1300 bytes. I believe this is a problem with the tool we use instead of the PLC to make requests, so there are no problems on the Profinet Stack side.

    Thank you, 

    Best Regards,

    Andrea

  • Hi Kamil,

    I have another question. In pn_app_iod_cfg.h I find these macro:

    #ifndef PND_EDDP_MEM_OPTIMIZATION
    #define PN_API_IOD_MAX_RECORD_LEN (8U * 1024U)
    #else
    #define PN_API_IOD_MAX_RECORD_LEN (2U * 1024U)
    #endif

    Which of the two branches should be considered? I have this doubt because it seems that bufLen as 2048 is passed by the PN_APP_IOD_cbRecordRead callback (even if the request is more than 2048 bytes). Is that correct?

    Thank you,

    Best Regards,

    Andrea

  • Hi Andrea,

    correct!

    the stack library is now compiled with the smaller buffer size (2048), but we will change this in the next release (in April). It will either be 8*1024 or dynamically configurable by the user.

    Kind regards,
    Kamil