A day in the life of an MES consultant

This post is a part of a series that presents common challenges faced when implementing and maintaining an MES system. MES consultants share their own MES war stories with you.

Tuesday, June 10, 2014
A Day In The Life Of An MES Consultant Banner

Integration with factory automation

I have been implementing MES systems for the last 9 years and during this time I ran into a fair share of interface problems. Some of these issues were a result of a wrong setup, others were caused by the technology environment not being stable and yes, there are few issues for which I never managed to find the cause… This is when ‘Plans B and C’ come in handy.

To begin, let’s review the low level communicating methods between MES and shop floor automation. I have used the following:

  • RS 232
  • TCP/IP
  • IO Cards
  • Flat files

I remember a situation using RS232 protocol where during the initial configuration everything worked perfect.  MES was receiving a stream of framed data and was sending back acknowledgments in a proper format. This worked fine for few months, then all of a sudden MES acknowledgments were being interpreted incorrectly by the PLCs. Keep in mind that no changes were done either to the MES or the PLC since the initial configuration. After completing some investigative work, we discovered that different data types being set on the MES side and the PLC side was causing this issue. To put it in layman’s terms, some positive integers sent by MES were being converted to negative values by the PLC. Lesson learned; all data types need to be exactly the same on both the MES and PLC side when connecting to the machines using the RS232 protocol.

Fortunately, I was not the first to face such low level communication issues and since 1996, there is a standard developed to simplify and standardize the integration – OLE for Process Control (OPC). It has been nearly 20 years since its introduction and today there are many stable OPC solutions available. These solutions separate the interfacing between MES with machines into two steps: machine to OPC server and OPC server to MES. Most MES vendors provide OPC interfaces and, as a result, this became a mainstream approach. As with many standards, OPC also has some implementation drawbacks related to performance and reliability. Here is an example of an issue I encountered.

The problem was related to DCOM configuration on the OPC server. Even though, the MES system had proper DCOM drivers, communication could not be established. OPC vendor recommended an upgrade to the newest version of the OPC core components. That still did not fix the issue.  Out of desperation, I decided to reinstall the MES system and that did the trick. Apparently there was a conflict in shared dlls between the two. For the other plants, OPC was installed first, and MES followed and this approach worked flawlessly.

Another issue we faced with OPC was related to the fact that information from machines was sent to MES as a long stream of framed data refreshed every 250 milliseconds. The difficulty was to promptly analyze information and perform business logic only when one particular machine parameter was changed. With such refresh rate, we could not execute the business logic on the MES server because the response time was not sufficient. This was solved by using some specific functionality of MES connector for OPC to store historical and new values (extracted from the stream frame) in memory. Difference between previous and new values of the individual parameter was a trigger to process the rest of the information.

MES can also communicate with other systems through file exchange. Particularly older systems provide flat files interfacing methods, but this approach is very sensitive to changes inside the file structure. Once you make a change to the message format, to update the flat file parsing synchronously on the other end. Nowadays, XML is the preferable way of exchanging information between business systems (as compared to flat files or interface tables). However, XML is not common when interfacing with shop floor automation.

I have participated in a project where we communicated with machines using this uncommon approach – XML. MES had to track 3 level pallet structure (boxes in boxes on a pallet) where all items were uniquely identified. Data was collected by fast cameras reading product identifiers. The challenge was that different cameras were collecting different packaging IDs in parallel, and the overall volume of data was high. The chosen solution was to build a pallet structure in the automation software and send data to MES in form of XML when the pallet assembly was finalized.

I could probably think of few more use cases where I ran into MES-automation integration issues, but I will stop here. I hope you enjoyed this blog and am interested in learning about your experiences with integrating MES with shop floor automation.

About the author

Mariusz Jagusiak is responsible for solution delivery at Andea. He has over 10 years of professional experience working with MES systems. Mariusz is recognized as accountable, friendly and open minded individual. People value working with Mariusz due to his deep and broad knowledge of the MES space. He gained this experience by working on MES implementations in the Automotive, FMCG, Metals, and Packaging industries. Mariusz has graduated from Częstochowa University of Technology where he received his MSc in Computer Science and Software Engineering.