AM6442: Profinet: Out of AR Resources Error

Part Number: AM6442

Tool/software:

Hello,

I have observed Out of AR Resources error in wireshark log and wondering why this occured.

Here is the background. I am using 12 submodules including DAP, IF, and Port1, Port 2.

After fresh application flash, modules/submodules are plugged and connection with Siemens PLC is established and even Cyclic Communication Started.

But the problem starts when I try to go Online in TIA Portal. Suddenly I get the following output.

AR disconnected! (AR = 1, session key = 4097, reason = 11)
Connect_ind: AR = 1, AR type = 1, send clock factor = 32, Reduction ratio (in) = 2, reduction ratio (out) = 2, session key = 5121, host IP = 192.168.0.1
Error (ERROR_FATAL): IO device stopped
AR disconnected! (AR = 1, session key = 5121, reason = 16)

After this, even when restarted the AM64x EVM board, I keep on getting same Out of AR Resources in wireshark.

I am using Profinet Sample Application from SDK with minimal modifications. PLC used: ET200SP

Attached wireshark Log.

Please let me know if you need further details.

.OutOfARResources_Log.zip


  • Hello Upendar, 

    The wireshark shows that PLC is trying to read I&M0 and gets no response. Following on that the AR gets aborted by PLC. The abort is not 100% clean. There is a missing Alarm acknowledge from PLC. I assume by this the AR stays occupied and no reconnect is possible. 

    Are your minimal modifications are somehow related to Records or I&M data? 

    Can you maybe also validate with PRONETA? PRONETA is also reading I&M data. Do you see responses there on wireshark?

    The blocked AR is a follow up error. We will also check if there is some timeout/cleanup missing. 

    Regards

    Christof

  • Hello Christof,

    Yes. It is related to IM0 data. Does the Stack call any callback to get this data? I have loaded IM0 during the startup phase. And could you also point me to where in the wireshark log is this recorded? timestamp would be helpful for my debugging.

    I will also test with PRONETA.

    Thank you.

    Regards,
    Upendar

  • Hello Christof,

    I have made few observation during my debugging.

    1. The problem occurs only when I turn on Online mode in TIA portal. 
    2. As you have mentioned, There was no response from the IO Device for Read Record Requests. These Read Record Requests are made during the switch to Online mode in TIA Portal.
    3. And there were no hits on the breakpoint set at function PN_APP_IOD_recordRead.
    4. Read Requests from TIA portal were created with data length 32KB. But the stack configured the max record data length to 8KB. I thougt increasing this value PN_API_IOD_MAX_RECORD_LEN to 32KB could solve the issue. But it did not. 

    5. I have also tested with PRONETA. There was no similar problem. There were successful responses for IM0 data requests.

    I am attaching a new wireshark log. Please analyse this and provide some inputs.

    Thank you.

    Best Regards,
    Upendar Sama

    RPC_READ_Error_While_TIA_OnlineMode.zip

  • Hi Upendar,

    Can you try the same test but you try reading records with smaller data length: (8KB) and less and let us know if the issue is still there?

    Thank you!

    Regards

    Assila

  • Hi Assila,

    I am not reading the records explicitly. TIA Portal automatically reads the records when I switch to Online Mode.

    My PLC project has no error blocks and that could be the reason for repeated connect requests from PLC, which then causes Out of Resource Error.

    Also, IO-Device stays in error state unless PLC is restarted (power cycle). This error state can be avoided if the blocks in below screenshot are added.



    But the original question remains. Why there was no response from the IO-Device for Record Read Request and why the device going into passivated state?

    If possible, Could you please try to reproduce the issue without any of these blocks in plc project? 

    Thank you.

    Best Regards,
    Upendar

  • Hi Upendar,

    I checked the traces you shared and here are my observations:

    - It looks like you have a custom module/submodule configuration.
    - For all configurated subslots, I see that no response for any of read record requests is being sent by the device,
      including the read implicit requests sent by Proneta and this could indicate a configuration issue. 


    We do not see such an issue on our end with the default module/submodule list.

    1- Did you run same tests with the default config? Do you see same issue?

    2- Could you check the list of IM0 data for each submodule upon device startup? (After calling "PN_APP_IOD_loadSubmodConfig")

    3- Could you share more details about the changes you made in your application (including you custom submodule config)?

    Kind regards,

    Assila