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.

how to use ethernetip_adapter code transfer data (am3359 icev2)

Other Parts Discussed in Thread: AM3359, SYSBIOS

Hi Guys,

I want to use the am3359 ice v2 board to transfer data through ethernet/ip protocol and get the command from upper level app also through ethernet/ip protocol. Now all the low level code has been finished(such as ADC sample, digital input/output and so on) and now it's time to transfer the data. But it seems I totally lost these days(I am a new man in the ethernet/ip communication field). Can anyone give me some suggestions, any documentation or any application notes? Can anyone point me to the right direction? 

For example, I added the ADC sample code into the ethernerip_adapter example code and want to send the measured data from ADC through ethernet/ip protocol. How can i modify the ethernetip_adapter code so that I can send the data through the ethernet/ip protocol?

I am very appreciate your help and thank you so much!

Regards,

Aaron

  • Hi Aaron,

    Could you provide some more details ? EtherNet/IP is just CIP implemented over plain EtherNet and TCP/IP. You can find lots of resources on the web, especially if you go to ODVA's website.

    Are you talking to some EtherNet/IP controller or node using the AM3359 ? Otherwise you can send data using just TCP/IP as well, it's a lot simpler if the usage is outside an industrial setup.

    To send data through EtherNet/IP you will have to use the EtherNet/IP stack (from Molex) for creating IO data packets. Since the stack provided with the SDK is a third party stack and only an evaluation version, to get more information you will have to go to Molex's website and download all necessary documentation.

    Regards

    Vineet

  • Hi Vineet,

    Thank you so much for your help. Am3359 is used to talk to eWON which is an industrial router. The eWON's document said it support the Ethernet/IP protocol. Now I think I know the direction. By the way, are there any sample code or open resource code for sending data using TCP/IP by am3359?

    Thanks and have a good day!

    Regards,
    Aaron
  • Hi Aaron,

    as Vineet pointed out, using TCP/IP would be less complicated.

    Providing that would suite you, there is a link in the user's guide of the ICEv2 board (the one that mentions Ethernet/ip) how to strip the EthernetIp example.

    The following threads cover problems that arised when the Ethernetip example was adapted to plain Tcp/Ip in a TIRTOS project:

    e2e.ti.com/.../1404124
    e2e.ti.com/.../406303
    e2e.ti.com/.../395190

    Hope that helps.

    Regards,
    Martin H.

  • Hi Martin,

    Thank you so much for your help. I followed the introduction to strip the EthernetIp example and used the XGCONFIG to configure the NDK. The NDK was set to use the static IP address: 192.168.1.2 and I build it and I tested it.  I connected the board to my PC and ping the address and It seems that it work, result showed below:

    Now, I want to move forward. I want to make a simple test that send the AD sample result to my PC through the ethernet. Here are my XGCONFIG for NDK:

    Here are questions:

    1) what kind of terminator do I need for the test?

    For example, if I test the UART communication with my PC, I use the terminator:  Tera Term, so that I can see the data sent form my board to PC and also I can use it to send data to my board.

    2) How to modify the code? What kind of API  functions can i use? 

    For example, I have a global variable to store the AD sample result. If I use the UART, I use the function UARTPutChar() to send data to my PC and use UARTGetChar() to get data from my PC.  And also do I need to add the hook functions? 

    3) Do you have some sample code for this? And where can I find the EchoTcp() example code? It is not in the SDK package.

    P.S.: Now i just want to build a very simple test, using the AD module to sample a analog input and then send it to my PC so that I can see the data.

    Thanks and have a good day and hope to hear from you! 

    Regards,

    Aaron

  • Hi Aaron,

       You can make use of NDK sockets to send data to PC. Industrial SDK does not provide basic TCP/IP  examples. Please refer to the sample applications in   NSP (NDK Support package) to get more info on basic NDK examples.

    Regards,
    Prajith

  • "Hercules SETUP utility by HW-Group.com" is a program I am quite happy with when it comes to checking connections. It is freeware.

    The EchoTcp example can be found in
    "User's Guide, TI Network Developer's Kit (NDK) v2.24", Literature Number: SPRU523I

    Good luck!
    Martin H.
  • Hi Prajith, Martin ,

    Thank you so much for your help! have a good day!

    Regards,
    Aaron
  • Can You say what did You follow by?

    Regards,
    Pawel
  • I mean Aaron wrote: "I followed the introduction to strip the EthernetIp example and used the XGCONFIG to configure the NDK"
  • Download this file "AM335x SYSBIOS Industrial SDK 01.01.00.06 User Guide.pdf" and there is introduction on how to modify Ethernet/IP to work as switch application.