2023年2月1日

MES-PLC Handshaking Methods (MES in Vehicle Manufacturing)

In vehicle manufacturing, MES integrates with devices deeply, and in most cases integrates via PLC.

This article introduces typical methods of MES-PLC handshaking and their features.

 

Method1: repeatedly collect data

For some devices, their key process parameters(such as temperature of heating oven) are very important, need to collect repeatedly to generate real time diagram, and for summary report and long-term analysis.

Normally these process parameters are analog data, and their values are changing continuously.

We can read these data via OPC, and write into Database repeatedly.

The feature of these data: high read frequency, small range of data values, so there will be lots of records with same values. Real-time Database is suitable to store such data.

 

Method 2: triggered by conditions

For lots of process parameters(e.g. torque values), their data are collected for traceability analysis, we can define a trigger signal for MES to read.

For example while engine completes assembly in one station, PLC writes key parameter values into Data Block, and set DATA_READY = true.

And MES will monitor DATA_READY every 1 second, when it’s set to true, then MES reads all data from Data Block.

Refer to below time-sequence diagram:



 

Detail handshaking process:

1)       Engine completes 1 step, PLC writes parameter 1.

2)       Engine completes another step, PLC writes parameter 2.

3)       Engine completes all assembly operations, PLC sets DATA_READY to true. Then MES reads parameter 1, parameter 2.

4)       Engine ready to leave current station, PLC resets all data.

 

Method 3: request-response mechanism, with 1 handshaking

For example when Engine Lift On, MES downloads Work Orders to PLC, the process can refer to below diagram:



 

Detail handshaking process:

1)       PLC writes request data(such as station) into PLC_MSG, then sets REQUEST_SENT = true.

2)       MES monitors changes of REQUEST_SENT, then reads data from PLC_MSG, then generates Order data and writes into MES_MSG, and sets RESPONSE_SENT = true.

3)       PLC monitors change of RESPONSE_SENT, then reads data from MES_MSG, and writes data into local Data Block, and then resets REQUEST_SENT and PLC_MSG.

4)       MES resets all data.

 

We can see that, the data exchange only happened once(step 1 & 2), the step 3&4 are only used to destroy data.

We can use this method to transfer different data in same station, for example download Orders & upload travel records, the only difference will be data content in PLC_MSG/MES_MSG.

 

Method 4: request-response mechanism, with 2 handshaking

The same example of Engine Lift On, the process can be referred to below diagram:



 

Detail handshaking process:

1)       PLC writes data into PLC_MSG.

2)       PLC sets REQUEST_SENT = true.

3)       MES monitors REQUEST_SENT, and then reads data from PLC_MSG, then sets REQUEST_RECEIVED = true.

4)       MES writes Orders data into MES_MSG.

5)       MES sets RESPONSE_SENT = true.

6)       PLC monitors RESPONSE_SENT, then reads data from MES_MSG, and then copy data into local Data Block, then sets RESPONSE_RECEIVED = true.

7)       MES monitors RESPONSE_RECEIVED, then resets all data.

8)       PLC resets all data.

 

We can see that, the whole process includes 2 handshaking, step 1-3 is the 1st handshaking, for sending request; step 4-8 is the 2nd handshaking, for sending data.

This method is much more complicated than method 3, but it’s still used a lot. Because the whole process will take several seconds, and PLC’s cycle time is only tens of ms, so the additional signals can be used as state marker, which helps to reduces anxiety of waiting, and the signals can also be used to debug.

 

Method 5: based on manufacturing process

At some stations, there will be multiple key process, such as in Engine Lift On station, engine will be Lift On, then assembly, then upload travel record.

So in a typical manufacturing process, PLC needs to exchange data with MES twice, 1st time for Order download, 2nd time for travel record upload, as referred as below diagram:



 

Detail process:

1)       Engine arrives, PLC sets ENGINE_ARRIVAL = true.

2)       PLC checks device and material, then sets STATION_READY = true.

3)       MES sets STATION_READY_RECEIVED = true.

4)       MES writes Orders into MES_DATA.

5)       MES sets MES_DATA_SENT = true.

6)       PLC copies MES_DATA into local Data Block, then sets MES_DATA_RECEIVED.

7)       MES resets all data.

8)       PLC starts assembly operations, then writes Engine number into ENGINE_SN.

9)       While assembly is completed, PLC sets PLC_COMPLETE = true.

10)   MES sets PLC_COMPLETE_RECEIVED = true.

11)   MES executes logic of travel record, and then sets MES_COMPLETE.

12)   PLC sets MES_COMPLETE_RECEIVED.

13)   MES resets all data.

14)   Engine readies to leave, PLC sets ENGINE_LEAVE = true.

15)   PLC resets all data.

 

We can see that, this method is very complicated, but it has these additional advantages:

1)       All key states are captured, and can be monitored via HMI.

2)       PLC states are referred to actual production status, can be used to track down while errors happen.

3)       When application errors happen, we can see which step of communication is executed to.

 

 

没有评论: