晸准的特马网站

technical article

> 技术文章 > 赫优信基于netX90 实现PROFINET 从站开发操作手册 Current page: 晸准的特马网站 > Technical Articles > Heyouxin develops PROFINET slave station operation manual based on netX90

Hilscher Implements PROFINET Slave Development Operation Manual Based on netX90

Contributed by Heyouxin (Shanghai) Automation System Trading Co., Ltd. 1/7/2020 13:18:52

0 Popularity: 63

  • Keywords: PROFINET netX90
  • Abstract: netX90 is a new-generation network controller successfully developed based on netX51 / 52. Its security is the core value of the product, which can achieve higher performance integration and improve power efficiency levels.

blob.png

1. Product introduction

1.1 netX 90 Introduction

netX90 is a new generation of network controller successfully developed based on netX51 / 52. Its security is the core value of the product, which can achieve higher performance integration and improve power efficiency levels. Two independent CPU cores are integrated in the netX90 SoC, one of which is used for real-time industrial communication, and the other enables the development of user applications. The data exchange between the two CPUs is still based on the dual-port memory DPM structure and a unified API interface. The industrial communication protocol stack is provided in the form of loadable firmware (LFW). After comprehensive testing and protocol pre-certification, application software developers can quickly implement driver migration and application development.

blob.png

Figure 1 hardware block diagram of netX90 chip

Whether the netX 90 is a single-chip solution or a communication coprocessor with a HOST CPU, the protocol stack based on the loadable firmware (LFW) can be run independently as a separate component. Its external HOST host interface can not only meet the high-speed access of large throughput of process I / O data, but also meet the precise clock synchronization of the network communication cycle.

1.2 NXHX 90-JTAG Introduction

XHX 90-JTAG is a development board independently developed by Hilscher based on the netX90 chip, which is convenient for customers' early evaluation and testing. This test is mainly based on this development board.

blob.png

Figure 2 NXHX 90-JTAG hardware block diagram

NetX90-based development board NXHX 90-JTAG, main features:

(1) Host interface:

  • As a host MCU communication processor: 8-bit / 16-bit parallel DPM mode, 2xSPI / SQI serial DPM mode;

  • Single-chip solution: 16 bit SDRAM, MII for Ethernet PHY, customized module solution.

(2) Provide additional host interface pins for serial DPM (SPM0) via SPI / SQI;

(3) JTAG MIPI-20 interface for debugging;

(4) On-board JTAG-to-USB adapter (FTDI) for OpenOCD

(5) On-board UART-to-USB adapter (FTDI) for diagnosing and downloading protocol stack firmware

(6) Mini-B type USB connector is used for JTAG-to-USB debugging and UART-to-USB for diagnosis and firmware download through FTDI;

(7) Two RJ45 Ethernet interfaces with "Link" and "Activity" LED lights

(8) Interface of NXHX traditional fieldbus module (PROFIBUS, CANopen, DeviceNet and CC-Link)

(9) 4MB SQI Flash

(10) RS-232 serial port

(11) Encoder interface with Biss, SSI or ENDat connection

(12) Analog-to-digital converter (ADC) interface

(13) MMIO connection

(14) Configure the boot mode (Alternative boot mode and Console mode) switch NXHX 90-JTAG development board has different debug methods:

(1) JTAG-to-USB: Connect the Mini-USB interface (X1000) on the development board, S701Switch1 = OFF;

(2) External debugger: Connect to the JTAG interface (X400) on the development board, S701 Switch1 = ON.

1.3 netX Studio CDT configuration software

netX Studio CDT (C / C ++ Development Tool) is an Eclipse-based integrated development environment for Hilscher netX SoC, which can be used for the following specific operations:

  • Object definition and mapping

  • Device Configuration

  • Create Product File (Build Process)

  • Download product files and loadable firmware to the hardware device

  • Offline simulation or online diagnostics

The application range of the netX Studio CDT tool is limited to netX-based slave devices, or to operate with loadable firmware. This tool is mainly used for the development of real-time Ethernet slave devices.

blob.png

Figure 3 netX Studio CDT interface

Use this tool to configure the NXHX 90-JTAG development board and debug netX90 applications.

2. Experiment preparation

Equipment required for testing:

blob.png

3. Hardware connection

When first serving as a single-chip solution, connect the NXHX 90-JTAG development board to a computer and configure it with netX Studio CDT. The connection diagram is shown in Figure 4 below.

After configuring the NXHX 90-JTAG development board, connect to the master PLC through the Ethernet port, and then create a PLC project.

blob.png

Figure 4 NXHX 90-JTAG development board and PC connection diagram

As an STM32-based supporting chip solution, you need to connect the SPI / SQI interface to the SPI interface of the STM32 development board, as shown in the following figure:

blob.png

Figure 5 Connection diagram with STM32 development board

4. Software installation

Install the configuration software netX Studio CDT, double-click the installation package netX Studio CDTV1.XXXX.X.XXXX xXX Setup.msi and install it directly, as shown in the figure below:

blob.png

Figure 4 netX Studio CDT installation interface

Reference document: netX Studio CDT-netX90 development GS 04 EN.pdf After installing the netX Studio CDT software, the interface for installing USB will appear according to the settings of the computer:

blob.png

Figure 5 USB installation interface

Click Install to install the USB driver.

5. Examples of single-chip solutions

As a single-chip solution, netX90 uses both the internal core responsible for Communication and Application, and the two cores establish a connection through DPM. At this time, you only need to configure the NXHX 90-JTAG board through netX StudioCDT, and then connect the master PLC through the Ethernet port to establish communication.

5.1 Configuring the NXHX 90-JTAG board

To connect the NXHX 90-JTAG to the computer for configuration via the miniUSB port, you need to set S701 Switch1 = OFF on the development board and set the boot mode to Stand boot Mode, so S400 Switch 5 = OFF and Switch 6 = OFF.

(1) Create the entire project

After setting up the hardware development board, open the netX Studio CDT software, select Open project in the welcome interface, enter the project file selection interface, select netXStudio_PNSV5_simpleConfig_V2.1.0.0, and open.

blob.png

Figure 1 netX Studio CDT welcome screen

blob.png

Figure 2 Open the project file

After importing the project file, you need to build the entire project first, select Build, and click Build Solution, as shown below:

blob.png

Figure 3 Select Build entire project

blob.png

Figure 4 Build process

(2) Build Doxygen html document

Select Doxygen and click Build Documentation, as shown below:

blob.png

Figure 5 Build Doxygen html file

After constructing the Doxygen html file, an Html folder is automatically generated under the Doc folder, as shown in the following figure:

blob.png

Figure 6 Generate Html folder

(3) Generate a hardware configuration binary file

In the project file provided by Hexun, the xml file containing the hardware setting file can be used to generate the binary file in the netXStudio CDT software. In the single-chip solution, the internal idpm needs to be started, so you need to select hardware_config_idpm.xml and right-click Build Hardware Configuration command, as shown below:

blob.png

Figure 7 Generate binary hardware configuration file

After the file is generated, a save window will pop up. First generate the LMF-based configuration file, hardware_config_idpm.hwc, and click OK, as shown in the figure below:

blob.png

Figure 8 Save the file

After saving, the pop-up window will continue to generate MFW-based binary hardware configuration file. Click OK to save it, as shown in the figure below:

blob.png

Figure 9 Save the file

(4) Flash the hardware configuration file and protocol stack firmware, click Tool, and select Flasher, as shown below:

blob.png

Figure 10 Select Flasher tool

Or you can directly click the small lightning button on the upper navigation bar. After entering, the connected development board will be automatically scanned, as shown in the figure below:

blob.png

Figure 11 Scanning device

After scanning the surface to the device, click on it and click Next to enter Flasher, as shown below:

blob.png

Figure 12 Enter Flasher tool

Select Brower Project, select the hardware configuration file, because the Loadable Firmware selected for this test, so select hardware_config_idpm.hwc when selecting the hardware configuration file, and click OK:

blob.png

Figure 13 Selecting the hardware configuration file

After selecting the hardware configuration file, the Flash Type is automatically selected as Internal Flash 01 (COM).

Click the Write button:

blob.png

Figure 14 Burning the hardware configuration file

After writing the hardware configuration file, a selection box will pop up, so you must continue to program the protocol stack, click Yes, as shown in the figure below:

blob.png

Figure 15 Select to continue programming

Select the protocol stack file X090D000.nxi, as shown below:

blob.png

Figure 16 Select the protocol stack file

Just as before, you can write the hardware configuration file by clicking Write, as shown below:

blob.png

Figure 17 Flashing the protocol stack file

After the protocol stack is programmed, a selection box will also appear. Because the programming is complete, click No, as shown in the following figure:

blob.png

Figure 18 Select completed

The NXHX 90-JTAG configuration is complete.

5.2 Commissioning project files

After the NXHX 90-JTAG development board is completed, you can debug the application in the netX Studio CDT software. First, set the debugging related parameters, click Debug, and select Set Sta rtu p Target to confirm that the one to be tested is armv7em-none-eabi / 4.9. 3 / netx90_app_iflash is shown below:

blob.png

Figure 19 Choose to set debugging parameters

After clicking Start Debugging, a Debug Setting selection box appears, as shown in the figure below. Select the target board as NXHX-90, Debugger as NXHX-90 On-Board Debugger, and click Debug.

blob.png

Figure 20 Setting the debug target

During the debugging process, a selection box will appear, whether to burn the application to the Internal Flash on the APP side, select Yes, as shown below:

blob.png

Figure 21 Selection box

After debugging, you can see that the application is running, as shown in the following figure:

blob.png

Figure 22 Running the application

5.3 Communication test

About the setting of the NXHX 90-JTAG development board and the debugging of the application program have been completed. Next, you can establish communication with the master station. This article selects the PROFINET master station as Siemens PLC1200 and completes the configuration on the way. The slave device description file can be Copy it in netX Studio CDT, as shown below:

blob.png

Figure 23 Select netX90 device description file

In the course of the blog, create a configuration project, first import the slave device description file into the Botu software, and then create a PN project. Because the device description file of netX90 matches the application, there is no need to set the input and output modules and directly configure the configuration. Just download the information to the PLC. After loading, you can check the communication status online. As shown in the figure below, NXHX 90-JTAG and Siemens PLC have successfully established communication.

blob.png

Figure 24 Establish communication with the master station

6. Example of a solution with a main CPU

netX90 can be used as a communication processor with a main CPU, and only uses its internal kernel responsible for communication to run the protocol stack, not the application kernel. In this article, the STM32-F7 development board is selected as the main CPU, the netX90 STM32-based application case is used as the main application, and the main station is Siemens PLC for testing.

6.1 Configure NXHX 90-JTAG Development Board

The steps for configuring the NXHX 90-JTAG development board are the same as when using netX90 as a single-chip solution. Steps (1) and (2) above will not be described in detail. When netX90 is used as a communication processor with a main CPU, its internal idpm is not enabled, but it is connected to the host through SPI, so the hardware configuration is different. You need to select hardware_config_spm.xml to generate a binary hardware configuration file, as shown in the figure below. Show:

blob.png

Figure 25 Select the hardware configuration xml file

blob.png

Figure 26 Click Generate Command

When generating a binary file, two binary files based on LFW and MFW are also generated, and both can be saved by clicking. Then flash the hardware configuration file and protocol stack hardware_config_spm.hwc and the protocol stack file X090D000.nxi to the development board, and then Debug.

6.2. Running STM32-based applications

When selecting an external CPU-based communication test, you need to establish a connection with the main CPU through the SPI pin. Then, open the System Workbench for STM32 software, select File → Import on the upper navigation bar, and import the project file, as shown in the figure below:

blob.png

Figure 25 Import project file

Select Existing Projects into Workspace in the pop-up interface, then click Next, and choose to save the file in the STM32 workspace. As shown below:

blob.png

Figure 26 Select Save File

Then enter the specific project file options, as shown below:

blob.png

Figure 27 Selecting a file

Click Brown and select Project in the STM32 folder according to the corresponding path, as shown in the following figure:

blob.png

Figure 28 project file

The materials provided by Heyouxun contain a variety of Ethernet examples. Users can choose the appropriate files according to their own tests. This article tests PROFINET, so you can only choose PROFINET project files. To compile the entire project, click Build → Build all, as shown below:

blob.png

Figure 29 Compile

Compile the entire file, enter the program debugging mode, select Run → Debug, as shown below:

blob.png

Figure 30 Program debugging

6.3 Communication test

As with the single-chip solution, a configuration project is created in the Botu software and the communication test is performed. As can be seen from the figure below, after the application is running, the communication is successful. At the same time, the serial tool Tera Term can be used to view the application print information. And the exchange of periodic data, as shown in the following figure:

blob.png

Figure 31 Communication test

7. Summary

In the tests of this article, whether as a single-chip solution or as a communication processor solution with a main CPU, the development of PROFINET slave stations can be implemented quickly and easily on the applications provided by Hexun. In addition, Hilscher also provides other application cases for real-time Ethernet development, such as: EtherCAT Slave, Ethernet / IP Adapter, Open Modbus TCP, etc.

Review editor (Wang Jing)
For more information, please visit Heyouxin (Shanghai) Automation System Trading Co., Ltd. ( http://c.rgwds.com/?cid=35397 )

Scan QR code on your phone to share this page

Download and install Gongkong APP

 

Let me evaluate

Evaluation:
general
var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?be055eb5acfdc25d3bd72279b8418725"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();