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.

AM6421: AM6421 AND Ethernet-IP Adapter custom explicit message

Part Number: AM6421

Hi,

Sub: Handling Custom Explicit Messages in Ethernet IP Adapter Application on Industrial Communication SDK9.00.03.

Issue :   Handling Custom Explicit Messages in Ethernet-IP Adapter Application.

             

How do we handle Explicit Messages and Implicit messages in the current SDK 9.00.03.

   Do you have any sample code for handling custom Explicit Messages in Ethernet-IP in Industrial Communication SDK 9.00.03.

  Please Note We could get device Id ,device Slno using explicit message however custom class data could not get.

Thank You.

  • Hi Narasimha,

    Thanks for your query.

    I will check on this and get back to you.

    Best Regards

    Ashwani

  • Hi Ashwani,

          Can you update for our above query.

    Thank You.

  • Hi Ashwani,

    We are at a critical juncture with respect to our delivery and ned your support for the same to clarify. 
    Thank you

  • Hi Avinash,

    How do we handle Explicit Messages and Implicit messages in the current SDK 9.00.03.

    Our stack partner is looking into this. However, to ensure we fully understand your needs, could you please clarify what exactly you mean by "handling custom Explicit Messages"?

    Do you have any sample code for handling custom Explicit Messages in Ethernet-IP in Industrial Communication SDK 9.00.03.

    What kind of "handling" are you trying to achieve? Actually, we think this is the key point so we can fully understand your need.

    Please Note We could get device Id ,device Slno using explicit message however custom class data could not get.

    Typically, you would access “custom class data” in the same way as you access other objects, instances, or attributes. Unless you have not packed your "custom class data" into EIP class attributes. If this is not the case, please provide more details, and we'll assist you accordingly.

    Best Regards

    Ashwani

  • Hi Ashwani,

    Narasimha Rao said:
    How do we handle Explicit Messages and Implicit messages in the current SDK 9.00.03.
    Our stack partner is looking into this. However, to ensure we fully understand your needs, could you please clarify what exactly you mean by "handling custom Explicit Messages"?

     

    There are 2 types of messages.  Implicit and Explicit Messages. Implicit messages are for transferring real time data. Explicit messages are for Non-realtime data. 
    We are using device profile Discrete_IO_Device.  In our case we are fine with Implicit messages. However with Explicit message like "Get time spent" from device. 
    We have more that 100+ such messages. This we are referring to as custom messages. 
    This is more like client server like exchange of data between controller and device. 
    Please let us know if this brings in clarity.   

     

    Narasimha Rao said:
    Do you have any sample code for handling custom Explicit Messages in Ethernet-IP in Industrial Communication SDK 9.00.03.
    What kind of "handling" are you trying to achieve? Actually, we think this is the key point so we can fully understand your need.

    Explained above.

     

    Narasimha Rao said:
    Please Note We could get device Id ,device Slno using explicit message however custom class data could not get.
    Typically, you would access “custom class data” in the same way as you access other objects, instances, or attributes. Unless you have not packed your 
    "custom class data" into EIP class attributes. If this is not the case, please provide more details, and we'll assist you accordingly.

    Explained above.

    We would appreciate if you could share a sample code, how Explicit messages can be added so that we can send application specific messages.

     Thank You.

  • Hi Ashwani,

    Hope you are able get in touch with stack partner. Do you have feedback from them.

    Appreciate if you can take this up on priority as we need to delivery to end customer.

    Thank You 

  • Hi Narasimha,

    Thanks for follow-up.

    I have forwarded your message with priority to stack partner. Waiting for response.

    Thanks for allowing some time to check and get back to you.

    Ashwani

  • Hi Ashwani,

    Hope you are able get in touch with stack partner. Do you have feedback from them.

    Appreciate if you can take this up on priority as we need to delivery to end customer.

    Thank You 

  • Hi Ashwani,

    Hope you are able get in touch with stack partner. Do you have feedback from them.

    Appreciate if you can take this up on priority as we need to delivery to end customer.

    Thank You 

  • Hi Aswani,
    Any news from your stack vendor ??

    Avinash

  • Hi Avinash,

    For explicit communications, you can access any attribute of custom classes/instances you have set up.

    See 'app_generic_device.c', function EI_APP_GENERIC_DEVICE_cipGenerateContent().
    There you can see how class (id:0x70), instance (id:0x1) and attributes (120 of various types, starting from id:0x300) are created.

    Running the “generic device” example, you can make explicit calls against that class:

    Please, let us know if this is helpful or if we are misunderstanding your requirement ?

    Thank you very much for your patience.

    Best Regards

    Ashwani

  • Hi Ashwani,

       We tried to run the "generic device" example as suggested above using the ind_comms_sdk_am64x_09_00_00_03 on the AM64x EVM, but in the logs we observed an error that that data is corrupted. I have attached the logs below. Can you please clarify this issue.

    Thank you.

  • Thanks ,

    I will check and get back to you.

    Best Regards

    Ashwani

  •   Hi Ashwani,

         After detailed analysis we still see Explicit messages are not supported. We are able to fetch the information from the Class/instance/Attribute to controller as static information. However, this is possible only if the Class is updated in  EI_APP_GENERIC_DEVICE_run(). All implicit messages/Cyclic data are handled in this function.

    We could not find how the Explicit message are update in the class outside of  EI_APP_GENERIC_DEVICE_run() function.

     

      Appreciate if you could provide insight into how Explicit message are updated and the API for the same.

    Thank You

  • logs we observed an error that that data is corrupted

    This message “The data is corrupted, write default values.“ comes from non-volatile memory read, where the configuration data are stored. This message we expect on any new board where you run stack for first time. It’s displayed just one time on start to write factory configuration data to non-volatile memory.

    This should have no impact to execution, because the default data are used for first time. After reset you should not see this message again because configuration data are already present in non-volatile memory.

    If you will see that message after next reset than the issue can be really wrong data, because on read we are making some checks to be sure that data are not incorrect.

    On the other hand, it would be helpful if you could you also let me know more details on what we are trying to achieve and what is your approach ?

    Best Regards

    Ashwani

  • Hi Ashwani,

    Thank you for the clarification.

       Can you also respond to the above query regarding the explicit message.

    Thank you.

  • Hi ,

    I am working on this. But I need some more info about the use case/ project.

    Can you also respond to the above query regarding the explicit message.

    The explicit messages need to be handled the same way as implicit messages. That means following initialization steps:

    • create class (by using EI_API_CIP_createClass, see EI_APP_GENERIC_DEVICE_cipGenerateContent)
    • create instance (by using EI_API_CIP_createInstance, see EI_APP_GENERIC_DEVICE_cipGenerateContent)
    • create attribute (by using EI_API_CIP_addInstanceAttr, see EI_APP_GENERIC_DEVICE_cipGenerateContent)
    • create service (by using EI_API_CIP_addInstanceService, see EI_APP_GENERIC_DEVICE_cipGenerateContent)
    • configure and initialize value (by using EI_API_CIP_setInstanceAttr, see EI_APP_GENERIC_DEVICE_cipGenerateContent)

    On side of application based on required behavior you can update the attribute value by EI_API_CIP_setAttr_usint or by any other EI_API_CIP_setAttr_xxxx function based on type of attribute.

    Based on expected behavior:
    For cyclic update user can use EI_APP_GENERIC_DEVICE_run function.
    For event based user can use any event callback function defined in application (by user).

    Note:

    Our EtherNet/IP Adapter device is acting only as server in client-server communication. Client feature is not supported. That means our device sends always response on request of any client. Is not able to send any request.

    Best Regards

    Ashwani

  • Hi Ashwani,

      Thanks for the response.

    We will go through the above procedure and let you know the outcome.

    Thank you,

    Mamatha B M

  • Hi Ashwani

    Thanks for helping us on explicit message. 

      We have followed the above instruction and were able to get the data on controller.

    Thank you.

    Mamatha B M

  • We have followed the above instruction and were able to get the data on controller.

    Glad to know that.

    Best Regards

    Ashwani

  • Hi,

        We are running the generic ethernet-ip adapter application we are getting below error's continuously.


    pbuf_alloc failed on receiving nrt frame

    pbuf_alloc failed on receiving nrt frame

    tcp_err_handler: Connection reset. (-14)

    Get Method: Class ID 0x80, Instance ID 0x1, Attribute ID 0x308 attrValue : 0x0

    RX non-real-time queue overflows: 959
    RX non-real-time queue overflows: 969
    RX non-real-time queue overflows: 979
    RX non-real-time queue overflows: 988
    RX non-real-time queue overflows: 998
    RX non-real-time queue overflows: 1008
    RX non-real-time queue overflows: 1017
    RX non-real-time queue overflows: 1027
    RX non-real-time queue overflows: 1036
    pbuf_alloc failed on receiving nrt frame

    RX non-real-time queue overflows: 1066
    pbuf_alloc failed on receiving nrt frame

    RX non-real-time queue overflows: 1097
    pbuf_alloc failed on receiving nrt frame

    RX non-real-time queue overflows: 1128
    pbuf_alloc failed on receiving nrt frame

    RX non-real-time queue overflows: 1160
    pbuf_alloc failed on receiving nrt frame

    We would appreciate if you could  help us resolving these errors.

    Thank You.

    Please 

  • Hi ,

    We are running the generic ethernet-ip adapter application we are getting below error's continuously.

    Looks not be related to original thread.

    Please create separate thread for new question

    Best Regards

    Ashwani

  • Hi Ashwani,

        These messages are coming when we try to test the explicit messages.

        Hope we get some recommendations for stopping these errors.

      Thank You.

  • Hi ,,

    you are getting these messages while debugging or just running the example ?

    The warning messages are completely normal in case that you are debugging and you are just stop on breakpoint.

    But if you are in runtime it can signalize that the packets are transferred too fast and system is not fast enough to process them.

    Best Regards

    Ashwani

  • Hi,

        Ashwani Replied

       But if you are in runtime, it can signalize that the packets are transferred too fast and system is not fast enough to process them.

     

       At what rate AM64x can process the packets so that we can spec the limitation.

       Is there any queuing mechanism to manage the packets if there are multiple packets coming. 

       Thank You.

  • .

    you are getting these messages while debugging or just running the example ?

    In case of running example we will need more information to be able to analyze:

    • board type on which customer is trying to run example

    • SDK version which he is using

    • UART + Wireshark log

    • information about changes if any on side of application

    • appimage file with information how to reproduce

    Regards

    Ashwani