With the continuous development of network information technology and industrial control, the application fields of remote monitoring are constantly expanding, especially in realizing the communication, configuration, and diagnostics of embedded intelligent devices in field control. These intelligent devices can be directly connected to a centralized monitoring and management system via the Internet through their communication interfaces, using Web Server access technology. This has profound practical and long-term significance in remotely acquiring various parameters and real-time data of device operation, sending remote control commands, configuring parameters, and obtaining alarm information and operating status. PROFINET is a latest real-time industrial Ethernet protocol that provides open and consistent connectivity for office and automation applications, and is one of the mainstream technologies for realizing industrial real-time Ethernet communication. HERS's netX system, which includes fieldbus protocols such as EtherCAT, CANopen, Modbus, and PROFINET, is a highly integrated network controller with a novel optimized system structure, suitable for industrial communication and large-scale data throughput. This research focuses on implementing PROFINET real-time Ethernet access, rapid local data processing, data storage technology, and remote data access based on a web server using the netX System-on-Chip (netX SoC), aiming to provide a good solution for some industrial real-time communication and control applications.
1. System Structure
Figure 1 shows the network structure of the distributed remote data acquisition system. It includes multiple NXIO (Hilfiger Real-Time Ethernet Slave IO Test Boards) connected to the master station. Several embedded controllers are connected to the master station monitoring computer via PROFINET real-time Ethernet. The master station monitoring computer is then connected to the Internet, and it sends data to a database server in real time. Simultaneously, it can publish the acquired slave station data and monitoring information. Additionally, the master station monitoring computer can also acquire data and perform control processing with the NXIO slaves via an RS-232 bus. Using this method, users, regardless of their location, can access real-time and historical data from all control devices via the Internet, as long as they have an Internet connection.
The database server stores the collected slave station data and related configuration data, allowing the master monitoring computer to read, write, and set its own operating status. Administrators can access and modify parameters in the database via a browser. The web application server publishes data over the network, allowing any user on the Internet to query and browse it, and permits authorized users to change the operating parameters of the master monitoring computer, which are stored on the database server. When a user requests data, the web application server reads the requested data from the database server via the Internet, and then sends this data to the requesting user via the Internet. Some of the user's parameter settings are saved on the database server, or the configuration information is distributed to the NXIO slave station via the netX master station.
2. Design of data communication between netX SoC master and slave stations
2.1 System Design Concept and Program Deployment
Using the HISCIFX real-time Ethernet master board and the HISCIFX NXIO real-time Ethernet slave I/O test board, a PROFINET real-time Ethernet communication platform was built to realize master-slave PROFINET network communication and the corresponding communication program design. Figure 2 illustrates the deployment of the master-slave control program based on PROFINET and RS232 communication, the real-time control task program of the NXIO slave based on the rcX embedded system, data storage, and data access program via Web.
2.2 Description of Main Functions of the System Program
1) Main station Web Server interface control and display program: The main station Web Server interface program, designed by ASP.NET, monitors the status of slave station buttons and indicator lights, configures master-slave communication parameters, and realizes data interaction with the master station communication program.
2) Master station data communication program: The SYCON.net system configuration software implements card driver and network diagnosis and realizes master-slave PROFINET communication. In addition, the C# serial communication class event driver is used to complete the configuration and data interaction of slave station serial communication based on RS232 communication.
3) Slave cyclic scanning control IO program: Based on the rcX real-time operating system, IO control is implemented by calling system functions in the board support package.
4) Slave data communication program: Based on BSP, serial communication protocol and PROFINET IO protocol stack, it realizes communication with the master station.
5) Multi-task data interaction between slave stations: Slave station control tasks, such as LED control tasks and communication tasks, use semaphore communication to obtain access to the shared memory area (ARM data POOL) to realize data interaction between tasks.
3. Design of netX SoC Master-Slave Data Communication and Web Access
3.1 Master-Slave Station Communication Configuration
SYCON.net is a configuration tool based on Field Device Tool (FDT)/Device Type Manager (DTM) technology. FDT is independent of communication protocols and the software environment of the host system or field devices; it has standard interface specifications and achieves comprehensive integration of smart meters. DTM enables device driving, configuration, and communication, operating under FDT. Using FDT/DTM improves the system's ability to diagnose and maintain field devices, enabling rapid response and enhancing system security and reliability. As shown in Figure 3, the SYCON.net configuration tool can configure, connect, diagnose, and export related NXD configuration files for PROFINET IO networks. The method involves selecting the netX500 PNM module from the Master folder in the Hilscher GmbH list on the right and dragging it to the network line on the left. The same method can be used to add NXIO slave devices to the master network line on the left and configure the corresponding master and slave stations using DTM. For slave devices from other manufacturers, the device's GSD file needs to be added.
3.2 Master Station Communication Design
The master station communication utilizes C-Toolkit to configure the cifX card, including initialization, memory operations, character operations, event handling, file processing, synchronization timing, and PLC configuration reading and writing, as shown in Figure 4. Under the Visual Studio.NET platform, C# (C-sharp) is used in conjunction with the Lab files, API functions, and communication authorization protocols provided by C-Toolkit for loading the cifX card firmware to implement the master station communication program, including merging slave data into the database and sending relevant configuration information to the slave. Figure 5 shows the serial communication class event-driven configuration of the NXIO slave serial communication, and the control of the slave IO interface switching and LED status display via RS-232. The program also includes a Socket class to receive slave configuration and control information sent via the Web.
3. Design of netX SoC Master-Slave Data Communication and Web Access
3.1 Master-Slave Station Communication Configuration
SYCON.net is a configuration tool based on Field Device Tool (FDT)/Device Type Manager (DTM) technology. FDT is independent of communication protocols and the software environment of the host system or field devices; it has standard interface specifications and achieves comprehensive integration of smart meters. DTM enables device driving, configuration, and communication, operating under FDT. Using FDT/DTM improves the system's ability to diagnose and maintain field devices, enabling rapid response and enhancing system security and reliability. As shown in Figure 3, the SYCON.net configuration tool can configure, connect, diagnose, and export related NXD configuration files for PROFINET IO networks. The method involves selecting the netX500 PNM module from the Master folder in the Hilscher GmbH list on the right and dragging it to the network line on the left. The same method can be used to add NXIO slave devices to the master network line on the left and configure the corresponding master and slave stations using DTM. For slave devices from other manufacturers, the device's GSD file needs to be added.
3.2 Master Station Communication Design
The master station communication utilizes C-Toolkit to configure the cifX card, including initialization, memory operations, character operations, event handling, file processing, synchronization timing, and PLC configuration reading and writing, as shown in Figure 4. Under the Visual Studio.NET platform, C# (C-sharp) is used in conjunction with the Lab files, API functions, and communication authorization protocols provided by C-Toolkit for loading the cifX card firmware to implement the master station communication program, including merging slave data into the database and sending relevant configuration information to the slave. Figure 5 shows the serial communication class event-driven configuration of the NXIO slave serial communication, and the control of the slave IO interface switching and LED status display via RS-232. The program also includes a Socket class to receive slave configuration and control information sent via the Web.
The main site's communication network program defines a Socket class to listen for configuration information sent by clients on the web page. Below is the main site's Socket communication code:
3.3 Web Control and Configuration Program Design
This project uses the Visual Studio .Net development platform to implement serial port configuration and LED monitoring of the Slave Device NXIO via a Web Server. Figure 6 shows a test interface for controlling the LEDs on the second slave device. The Web page encapsulates an ActiveX control containing a Socket for communication with the server-side Socket. When configuring slave information and receiving data collected from the slave, it triggers events and enables data interaction. The Web method is not suitable for real-time querying and display of monitoring data; however, the data status of each monitoring point can be queried by refreshing the Web page. For example, to refresh the monitoring page every two seconds, the following code can be added to the HTML file:
4. Research on netX SoC Slave System Technology
4.1 Communication Design of Embedded NetX Hardware Platform
The netX embedded system user program includes real-time communication and control programs. Real-time communication and control programs are designed under the rcX embedded system, with task scheduling based on time slices and interrupts in the real-time multi-tasking operating system. Figure 7 shows the NXIO slave software system architecture. The real-time communication and control programs exchange data through dual-port memory (DPM) and are relatively independent; when the real-time communication program uses a message communication mechanism, the integrity of the communication data can be improved by utilizing receive and send flags.
4.2 Design and Implementation of netX Slave Program
The slave control program is based on the rcX real-time operating system. It implements I/O control, serial communication, and PROFINET-based real-time communication by calling system functions in the board support package. The slave implementation flow is as follows: Hardware initialization is completed in the Hitop IDE development environment. The main function initializes and configures the tasks, including LED control, serial communication, PROFINET real-time communication, and scheduling between tasks. The program is then downloaded and resides in the rcX embedded controller. The software hierarchy of the slave communication and control program is shown in Figure 8.
5. Conclusion
Through research on communication technologies such as configuring the PROFINET protocol stack on NetX SoC, we have realized real-time Ethernet access to PROFINET, PROFINET and UART data communication between NetX SoC master and slave stations, and remote configuration management and monitoring of slave stations via the control master station in a Web-based manner. This provides a feasible technical solution for remote control and supervision using PROFINET.