| With the plan of "Made in China 2025","intelligent manufacturing" has become a new development direction of manufacturing industry,and as the core component of "intelligent manufacturing",PLC is the cornerstone of industrial equipment automation and intelligence.With the continuous improvement of the degree of industrial automation,the manufacturing industry has put forward higher requirements for programmable control system,and to judge whether the programmable control system meets the requirements is to judge by its function blocks developed based on PLCopen specifications.In this paper,Simulink PLC Coder module in Matlab/Simulink is used to realize the development of programmable control system function blocks.Matlab/Simulink powerful numerical computing ability and flexible programming method are used to realize the writing of complex function blocks.After the writing of function blocks,Based on Matlab/Simulink interactive simulation environment,system modeling of the controlled object,so as to complete the data analysis of the function block in Matlab/Simulink,improve the development efficiency of the function block.The main research work of this paper is as follows:(1)Design the function block based on IEC61131-3 standard.Digital I/O function block,management function block,uniaxial motion function block and multi-axial motion function block are designed by using structured text(ST)language and function block(FBD)based on IEC61131-3standard.At the same time,aiming at the difficulty of writing complex algorithm function blocks,a method of generating function blocks quickly based on Matlab/Simulink is proposed.(2)The PLC system test platform is designed.In order to verify whether the developed functional blocks can meet the actual needs,a PLC test system based on distributed real-time Ethernet architecture is designed and built,and the hardware facilities,working principles and operating systems of the master-slave modules in the test system are described in detail.At the same time,in the programming software of the test platform,the corresponding human-computer interaction interface is designed to facilitate the real-time control of the operation of the function blocks.(3)Verification of the research results of the thesis.In the designed PLC test platform,the functional blocks designed and developed in this paper are tested experimentally.The experimental results show that the function blocks designed in this paper all meet the requirements of practical applications,so it can be determined that the method of quickly generating function blocks based on Matlab/Simulink proposed in this paper meets the industrial requirements and has good industrial application value. |