Share this

Several ways for MES and PLC to communicate

2026-04-06 06:22:28 · · #1

In the automotive manufacturing industry, MES (Manufacturing Execution System) is deeply integrated with the equipment layer, and PLC (Programmable Logic Controller) integration is the most mainstream form. This article mainly introduces several handshake methods and characteristics when integrating MES with PLC.

Method 1: Periodically collect data

Key process parameters of certain equipment (such as the temperature of the heat treatment furnace for gearbox shafts) are very important and need to be captured regularly to generate real-time curves and for long-term traceability analysis.

These process parameters are usually analog quantities, and their values ​​are constantly changing.

We can usually read this data using OPC software, process it for precision, and then periodically write it into a real-time database.

These data are characterized by high reading frequency and low data change, resulting in a large number of duplicate records when stored in the database. Real-time databases provide data compression capabilities, making them particularly suitable for storing this type of data.

Method 2: Based on condition triggering

The collection of many process parameters (such as bolt tightening values) is mainly for post-event quality traceability analysis. We usually define a trigger signal to notify the MES to read them.

For example, after the engine completes its physical assembly at a certain workstation, the PLC will write the key process parameters into the data exchange area and then set the DATA_READY signal.

MES will scan and listen for the DATA_READY signal every second. When this signal is high, it will read the quality traceability data from the data exchange area.

Please refer to the image below:

The specific handshake process is as follows:

When the engine completes a certain assembly step, the PLC writes parameter 1.

When the engine completes a certain assembly step, parameter 2 is written into the PLC.

After the engine completes all physical assembly operations, the PLC sets the DATA_READY bit. The MES reads parameter 1 and parameter 2.

The engine is preparing to leave the current workstation, and the PLC resets all data.

Method 3: Request-response mechanism, one handshake

This approach is very similar to message processing mechanisms such as MQ/WEBSERVICE in IT systems.

For example, when an engine is put into production, the MES sends a work order to the PLC. The process can be seen in the following diagram:

The specific handshake process is as follows:

The PLC writes request data, such as the workstation, to PLC_MSG and sets the REQUEST_SENT bit.

When MES detects REQUEST_SENT, it reads PLC_MSG, generates work order data, writes it to MES_MSG, and sets RESPONSE_SENT.

The PLC scans REQUEST_SENT, reads MES_MSG and writes it to the local data block, and then resets REQUEST_SENT and PLC_MSG.

MES resets all data and control bits.

We can see that the entire data exchange process only involves one round trip, namely steps 1-2, while steps 3-4 are the actions of destroying the message.

Another feature of this method is its good encapsulation. The same interface can be used to send work orders and upload station data. The difference lies in the data content stored in PLC_MSG/MES_MSG.

Method 4: Request-response mechanism, two-way handshake

Another example of engine production line assembly can be seen in the following diagram:

The specific handshake process is as follows:

The PLC writes request data, such as the workstation, into PLC_MSG.

The PLC sets the REQUEST_SENT bit.

MES scans for REQUEST_SENT, reads PLC_MSG, and then sends REQUEST_RECEIVED.

MES generates work order data and writes it to MES_MSG.

MES sets the RESPONSE_SENT bit.

The PLC scans RESPONSE_SENT, reads MES_MSG and writes it to the local data block, and then sets RESPONSE_RECEIVED.

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. Steps 1-3 are the first handshake, used to receive the request; steps 4-8 are the second handshake, used to send the data.

We can see that method 4 is much more cumbersome than method 3, but this method is still widely used in actual projects. This is because the complete response time can be as long as several seconds, while the PLC's scan cycle is only tens of milliseconds. The extra status bits in between can serve as status indicators to alleviate the anxiety of workers waiting, and can also serve as breakpoints to facilitate communication debugging.

Method 5: Based on workstation production cycle

At some workstations, there are multiple key business processes. For example, at the engine production line workstation, the engine is first put into production, then assembled, and finally the station record is sent.

In a complete workstation production cycle, the PLC needs to exchange data with the MES twice: first, downloading the work order, and second, uploading the station record, as shown in the diagram below:

The specific handshake process is as follows:

When the engine arrives, the PLC sets the ENGINE_ARRIVAL bit.

The PLC checks the pallet, equipment, and materials, and sets the STATION_READY flag when the conditions are met.

MES sets STATION_READY_RECEIVED.

MES writes the work order data into MES_DATA.

MES sets the MES_DATA_SENT bit.

The PLC writes MES_DATA to the local data block and sets the MES_DATA_RECEIVED bit.

MES resets all data and status bits on the IT side.

The PLC begins the assembly operation at this workstation and writes the engine serial number into ENGINE_SN.

After the PLC is assembled, the PLC will set the PLC_COMPLETE bit.

MES sets PLC_COMPLETE_RECEIVED.

MES executes the transit logic and sets the MES_COMPLETE bit upon completion.

The PLC sets the MES_COMPLETE_RECEIVED bit.

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 is reset to all data and status bits.

We can see that this method is very cumbersome, but its advantages are:

The key states in the production cycle are all reflected and can be easily monitored through HMI.

PLC status corresponds to the actual production execution status, making it easy to track down problems when they occur.

When a program encounters an error, you can clearly see which step the communication process has reached.

In addition, we should understand that downloading work orders and uploading station records are only part of the complete production cycle and have an inherent logical connection. For example, if a problem is found in the cylinder block during the assembly process and a new cylinder block needs to be put on the line, the MES has not yet received the station record. Therefore, even when the STATION_READY signal is received for the second time, the MES will still issue the same work order. This can effectively avoid the loss of work orders and engine serial numbers.

Read next

CATDOLL 146CM Sasha TPE (Customer Photos)

Height: 146cm A-cup Weight: 26kg Shoulder Width: 32cm Bust/Waist/Hip: 64/54/74cm Oral Depth: 3-5cm Vaginal Depth: 3-15c...

Articles 2026-02-22