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.

RTOS/AM5728: Profinet Slave debug

Part Number: AM5728
Other Parts Discussed in Thread: PROFIBUS

Tool/software: TI-RTOS

Hi,

I am debugging profinet_slave_IRT on AM5728 using PRU-ICSS-Profinet_Slave_01.00.00.00.

I have done ethercat_slave_demo on my board. So I think the hardware of my board should be ok. And what I have changed in the project are the GPIO pin numbers and SPI. I used SPI1, not SPI3. When I run the out file,  the LED red is blinking, and I got:

   [CortexA15_0] Network Added: If-1:192.168.0.21

   EDMA driver initialization PASS.
   Network Removed: If-1:192.168.0.21

I traced the out step by step, and it seemed that the error happend in function 'main_pn' in the task 'taskPruss'. I have some questions:

1. Where the ip address 192.168.0.21 come from? I think the ip address of the slave is set by the master.

2. Why the network is removed, according the printf?

3. Is it ok that the QSPI flash on my board is empty?

Thanks.

  • I've moved your thread to the device forum.

    Todd
  • Hi  Carolyn,

    Please see the answers below -

    carolyn zhang said:
    1. Where the ip address 192.168.0.21 come from? I think the ip address of the slave is set by the master.

    The default IP address is configured in *.cfg files. Refer to examples\profinet_slave\am572x_app_arm.cfg or examples\profinet_slave\am572x_app_dsp.cfg (search for 'Ip.address')

    carolyn zhang said:
    2. Why the network is removed, according the printf?

    The application will remove the IP address during startup so that the slave IP address can be assigned via PROFINET master (say, PLC or PROFINET IO Tester)

    carolyn zhang said:
    3. Is it ok that the QSPI flash on my board is empty?

    I think it should be OK. Generally the application will be storing the device configuration details (device name, IP address) at the specified offsets if the details are written in permanent mode using set requests. The details set in permanent mode will be preserved even after the board is power restarted.


    Regards,
    Nijin P

  • Hi, Nijin,

    Could you please tell me where I can get the file 'GSDML-DEVICEPROFILE-V2.31.XSD'? I only have 'GSDML-DEVICEPROFILE-V2.25.xsd'.

    Thanks.

  • Hi  Carolyn,

    Are you looking for the GSDML files corresponding to AM57xx PROFINET Slave? If so, these files can be found at <SDK_INSTALL_DIR>\examples\profinet_slave\GSD

    The file "GSDML-V2.31-MOLEX_TI-AM57xxProfinet_SDK-20160113.xml" if for IRT device and the file "GSDML-V2.31-MOLEX_TI-AM57xx-MRP-20140611.xml" is for RT-MRP device.

    Also I think the file "GSDML-DEVICEPROFILE-V2.31.xsd" should come along with installation of PROFINET master software's (say, Engineering tool to configure the PLC's). Please let us know where exactly you need this file.

    Regards,
    Nijin P

  • Hi, Nijin,


     It looks like the ProfiNET master needs the file. However, the file is mentioned on line2 of "GSDML-V2.31-MOLEX_TI-AM57xx-MRP-20140611.xml " as below:

    <ISO15745Profile xmlns="www.profibus.com/.../DeviceProfile" xmlns:xsi="www.w3.org/.../XMLSchema-instance" xsi:schemaLocation="www.profibus.com/.../DeviceProfile ..\xsd\GSDML-DeviceProfile-V2.31.xsd">

    So, I think maybe the file is needed by the ProfiNET slave.

    Could you please tell me which end needs this file? Thanks.

  • Hi, Nijin,


    It looks like the ProfiNET master needs the file. However, the file is mentioned on line2 of "GSDML-V2.31-MOLEX_TI-AM57xx-MRP-20140611.xml " as below:

    <ISO15745Profile xmlns="www.profibus.com/.../DeviceProfile" xmlns:xsi="www.w3.org/.../XMLSchema-instance" xsi:schemaLocation="www.profibus.com/.../DeviceProfile ..\xsd\GSDML-DeviceProfile-V2.31.xsd">

    So, I think maybe the file is needed by the ProfiNET slave.


    Could you please tell me which end needs this file? Thanks.
  • Hi Carolyn,

    carolyn zhang said:
    It looks like the ProfiNET master needs the file

    Which ProfiNET master are you using? Is it a PLC or a software master? The xml schema file "GSDML-DeviceProfile-V2.31.xsd" should get installed in the PC as part of the master configuration software installation.

    We just need to import the GSDML file corresponding to ProfiNET slave to the master software while creating a new project. ProfiNET slave might not be directly requiring this xsd file.

    Regards,
    Nijin P

  • Hi, Nijin,
    Thanks for your apply. It is a file needed by master. I use Molex PCI card as ProfiNET master.
    Could you please tell me how to test the ProfiNET slave? Is there any detail file? There is a red light blink on my board. And the output leds move when I set Digital Input 2. However, I still don't know the ProfiNET is connected or not. I feel very confused.
    Thanks.
  • Hi Carolyn,

    Please go through PRU-PROFINET Slave user guide available here. I expect the PROFINET Slave application is running correctly in your board. This can be confirmed by verifying the startup UART messages sent by the application using softwares like TeraTerm.

    carolyn zhang said:
    There is a red light blink on my board

    .

    This is the activity LED indicating the application is up and running in the board. Are you using AM572x IDK board? We usually see activity LED blinking BLUE. What could be the reason for change in activity LED colour? Is it the GPIO pin and SPI changes as you mentioned in first post? What was the reason for this change?

    carolyn zhang said:
    I use Molex PCI card as ProfiNET master

    We are not familiar with this master. We generally use S7 1511-1 series of PROFINET PLC's for our tests. You need to go through the user manual for 'Brad applicomIO software tools' and create a project. The GSDML files (<SDK_INSTALL_DIR>\examples\profinet_slave\GSD) will be used during this project creation.

    Once the PROFINET master is setup correctly, you can verify the IO data exchange between the AM572x board and master. Also the master configuration software will be showing the slave communication status in GUI.

    A visible indication from the slave side indicating proper IO data exchange is that BLUE blinking LED changes to GREEN blinking LED. Also there will be constant RED LED indicating the application is in SYNC with PROFINET master if you are using IRT application and PROFINET master is configured as SYNC master. You can also consider the Prebuilt-binaries as a reference.

    Please let us know the results.

    Regards,
    Nijin P

  • Hi, Nijin,

    I am not using AM572x IDK board. However, we set PRU-ICSS the same as AM572x IDK, except we changed the GPIO num of led. But I didn't changed the color definiton. So I don't think the PROFINET Slave application is running correctly in my board. The red led blink always, even if I unplug the network wire. Could you please tell me the meaning of the tricolor status? Thanks.

    /***********************************************************************/
    /** @def BOARD_TRICOLOR0_RED
    * Macro for configuring Tri color0 blue
    */
    #define BOARD_TRICOLOR0_RED (1u << (0u))
    /** @def BOARD_TRICOLOR0_GREEN
    * Macro for configuring Tri color0 green
    */
    #define BOARD_TRICOLOR0_GREEN (1u << (1u))
    /** @def BOARD_TRICOLOR0_BLUE
    * Macro for configuring Tri color0 red
    */
    #define BOARD_TRICOLOR0_BLUE (1u << (2u))
    /** @def BOARD_TRICOLOR1_RED
    * Macro for configuring Tri color1 blue
    */
    #define BOARD_TRICOLOR1_RED (1u << (3u))
    /** @def BOARD_TRICOLOR1_GREEN
    * Macro for configuring Tri color1 green
    */
    #define BOARD_TRICOLOR1_GREEN (1u << (4u))
    /** @def BOARD_TRICOLOR1_BLUE
    * Macro for configuring Tri color1 red
    */
    #define BOARD_TRICOLOR1_BLUE (1u << (5u))
  • Hi Carolyn,

    The PROFINET slave application uses Industrial LED0 and Industrial LED1 in AM57xx IDK board for the LED status.

    Industrial LED0: Constant RED when the application (IRT) is in SYNC with PROFINET master, Off otherwise
    Industrial LED1: Activity LED, blinking BLUE if the application is running. It turns to blinking GREEN once the slave is in data exchange with PROFINET master. It will come back to blinking BLUE again if there is any communication break between master and slave.

    Note that activity LED (Industrial LED1) will blink BLUE even if there is no network connection. It just indicates the application is alive (not crashed)

    The basic diagnostic to verify if the PROFINET slave application is running correctly in your board could be below:

    • Verify UART display and see if the application prints startup messages including the application version etc.
    • Connect network cable to board and see if the board is transmitting out PROFINET LLDP frames periodically (verify with Wireshark running in PC)
    • Presence of activity LED in the board(The  change in activity LED colour might not be a functional issue in your case, it can be related to GPIO pin change as well)

    As I mentioned earlier, you need to try configuring your master by creating a PLC project and try to communicate with the slave board. The PROFINET device name and IP should be assigned by the master based on the configuration done in the PLC project. If the project settings and the communication is successful, the slave device will be detected/displayed properly in the master configuration software. Also you will see IO data exchange in the network traffic.

    Regards,
    Nijin P

  • Hi, Nijin,

    Could you tell me what will cause an error "DCP no_station_name"? I think the problm is the device doesn't connect to the ethernet. Industrial LED1 is blinking BLUE, but LED0 is off always.
    Thanks.
  • Hi Carolyn,

    'DCP no_station_name' error indicates that the PROFINET master did not set the slave name correctly. During the connection establishment sequence, the slave device name and IP address are configured by the master using DCP set requests. The master slave communication starts only after the name/IP is set correctly.

    We need to capture a network traffic between master and slave to see the DCP set request/response frames. Below are the reference sequence

    • Master sends DCP ident request (NameOfStation or AliasName)
    • Slave responds with DCP ident response (this will contain current device name)
    • If the master sees a difference in slave name w.r.to that configured in the PLC program, master will send DCP set request for new name
    • Slave should repond with DCP set OK(for device name)
    • Master sends DCP set request for device IP (as per the configured IP address in the PLC program)
    • Slave should repond with DCP set OK(for IP address)

    At this point, the master will send connect request and slave should respond with valid connect response. Please verify the network traffic to understand where the problem is. The LED indication which you mentioned also indicates that the master-slave data exchange is not active.

    Regards,
    Nijin P

  • Hi, Nijin,

    I haved solved the problem. The reason for useless is that I use a router to connect the Master and the Slave. The green led is blinking when I use a switch.

    Is there any time limit for the ProfiNET connection? May I changed the length of both the input integer and the output integer?

    Thanks.
  • Hi Carolyn,

    Good to know that the ProfiNET communication issue is resolved. Green blinking LED indicates the ProfiNET data exchange between master and slave is proper. Do you configure PLC as SYNC master and slave application as sync slave? If so, the ProfiNET IRT application should go to SYNC with PLC and there should be a constant red LED on Industrial LED0

    carolyn zhang said:
    Is there any time limit for the ProfiNET connection?

    No, there is no time limit for the ProfiNET connection.

    carolyn zhang said:
    May I changed the length of both the input integer and the output integer?

    Are you trying to change data size in ProfiNET IO data exchanged between master and slave? By default, the IO data size will be 40 bytes (Frame size will include header and trailer in addition to this). We need changes in ProfiNET slave stack to alter the IO data size and corresponding changes should be done in GSDML file also to handle large IO data upto 1440 bytes.

    Regards,
    Nijin P

  • Hi, Nijin,
    Where can I change the device name 'molex-devti' to anyother name I want? Thanks.
  • Hi, Nijin,

    I have another question. Does the PRU-ICSS-Profinet_Slave_01.00.00.00 be used as topology structure? If it can, which topology could be realize, line topology, star topology or tree topology?
    Thanks.
  • Hi Carolyn,

    we can only implement a two port PN switch. So whatever topology you can build with that is supported.

    Device name of a PROFINET device can be changed using DCP protocol at runtime.

    Regards,

  • Hi, Frank,

    I am testing 'ProfiNET Slave RT' now. I saw the MinDeviceInterval is set as 32 in the GSDML-V2.31-MOLEX_TI-AM57xx-MRP-20140611.xml, so I think I can read input data at 1ms time interval. And I didnot change SPI clock 1MHz as default. My leds are moved normaly. However, the input data I read on ProfiNET master are just like '0, 0x4, 0x8,0xc, 0x10, 0x14......'. Does it right?

    In my opinion, I thought I should read input data like '0, 0x1, 0x2, 0x3, 0x4, 0x5...'. Am I right?

    Thanks.