Introduce several handshake methods and characteristics when MES and PLC are integrated
In the automotive manufacturing industry, MES has deep integration with the device layer, and PLC integration is the most mainstream form. This article mainly introduces several handshake methods and characteristics when MES and PLC are integrated. Method 1: Periodic data capture Some of the critical process parameters of the equipment (such as the temperature of the heat-treating furnace of the gear shaft) are very important and need to be grasped regularly to generate real-time curves and for long-term traceability analysis. These process parameters are usually analog and the values ​​are constantly changing. Usually we can read this data through OPC software, processed with precision, and then regularly write to the real-time database. The characteristics of these data are: high reading frequency, small data changes, so there will be a large number of duplicate records when stored in the database, and the real-time database provides data compression functions, which are particularly suitable for the storage of such data. Method 2: Triggering on conditional The collection of many process parameters (such as bolt tightening values) is mainly used for post-mortem quality traceability analysis. Usually we will define a trigger signal to inform the MES to read. For example, after the engine has completed a physical assembly job at a station, the PLC will write key process parameters into the data exchange area and then set the DATA_READY signal. The MES scans the DATA_READY signal every 1 second. When this signal is high, the quality trace data of the data exchange area is read. Can refer to the following figure: The specific handshake process is: The engine completes an assembly step and the PLC writes parameter 1. The engine completes an assembly step and the PLC writes parameter 2. The engine completes all physical assembly operations and the PLC sets DATA_READY. The MES reads parameter 1 and parameter 2. The engine is ready to leave the current station and the PLC resets all data. Mode 3: Request-response mechanism, 1 handshake This approach is very similar to the message processing mechanism of the IT system such as MQ/WEB SERVICE. If the engine is online, the MES issues a work order to the PLC. Refer to the following figure for the process: The specific handshake process is: The PLC writes request data, such as stations, in PLC_MSG and sets REQUEST_SENT. The MES scans to REQUEST_SENT, reads PLC_MSG, generates work order data, writes MES_MSG, and sets RESPONSE_SENT. The PLC scans RESPONSE_SENT, reads MES_MSG and writes to the local data block, and then resets REQUEST_SENT and PLC_MSG. The MES resets all data and control bits. We can see that the entire data exchange process has only occurred one back and forth, that is, 1-2 steps, and 3-4 steps are the actions to destroy the message. This method also has a characteristic, that is, good encapsulation, the same interface, can not only issue work orders, but also can upload the station data, the difference is that the data stored in the PLC_MSG/MES_MSG is not the same. Mode 4: Request-response mechanism, 2-way handshake The same is an example of engine on line, the process can refer to the following figure: The specific handshake process is: The PLC writes request data in the PLC_MSG, such as a station. The PLC sets REQUEST_SENT. The MES scans to REQUEST_SENT, reads PLC_MSG, and sends REQUEST_RECEIVED. MES generates work order data and writes it to MES_MSG. The MES sets RESPONSE_SENT. The PLC scans RESPONSE_SENT, reads MES_MSG and writes to the local data block, then sets RESPONSE_RECEIVED. The MES scans RESPONSE_RECEIVED and resets all data and control bits. The PLC resets the local data and control bits. We can see that the whole process is equivalent to two handshakes, of which 1-3 is the first handshake to receive the request; 4-8 is the second handshake to send data. We can see that mode 4 is much more cumbersome than mode 3, but this method is still used in actual projects. This is because the full response time may be up to a few seconds, while the PLC scan cycle is only tens of milliseconds. The more status bits in the middle can be used as a status indication to ease worker's waiting anxiety, or as a breakpoint to facilitate communication debugging. Method 5: Station-based production cycle In some stations, there will be a number of key business processes, such as the engine on-line station first go online, then assembly, and finally send the station record. Then in a complete station production cycle, the PLC needs to perform data exchange with the MES twice, download the work order the first time, upload the station record the second time, as shown in the following figure: The specific handshake process is: When the engine arrives, the PLC sets ENGINE_ARRIVAL. The PLC checks the pallets, equipment, and materials and sets STATION_READY after conditions are met. The MES sets STATION_READY_RECEIVED. The MES writes work order data to MES_DATA. The MES sets MES_DATA_SENT. The PLC writes MES_DATA to the local data block and sets MES_DATA_RECEIVED. The MES resets all data and status bits on the IT side. The PLC starts the assembly work of this station and writes the engine serial number to ENGINE_SN. After the PLC is assembled, the PLC sets PLC_COMPLETE. The MES sets PLC_COMPLETE_RECEIVED. The MES executes the station logic and sets MES_COMPLETE after it is completed. The PLC sets MES_COMPLETE_RECEIVED. The MES resets all data and status bits on the IT side. The engine is ready to leave and the PLC sets ENGINE_LEAVE. The PLC resets all data and status bits. We can see that this approach is very tedious, but the advantages are: The key statuses in the production cycle are reflected and can be easily monitored via the HMI. The PLC status corresponds to the actual production execution and is easily traced when a problem occurs. When a program error occurs, it can be seen intuitively where the communication is going. In addition, we should also understand that downloading work orders and uploading records are only part of the complete production cycle, and have inherent logical connections. For example, during the assembly process, a cylinder problem is found and a cylinder needs to be changed. At this time, because the MES has not received the over-reach record, even when the STATION_READY signal is received for the second time, the MES still issues the same work order, thus effectively avoiding the loss of the work order and the engine serial number. Suizhou simi intelligent technology development co., LTD , https://www.msmsmart.com