Abstract:In order to solve the problem that automatic peripheral field devices access PROFINET network, while similar devices rely on specific chips, with high cost and poor portability,the PROFINET IO communication under the common network card is realized by software design. The IO device is implemented on the Raspberry Pi 3B+ development board, which supports asynchronous real-time data exchange. The IO module can be matched through the slot/ sub-slot data model. Through the design of the descriptive file, the IO module type is mapped to the ID of the module and sub-module to realize the modular IO device, and modules can be added and deleted as required; When the system is started, the controller addresses the IO devices according to the device name, and then assigns IP addresses to the IO devices based on the device name. The implementation of this process depends on DCP protocol, which is the basis of data interaction in PROFINET network. In order to deeply explore the PROFINET protocol stack, based on the implementation of PROFINET, starting with the principle of DCP protocol, the function and program implementation are studied in detail, and the implemented IO device is configured with PLC S7-1200 to verify the function of IO device and the working process of DCP. Experimental tests show that the Raspberry Pi realizes the communication functions of PROFINET RT and NRT, and its update time jitter is less than 50μs. Meet the application requirements of control engineering.