MES-based production line data regulation and control method and system
By defining the event interaction mechanism and setting the communication content area in the PLC, the problem of inconsistent communication interfaces caused by the diversity of PLC equipment is solved, effective data interaction between the MES system and the device is achieved, and the accuracy and interaction efficiency of production data are improved.
Patent Information
- Application Number
- CN202411668107.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
AI Technical Summary
Due to the diversity of PLC equipment on the production line, the communication interfaces provided by various equipment programs are not uniform. This lack of unified standards seriously hinders the effective data interaction between the MES system and the equipment, and thus limits the implementation of many key functions.
By defining the event interaction mechanism, the PLC and the MES system interact data through the event interaction mechanism, and set up a communication content area in the PLC, including multiple preset communication bits, register different events, and each event corresponds to a preset function. The PLC and the MES system constantly read and write the content of the preset communication bits to complete data interaction and realize the required functions.
It realizes rapid data interaction between production equipment and MES system, unifies the communication standards between PLC equipment and MES system, simplifies the data interaction process, improves data interaction efficiency, ensures accurate transmission and recording of information between PLC and MES system, and improves the accuracy of production data.
Smart Images

Figure CN119620704A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of production management, and in particular to a production line data control method and system based on MES. Background Art
[0002] Data collection plays a vital role in MES. The MES data collection system can monitor the production process in real time by collecting data on the production line, such as equipment status, production progress, output, etc. This real-time monitoring helps to promptly discover bottlenecks and problems in production, so that measures can be taken quickly to solve them, reduce downtime and scrap rate, and significantly improve production efficiency. By integrating various production equipment, the production process can be automated. Data collection, as the basis of automated control, ensures the smooth operation of the production process, reduces manual intervention and human errors, and improves the speed and reliability of the production line. The data collection system can collect quality data in the production process in real time, such as temperature, pressure, speed and other key quality parameters. By monitoring these data, the system can adjust production conditions in real time to ensure product consistency and reliability.
[0003] Due to the diversity of PLC equipment on the production line, the communication interfaces provided by various equipment programs are not unified. This lack of unified standards seriously hinders the effective data interaction between the MES system and the equipment, and thus limits the realization of many key functions. Therefore, it is of great significance to develop a production line data control method based on MES. Summary of the invention
[0004] The purpose of the present invention is to provide a production line data control method and system based on MES to solve the shortcomings of the background technology.
[0005] In order to achieve the above object, the present invention provides the following technical solution: a production line data control method based on MES, comprising:
[0006] Define the event interaction mechanism, through which data is exchanged between PLC and MES system, where MES system stands for manufacturing execution system and PLC stands for programmable logic controller;
[0007] A communication content area is set in the PLC, wherein the communication content area includes a plurality of preset communication bits;
[0008] Different events are registered in multiple preset communication bits. Each event corresponds to a preset function. The PLC and MES systems continuously read and write the contents of the preset communication bits to complete data interaction and realize the required functions.
[0009] In a new embodiment, the steps of defining an event interaction mechanism and performing data interaction between the PLC and the MES system through the event interaction mechanism are as follows:
[0010] Define the event interaction mechanism, through which the PLC and MES system interact and meet the preset interaction logic;
[0011] The preset interaction logic includes:
[0012] When the PLC sends a request but does not receive a response from the MES system within the preset time, the PLC should display an MES communication timeout error and submit it to the management end, and reset the request bit to 0, where the request bit indicates the number of request signals. If no request signal is generated, the request bit value is 0. The request includes interactive data and request signals.
[0013] All request signals will be closed after the interaction is completed, and the request signals will remain open until the interaction between the PLC and the MES system is completed;
[0014] All requests must complete all interactive data before they can be sent.
[0015] In a new embodiment, the step of setting a communication content area in the PLC, wherein the communication content area includes a plurality of preset communication bits, is as follows:
[0016] Set up a communication content area in the PLC, and divide the communication content area into two parts, including the P area and the M area. The P area is written by the PLC and read by the MES, and the M area is written by the MES and read by the PLC.
[0017] A plurality of preset communication bits are constructed in the communication content area, wherein the communication bits include communication bit address information, interactive data format and interactive data access rights.
[0018] In a new embodiment, different events are registered in multiple preset communication bits, each event corresponds to a preset function, and the PLC and MES systems continuously read and write the contents of the preset communication bits to complete data interaction and realize the required functions. The steps are:
[0019] Register different events in multiple preset communication positions, including: equipment status, downloading product model list, downloading production parameters, uploading production parameters, processing part status check, processing part status and processing data upload, equipment verification;
[0020] The PLC and MES systems continuously read and write interactive data in the preset communication bits, and execute corresponding events to realize corresponding functions;
[0021] The MES system can control the processing parameters of the equipment by downloading product models, downloading production parameters and uploading production parameters;
[0022] The MES system controls the processing of workpieces through workpiece status inspection, workpiece status and workpiece data upload;
[0023] The overall status of the equipment can be controlled through equipment status and equipment verification.
[0024] In a new embodiment, the steps of realizing the control of the processing parameters of the equipment by the MES system by downloading the product model, downloading the production parameters and uploading the production parameters are:
[0025] The PLC sends a product model download request to the MES system through the preset communication bit;
[0026] After receiving the request, the MES system writes the product model list data into the preset communication bit of zone M;
[0027] PLC reads the product model list data in the preset communication bit of area M, and displays the product model list data on the operation interface;
[0028] The PLC sends a product parameter download request to the MES system through the preset communication bit in the P area, and writes the product model for which the parameters need to be downloaded into the preset communication bit in the P area;
[0029] After receiving the request, the MES system reads the product model in the preset communication bit of the P area, searches for the parameter information of the corresponding product from the database according to the product model, and writes the parameter information into the preset communication bit of the M area;
[0030] The PLC reads the parameter information in the preset communication bit of the M area and sets the parameters of the device according to the parameter information.
[0031] In a new embodiment, the steps of realizing the control of the workpiece processing process by the MES system through workpiece status inspection, workpiece status and workpiece data upload are:
[0032] The PLC sends a workpiece status check request to the MES system through the preset communication bit in the P area, and writes the product model and barcode list information into the preset communication bit in the P area;
[0033] After receiving the request, the MES system reads the product model and barcode list information in the preset communication position of the P area, and queries the status information of the workpiece according to the barcode information, and writes the query result to the preset communication position of the M area. The query result includes OK, NG and error information. If the status information meets the use standard, the query result is OK. If the status information does not meet the use standard, the query result is NG and error information.
[0034] PLC reads the query result in the preset communication bit of zone M and performs corresponding operations according to the query result, that is, if the query result is OK, processing is performed, and if the query result is , rework is performed;
[0035] After the processing is completed, the PLC writes the product signal, barcode, processing results, and list data generated by the process to the preset communication bit in the P area, and sends the processing part status and processing data upload request to the MES system through the preset communication bit in the P area;
[0036] After receiving the request, the MES system reads the data in the preset communication bit of the P area, updates the status information of the workpiece according to the data, and saves the process data.
[0037] In a new embodiment, the steps of controlling the overall status of the device through device status and device verification are as follows:
[0038] According to the change of equipment status, PLC writes the equipment status information into the preset communication bit of P area, and sends the equipment status change request to MES system through the preset communication bit of P area, where the status information includes: production, idle, manual, verification, fault. If the status information is fault, PLC writes the fault code and fault description into the preset communication bit of P area;
[0039] After receiving the request, the MES system reads the device status information in the preset communication bit of the P area, updates the device status information, and performs corresponding operations according to the device status information. That is, when the device status information shows a fault, the fault code and fault description will be sent to the administrator;
[0040] The MES system writes the reminder information into the preset communication bit of the M area, and initiates a reminder request to the PLC through the preset communication bit of the M area. After receiving the request, the PLC reads the reminder information in the preset communication bit of the M area and completes the corresponding operation according to the reminder information, where the reminder information includes forced shutdown, material shortage, verification required, and production parameter change;
[0041] The PLC sends a device verification request to the MES system through the preset communication bit in the P area, and writes the device verification test items and test result data into the preset communication bit in the P area;
[0042] After receiving the request, the MES system reads the equipment verification test items and test result data in the preset communication bit of the P area, saves the equipment verification test items and test result data into the database, and writes back the list of unfinished test items to the PLC according to the verification results.
[0043] The present invention also provides a production line data control system based on MES, comprising:
[0044] Event interaction environment module: defines the event interaction mechanism. PLC and MES system exchange data through the event interaction mechanism, where MES system stands for manufacturing execution system and PLC stands for programmable logic controller.
[0045] Communication area module: a communication content area is set in the PLC, wherein the communication content area includes a plurality of preset communication bits;
[0046] Event module: registers different events in multiple preset communication bits, each event corresponds to a preset function, and the PLC and MES systems continuously read and write the contents of the preset communication bits to complete data interaction and realize the required functions.
[0047] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0048] 1. The present invention realizes fast data interaction between production equipment and MES system by setting a communication content area and setting multiple communication bits therein, defining an event interaction mechanism and constructing interaction logic. The design of the communication bit and the event interaction mechanism unifies the communication standard between PLC equipment and MES system, and can meet the interaction between different PLC equipment and MES system. At the same time, the communication area is divided into P area and M area to simplify the data interaction process and improve the data interaction efficiency. The design of the interaction logic ensures the integrity and timeliness of the interaction data.
[0049] 2. The present invention realizes corresponding functions by registering different events and completing events through different interactive processes. It ensures accurate transmission and recording of information between PLC and MES systems and improves the accuracy of production data through registration and data interaction of equipment status, downloading product model list, downloading production parameters, uploading production parameters, processing part status check, processing part status and processing data upload, and equipment verification record upload events. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0051] Figure 1 is a flow chart of the method of the present invention;
[0052] Figure 2 It is a system block diagram of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Example 1, please refer to Figure 1 As shown, the present embodiment uses a production line data control method based on MES, including:
[0055] S1. Define the event interaction mechanism. PLC and MES system exchange data through the event interaction mechanism, where MES system stands for manufacturing execution system and PLC stands for programmable logic controller;
[0056] S2. Setting a communication content area in the PLC, wherein the communication content area includes a plurality of preset communication bits;
[0057] S3. Register different events in multiple preset communication bits. Each event corresponds to a preset function. The PLC and MES systems continuously read and write the contents of the preset communication bits to complete data interaction and realize the required functions.
[0058] As described in the above steps S1-S3, data acquisition plays a vital role in MES. The MES data acquisition system can monitor the production process in real time by collecting data on the production line, such as equipment status, production progress, output, etc. This real-time monitoring helps to promptly discover bottlenecks and problems in production, so that measures can be taken quickly to solve them, reduce downtime and scrap rate, and significantly improve production efficiency. By integrating various production equipment, the production process can be automatically controlled. Data acquisition, as the basis of automatic control, ensures the smooth operation of the production process, reduces manual intervention and human errors, and improves the operation speed and reliability of the production line. However, due to the diversity of PLC equipment on the production line, the communication interfaces provided by various equipment programs are not unified. This lack of unified standards seriously hinders the effective data interaction between the MES system and the equipment, thereby limiting the realization of many key functions. The present invention sets a communication interface to ensure that the MES system can communicate with the equipment. The communication content area is defined and multiple communication bits are set therein. At the same time, the event interaction mechanism is defined and the interaction logic is constructed to realize the rapid data interaction between the production equipment and the MES system. The design of the communication bit and the event interaction mechanism unifies the communication standard between the PLC equipment and the MES system, and can meet the interaction between different PLC equipment and the MES system. At the same time, the communication area is divided into the P area and the M area to simplify the data interaction process and improve the data interaction efficiency. The design of the interaction logic ensures the integrity and timeliness of the interaction data. At the same time, the present invention registers different events and completes the events through different interaction processes to realize the corresponding functions. Through the registration and data interaction of equipment status, downloading product model list, downloading production parameters, uploading production parameters, processing part status inspection, processing part status and processing data upload, and equipment verification record upload events, it ensures the accurate transmission and recording of information between the PLC and the MES system, and improves the accuracy of production data.
[0059] In one embodiment, the step S1 of defining an event interaction mechanism and performing data interaction between the PLC and the MES system through the event interaction mechanism includes:
[0060] S10. Define the event interaction mechanism. The PLC and MES system interact with each other through the event interaction mechanism and meet the preset interaction logic.
[0061] S11. The preset interaction logic includes:
[0062] S12. When the PLC sends a request but does not receive a response from the MES system within the preset time, the PLC shall display an MES communication timeout error and submit it to the management end, and reset the request bit to 0, where the request bit indicates the number of request signals. If no request signal is generated, the request bit value is 0. The request includes interactive data and request signals.
[0063] S13. All request signals will be closed after the interaction is completed. The request signals will remain open until the interaction between the PLC and the MES system is completed.
[0064] S14. All requests must complete all interactive data before they can be sent;
[0065] As described in the above steps S11-S14, an interactive environment is constructed between the PLC and the EMS system, including an event interaction mechanism and an interaction logic. The interaction is achieved by constructing the interaction logic between the PLC and the EMS system. Different interactive tasks are completed by modifying the interactive data, that is, different events are completed and different functions are realized. The preset interaction logic includes: 1. When the PLC sends a request, the request includes interactive data and a request signal, but no response from the MES system is received within the preset time, the PLC should display an MES communication timeout error and submit it to the management end, and reset the request bit to 0 at the same time, where the request bit represents the number of request signals. If no request signal is generated, the request bit value is 0. If there are multiple request signals, the value of the request bit changes accordingly. The setting of the request bit can ensure that the MES system reasonably allocates system computing power to reply to requests. If the request for a certain component is displayed as 0, there is no need to pay attention to the information of that part. If multiple request bits are displayed, they are replied in chronological order. 2. All requests are sent to the management end. The request signal will be closed after the interaction is completed, and the request signal will remain open before the interaction between the PLC and the MES system is completed. 3. All requests must complete all interaction data filling before they can be issued. The request signal will be closed after the interaction is completed, and it will remain open during the interaction process. This can ensure the independence and accuracy of the data during the interaction between the PLC and the MES system. If the request signal is closed halfway during the completion of an interaction task for a certain request, data from other requests will intervene, causing confusion in the execution of the request. At the same time, all requests must be issued after all interaction data is filled in, which ensures the integrity of the interaction data and avoids interaction failures caused by missing data. Under the premise that the PLC and the MES system fully follow the preset interaction logic, the orderly processing of requests and the integrity, independence and accuracy of the interaction data can be guaranteed. The definition of the event interaction mechanism and the construction of the interaction logic build an interaction environment between the PLC and the MES system, and a series of functions are realized through this interaction environment.
[0066] In one embodiment, the step S2 of setting a communication content area in the PLC, wherein the communication content area includes a plurality of preset communication bits, comprises:
[0067] S21, setting a communication content area in the PLC, dividing the communication content area into two parts including a P area and an M area, wherein the P area is written by the PLC and read by the MES, and the M area is written by the MES and read by the PLC;
[0068] S22, constructing a plurality of preset communication bits in the communication content area, wherein the communication bits include communication bit address information, interactive data format, and interactive data access rights;
[0069] As described in the above steps S21-S22, a communication content area is set in the PLC, which is used for the interaction between the PLC and the MES system. At the same time, the communication content area is divided into two parts including the P area and the M area. The P area is written by the PLC and read by the MES, and the M area is written by the MES and read by the PLC. The P area is mainly used for writing PLC equipment data, such as writing updated production data, process parameters, equipment status and other data to the MES system for reading. The MES system monitors the completed production process based on the data provided by the P area. The M area is mainly used for writing MES system data, such as writing production plans, process parameter adjustments and other data to the PLC equipment for reading. The PLC equipment completes the production process based on the data provided by the MES system. In actual In the design of the communication content area, the label of the P area is set to COMM.PLC, and the label of the M area is set to COMM.ACC. The above two labels represent the label classification of the overall communication content area. Different labels are defined for different events, and multiple preset communication bits are constructed in the communication content area. The communication bit contains address information, interaction data format, and interaction data access rights. In the actual interaction process, the data generated by different functions are different. Therefore, different communication bits are designed to provide reasonable interaction addresses for each type of data. The communication bit will record the interaction data format to ensure that different PLC devices can interact smoothly with the MES system. At the same time, the interaction data access rights are set to ensure the security and independence of the interaction data and the smooth completion of the interaction process.
[0070] In one embodiment, the step S3 of registering different events in a plurality of preset communication bits, each event corresponding to a preset function, and the PLC and MES system continuously reading and writing the content of the preset communication bits to complete data interaction and realize the required functions includes:
[0071] S31. Registering different events in multiple preset communication positions includes: equipment status, downloading product model list, downloading production parameters, uploading production parameters, processing part status check, processing part status and processing data upload, and equipment verification;
[0072] S32, PLC and MES systems continuously read and write interactive data in preset communication bits, and execute corresponding events to realize corresponding functions;
[0073] S33, by downloading product models, downloading production parameters and uploading production parameters, the MES system can control the processing parameters of the equipment;
[0074] S34, realize the control of the processing process of the workpiece by the MES system through the workpiece status inspection, workpiece status and workpiece data upload;
[0075] S35. Control the overall status of the equipment through equipment status and equipment verification;
[0076] As described in the above steps S31-S35, different events are registered in the preset communication bit. The composition of the event is a complete interaction process between the PLC and the MES system. For example, the process parameters need to be adjusted during the production process, so the process parameter adjustment event is registered, which includes the MES system writing the process parameter adjustment plan in the preset communication bit of the M area, and sending a process parameter adjustment request to the PLC device through the preset communication bit. The PLC device receives the request signal and reads the process parameter adjustment plan in the preset communication bit, and then adjusts the process parameters of the production process according to the adjustment plan. After the process parameter adjustment is completed, the completed process parameter data is written into the preset communication bit of the P area, and an adjustment completion request is sent to the MES system. The MES system reads and writes the process parameter data in the preset communication bit of the P area. At this point, the interaction is completed, that is, the process parameter adjustment event is completed. The adjustment of the process parameters in the production process is realized through the completion of the process parameter adjustment event. Various events are registered based on production needs, including: equipment status, downloading product model list, downloading production parameters, uploading production parameters, processing part status inspection, processing part status and processing data upload, equipment verification record upload, P LC equipment and MES system complete the above events and realize corresponding functions by continuously reading and writing interactive data in preset communication bits. Parameter control of equipment processing can be realized by completing the event of downloading product model and production parameters. Control of workpiece processing can be realized by completing the event of processing part status check and process data upload. Control of the overall status of equipment can be realized by completing the event of equipment status and equipment verification. In the actual design process, corresponding labels of P area and M area are designed for different events. For example, in the event of downloading product model list, the label of P area is set to TYPE.PLC, and the label of M area is set to TYPE.ACC. In the event of downloading production parameters and uploading production parameters, the label of P area is set to PARAM.PLC, and the label of M area is set to PARAM.ACC. In the event of processing part status check, processing part status and processing data upload, the label of P area is set to LOAD.PLC, and the label of M area is set to LOAD.ACC. In the event of uploading equipment status and equipment verification record, the label of P area is set to AUDIT.PLC, and the label of M area is set to AUDIT.ACC.
[0077] In one embodiment, the step S33 of implementing the control of the processing parameters of the equipment by the MES system by downloading the product model, downloading the production parameters and uploading the production parameters includes:
[0078] S331, PLC sends a product model download request to the MES system through the preset communication bit;
[0079] S332, after receiving the request, the MES system writes the product model list data into the preset communication bit of zone M;
[0080] S333, PLC reads the product model list data in the preset communication bit of zone M, and displays the product model list data on the operation interface;
[0081] S334, PLC sends a product parameter download request to the MES system through the preset communication bit of the P zone, and writes the product model for which the parameters need to be downloaded into the preset communication bit of the P zone;
[0082] S335. After receiving the request, the MES system reads the product model in the preset communication position of the P area, searches for the parameter information of the corresponding product from the database according to the product model, and writes the parameter information into the preset communication position of the M area;
[0083] S336, PLC reads the parameter information in the preset communication bit of zone M, and sets the parameters of the device according to the parameter information;
[0084] As described in the above steps S331-S336, in order to realize the control of the processing parameters of the equipment, the interactive data in the TYPE.PLC and TYPE.ACC communication bits is read and written by the PLC equipment and the MES system. For the event of downloading the product model, the PLC first sends a product model download request to the MES system through the TYPE.PLC communication bit, the MES system receives the product model download request and writes the product model list data into the TYPE.PLC communication bit, the PLC reads the product model list data in the TYPE.PLC communication bit and displays the product model list data on the operation interface. For the events of downloading production parameters and uploading production parameters, the PLC first sends a product parameter download request to the MES system through the PARAM.PLC communication bit, and writes the product model to be downloaded into the PARAM.PLC communication bit. After receiving the request, the MES system reads the product model in the PARAM.PLC communication bit, and searches for the parameter information of the corresponding product from the database according to the product model, writes the parameter information into the PARAM.ACC communication bit, the PLC reads the parameter information in the PARAM.ACC communication bit, and sets the parameters of the equipment according to the parameter information.
[0085] In one embodiment, the step S34 of realizing the control of the workpiece processing process by the MES system through workpiece status inspection, workpiece status and workpiece data upload includes:
[0086] S341, PLC sends a workpiece status check request to the MES system through the preset communication bit in the P zone, and writes the product model and barcode list information into the preset communication bit in the P zone;
[0087] S342, after receiving the request, the MES system reads the product model and barcode list information in the preset communication position of the P area, queries the status information of the workpiece according to the barcode information, and writes the query result to the preset communication position of the M area, where the query result includes OK, NG and error information. If the status information meets the use standard, the query result is OK, and if the status information does not meet the use standard, the query result is NG and error information;
[0088] S343, PLC reads the query result in the preset communication bit of zone M, and performs corresponding operations according to the query result, that is, if the query result is OK, processing is performed, and if the query result is NG or error information, rework is performed;
[0089] S344, after the processing is completed, the PLC writes the product signal, barcode, processing results, and list data generated by the process into the preset communication bit of the P area, and sends the processing part status and processing data upload request to the MES system through the preset communication bit of the P area;
[0090] S345, after receiving the request, the MES system reads the data in the preset communication bit of the P area, updates the status information of the workpiece according to the data, and saves the process data;
[0091] As described in the above steps S341-S345, in order to realize the control of the processing of the workpiece, the interactive data in the LOAD.PLC and LOAD.ACC communication bits is read and written by the PLC device and the MES system. For the workpiece status check event, the PLC sends a workpiece status check request to the MES system through the LOAD.PLC communication bit, and writes the product model and barcode list information into the LOAD.PLC communication bit. After receiving the request, the MES system reads the product model and barcode list information in the LOAD.PLC communication bit, and queries the status information of the workpiece according to the barcode information, and writes the query result into the LOAD.ACC communication bit, where the query result includes OK, NG and error information. If the status information meets the usage standard, it is checked. If the query result is OK, if the status information does not meet the usage standards, the query result is NG and an error message. The PLC reads the query result in the LOAD.ACC communication bit and performs corresponding operations based on the query result, that is, if the query result is OK, processing is performed, and if the query result is NG and an error message, rework is performed. For the status of the processed part and the upload of processing data, after the processing is completed, the PLC writes the product signal, barcode, processing result, and list data generated by the process to the LOAD.PLC communication bit, and sends a request for uploading the status of the processed part and processing data to the MES system through the LOAD.PLC communication bit. After receiving the request, the MES system reads the list data in the LOAD.PLC communication bit, updates the status information of the processed part according to the list data, and saves the process data.
[0092] In one embodiment, the step S35 of controlling the overall status of the device through the device status and device verification includes:
[0093] S351. PLC writes the equipment status information into the preset communication bit of the P zone according to the change of the equipment status, and sends the equipment status change request to the MES system through the preset communication bit of the P zone, wherein the status information includes: production, idle, manual, verification, and fault. If the status information is a fault, the PLC writes the fault code and fault description into the preset communication bit of the P zone;
[0094] S352, after receiving the request, the MES system reads the device status information in the preset communication bit of the P zone, updates the device status information, and performs corresponding operations according to the device status information, that is, when the device status information shows a fault, the fault code and fault description will be sent to the administrator;
[0095] S353, the MES system writes the reminder information into the preset communication bit of the M area, and initiates a reminder request to the PLC through the preset communication bit of the M area. After receiving the request, the PLC reads the reminder information in the preset communication bit of the M area, and completes corresponding operations according to the reminder information, wherein the reminder information includes forced shutdown, material shortage, verification required, and production parameter change;
[0096] S354, PLC sends a device verification request to the MES system through the preset communication bit of the P zone, and writes the device verification test items and test result data into the preset communication bit of the P zone;
[0097] S355. After receiving the request, the MES system reads the equipment verification test items and test result data in the preset communication bit of the P zone, saves the equipment verification test items and test result data into the database, and writes back the unfinished test item list to the PLC according to the verification result;
[0098] As described in the above steps S351-S355, in order to achieve the control of the overall status of the equipment, the interactive data in the AUDIT.PLC and AUDIT.ACC communication bits is read and written by the PLC device and the MES system. For equipment status events, the PLC writes the equipment status information to the AUDIT.PLC communication bit according to the change of the equipment status, and sends an equipment status change request to the MES system through the AUDIT.PLC communication bit, where the status information includes: production, idle, manual, verification, and fault. If the status information is a fault, the PLC writes the fault code and fault description to the AUDIT.PLC communication bit. After receiving the request, the MES system reads the equipment status information in the AUDIT.PLC communication bit, updates the equipment status information, and performs corresponding operations according to the equipment status information. That is, when the equipment status information shows a fault, the fault code and fault description will be sent to the administrator, and the MES system will send a reminder to the PLC. The information includes forced shutdown, material shortage, verification required and production parameter change. The process is that the MES system writes the reminder information to the preset AUDIT.ACC communication bit, and initiates a reminder request to the PLC through the AUDIT.ACC communication bit. After receiving the request, the PLC reads the reminder information in the AUDIT.ACC communication bit and completes the corresponding operation according to the reminder information. For equipment verification events, the PLC sends an equipment verification request to the MES system through the AUDIT.PLC communication bit, and writes the equipment verification test items and test result data to the AUDIT.PLC communication bit. After receiving the request, the MES system reads the equipment verification test items and test result data in the AUDIT.PLC communication bit, and saves the equipment verification test items and test result data to the database. According to the verification results, the list of unfinished test items is written back to the PLC, that is, when there are unfinished tests, the untested items will be fed back to the PLC. Based on production needs, the PLC determines whether re-testing is required.
[0099] A production line data control system based on MES, comprising:
[0100] Event interaction environment module: defines the event interaction mechanism. PLC and MES system exchange data through the event interaction mechanism, where MES system stands for manufacturing execution system and PLC stands for programmable logic controller.
[0101] Communication area module: a communication content area is set in the PLC, wherein the communication content area includes a plurality of preset communication bits;
[0102] Event module: registers different events in multiple preset communication bits, each event corresponds to a preset function, and the PLC and MES systems continuously read and write the contents of the preset communication bits to complete data interaction and realize the required functions.
[0103] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A production line data control method based on MES, characterized by: Define the event interaction mechanism, through which data is exchanged between PLC and MES system, where MES system stands for manufacturing execution system and PLC stands for programmable logic controller; A communication content area is set in the PLC, wherein the communication content area includes a plurality of preset communication bits; Different events are registered in multiple preset communication bits. Each event corresponds to a preset function. The PLC and MES systems continuously read and write the contents of the preset communication bits to complete data interaction and realize the required functions.
2. The production line data control method based on MES according to claim 1, characterized in that: The steps of defining the event interaction mechanism and performing data interaction between the PLC and the MES system through the event interaction mechanism are as follows: Define the event interaction mechanism, through which the PLC and MES system interact and meet the preset interaction logic; The preset interaction logic includes: When the PLC sends a request but does not receive a response from the MES system within the preset time, the PLC should display an MES communication timeout error and submit it to the management end, and reset the request bit to 0, where the request bit indicates the number of request signals. If no request signal is generated, the request bit value is 0. The request includes interactive data and request signals. All request signals will be closed after the interaction is completed, and the request signals will remain open until the interaction between the PLC and the MES system is completed; All requests must complete all interactive data before they can be sent.
3. The production line data control method based on MES according to claim 1, characterized in that: The step of setting a communication content area in the PLC, wherein the communication content area includes a plurality of preset communication bits, is as follows: Set up a communication content area in the PLC, and divide the communication content area into two parts, including the P area and the M area. The P area is written by the PLC and read by the MES, and the M area is written by the MES and read by the PLC. A plurality of preset communication bits are constructed in the communication content area, wherein the communication bits include communication bit address information, interactive data format and interactive data access rights.
4. The production line data control method based on MES according to claim 1, characterized in that: The steps of registering different events in multiple preset communication bits, each event corresponding to a preset function, and PLC and MES system continuously reading and writing the content of the preset communication bits to complete data interaction and realize the required functions are as follows: Register different events in multiple preset communication positions, including: equipment status, downloading product model list, downloading production parameters, uploading production parameters, processing part status check, processing part status and processing data upload, equipment verification; The PLC and MES systems continuously read and write interactive data in the preset communication bits and execute corresponding events; The MES system can control the processing parameters of the equipment by downloading product models, downloading production parameters and uploading production parameters; The MES system controls the processing of workpieces through workpiece status inspection, workpiece status and workpiece data upload; The overall status of the equipment can be controlled through equipment status and equipment verification.
5. The method for controlling production line data based on MES according to claim 4, characterized in that: The steps of implementing the control of the processing parameters of the equipment by the MES system by downloading the product model, downloading the production parameters and uploading the production parameters are as follows: The PLC sends a product model download request to the MES system through the preset communication bit; After receiving the request, the MES system writes the product model list data into the preset communication bit of zone M; PLC reads the product model list data in the preset communication bit of area M, and displays the product model list data on the operation interface; The PLC sends a product parameter download request to the MES system through the preset communication bit in the P area, and writes the product model for which the parameters need to be downloaded into the preset communication bit in the P area; After receiving the request, the MES system reads the product model in the preset communication bit of the P area, searches for the parameter information of the corresponding product from the database according to the product model, and writes the parameter information into the preset communication bit of the M area; The PLC reads the parameter information in the preset communication bit of the M area and sets the parameters of the device according to the parameter information.
6. The method for controlling production line data based on MES according to claim 4, characterized in that: The steps of realizing the control of the workpiece processing process by the MES system through workpiece status inspection, workpiece status and workpiece data upload are: The PLC sends a workpiece status check request to the MES system through the preset communication bit in the P area, and writes the product model and barcode list information into the preset communication bit in the P area; After receiving the request, the MES system reads the product model and barcode list information in the preset communication position of the P area, and queries the status information of the workpiece according to the barcode information, and writes the query result to the preset communication position of the M area. The query result includes OK, NG and error information. If the status information meets the use standard, the query result is OK. If the status information does not meet the use standard, the query result is NG and error information. PLC reads the query result in the preset communication bit of zone M and performs corresponding operations according to the query result, that is, if the query result is OK, processing is performed, and if the query result is , rework is performed; After the processing is completed, the PLC writes the product signal, barcode, processing results, and list data generated by the process to the preset communication bit in the P area, and sends the processing part status and processing data upload request to the MES system through the preset communication bit in the P area; After receiving the request, the MES system reads the data in the preset communication bit of the P area, updates the status information of the workpiece according to the data, and saves the process data.
7. The production line data control method based on MES according to claim 4 is characterized in that: The steps of controlling the overall status of the device through device status and device verification are as follows: According to the change of equipment status, PLC writes the equipment status information into the preset communication bit of P area, and sends the equipment status change request to MES system through the preset communication bit of P area, where the status information includes: production, idle, manual, verification, fault. If the status information is fault, PLC writes the fault code and fault description into the preset communication bit of P area; After receiving the request, the MES system reads the device status information in the preset communication bit of the P area, updates the device status information, and performs corresponding operations according to the device status information. That is, when the device status information shows a fault, the fault code and fault description will be sent to the administrator; The MES system writes the reminder information into the preset communication bit of the M area, and initiates a reminder request to the PLC through the preset communication bit of the M area. After receiving the request, the PLC reads the reminder information in the preset communication bit of the M area and completes the corresponding operation according to the reminder information, where the reminder information includes forced shutdown, material shortage, verification required, and production parameter change; The PLC sends a device verification request to the MES system through the preset communication bit in the P area, and writes the device verification test items and test result data into the preset communication bit in the P area; After receiving the request, the MES system reads the equipment verification test items and test result data in the preset communication bit of the P area, saves the equipment verification test items and test result data into the database, and writes back the list of unfinished test items to the PLC according to the verification results.
8. A production line data control system based on MES, used to implement a production line data control method based on MES according to any one of claims 1 to 7, characterized in that: Event interaction environment module: defines the event interaction mechanism. PLC and MES system exchange data through the event interaction mechanism, where MES system stands for manufacturing execution system and PLC stands for programmable logic controller. Communication area module: a communication content area is set in the PLC, wherein the communication content area includes a plurality of preset communication bits; Event module: registers different events in multiple preset communication bits, each event corresponds to a preset function, and the PLC and MES systems continuously read and write the contents of the preset communication bits to complete data interaction and realize the required functions.
Citation Information
Cited By
Interactive interface generation method and system based on cable production equipment process parameters
CN121070490A